simplecov 0.6.2 → 0.6.3

Sign up to get free protection for your applications and to get access to all the features.
data/.travis.yml CHANGED
@@ -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
data/Appraisals ADDED
@@ -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
data/CHANGELOG.md CHANGED
@@ -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)
data/Gemfile CHANGED
@@ -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'
data/README.md CHANGED
@@ -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.
data/Rakefile CHANGED
@@ -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'
@@ -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
 
@@ -59,3 +59,8 @@ Then /^the report should be based upon:$/ do |table|
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
@@ -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=>"../"
@@ -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!
@@ -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=>"../"
@@ -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!
@@ -15,7 +15,12 @@ module SimpleCov::ResultMerger
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 @@ module SimpleCov::ResultMerger
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
@@ -1,3 +1,3 @@
1
1
  module SimpleCov
2
- VERSION = "0.6.2"
2
+ VERSION = "0.6.3"
3
3
  end
data/simplecov.gemspec CHANGED
@@ -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'
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: simplecov
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.6.2
4
+ version: 0.6.3
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,22 +9,22 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2012-04-20 00:00:00.000000000 Z
12
+ date: 2012-05-10 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: multi_json
16
- requirement: &70158866626880 !ruby/object:Gem::Requirement
16
+ requirement: &70307285759020 !ruby/object:Gem::Requirement
17
17
  none: false
18
18
  requirements:
19
19
  - - ~>
20
20
  - !ruby/object:Gem::Version
21
- version: '1.3'
21
+ version: '1.0'
22
22
  type: :runtime
23
23
  prerelease: false
24
- version_requirements: *70158866626880
24
+ version_requirements: *70307285759020
25
25
  - !ruby/object:Gem::Dependency
26
26
  name: simplecov-html
27
- requirement: &70158866626100 !ruby/object:Gem::Requirement
27
+ requirement: &70307285773100 !ruby/object:Gem::Requirement
28
28
  none: false
29
29
  requirements:
30
30
  - - ~>
@@ -32,10 +32,10 @@ dependencies:
32
32
  version: 0.5.3
33
33
  type: :runtime
34
34
  prerelease: false
35
- version_requirements: *70158866626100
35
+ version_requirements: *70307285773100
36
36
  - !ruby/object:Gem::Dependency
37
37
  name: aruba
38
- requirement: &70158866625580 !ruby/object:Gem::Requirement
38
+ requirement: &70307285790800 !ruby/object:Gem::Requirement
39
39
  none: false
40
40
  requirements:
41
41
  - - ! '>='
@@ -43,10 +43,10 @@ dependencies:
43
43
  version: '0'
44
44
  type: :development
45
45
  prerelease: false
46
- version_requirements: *70158866625580
46
+ version_requirements: *70307285790800
47
47
  - !ruby/object:Gem::Dependency
48
48
  name: capybara
49
- requirement: &70158866624800 !ruby/object:Gem::Requirement
49
+ requirement: &70307285820920 !ruby/object:Gem::Requirement
50
50
  none: false
51
51
  requirements:
52
52
  - - ! '>='
@@ -54,10 +54,21 @@ dependencies:
54
54
  version: '0'
55
55
  type: :development
56
56
  prerelease: false
57
- version_requirements: *70158866624800
57
+ version_requirements: *70307285820920
58
+ - !ruby/object:Gem::Dependency
59
+ name: appraisal
60
+ requirement: &70307285819640 !ruby/object:Gem::Requirement
61
+ none: false
62
+ requirements:
63
+ - - ! '>='
64
+ - !ruby/object:Gem::Version
65
+ version: '0'
66
+ type: :development
67
+ prerelease: false
68
+ version_requirements: *70307285819640
58
69
  - !ruby/object:Gem::Dependency
59
70
  name: cucumber
60
- requirement: &70158866617760 !ruby/object:Gem::Requirement
71
+ requirement: &70307285818160 !ruby/object:Gem::Requirement
61
72
  none: false
62
73
  requirements:
63
74
  - - ! '>='
@@ -65,10 +76,10 @@ dependencies:
65
76
  version: 1.1.4
66
77
  type: :development
