Commit fc748531 authored by Eloy Durán's avatar Eloy Durán

Drop support for Ruby < 2.0.0

parent aba2ec9d
...@@ -38,9 +38,8 @@ Gem::Specification.new do |s| ...@@ -38,9 +38,8 @@ Gem::Specification.new do |s|
s.add_runtime_dependency 'colored', '~> 1.2' s.add_runtime_dependency 'colored', '~> 1.2'
s.add_runtime_dependency 'escape', '~> 0.0.4' s.add_runtime_dependency 'escape', '~> 0.0.4'
s.add_runtime_dependency 'json_pure', '~> 1.8'
s.add_runtime_dependency 'open4', '~> 1.3' s.add_runtime_dependency 'open4', '~> 1.3'
s.add_runtime_dependency 'activesupport', '>= 3.2.15', '< 4' s.add_runtime_dependency 'activesupport', '>= 3.2.15'
s.add_runtime_dependency 'nap', '~> 0.8' s.add_runtime_dependency 'nap', '~> 0.8'
s.add_development_dependency 'bundler', '~> 1.3' s.add_development_dependency 'bundler', '~> 1.3'
......
...@@ -63,20 +63,15 @@ module Pod ...@@ -63,20 +63,15 @@ module Pod
# !@group Private methods # !@group Private methods
# Returns the sanitized text with UTF-8 eliminating invalid characters if # Returns the sanitized text with UTF-8 invalid characters eliminated.
# Ruby version >=1.9 else will return the text.
# #
# @param [String] text # @param [String] text
# the text we want to sanitize. # the text we want to sanitize.
# #
# @return [String] The sanitized text if Ruby >=1.9 else text. # @return [String] The sanitized UTF-8 text.
# #
def sanitize_encoding(text) def sanitize_encoding(text)
if RUBY_VERSION >= '1.9'
text.encode('UTF-8', :invalid => :replace, :undef => :replace, :replace => '') text.encode('UTF-8', :invalid => :replace, :undef => :replace, :replace => '')
else
text
end
end end
#-----------------------------------------------------------------------# #-----------------------------------------------------------------------#
......
...@@ -27,7 +27,6 @@ describe Pod::Generator::Plist do ...@@ -27,7 +27,6 @@ describe Pod::Generator::Plist do
} }
end end
if RUBY_VERSION >= '1.9'
it 'returns a correctly sanitized license hash for each pod' do it 'returns a correctly sanitized license hash for each pod' do
license_text = 'Copyright © 2013–2014 Boris Bügling' license_text = 'Copyright © 2013–2014 Boris Bügling'
@generator.stubs(:license_text).returns(license_text) @generator.stubs(:license_text).returns(license_text)
...@@ -37,7 +36,6 @@ describe Pod::Generator::Plist do ...@@ -37,7 +36,6 @@ describe Pod::Generator::Plist do
:FooterText => license_text, :FooterText => license_text,
} }
end end
end
it 'returns nil for a pod with no license text' do it 'returns nil for a pod with no license text' do
@generator.expects(:license_text).returns(nil) @generator.expects(:license_text).returns(nil)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment