Skip to content

Commit

Permalink
Removed the gem dev dependencies from the gemspec to the gemfile as s…
Browse files Browse the repository at this point in the history
…ome dependencies required specific ruby engines. Also changed a RUBY_VERSION reference to RUBY_ENGINE which was left over from the previous commit
  • Loading branch information
joshk committed Apr 18, 2011
1 parent 485b9b7 commit a43c433
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 15 deletions.
6 changes: 5 additions & 1 deletion Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@ source "http://rubygems.org"

gemspec

gem 'rake', '~> 0.8'
gem 'rspec', '~> 2.5'
gem 'rcov', '~> 0.9', :platforms => [:mri, :jruby]

gem 'json', '~> 1.4', :require => nil
gem 'json_pure', '~> 1.4', :require => nil
gem 'yajl-ruby', '~> 0.7', :require => nil, :platforms => :ruby
gem 'yajl-ruby', '~> 0.7', :require => nil, :platforms => :ruby
13 changes: 0 additions & 13 deletions multi_json.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -21,18 +21,5 @@ Gem::Specification.new do |s|
s.test_files = `git ls-files -- {test,spec,features}/*`.split("\n")

s.require_paths = ["lib"]

s.add_development_dependency("rake", "~> 0.8")
s.add_development_dependency("rspec", "~> 2.0")
s.add_development_dependency("json", "~> 1.4")
s.add_development_dependency("json_pure", "~> 1.4")

unless RUBY_ENGINE == "rbx"
s.add_development_dependency("rcov", "~> 0.9")
end

unless RUBY_ENGINE == "jruby"
s.add_development_dependency("yajl-ruby", "~> 0.7")
end
end

2 changes: 1 addition & 1 deletion spec/multi_json_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ def self.encode(string)
context 'engines' do
it 'should default to the best available gem' do
# the yajl-ruby gem does not work on jruby, so the best engine is the JsonGem engine
if ENV['RUBY_VERSION'].match(/^jruby-/)
if jruby?
require 'json'
MultiJson.engine.name.should == 'MultiJson::Engines::JsonGem'
else
Expand Down
4 changes: 4 additions & 0 deletions spec/spec_helper.rb
Original file line number Diff line number Diff line change
Expand Up @@ -9,3 +9,7 @@

$VERBOSE = true
require 'multi_json'

def jruby?
defined?(RUBY_ENGINE) && RUBY_ENGINE == "jruby"
end

0 comments on commit a43c433

Please sign in to comment.