coveralls 0.5.6 → 0.5.7

Sign up to get free protection for your applications and to get access to all the features.
@@ -2,8 +2,8 @@
2
2
  require File.expand_path('../lib/coveralls/version', __FILE__)
3
3
 
4
4
  Gem::Specification.new do |gem|
5
- gem.authors = ["Wil Gieseler"]
6
- gem.email = ["supapuerco@gmail.com"]
5
+ gem.authors = ["Nick Merwin", "Wil Gieseler"]
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
9
  gem.homepage = "http://coveralls.io"
data/lib/coveralls/api.rb CHANGED
@@ -18,6 +18,8 @@ module Coveralls
18
18
  if response_hash['message']
19
19
  puts ("[Coveralls] " + response_hash['url'].underline).cyan
20
20
  end
21
+ rescue RestClient::ServiceUnavailable
22
+ puts ("[Coveralls] API timeout occured, but data should still be processed").red
21
23
  end
22
24
 
23
25
  private
@@ -44,6 +46,5 @@ module Coveralls
44
46
  end
45
47
  hash.merge(config)
46
48
  end
47
-
48
49
  end
49
50
  end
@@ -7,7 +7,11 @@ module Coveralls
7
7
  def push
8
8
  return unless ensure_can_run_locally!
9
9
  ENV["COVERALLS_RUN_LOCALLY"] = "true"
10
- exec "bundle exec rake"
10
+ cmd = "bundle exec rake"
11
+ if File.exists?('.travis.yml')
12
+ cmd = YAML.load_file('.travis.yml')["script"] || cmd rescue cmd
13
+ end
14
+ exec cmd
11
15
  ENV["COVERALLS_RUN_LOCALLY"] = nil
12
16
  end
13
17
 
@@ -33,6 +37,11 @@ module Coveralls
33
37
  open_token_based_url "https://coveralls.io/repos/%@/last_build"
34
38
  end
35
39
 
40
+ desc "version", "See version"
41
+ def version
42
+ puts Coveralls::VERSION
43
+ end
44
+
36
45
  private
37
46
 
38
47
  def open_token_based_url url
@@ -36,7 +36,7 @@ module Coveralls
36
36
  properties = {}
37
37
 
38
38
  # Get Source
39
- properties[:source] = File.open(file.filename, "rb").read
39
+ properties[:source] = File.open(file.filename, "rb:utf-8").read
40
40
 
41
41
  # Get the root-relative filename
42
42
  properties[:name] = short_filename(file.filename)
@@ -68,7 +68,7 @@ module Coveralls
68
68
 
69
69
  true
70
70
 
71
- rescue Exception => e
71
+ rescue Exception => e
72
72
  puts "Coveralls encountered an exception:".red
73
73
  puts e.class.to_s.red
74
74
  puts e.message.red
@@ -1,3 +1,3 @@
1
1
  module Coveralls
2
- VERSION = "0.5.6"
2
+ VERSION = "0.5.7"
3
3
  end
metadata CHANGED
@@ -1,15 +1,16 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: coveralls
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.5.6
4
+ version: 0.5.7
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
8
+ - Nick Merwin
8
9
  - Wil Gieseler
9
10
  autorequire:
10
11
  bindir: bin
11
12
  cert_chain: []
12
- date: 2013-02-12 00:00:00.000000000 Z
13
+ date: 2013-02-27 00:00:00.000000000 Z
13
14
  dependencies:
14
15
  - !ruby/object:Gem::Dependency
15
16
  name: rest-client
@@ -125,6 +126,7 @@ dependencies:
125
126
  version: '0'
126
127
  description: A Ruby implementation of the Coveralls API.
127
128
  email:
129
+ - nick@lemurheavy.com
128
130
  - supapuerco@gmail.com
129
131
  executables:
130
132
  - coveralls