67
78
  prerelease: false
68
- version_requirements: *70158866617760
79
+ version_requirements: *70307285818160
69
80
  - !ruby/object:Gem::Dependency
70
81
  name: rake
71
- requirement: &70158866616920 !ruby/object:Gem::Requirement
82
+ requirement: &70307285815960 !ruby/object:Gem::Requirement
72
83
  none: false
73
84
  requirements:
74
85
  - - ! '>='
@@ -76,10 +87,10 @@ dependencies:
76
87
  version: '0'
77
88
  type: :development
78
89
  prerelease: false
79
- version_requirements: *70158866616920
90
+ version_requirements: *70307285815960
80
91
  - !ruby/object:Gem::Dependency
81
92
  name: rspec
82
- requirement: &70158866616220 !ruby/object:Gem::Requirement
93
+ requirement: &70307285831700 !ruby/object:Gem::Requirement
83
94
  none: false
84
95
  requirements:
85
96
  - - ! '>='
@@ -87,10 +98,10 @@ dependencies:
87
98
  version: '0'
88
99
  type: :development
89
100
  prerelease: false
90
- version_requirements: *70158866616220
101
+ version_requirements: *70307285831700
91
102
  - !ruby/object:Gem::Dependency
92
103
  name: shoulda
93
- requirement: &70158866614920 !ruby/object:Gem::Requirement
104
+ requirement: &70307285827880 !ruby/object:Gem::Requirement
94
105
  none: false
95
106
  requirements:
96
107
  - - ! '>='
@@ -98,7 +109,7 @@ dependencies:
98
109
  version: '0'
99
110
  type: :development
100
111
  prerelease: false
101
- version_requirements: *70158866614920
112
+ version_requirements: *70307285827880
102
113
  description: Code coverage for Ruby 1.9 with a powerful configuration library and
103
114
  automatic merging of coverage across test suites
104
115
  email:
@@ -110,6 +121,7 @@ files:
110
121
  - .gitignore
111
122
  - .rvmrc
112
123
  - .travis.yml
124
+ - Appraisals
113
125
  - CHANGELOG.md
114
126
  - Gemfile
115
127
  - LICENSE
@@ -145,6 +157,10 @@ files:
145
157
  - features/test_unit_groups_using_filter_class.feature
146
158
  - features/test_unit_without_simplecov.feature
147
159
  - features/unicode_compatiblity.feature
160
+ - gemfiles/multi_json-legacy.gemfile
161
+ - gemfiles/multi_json-legacy.gemfile.lock
162
+ - gemfiles/multi_json-new.gemfile
163
+ - gemfiles/multi_json-new.gemfile.lock
148
164
  - lib/simplecov.rb
149
165
  - lib/simplecov/adapters.rb
150
166
  - lib/simplecov/command_guesser.rb
@@ -161,7 +177,6 @@ files:
161
177
  - lib/simplecov/result_merger.rb
162
178
  - lib/simplecov/source_file.rb
163
179
  - lib/simplecov/version.rb
164
- - simplecov-0.6.2.gem
165
180
  - simplecov.gemspec
166
181
  - test/faked_project/Gemfile
167
182
  - test/faked_project/Rakefile
@@ -216,12 +231,18 @@ required_ruby_version: !ruby/object:Gem::Requirement
216
231
  - - ! '>='
217
232
  - !ruby/object:Gem::Version
218
233
  version: '0'
234
+ segments:
235
+ - 0
236
+ hash: 4064525278113991582
219
237
  required_rubygems_version: !ruby/object:Gem::Requirement
220
238
  none: false
221
239
  requirements:
222
240
  - - ! '>='
223
241
  - !ruby/object:Gem::Version
224
242
  version: '0'
243
+ segments:
244
+ - 0
245
+ hash: 4064525278113991582
225
246
  requirements: []
226
247
  rubyforge_project:
227
248
  rubygems_version: 1.8.16
@@ -300,4 +321,3 @@ test_files:
300
321
  - test/test_return_codes.rb
301
322
  - test/test_source_file.rb
302
323
  - test/test_source_file_line.rb
303
- has_rdoc: