limited_red 0.3.6 → 0.3.7
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/limited_red/client.rb +17 -16
- data/lib/limited_red/version.rb +1 -1
- metadata +61 -44
data/lib/limited_red/client.rb
CHANGED
@@ -18,8 +18,8 @@ module LimitedRed
|
|
18
18
|
:token => token_for(data.merge(:build_id => build_id))})
|
19
19
|
|
20
20
|
@thread_pool.with_a_thread_run do
|
21
|
-
|
22
|
-
|
21
|
+
response = @adapter.post("/projects/#{@project_id}/builds/#{build_id}/results", :body => data)
|
22
|
+
log(response) if error?(response)
|
23
23
|
end
|
24
24
|
end
|
25
25
|
|
@@ -30,8 +30,8 @@ module LimitedRed
|
|
30
30
|
:build_id => build_id, :token => token_for(data)})
|
31
31
|
|
32
32
|
@thread_pool.with_a_thread_run do
|
33
|
-
|
34
|
-
|
33
|
+
response = @adapter.post("/projects/#{@project_id}/builds", :body => data)
|
34
|
+
log(response) if error?(response)
|
35
35
|
end
|
36
36
|
end
|
37
37
|
|
@@ -40,8 +40,11 @@ module LimitedRed
|
|
40
40
|
|
41
41
|
response = @adapter.get("/projects/#{@project_id}/features/fails?user=#{@username}")
|
42
42
|
|
43
|
-
|
44
|
-
|
43
|
+
if response.nil? || response.empty? || error?(response)
|
44
|
+
return []
|
45
|
+
else
|
46
|
+
response.body.split(" ")
|
47
|
+
end
|
45
48
|
end
|
46
49
|
|
47
50
|
private
|
@@ -64,18 +67,16 @@ module LimitedRed
|
|
64
67
|
data == "" || data.nil? ? "" : data.join("")
|
65
68
|
end
|
66
69
|
|
67
|
-
def error?(
|
68
|
-
|
70
|
+
def error?(response)
|
71
|
+
response.code != 200
|
72
|
+
end
|
73
|
+
|
74
|
+
def log(response)
|
75
|
+
@out.puts(error_message(response))
|
69
76
|
end
|
70
77
|
|
71
|
-
def error_message(
|
72
|
-
|
73
|
-
message = error_msg
|
74
|
-
else
|
75
|
-
message = ""
|
76
|
-
end
|
77
|
-
|
78
|
-
"\nLimited Red had a problem logging your test results.\n#{message}"
|
78
|
+
def error_message(response)
|
79
|
+
"\nLimited Red had a problem logging your test results: #{response ? response.body : ''}"
|
79
80
|
end
|
80
81
|
end
|
81
82
|
end
|
data/lib/limited_red/version.rb
CHANGED
metadata
CHANGED
@@ -1,47 +1,60 @@
|
|
1
|
-
--- !ruby/object:Gem::Specification
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
2
|
name: limited_red
|
3
|
-
version: !ruby/object:Gem::Version
|
4
|
-
|
5
|
-
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
prerelease: false
|
5
|
+
segments:
|
6
|
+
- 0
|
7
|
+
- 3
|
8
|
+
- 7
|
9
|
+
version: 0.3.7
|
6
10
|
platform: ruby
|
7
|
-
authors:
|
11
|
+
authors:
|
8
12
|
- Joseph Wilk
|
9
13
|
autorequire:
|
10
14
|
bindir: bin
|
11
15
|
cert_chain: []
|
12
|
-
|
13
|
-
|
14
|
-
|
16
|
+
|
17
|
+
date: 2012-02-20 00:00:00 +00:00
|
18
|
+
default_executable:
|
19
|
+
dependencies:
|
20
|
+
- !ruby/object:Gem::Dependency
|
15
21
|
name: httparty
|
16
|
-
|
17
|
-
|
18
|
-
requirements:
|
19
|
-
- - =
|
20
|
-
- !ruby/object:Gem::Version
|
22
|
+
prerelease: false
|
23
|
+
requirement: &id001 !ruby/object:Gem::Requirement
|
24
|
+
requirements:
|
25
|
+
- - "="
|
26
|
+
- !ruby/object:Gem::Version
|
27
|
+
segments:
|
28
|
+
- 0
|
29
|
+
- 8
|
30
|
+
- 1
|
21
31
|
version: 0.8.1
|
22
32
|
type: :runtime
|
23
|
-
|
24
|
-
|
25
|
-
- !ruby/object:Gem::Dependency
|
33
|
+
version_requirements: *id001
|
34
|
+
- !ruby/object:Gem::Dependency
|
26
35
|
name: cucumber
|
27
|
-
|
28
|
-
|
29
|
-
requirements:
|
30
|
-
- -
|
31
|
-
- !ruby/object:Gem::Version
|
36
|
+
prerelease: false
|
37
|
+
requirement: &id002 !ruby/object:Gem::Requirement
|
38
|
+
requirements:
|
39
|
+
- - ">="
|
40
|
+
- !ruby/object:Gem::Version
|
41
|
+
segments:
|
42
|
+
- 1
|
43
|
+
- 1
|
44
|
+
- 4
|
32
45
|
version: 1.1.4
|
33
46
|
type: :runtime
|
34
|
-
|
35
|
-
|
36
|
-
description: Learn and adapt from you test metrics. Used with the www.limited-red.com
|
37
|
-
service. Tests are priorited by the probability of failure
|
47
|
+
version_requirements: *id002
|
48
|
+
description: Learn and adapt from you test metrics. Used with the www.limited-red.com service. Tests are priorited by the probability of failure
|
38
49
|
email: joe@josephwilk.net
|
39
50
|
executables: []
|
51
|
+
|
40
52
|
extensions: []
|
41
|
-
|
53
|
+
|
54
|
+
extra_rdoc_files:
|
42
55
|
- LICENSE
|
43
56
|
- README.rdoc
|
44
|
-
files:
|
57
|
+
files:
|
45
58
|
- lib/limited_red/adapter/httparty.rb
|
46
59
|
- lib/limited_red/client.rb
|
47
60
|
- lib/limited_red/config.rb
|
@@ -55,31 +68,35 @@ files:
|
|
55
68
|
- lib/limited_red.rb
|
56
69
|
- LICENSE
|
57
70
|
- README.rdoc
|
71
|
+
has_rdoc: true
|
58
72
|
homepage: http://www.limited-red.com
|
59
|
-
licenses:
|
73
|
+
licenses:
|
60
74
|
- MIT
|
61
75
|
post_install_message:
|
62
|
-
rdoc_options:
|
76
|
+
rdoc_options:
|
63
77
|
- --charset=UTF-8
|
64
|
-
require_paths:
|
78
|
+
require_paths:
|
65
79
|
- lib
|
66
|
-
required_ruby_version: !ruby/object:Gem::Requirement
|
67
|
-
|
68
|
-
|
69
|
-
|
70
|
-
|
71
|
-
|
72
|
-
|
73
|
-
|
74
|
-
requirements:
|
75
|
-
- -
|
76
|
-
- !ruby/object:Gem::Version
|
77
|
-
|
80
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
81
|
+
requirements:
|
82
|
+
- - ">="
|
83
|
+
- !ruby/object:Gem::Version
|
84
|
+
segments:
|
85
|
+
- 0
|
86
|
+
version: "0"
|
87
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
88
|
+
requirements:
|
89
|
+
- - ">="
|
90
|
+
- !ruby/object:Gem::Version
|
91
|
+
segments:
|
92
|
+
- 0
|
93
|
+
version: "0"
|
78
94
|
requirements: []
|
95
|
+
|
79
96
|
rubyforge_project:
|
80
|
-
rubygems_version: 1.
|
97
|
+
rubygems_version: 1.3.6
|
81
98
|
signing_key:
|
82
99
|
specification_version: 3
|
83
100
|
summary: Client for www.limited-red.com service
|
84
101
|
test_files: []
|
85
|
-
|
102
|
+
|