coveralls-lcov 0.0.1 → 1.0.0
Sign up to get free protection for your applications and to get access to all the features.
- data/README.md +1 -1
- data/coveralls-lcov.gemspec +1 -1
- data/lib/coveralls/lcov/runner.rb +16 -1
- data/lib/coveralls/lcov/version.rb +1 -1
- metadata +3 -3
data/README.md
CHANGED
data/coveralls-lcov.gemspec
CHANGED
@@ -10,7 +10,7 @@ Gem::Specification.new do |spec|
|
|
10
10
|
spec.email = ["okimoto@clear-code.com"]
|
11
11
|
spec.summary = %q{Post coverage information to coveralls.io}
|
12
12
|
spec.description = %q{Post coverage information to coveralls.io}
|
13
|
-
spec.homepage = ""
|
13
|
+
spec.homepage = "https://github.com/okkez/coveralls-lcov"
|
14
14
|
spec.license = "MIT"
|
15
15
|
|
16
16
|
spec.files = `git ls-files -z`.split("\x0")
|
@@ -13,6 +13,8 @@ module Coveralls
|
|
13
13
|
def initialize(argv)
|
14
14
|
@argv = argv
|
15
15
|
@repo_token = nil
|
16
|
+
@n_times = 3
|
17
|
+
@delay = 3
|
16
18
|
@verbose = false
|
17
19
|
@dry_run = false
|
18
20
|
@parser = OptionParser.new(@argv)
|
@@ -25,6 +27,12 @@ BANNER
|
|
25
27
|
@parser.on("-t", "--repo-token=TOKEN", "Repository token") do |token|
|
26
28
|
@repo_token = token
|
27
29
|
end
|
30
|
+
@parser.on("--retry=N", Integer, "Retry to POST N times (default: 3)") do |n_times|
|
31
|
+
@n_times = n_times
|
32
|
+
end
|
33
|
+
@parser.on("--delay=N", Integer, "Delay in N secs when retry (default: 3)") do |delay|
|
34
|
+
@delay = delay
|
35
|
+
end
|
28
36
|
@parser.on("-v", "--verbose", "Print payload") do
|
29
37
|
@verbose = true
|
30
38
|
end
|
@@ -47,12 +55,17 @@ BANNER
|
|
47
55
|
payload_json = payload.to_json
|
48
56
|
puts payload_json if @verbose
|
49
57
|
unless @dry_run
|
50
|
-
|
58
|
+
@n_times.times do
|
59
|
+
response = post(payload_json)
|
60
|
+
break if response.is_a?(Net::HTTPSuccess)
|
61
|
+
sleep @delay
|
62
|
+
end
|
51
63
|
end
|
52
64
|
end
|
53
65
|
|
54
66
|
def post(payload)
|
55
67
|
Net::HTTP.version_1_2
|
68
|
+
response = nil
|
56
69
|
|
57
70
|
http = Net::HTTP.new(HOST, 443)
|
58
71
|
http.use_ssl = true
|
@@ -71,6 +84,8 @@ BODY
|
|
71
84
|
p response
|
72
85
|
puts response.body
|
73
86
|
end
|
87
|
+
|
88
|
+
response
|
74
89
|
end
|
75
90
|
end
|
76
91
|
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: coveralls-lcov
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0
|
4
|
+
version: 1.0.0
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2014-01-
|
12
|
+
date: 2014-01-28 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: bundler
|
@@ -62,7 +62,7 @@ files:
|
|
62
62
|
- lib/coveralls/lcov/converter.rb
|
63
63
|
- lib/coveralls/lcov/runner.rb
|
64
64
|
- lib/coveralls/lcov/version.rb
|
65
|
-
homepage:
|
65
|
+
homepage: https://github.com/okkez/coveralls-lcov
|
66
66
|
licenses:
|
67
67
|
- MIT
|
68
68
|
post_install_message:
|