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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 219c86793eeb9500314dd5e3d82c1005156b902d
4
- data.tar.gz: ef35f8c0ea3dc55934d8dc5adbf2ab928cbc374b
3
+ metadata.gz: 5fea86065d88efec3c68e906abf0f1e383177e82
4
+ data.tar.gz: 18143abaa165302d29ceb9e7e8fc6a589874e219
5
5
  SHA512:
6
- metadata.gz: 7a1095dff575e95b96e1a8632eb71cb32d9a0e18929455e26d7a36f50ab0987b0680d440bf1c0be39f46f80fe87727fbcbd92c4d3306a2475b8d82345c6f0853
7
- data.tar.gz: 6c45df07a7d00c16b05887357538f0bb8b352a48b21847787b5420732acce04e06e3cc8102a72a5517c3776b4158d59e6754be1d0f991e5470214a63faede217
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.0
9
- - 2.2.0
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'
@@ -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.add_dependency 'multi_json', '~> 1.10'
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.9.1'
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 'rspec', '~> 3.1'
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
- module Coveralls
2
- class API
3
-
4
- require 'multi_json'
5
- require 'rest_client'
1
+ require 'json'
2
+ require 'rest_client'
6
3
 
7
- if ENV['COVERALLS_ENDPOINT']
8
- API_HOST = ENV['COVERALLS_ENDPOINT']
9
- API_DOMAIN = ENV['COVERALLS_ENDPOINT']
10
- else
11
- API_HOST = ENV['COVERALLS_DEVELOPMENT'] ? "localhost:3000" : "coveralls.io"
12
- API_PROTOCOL = ENV['COVERALLS_DEVELOPMENT'] ? "http" : "https"
13
- API_DOMAIN = "#{API_PROTOCOL}://#{API_HOST}"
14
- end
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
- API_BASE = "#{API_DOMAIN}/api/v1"
15
+ API_BASE = "#{API_DOMAIN}/api/v1"
17
16
 
18
- def self.post_json(endpoint, hash)
19
- disable_net_blockers!
20
- url = endpoint_to_url(endpoint)
21
- Coveralls::Output.puts("#{ MultiJson.dump(hash, :pretty => true) }", :color => "green") if ENV['COVERALLS_DEBUG']
22
- hash = apified_hash hash
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
- response = RestClient::Request.execute(:method => :post, :url => url, :payload => { :json_file => hash_to_file(hash) }, :ssl_version => 'SSLv23')
25
- response_hash = MultiJson.load(response.to_str)
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
- if response_hash['message']
26
+ if response_hash['message']
28
27
  Coveralls::Output.puts("[Coveralls] #{ Coveralls::Output.format(response_hash['url'], :color => "underline") }", :color => "cyan")
29
- end
30
- rescue RestClient::ServiceUnavailable
31
- Coveralls::Output.puts("[Coveralls] API timeout occured, but data should still be processed", :color => "red")
32
- rescue RestClient::InternalServerError
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
- end
33
+ end
35
34
 
36
- private
35
+ private
37
36
 
38
- def self.disable_net_blockers!
39
- if defined?(WebMock) &&
40
- allow = WebMock::Config.instance.allow || []
41
- WebMock::Config.instance.allow = [*allow].push API_HOST
42
- end
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
- if defined?(VCR)
45
- VCR.send(VCR.version.major < 2 ? :config : :configure) do |c|
43
+ if defined?(VCR)
44
+ VCR.send(VCR.version.major < 2 ? :config : :configure) do |c|
46
45
  c.ignore_hosts API_HOST
47
- end
48
- end
49
- end
46
+ end
47
+ end
48
+ end
50
49
 
51
- def self.endpoint_to_url(endpoint)
52
- "#{API_BASE}/#{endpoint}"
53
- end
50
+ def self.endpoint_to_url(endpoint)
51
+ "#{API_BASE}/#{endpoint}"
52
+ end
54
53
 
55
- def self.hash_to_file(hash)
56
- file = nil
57
- Tempfile.open(['coveralls-upload', 'json']) do |f|
58
- f.write(MultiJson.dump hash)
59
- file = f
60
- end
61
- File.new(file.path, 'rb')
62
- end
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
- def self.apified_hash hash
65
- config = Coveralls::Configuration.configuration
66
- if ENV['CI'] || ENV['COVERALLS_DEBUG'] || Coveralls.testing
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 = MultiJson.dump(config, :pretty => true).gsub(/"repo_token": ?"(.*?)"/,'"repo_token": "[secure]"')
67
+ output = JSON.pretty_generate(config).gsub(/"repo_token": ?"(.*?)"/,'"repo_token": "[secure]"')
69
68
  Coveralls::Output.puts output, :color => "yellow"
70
- end
71
- hash.merge(config)
72
- end
73
- end
69
+ end
70
+ hash.merge(config)
71
+ end
72
+ end
74
73
  end
@@ -1,6 +1,6 @@
1
- module Coveralls
2
- require "thor"
1
+ require "thor"
3
2
 
3
+ module Coveralls
4
4
  class CommandLine < Thor
5
5
 
6
6
  desc "push", "Runs your test suite and pushes the coverage results to Coveralls."
@@ -1,9 +1,9 @@
1
+ require 'yaml'
2
+ require 'securerandom'
3
+
1
4
  module Coveralls
2
5
  module Configuration
3
6
 
4
- require 'yaml'
5
- require 'securerandom'
6
-
7
7
  def self.configuration
8
8
  config = {
9
9
  :environment => self.relevant_env,
@@ -1,3 +1,3 @@
1
1
  module Coveralls
2
- VERSION = "0.8.0"
2
+ VERSION = "0.8.1"
3
3
  end
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.0
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-02 00:00:00.000000000 Z
12
+ date: 2015-04-20 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
- name: multi_json
15
+ name: json
16
16
  requirement: !ruby/object:Gem::Requirement
17
17
  requirements:
18
18
  - - "~>"
19
19
  - !ruby/object:Gem::Version
20
- version: '1.10'
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.10'
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.9.1
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.9.1
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: rspec
91
+ name: bundler
92
92
  requirement: !ruby/object:Gem::Requirement
93
93
  requirements:
94
94
  - - "~>"
95
95
  - !ruby/object:Gem::Version
96
- version: '3.1'
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: '3.1'
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: '0'
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