Skip to content
This repository
  • 7 commits
  • 16 files changed
  • 2 comments
  • 2 contributors
May 10, 2012
Christoph Olszowka Removed mistakenly included packaged gem file from source control eb6a231
Christoph Olszowka Added transparent compatibility with MultiJson legacy api for #132
Original source for the updated API was #122.

Also see sferik/rails@5e62670
for the source implementation of this.
c9120e6
Kevin Menard nirvdrum Grammar fix: it's "its." d059ce2
Christoph Olszowka Merge pull request #133 from nirvdrum/patch-1
Grammar fix: it's "its."
57f068b
Christoph Olszowka Added appraisal gem for testing against different gem dependency vers…
…ions.

Also updated developer instructions in README and test setup both for local
and CI.

This became neccessary to ensure that older versions of multi_json are
supported, see #132.
f29a61b
Christoph Olszowka Put the merge timeout cuke feature to sleep for 2 secs to ensure
it also passes on powerful machines...
4d9b91d
Christoph Olszowka Updated changelog, version bump adbd35a
8 .travis.yml
... ... @@ -1,6 +1,8 @@
1   -script: "bundle exec rake test && bundle exec cucumber features"
  1 +script:
  2 + - bundle
  3 + - rake appraisal:install
  4 + - rake appraisal
2 5 rvm:
3   -# - 1.8.6 # Has trouble with rake 0.9+ :(
4 6 - 1.8.7
5 7 - 1.9.2
6 8 - 1.9.3
@@ -10,4 +12,4 @@ rvm:
10 12 notifications:
11 13 email:
12 14 on_success: always
13   - on_failure: always
  15 + on_failure: always
8 Appraisals
... ... @@ -0,0 +1,8 @@
  1 +# See https://github.com/colszowka/simplecov/issues/132
  2 +appraise "multi_json-new" do
  3 + gem "multi_json", ">= 1.3.4"
  4 +end
  5 +
  6 +appraise "multi_json-legacy" do
  7 + gem "multi_json", "~> 1.0.0"
  8 +end
13 CHANGELOG.md
Source Rendered
... ... @@ -1,7 +1,18 @@
  1 +v0.6.3 (2012-05-10)
  2 +===================
  3 +
  4 + * Modified the API-changes for newer multi_json versions introduced with #122 and v0.6.2 so
  5 + they are backwards-compatible with older multi_json gems in order to avoid simplecov polluting
  6 + the multi_json minimum version requirement for entire applications.
  7 + See https://github.com/colszowka/simplecov/issues/132
  8 + * Added appraisal gem to the test setup in order to run the test suite against both 1.0 and 1.3
  9 + multi_json gems and ensure the above actually works :)
  10 +
1 11 v0.6.2 (2012-04-20)
2 12 ===================
  13 +**Note: Yanked 2012-05-10 because of backwards-incompatibilty of the updated multi_json api**
3 14
4   - * Updated to latest version of MultiJSON and it's new API (thanks to @sferik and @ronen).
  15 + * Updated to latest version of MultiJSON and its new API (thanks to @sferik and @ronen).
5 16 See https://github.com/colszowka/simplecov/pull/122
6 17
7 18 v0.6.1 (2012-02-24)
8 Gemfile
... ... @@ -1,9 +1,5 @@
1 1 source "http://rubygems.org"
2 2 gemspec
3 3
4   -# Use local copy of simplecov-html in development when checked out
5   -if File.directory?(File.dirname(__FILE__) + '/../simplecov-html')
6   - gem 'simplecov-html', :path => File.dirname(__FILE__) + '/../simplecov-html'
7   -else
8   - gem 'simplecov-html', :git => 'https://github.com/colszowka/simplecov-html'
9   -end
  4 +# Uncomment this to use local copy of simplecov-html in development when checked out
  5 +# gem 'simplecov-html', :path => File.dirname(__FILE__) + '/../simplecov-html'
14 README.md
Source Rendered
@@ -94,7 +94,7 @@ care what kind of framework it is running in, it just looks at what code is bein
94 94
95 95 ### Notes on specific frameworks and test utilities
96 96
97   -For some frameworks and testing tools there are quirks and problems you might want to know about if you want
  97 +For some frameworks and testing tools there are quirks and problems you might want to know about if you want
