coveralls 0.8.0 → 0.8.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.travis.yml +11 -4
- data/Gemfile +7 -3
- data/coveralls-ruby.gemspec +5 -6
- data/lib/coveralls/api.rb +56 -57
- data/lib/coveralls/command.rb +2 -2
- data/lib/coveralls/configuration.rb +3 -3
- data/lib/coveralls/version.rb +1 -1
- metadata +11 -54
- data/.ruby-version +0 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 5fea86065d88efec3c68e906abf0f1e383177e82
|
4
|
+
data.tar.gz: 18143abaa165302d29ceb9e7e8fc6a589874e219
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 09117345cc8b17467809f6f11c4297930caaaa1c6ca6102ddfe1bde3e7dbfc24566bd701176f0c042ae96c68b3cfbc57dd000fe8facf2b0ba52733d16028df75
|
7
|
+
data.tar.gz: 82f29ba0ce528d6714e9c5249040ee925923eb613a802385dd29c33cbd4520ade16daca7b24253fc891c7751fda1c2157b8d29f0de102fb5ff5c8af561ef0481
|
data/.travis.yml
CHANGED
@@ -1,13 +1,20 @@
|
|
1
1
|
language: ruby
|
2
|
+
|
3
|
+
cache: bundler
|
4
|
+
|
5
|
+
sudo: false
|
6
|
+
|
2
7
|
rvm:
|
3
|
-
- jruby-19mode
|
4
8
|
- 1.8.7
|
5
|
-
- 1.9.2
|
6
9
|
- 1.9.3
|
7
10
|
- 2.0.0
|
8
|
-
- 2.1
|
9
|
-
- 2.2
|
11
|
+
- 2.1
|
12
|
+
- 2.2
|
10
13
|
- ruby-head
|
14
|
+
- jruby
|
15
|
+
|
11
16
|
matrix:
|
12
17
|
allow_failures:
|
13
18
|
- rvm: ruby-head
|
19
|
+
- rvm: jruby
|
20
|
+
fast_finish: true
|
data/Gemfile
CHANGED
@@ -3,6 +3,13 @@ source 'https://rubygems.org'
|
|
3
3
|
# Specify your gem's dependencies in coveralls-ruby.gemspec
|
4
4
|
gemspec
|
5
5
|
|
6
|
+
gem 'rake', '>= 10.4'
|
7
|
+
gem 'rspec', '>= 3.2'
|
8
|
+
gem 'simplecov', :require => false
|
9
|
+
gem 'truthy', '>= 1'
|
10
|
+
gem 'vcr', '>= 2.9'
|
11
|
+
gem 'webmock', '>= 1.20'
|
12
|
+
|
6
13
|
platforms :ruby_18 do
|
7
14
|
gem 'mime-types', '~> 1.25'
|
8
15
|
gem 'rest-client', '~> 1.6.0'
|
@@ -12,9 +19,6 @@ platforms :jruby do
|
|
12
19
|
gem 'jruby-openssl', '~> 0.9.5'
|
13
20
|
end
|
14
21
|
|
15
|
-
gem 'simplecov', :require => false
|
16
|
-
gem 'truthy'
|
17
|
-
|
18
22
|
platform :rbx do
|
19
23
|
gem 'rubysl', '~> 2.0'
|
20
24
|
gem 'json'
|
data/coveralls-ruby.gemspec
CHANGED
@@ -17,14 +17,13 @@ Gem::Specification.new do |gem|
|
|
17
17
|
gem.require_paths = ["lib"]
|
18
18
|
gem.version = Coveralls::VERSION
|
19
19
|
|
20
|
-
gem.
|
20
|
+
gem.required_ruby_version = '>= 1.8.7'
|
21
|
+
|
22
|
+
gem.add_dependency 'json', '~> 1.8'
|
21
23
|
gem.add_dependency 'rest-client', '>= 1.6.8', '< 2'
|
22
|
-
gem.add_dependency 'simplecov', '~> 0.
|
24
|
+
gem.add_dependency 'simplecov', '~> 0.10.0'
|
23
25
|
gem.add_dependency 'term-ansicolor', '~> 1.3'
|
24
26
|
gem.add_dependency 'thor', '~> 0.19.1'
|
25
27
|
|
26
|
-
gem.add_development_dependency '
|
27
|
-
gem.add_development_dependency 'rake', '~> 10.4'
|
28
|
-
gem.add_development_dependency 'webmock', '~> 1.20'
|
29
|
-
gem.add_development_dependency 'vcr', '~> 2.9'
|
28
|
+
gem.add_development_dependency 'bundler', '~> 1.7'
|
30
29
|
end
|
data/lib/coveralls/api.rb
CHANGED
@@ -1,74 +1,73 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
|
4
|
-
require 'multi_json'
|
5
|
-
require 'rest_client'
|
1
|
+
require 'json'
|
2
|
+
require 'rest_client'
|
6
3
|
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
4
|
+
module Coveralls
|
5
|
+
class API
|
6
|
+
if ENV['COVERALLS_ENDPOINT']
|
7
|
+
API_HOST = ENV['COVERALLS_ENDPOINT']
|
8
|
+
API_DOMAIN = ENV['COVERALLS_ENDPOINT']
|
9
|
+
else
|
10
|
+
API_HOST = ENV['COVERALLS_DEVELOPMENT'] ? "localhost:3000" : "coveralls.io"
|
11
|
+
API_PROTOCOL = ENV['COVERALLS_DEVELOPMENT'] ? "http" : "https"
|
12
|
+
API_DOMAIN = "#{API_PROTOCOL}://#{API_HOST}"
|
13
|
+
end
|
15
14
|
|
16
|
-
|
15
|
+
API_BASE = "#{API_DOMAIN}/api/v1"
|
17
16
|
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
Coveralls::Output.puts("#{
|
22
|
-
|
17
|
+
def self.post_json(endpoint, hash)
|
18
|
+
disable_net_blockers!
|
19
|
+
url = endpoint_to_url(endpoint)
|
20
|
+
Coveralls::Output.puts("#{ JSON.pretty_generate(hash) }", :color => "green") if ENV['COVERALLS_DEBUG']
|
21
|
+
hash = apified_hash hash
|
23
22
|
Coveralls::Output.puts("[Coveralls] Submitting to #{API_BASE}", :color => "cyan")
|
24
|
-
|
25
|
-
|
23
|
+
response = RestClient::Request.execute(:method => :post, :url => url, :payload => { :json_file => hash_to_file(hash) }, :ssl_version => 'SSLv23')
|
24
|
+
response_hash = JSON.load(response.to_str)
|
26
25
|
Coveralls::Output.puts("[Coveralls] #{ response_hash['message'] }", :color => "cyan")
|
27
|
-
|
26
|
+
if response_hash['message']
|
28
27
|
Coveralls::Output.puts("[Coveralls] #{ Coveralls::Output.format(response_hash['url'], :color => "underline") }", :color => "cyan")
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
28
|
+
end
|
29
|
+
rescue RestClient::ServiceUnavailable
|
30
|
+
Coveralls::Output.puts("[Coveralls] API timeout occured, but data should still be processed", :color => "red")
|
31
|
+
rescue RestClient::InternalServerError
|
33
32
|
Coveralls::Output.puts("[Coveralls] API internal error occured, we're on it!", :color => "red")
|
34
|
-
|
33
|
+
end
|
35
34
|
|
36
|
-
|
35
|
+
private
|
37
36
|
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
37
|
+
def self.disable_net_blockers!
|
38
|
+
if defined?(WebMock) &&
|
39
|
+
allow = WebMock::Config.instance.allow || []
|
40
|
+
WebMock::Config.instance.allow = [*allow].push API_HOST
|
41
|
+
end
|
43
42
|
|
44
|
-
|
45
|
-
|
43
|
+
if defined?(VCR)
|
44
|
+
VCR.send(VCR.version.major < 2 ? :config : :configure) do |c|
|
46
45
|
c.ignore_hosts API_HOST
|
47
|
-
|
48
|
-
|
49
|
-
|
46
|
+
end
|
47
|
+
end
|
48
|
+
end
|
50
49
|
|
51
|
-
|
52
|
-
|
53
|
-
|
50
|
+
def self.endpoint_to_url(endpoint)
|
51
|
+
"#{API_BASE}/#{endpoint}"
|
52
|
+
end
|
54
53
|
|
55
|
-
|
56
|
-
|
57
|
-
|
58
|
-
|
59
|
-
|
60
|
-
|
61
|
-
|
62
|
-
|
54
|
+
def self.hash_to_file(hash)
|
55
|
+
file = nil
|
56
|
+
Tempfile.open(['coveralls-upload', 'json']) do |f|
|
57
|
+
f.write(JSON.dump hash)
|
58
|
+
file = f
|
59
|
+
end
|
60
|
+
File.new(file.path, 'rb')
|
61
|
+
end
|
63
62
|
|
64
|
-
|
65
|
-
|
66
|
-
|
63
|
+
def self.apified_hash hash
|
64
|
+
config = Coveralls::Configuration.configuration
|
65
|
+
if ENV['CI'] || ENV['COVERALLS_DEBUG'] || Coveralls.testing
|
67
66
|
Coveralls::Output.puts "[Coveralls] Submitting with config:", :color => "yellow"
|
68
|
-
output =
|
67
|
+
output = JSON.pretty_generate(config).gsub(/"repo_token": ?"(.*?)"/,'"repo_token": "[secure]"')
|
69
68
|
Coveralls::Output.puts output, :color => "yellow"
|
70
|
-
|
71
|
-
|
72
|
-
|
73
|
-
|
69
|
+
end
|
70
|
+
hash.merge(config)
|
71
|
+
end
|
72
|
+
end
|
74
73
|
end
|
data/lib/coveralls/command.rb
CHANGED
data/lib/coveralls/version.rb
CHANGED
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.8.
|
4
|
+
version: 0.8.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Nick Merwin
|
@@ -9,22 +9,22 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2015-04-
|
12
|
+
date: 2015-04-20 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
|
-
name:
|
15
|
+
name: json
|
16
16
|
requirement: !ruby/object:Gem::Requirement
|
17
17
|
requirements:
|
18
18
|
- - "~>"
|
19
19
|
- !ruby/object:Gem::Version
|
20
|
-
version: '1.
|
20
|
+
version: '1.8'
|
21
21
|
type: :runtime
|
22
22
|
prerelease: false
|
23
23
|
version_requirements: !ruby/object:Gem::Requirement
|
24
24
|
requirements:
|
25
25
|
- - "~>"
|
26
26
|
- !ruby/object:Gem::Version
|
27
|
-
version: '1.
|
27
|
+
version: '1.8'
|
28
28
|
- !ruby/object:Gem::Dependency
|
29
29
|
name: rest-client
|
30
30
|
requirement: !ruby/object:Gem::Requirement
|
@@ -51,14 +51,14 @@ dependencies:
|
|
51
51
|
requirements:
|
52
52
|
- - "~>"
|
53
53
|
- !ruby/object:Gem::Version
|
54
|
-
version: 0.
|
54
|
+
version: 0.10.0
|
55
55
|
type: :runtime
|
56
56
|
prerelease: false
|
57
57
|
version_requirements: !ruby/object:Gem::Requirement
|
58
58
|
requirements:
|
59
59
|
- - "~>"
|
60
60
|
- !ruby/object:Gem::Version
|
61
|
-
version: 0.
|
61
|
+
version: 0.10.0
|
62
62
|
- !ruby/object:Gem::Dependency
|
63
63
|
name: term-ansicolor
|
64
64
|
requirement: !ruby/object:Gem::Requirement
|
@@ -88,61 +88,19 @@ dependencies:
|
|
88
88
|
- !ruby/object:Gem::Version
|
89
89
|
version: 0.19.1
|
90
90
|
- !ruby/object:Gem::Dependency
|
91
|
-
name:
|
91
|
+
name: bundler
|
92
92
|
requirement: !ruby/object:Gem::Requirement
|
93
93
|
requirements:
|
94
94
|
- - "~>"
|
95
95
|
- !ruby/object:Gem::Version
|
96
|
-
version: '
|
96
|
+
version: '1.7'
|
97
97
|
type: :development
|
98
98
|
prerelease: false
|
99
99
|
version_requirements: !ruby/object:Gem::Requirement
|
100
100
|
requirements:
|
101
101
|
- - "~>"
|
102
102
|
- !ruby/object:Gem::Version
|
103
|
-
version: '
|
104
|
-
- !ruby/object:Gem::Dependency
|
105
|
-
name: rake
|
106
|
-
requirement: !ruby/object:Gem::Requirement
|
107
|
-
requirements:
|
108
|
-
- - "~>"
|
109
|
-
- !ruby/object:Gem::Version
|
110
|
-
version: '10.4'
|
111
|
-
type: :development
|
112
|
-
prerelease: false
|
113
|
-
version_requirements: !ruby/object:Gem::Requirement
|
114
|
-
requirements:
|
115
|
-
- - "~>"
|
116
|
-
- !ruby/object:Gem::Version
|
117
|
-
version: '10.4'
|
118
|
-
- !ruby/object:Gem::Dependency
|
119
|
-
name: webmock
|
120
|
-
requirement: !ruby/object:Gem::Requirement
|
121
|
-
requirements:
|
122
|
-
- - "~>"
|
123
|
-
- !ruby/object:Gem::Version
|
124
|
-
version: '1.20'
|
125
|
-
type: :development
|
126
|
-
prerelease: false
|
127
|
-
version_requirements: !ruby/object:Gem::Requirement
|
128
|
-
requirements:
|
129
|
-
- - "~>"
|
130
|
-
- !ruby/object:Gem::Version
|
131
|
-
version: '1.20'
|
132
|
-
- !ruby/object:Gem::Dependency
|
133
|
-
name: vcr
|
134
|
-
requirement: !ruby/object:Gem::Requirement
|
135
|
-
requirements:
|
136
|
-
- - "~>"
|
137
|
-
- !ruby/object:Gem::Version
|
138
|
-
version: '2.9'
|
139
|
-
type: :development
|
140
|
-
prerelease: false
|
141
|
-
version_requirements: !ruby/object:Gem::Requirement
|
142
|
-
requirements:
|
143
|
-
- - "~>"
|
144
|
-
- !ruby/object:Gem::Version
|
145
|
-
version: '2.9'
|
103
|
+
version: '1.7'
|
146
104
|
description: A Ruby implementation of the Coveralls API.
|
147
105
|
email:
|
148
106
|
- nick@lemurheavy.com
|
@@ -154,7 +112,6 @@ extra_rdoc_files: []
|
|
154
112
|
files:
|
155
113
|
- ".gitignore"
|
156
114
|
- ".rspec"
|
157
|
-
- ".ruby-version"
|
158
115
|
- ".travis.yml"
|
159
116
|
- CHANGELOG.md
|
160
117
|
- Gemfile
|
@@ -196,7 +153,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
196
153
|
requirements:
|
197
154
|
- - ">="
|
198
155
|
- !ruby/object:Gem::Version
|
199
|
-
version:
|
156
|
+
version: 1.8.7
|
200
157
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
201
158
|
requirements:
|
202
159
|
- - ">="
|
data/.ruby-version
DELETED
@@ -1 +0,0 @@
|
|
1
|
-
2.1.3
|