diff options
-rw-r--r-- | .travis.yml | 1 | ||||
-rw-r--r-- | Gemfile | 2 | ||||
-rw-r--r-- | Rakefile | 12 | ||||
-rw-r--r-- | json.gemspec | 6 | ||||
-rw-r--r-- | json_pure.gemspec | 6 |
5 files changed, 16 insertions, 11 deletions
diff --git a/.travis.yml b/.travis.yml index e77e37b..f80253b 100644 --- a/.travis.yml +++ b/.travis.yml @@ -3,6 +3,7 @@ bundler_args: --binstubs # Specify which ruby versions you wish to run your tests on, each version will be used rvm: + - 1.8.6 - 1.8.7 - 1.9.2 - 1.9.3 @@ -12,5 +12,5 @@ group :development, :test do end group :test do - gem 'test-unit', '2.4.7', :platform => :mri_19 + gem 'test-unit', '~> 2.5', :platform => :mri_19 end @@ -23,6 +23,10 @@ class UndocumentedTestTask < Rake::TestTask def desc(*) end end +def skip_sdoc(src) + src.gsub(/^.*sdoc.*/) { |s| s + ' if RUBY_VERSION > "1.8.6"' } +end + MAKE = ENV['MAKE'] || %w[gmake make].find { |c| system(c, '-v') } BUNDLE = ENV['BUNDLE'] || %w[bundle].find { |c| system(c, '-v') } PKG_NAME = 'json' @@ -84,7 +88,7 @@ if defined?(Gem) and defined?(Gem::PackageTask) s.require_path = 'lib' s.add_development_dependency 'permutation' - s.add_development_dependency 'sdoc' + s.add_development_dependency 'sdoc', '~> 0.3.16' s.add_development_dependency 'rake', '~>0.9.2' s.extra_rdoc_files << 'README.rdoc' @@ -101,7 +105,7 @@ if defined?(Gem) and defined?(Gem::PackageTask) desc 'Creates a json_pure.gemspec file' task :gemspec_pure => :version do File.open('json_pure.gemspec', 'w') do |gemspec| - gemspec.write spec_pure.to_ruby + gemspec.write skip_sdoc(spec_pure.to_ruby) end end @@ -122,7 +126,7 @@ if defined?(Gem) and defined?(Gem::PackageTask) s.require_path = 'lib' s.add_development_dependency 'permutation' - s.add_development_dependency 'sdoc' + s.add_development_dependency 'sdoc', '~> 0.3.16' s.extra_rdoc_files << 'README.rdoc' s.rdoc_options << @@ -138,7 +142,7 @@ if defined?(Gem) and defined?(Gem::PackageTask) desc 'Creates a json.gemspec file' task :gemspec_ext => :version do File.open('json.gemspec', 'w') do |gemspec| - gemspec.write spec_ext.to_ruby + gemspec.write skip_sdoc(spec_ext.to_ruby) end end diff --git a/json.gemspec b/json.gemspec index b6d8026..7578698 100644 --- a/json.gemspec +++ b/json.gemspec @@ -25,13 +25,13 @@ Gem::Specification.new do |s| if Gem::Version.new(Gem::VERSION) >= Gem::Version.new('1.2.0') then s.add_development_dependency(%q<permutation>, [">= 0"]) - s.add_development_dependency(%q<sdoc>, [">= 0"]) + s.add_development_dependency(%q<sdoc>, ["~> 0.3.16"]) if RUBY_VERSION > "1.8.6" else s.add_dependency(%q<permutation>, [">= 0"]) - s.add_dependency(%q<sdoc>, [">= 0"]) + s.add_dependency(%q<sdoc>, ["~> 0.3.16"]) if RUBY_VERSION > "1.8.6" end else s.add_dependency(%q<permutation>, [">= 0"]) - s.add_dependency(%q<sdoc>, [">= 0"]) + s.add_dependency(%q<sdoc>, ["~> 0.3.16"]) if RUBY_VERSION > "1.8.6" end end diff --git a/json_pure.gemspec b/json_pure.gemspec index f18804d..172a348 100644 --- a/json_pure.gemspec +++ b/json_pure.gemspec @@ -24,16 +24,16 @@ Gem::Specification.new do |s| if Gem::Version.new(Gem::VERSION) >= Gem::Version.new('1.2.0') then s.add_development_dependency(%q<permutation>, [">= 0"]) - s.add_development_dependency(%q<sdoc>, [">= 0"]) + s.add_development_dependency(%q<sdoc>, ["~> 0.3.16"]) if RUBY_VERSION > "1.8.6" s.add_development_dependency(%q<rake>, ["~> 0.9.2"]) else s.add_dependency(%q<permutation>, [">= 0"]) - s.add_dependency(%q<sdoc>, [">= 0"]) + s.add_dependency(%q<sdoc>, ["~> 0.3.16"]) if RUBY_VERSION > "1.8.6" s.add_dependency(%q<rake>, ["~> 0.9.2"]) end else s.add_dependency(%q<permutation>, [">= 0"]) - s.add_dependency(%q<sdoc>, [">= 0"]) + s.add_dependency(%q<sdoc>, ["~> 0.3.16"]) if RUBY_VERSION > "1.8.6" s.add_dependency(%q<rake>, ["~> 0.9.2"]) end end |