98 98 to use SimpleCov with them. Here's an overview of the known ones:
99 99
100 100 <table>
@@ -108,7 +108,7 @@ to use SimpleCov with them. Here's an overview of the known ones:
108 108 <code>test-unit</code> releases 2.4.3+ (Dec 11th, 2011) should have this problem resolved.
109 109 </td>
110 110 <td>
111   - <a href="https://github.com/colszowka/simplecov/issues/45">SimpleCov #45</a> &
  111 + <a href="https://github.com/colszowka/simplecov/issues/45">SimpleCov #45</a> &
112 112 <a href="https://github.com/test-unit/test-unit/pull/12">Test/Unit #12</a>
113 113 </td>
114 114 </tr>
@@ -452,12 +452,16 @@ SimpleCov is built in [Continuous Integration] on 1.8.7, ree, 1.9.2, 1.9.3.
452 452
453 453 To fetch & test the library for development, do:
454 454
455   - $ git clone https://github.com/colszowka/simplecov
  455 + $ git clone https://github.com/colszowka/simplecov.git
456 456 $ cd simplecov
457 457 $ bundle
458   - $ bundle exec rake test && bundle exec cucumber features
  458 + $ rake appraisal:install
  459 + $ rake appraisal
459 460
460   -If you wont to contribute, please:
  461 +For more information on the appraisal gem (for testing against multiple gem dependency versions), please see
  462 +https://github.com/thoughtbot/appraisal/
  463 +
  464 +If you want to contribute, please:
461 465
462 466 * Fork the project.
463 467 * Make your feature addition or bug fix.
4 Rakefile
... ... @@ -1,6 +1,8 @@
1 1 #!/usr/bin/env rake
2 2
3   -require 'bundler'
  3 +require 'rubygems'
  4 +require 'bundler/setup'
  5 +require 'appraisal'
4 6 Bundler::GemHelper.install_tasks
5 7
6 8 require 'rake/testtask'
3  features/config_merge_timeout.feature
@@ -32,7 +32,8 @@ Feature:
32 32 Then the report should be based upon:
33 33 | Unit Tests |
34 34
35   - When I open the coverage report generated with `bundle exec rspec spec`
  35 + When I wait for 2 seconds
  36 + And I open the coverage report generated with `bundle exec rspec spec`
36 37 Then the report should be based upon:
37 38 | RSpec |
38 39
5 features/step_definitions/simplecov_steps.rb
@@ -59,3 +59,8 @@
59 59 }
60 60 end
61 61
  62 +# This is neccessary to ensure timing-dependant tests like the merge timeout
  63 +# do not fail on powerful machines.
  64 +When /^I wait for (\d+) seconds$/ do |seconds|
  65 + sleep seconds.to_i
  66 +end
7 gemfiles/multi_json-legacy.gemfile
... ... @@ -0,0 +1,7 @@
  1 +# This file was generated by Appraisal
  2 +
  3 +source "http://rubygems.org"
  4 +
  5 +gem "multi_json", "~> 1.0.0"
  6 +
  7 +gemspec :path=>"../"
