Skip to content

Commit

Permalink
Use new MultiJson API
Browse files Browse the repository at this point in the history
  • Loading branch information
sferik committed Apr 18, 2012
1 parent 44d8115 commit b496fd3
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions lib/simplecov/result_merger.rb
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ def resultset_path
# Loads the cached resultset from YAML and returns it as a Hash
def resultset
if stored_data
MultiJson.decode(stored_data)
MultiJson.load(stored_data)
else
{}
end
Expand Down Expand Up @@ -71,7 +71,7 @@ def store_result(result)
if defined? ::JSON
f.puts JSON.pretty_generate(new_set)
else
f.puts MultiJson.encode(new_set)
f.puts MultiJson.dump(new_set)
end
end
true
Expand Down
2 changes: 1 addition & 1 deletion simplecov.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ Gem::Specification.new do |gem|
gem.description = %Q{Code coverage for Ruby 1.9 with a powerful configuration library and automatic merging of coverage across test suites}
gem.summary = gem.description

gem.add_dependency 'multi_json', '~> 1.0'
gem.add_dependency 'multi_json', '~> 1.3'
gem.add_dependency 'simplecov-html', '~> 0.5.3'
gem.add_development_dependency 'aruba'
gem.add_development_dependency 'capybara'
Expand Down

1 comment on commit b496fd3

@nirvdrum
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please use feature detection and not rely on newer API. This is roughly akin to just going to multi_json 2.0 in a simplecov point release. As a transitive dependency, it affects the entire dependency graph. E.g., updating simplecov now would require a project to update resque or twitter, which makes little sense.

Please sign in to comment.