coveralls 0.6.2 → 0.6.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/coveralls-ruby.gemspec +1 -1
- data/lib/coveralls.rb +13 -0
- data/lib/coveralls/rake/task.rb +20 -0
- data/lib/coveralls/version.rb +1 -1
- data/spec/coveralls/coveralls_spec.rb +20 -0
- metadata +10 -3
data/coveralls-ruby.gemspec
CHANGED
@@ -6,7 +6,7 @@ Gem::Specification.new do |gem|
|
|
6
6
|
gem.email = ["nick@lemurheavy.com", "supapuerco@gmail.com"]
|
7
7
|
gem.description = "A Ruby implementation of the Coveralls API."
|
8
8
|
gem.summary = "A Ruby implementation of the Coveralls API."
|
9
|
-
gem.homepage = "
|
9
|
+
gem.homepage = "https://coveralls.io"
|
10
10
|
|
11
11
|
gem.files = `git ls-files`.split($\)
|
12
12
|
gem.executables = gem.files.grep(%r{^bin/}).map{ |f| File.basename(f) }
|
data/lib/coveralls.rb
CHANGED
@@ -15,6 +15,19 @@ module Coveralls
|
|
15
15
|
start! simplecov_setting, &block
|
16
16
|
end
|
17
17
|
|
18
|
+
def wear_merged!(simplecov_setting=nil, &block)
|
19
|
+
require 'simplecov'
|
20
|
+
@@adapter = :simplecov
|
21
|
+
::SimpleCov.formatter = nil
|
22
|
+
start! simplecov_setting, &block
|
23
|
+
end
|
24
|
+
|
25
|
+
def push!
|
26
|
+
require 'simplecov'
|
27
|
+
result = ::SimpleCov::ResultMerger.merged_result
|
28
|
+
Coveralls::SimpleCov::Formatter.new.format result
|
29
|
+
end
|
30
|
+
|
18
31
|
def setup!
|
19
32
|
# Try to load up SimpleCov.
|
20
33
|
@@adapter = nil
|
@@ -0,0 +1,20 @@
|
|
1
|
+
require 'rake'
|
2
|
+
require 'rake/tasklib'
|
3
|
+
require 'json'
|
4
|
+
|
5
|
+
module Coveralls
|
6
|
+
class RakeTask < ::Rake::TaskLib
|
7
|
+
include ::Rake::DSL if defined?(::Rake::DSL)
|
8
|
+
|
9
|
+
def initialize(*args, &task_block)
|
10
|
+
namespace :coveralls do
|
11
|
+
desc "Push latest coverage results to Coveralls.io"
|
12
|
+
task :push do
|
13
|
+
require 'coveralls'
|
14
|
+
Coveralls.push!
|
15
|
+
end
|
16
|
+
end
|
17
|
+
end # initialize
|
18
|
+
|
19
|
+
end # class
|
20
|
+
end # module
|
data/lib/coveralls/version.rb
CHANGED
@@ -42,6 +42,26 @@ describe Coveralls do
|
|
42
42
|
end
|
43
43
|
end
|
44
44
|
|
45
|
+
describe "#wear_merged!" do
|
46
|
+
it "sets formatter to nil" do
|
47
|
+
::SimpleCov.should_receive(:start).with
|
48
|
+
silence do
|
49
|
+
subject.wear_merged!
|
50
|
+
end
|
51
|
+
::SimpleCov.formatter.should be_nil
|
52
|
+
end
|
53
|
+
end
|
54
|
+
|
55
|
+
describe "#push!" do
|
56
|
+
it "sends existings test results" do
|
57
|
+
result = false
|
58
|
+
silence do
|
59
|
+
result = subject.push!
|
60
|
+
end
|
61
|
+
result.should be_true
|
62
|
+
end
|
63
|
+
end
|
64
|
+
|
45
65
|
describe "#setup!" do
|
46
66
|
it "sets SimpleCov adapter" do
|
47
67
|
SimpleCovTmp = SimpleCov
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: coveralls
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.6.
|
4
|
+
version: 0.6.3
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -10,7 +10,7 @@ authors:
|
|
10
10
|
autorequire:
|
11
11
|
bindir: bin
|
12
12
|
cert_chain: []
|
13
|
-
date: 2013-03-
|
13
|
+
date: 2013-03-19 00:00:00.000000000 Z
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|
16
16
|
name: rest-client
|
@@ -179,6 +179,7 @@ files:
|
|
179
179
|
- lib/coveralls/api.rb
|
180
180
|
- lib/coveralls/command.rb
|
181
181
|
- lib/coveralls/configuration.rb
|
182
|
+
- lib/coveralls/rake/task.rb
|
182
183
|
- lib/coveralls/simplecov.rb
|
183
184
|
- lib/coveralls/version.rb
|
184
185
|
- spec/coveralls/configuration_spec.rb
|
@@ -192,7 +193,7 @@ files:
|
|
192
193
|
- spec/coveralls/fixtures/sample.rb
|
193
194
|
- spec/coveralls/simplecov_spec.rb
|
194
195
|
- spec/spec_helper.rb
|
195
|
-
homepage:
|
196
|
+
homepage: https://coveralls.io
|
196
197
|
licenses: []
|
197
198
|
post_install_message:
|
198
199
|
rdoc_options: []
|
@@ -204,12 +205,18 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
204
205
|
- - ! '>='
|
205
206
|
- !ruby/object:Gem::Version
|
206
207
|
version: '0'
|
208
|
+
segments:
|
209
|
+
- 0
|
210
|
+
hash: 1162132818489506396
|
207
211
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
208
212
|
none: false
|
209
213
|
requirements:
|
210
214
|
- - ! '>='
|
211
215
|
- !ruby/object:Gem::Version
|
212
216
|
version: '0'
|
217
|
+
segments:
|
218
|
+
- 0
|
219
|
+
hash: 1162132818489506396
|
213
220
|
requirements: []
|
214
221
|
rubyforge_project:
|
215
222
|
rubygems_version: 1.8.23
|