85 gemfiles/multi_json-legacy.gemfile.lock
... ... @@ -0,0 +1,85 @@
  1 +PATH
  2 + remote: /Users/colszowka/Projects/github/colszowka/simplecov
  3 + specs:
  4 + simplecov (0.6.2)
  5 + multi_json (~> 1.0)
  6 + simplecov-html (~> 0.5.3)
  7 +
  8 +GEM
  9 + remote: http://rubygems.org/
  10 + specs:
  11 + addressable (2.2.8)
  12 + appraisal (0.4.1)
  13 + bundler
  14 + rake
  15 + aruba (0.4.11)
  16 + childprocess (>= 0.2.3)
  17 + cucumber (>= 1.1.1)
  18 + ffi (>= 1.0.11)
  19 + rspec (>= 2.7.0)
  20 + builder (3.0.0)
  21 + capybara (1.1.2)
  22 + mime-types (>= 1.16)
  23 + nokogiri (>= 1.3.3)
  24 + rack (>= 1.0.0)
  25 + rack-test (>= 0.5.4)
  26 + selenium-webdriver (~> 2.0)
  27 + xpath (~> 0.1.4)
  28 + childprocess (0.3.2)
  29 + ffi (~> 1.0.6)
  30 + cucumber (1.2.0)
  31 + builder (>= 2.1.2)
  32 + diff-lcs (>= 1.1.3)
  33 + gherkin (~> 2.10.0)
  34 + json (>= 1.4.6)
  35 + diff-lcs (1.1.3)
  36 + ffi (1.0.11)
  37 + gherkin (2.10.0)
  38 + json (>= 1.4.6)
  39 + json (1.7.1)
  40 + libwebsocket (0.1.3)
  41 + addressable
  42 + mime-types (1.18)
  43 + multi_json (1.0.4)
  44 + nokogiri (1.5.2)
  45 + rack (1.4.1)
  46 + rack-test (0.6.1)
  47 + rack (>= 1.0)
  48 + rake (0.9.2.2)
  49 + rspec (2.10.0)
  50 + rspec-core (~> 2.10.0)
  51 + rspec-expectations (~> 2.10.0)
  52 + rspec-mocks (~> 2.10.0)
  53 + rspec-core (2.10.0)
  54 + rspec-expectations (2.10.0)
  55 + diff-lcs (~> 1.1.3)
  56 + rspec-mocks (2.10.1)
  57 + rubyzip (0.9.8)
  58 + selenium-webdriver (2.21.2)
  59 + childprocess (>= 0.2.5)
  60 + ffi (~> 1.0)
  61 + libwebsocket (~> 0.1.3)
  62 + multi_json (~> 1.0)
  63 + rubyzip
  64 + shoulda (3.0.1)
  65 + shoulda-context (~> 1.0.0)
  66 + shoulda-matchers (~> 1.0.0)
  67 + shoulda-context (1.0.0)
  68 + shoulda-matchers (1.0.0)
  69 + simplecov-html (0.5.3)
  70 + xpath (0.1.4)
  71 + nokogiri (~> 1.3)
  72 +
  73 +PLATFORMS
  74 + ruby
  75 +
  76 +DEPENDENCIES
  77 + appraisal
  78 + aruba
  79 + capybara
  80 + cucumber (>= 1.1.4)
  81 + multi_json (~> 1.0.0)
  82 + rake
  83 + rspec
  84 + shoulda
  85 + simplecov!
7 gemfiles/multi_json-new.gemfile
... ... @@ -0,0 +1,7 @@
  1 +# This file was generated by Appraisal
  2 +
  3 +source "http://rubygems.org"
  4 +
  5 +gem "multi_json", ">= 1.3.4"
  6 +
  7 +gemspec :path=>"../"
85 gemfiles/multi_json-new.gemfile.lock
... ... @@ -0,0 +1,85 @@
  1 +PATH
  2 + remote: /Users/colszowka/Projects/github/colszowka/simplecov
  3 + specs:
  4 + simplecov (0.6.2)
  5 + multi_json (~> 1.0)
  6 + simplecov-html (~> 0.5.3)
  7 +
  8 +GEM
  9 + remote: http://rubygems.org/
  10 + specs:
  11 + addressable (2.2.8)
  12 + appraisal (0.4.1)
  13 + bundler
  14 + rake
  15 + aruba (0.4.11)
  16 + childprocess (>= 0.2.3)
  17 + cucumber (>= 1.1.1)
  18 + ffi (>= 1.0.11)
  19 + rspec (>= 2.7.0)
  20 + builder (3.0.0)
  21 + capybara (1.1.2)
  22 + mime-types (>= 1.16)
  23 + nokogiri (>= 1.3.3)
  24 + rack (>= 1.0.0)
  25 + rack-test (>= 0.5.4)
  26 + selenium-webdriver (~> 2.0)
  27 + xpath (~> 0.1.4)
  28 + childprocess (0.3.2)
  29 + ffi (~> 1.0.6)
  30 + cucumber (1.2.0)
  31 + builder (>= 2.1.2)
  32 + diff-lcs (>= 1.1.3)
  33 + gherkin (~> 2.10.0)
  34 + json (>= 1.4.6)
  35 + diff-lcs (1.1.3)
  36 + ffi (1.0.11)
  37 + gherkin (2.10.0)
  38 + json (>= 1.4.6)
  39 + json (1.7.1)
  40 + libwebsocket (0.1.3)
  41 + addressable
  42 + mime-types (1.18)
  43 + multi_json (1.3.4)
  44 + nokogiri (1.5.2)
  45 + rack (1.4.1)
  46 + rack-test (0.6.1)
  47 + rack (>= 1.0)
  48 + rake (0.9.2.2)
  49 + rspec (2.10.0)
  50 + rspec-core (~> 2.10.0)
  51 + rspec-expectations (~> 2.10.0)
  52 + rspec-mocks (~> 2.10.0)
  53 + rspec-core (2.10.0)
  54 + rspec-expectations (2.10.0)
  55 + diff-lcs (~> 1.1.3)
  56 + rspec-mocks (2.10.1)
  57 + rubyzip (0.9.8)
  58 + selenium-webdriver (2.21.2)
  59 + childprocess (>= 0.2.5)
  60 + ffi (~> 1.0)
  61 + libwebsocket (~> 0.1.3)
  62 + multi_json (~> 1.0)
  63 + rubyzip
  64 + shoulda (3.0.1)
  65 + shoulda-context (~> 1.0.0)
  66 + shoulda-matchers (~> 1.0.0)
  67 + shoulda-context (1.0.0)
  68 + shoulda-matchers (1.0.0)
  69 + simplecov-html (0.5.3)
  70 + xpath (0.1.4)
  71 + nokogiri (~> 1.3)
  72 +
  73 +PLATFORMS
  74 + ruby
  75 +
  76 +DEPENDENCIES
  77 + appraisal
  78 + aruba
  79 + capybara
  80 + cucumber (>= 1.1.4)
  81 + multi_json (>= 1.3.4)
  82 + rake
  83 + rspec
  84 + shoulda
  85 + simplecov!
14 lib/simplecov/result_merger.rb
@@ -15,7 +15,12 @@ def resultset_path
15 15 # Loads the cached resultset from YAML and returns it as a Hash
16 16 def resultset
17 17 if stored_data
18   - MultiJson.load(stored_data)
  18 + # Detect and use available MultiJson API - it changed in v1.3
  19 + if MultiJson.respond_to?(:adapter)
  20 + MultiJson.load(stored_data)
  21 + else
  22 + MultiJson.decode(stored_data)
  23 + end
19 24 else
20 25 {}
21 26 end
@@ -71,7 +76,12 @@ def store_result(result)
71 76 if defined? ::JSON
72 77 f.puts JSON.pretty_generate(new_set)
73 78 else
74   - f.puts MultiJson.dump(new_set)
  79 + # Detect and use available MultiJson API - it changed in v1.3
  80 + if MultiJson.respond_to?(:adapter)
  81 + f.puts MultiJson.dump(new_set)
  82 + else
  83 + f.puts MultiJson.encode(new_set)
  84 + end
75 85 end
76 86 end
77 87 true
2  lib/simplecov/version.rb
... ... @@ -1,3 +1,3 @@
1 1 module SimpleCov
2   - VERSION = "0.6.2"
  2 + VERSION = "0.6.3"
3 3 end
BIN  simplecov-0.6.2.gem
Binary file not shown
3  simplecov.gemspec
@@ -12,10 +12,11 @@ Gem::Specification.new do |gem|
12 12 gem.description = %Q{Code coverage for Ruby 1.9 with a powerful configuration library and automatic merging of coverage across test suites}
13 13 gem.summary = gem.description
14 14
15   - gem.add_dependency 'multi_json', '~> 1.3'
  15 + gem.add_dependency 'multi_json', '~> 1.0'
16 16 gem.add_dependency 'simplecov-html', '~> 0.5.3'
17 17 gem.add_development_dependency 'aruba'
18 18 gem.add_development_dependency 'capybara'
  19 + gem.add_development_dependency 'appraisal'
19 20 gem.add_development_dependency 'cucumber', '>= 1.1.4'
20 21 gem.add_development_dependency 'rake'
21 22 gem.add_development_dependency 'rspec'

Showing you all comments on commits in this comparison.

Petteri Räty

I am not sure if this was the proper thing to do. If you use Bundler with Gemfile.lock then you have multi_json locked to a working version. Now it can mean a production deploy does not work because the gem has gone missing. I think gems should only be yanked for security and eat your hard drive level things.

Christoph Olszowka
Owner

True. Unyanked it and removed the notice from changelog. It should install without problems again.

Something went wrong with that request. Please try again.