codefumes 0.2.2 → 0.3.0
Sign up to get free protection for your applications and to get access to all the features.
- data/.rvmrc +2 -0
- data/Gemfile +3 -1
- data/Gemfile.lock +81 -135
- data/History.txt +27 -0
- data/Manifest.txt +4 -0
- data/bin/fumes +84 -7
- data/features/claiming_a_project.feature +5 -5
- data/features/deleting_a_project.feature +4 -4
- data/features/managing_project_build_status.feature +63 -0
- data/features/releasing_a_project.feature +6 -6
- data/features/step_definitions/cli_steps.rb +12 -2
- data/features/storing_user_api_key.feature +4 -4
- data/features/synchronizing_repository_with_project.feature +4 -4
- data/lib/codefumes.rb +1 -1
- data/lib/codefumes/api/build.rb +8 -0
- data/lib/codefumes/api/commit.rb +22 -0
- data/lib/codefumes/cli_helpers.rb +8 -0
- data/lib/codefumes/errors.rb +6 -0
- data/lib/codefumes/exit_codes.rb +13 -9
- data/spec/codefumes/api/build_spec.rb +35 -3
- data/spec/codefumes/api/commit_spec.rb +23 -0
- data/spec/codefumes_service_helpers.rb +6 -0
- data/spec/fixtures/builds.xml +21 -0
- data/spec/fixtures/no_builds.xml +3 -0
- data/tasks/cucumber.rake +6 -0
- metadata +77 -44
@@ -180,4 +180,27 @@ describe "API::Commit" do
|
|
180
180
|
end
|
181
181
|
end
|
182
182
|
end
|
183
|
+
|
184
|
+
describe "builds" do
|
185
|
+
let(:project) {@project}
|
186
|
+
let(:commit) {Commit.latest(project)}
|
187
|
+
|
188
|
+
before(:each) do
|
189
|
+
register_latest_uri
|
190
|
+
end
|
191
|
+
|
192
|
+
context "when no builds are associated with the commit" do
|
193
|
+
it "returns an empty array" do
|
194
|
+
register_builds_uri(["200", "Ok"], fixtures[:no_builds])
|
195
|
+
commit.builds.should == []
|
196
|
+
end
|
197
|
+
end
|
198
|
+
|
199
|
+
context "when builds are associated with the commit" do
|
200
|
+
it "returns an array of Build objects" do
|
201
|
+
register_builds_uri
|
202
|
+
commit.builds.each {|b| b.should be_instance_of(Build)}
|
203
|
+
end
|
204
|
+
end
|
205
|
+
end
|
183
206
|
end
|
@@ -68,6 +68,12 @@ module CodeFumesServiceHelpers
|
|
68
68
|
FakeWeb.register_uri(:get, "#{@anon_project_api_uri}/commits/#{@identifier}",
|
69
69
|
:status => status_code, :body => body_content)
|
70
70
|
end
|
71
|
+
|
72
|
+
def register_builds_uri(status_code = ["200", "Ok"], body_content = fixtures[:builds])
|
73
|
+
FakeWeb.register_uri( :get, "#{@anon_project_api_uri}/commits/#{@identifier}/builds",
|
74
|
+
:status => status_code,
|
75
|
+
:body => body_content)
|
76
|
+
end
|
71
77
|
end
|
72
78
|
|
73
79
|
module PayloadHelpers
|
@@ -0,0 +1,21 @@
|
|
1
|
+
<?xml version="1.0" encoding="UTF-8"?>
|
2
|
+
<builds>
|
3
|
+
<build>
|
4
|
+
<identifier>BUILD_ID</identifier>
|
5
|
+
<name>IE7</name>
|
6
|
+
<state>running</state>
|
7
|
+
<ended_at></ended_at>
|
8
|
+
<started_at>2009-09-26 21:18:11 UTC</started_at>
|
9
|
+
<created_at>2009-09-26 21:19:11 UTC</created_at>
|
10
|
+
<api_uri>http://codefumes.com/api/v1/xml/projects/public_key_value/commits/COMMIT_IDENTIFIER/builds/BUILD_ID.xml</api_uri>
|
11
|
+
</build>
|
12
|
+
<build>
|
13
|
+
<identifier>BUILD_ID2</identifier>
|
14
|
+
<name>SPECS</name>
|
15
|
+
<state>running</state>
|
16
|
+
<ended_at></ended_at>
|
17
|
+
<started_at>2009-09-26 21:18:11 UTC</started_at>
|
18
|
+
<created_at>2009-09-26 21:19:11 UTC</created_at>
|
19
|
+
<api_uri>http://codefumes.com/api/v1/xml/projects/public_key_value/commits/COMMIT_IDENTIFIER/builds/BUILD_ID2.xml</api_uri>
|
20
|
+
</build>
|
21
|
+
</builds>
|
data/tasks/cucumber.rake
CHANGED
@@ -4,6 +4,12 @@ begin
|
|
4
4
|
Cucumber::Rake::Task.new do |t|
|
5
5
|
t.cucumber_opts = %w{--tags ~@jruby} unless defined?(JRUBY_VERSION)
|
6
6
|
end
|
7
|
+
|
8
|
+
namespace :cucumber do
|
9
|
+
Cucumber::Rake::Task.new(:wip) do |t|
|
10
|
+
t.cucumber_opts = %w{--tags @wip}
|
11
|
+
end
|
12
|
+
end
|
7
13
|
rescue LoadError
|
8
14
|
task :cucumber do
|
9
15
|
abort "Cucumber is not available. In order to run features, you must: sudo gem install cucumber"
|
metadata
CHANGED
@@ -1,12 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: codefumes
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
+
hash: 19
|
4
5
|
prerelease: false
|
5
6
|
segments:
|
6
7
|
- 0
|
7
|
-
-
|
8
|
-
-
|
9
|
-
version: 0.
|
8
|
+
- 3
|
9
|
+
- 0
|
10
|
+
version: 0.3.0
|
10
11
|
platform: ruby
|
11
12
|
authors:
|
12
13
|
- Tom Kersten
|
@@ -14,176 +15,200 @@ autorequire:
|
|
14
15
|
bindir: bin
|
15
16
|
cert_chain: []
|
16
17
|
|
17
|
-
date: 2010-
|
18
|
+
date: 2010-09-13 00:00:00 -05:00
|
18
19
|
default_executable:
|
19
20
|
dependencies:
|
20
21
|
- !ruby/object:Gem::Dependency
|
22
|
+
type: :runtime
|
23
|
+
prerelease: false
|
24
|
+
name: httparty
|
21
25
|
version_requirements: &id001 !ruby/object:Gem::Requirement
|
26
|
+
none: false
|
22
27
|
requirements:
|
23
28
|
- - ">="
|
24
29
|
- !ruby/object:Gem::Version
|
30
|
+
hash: 5
|
25
31
|
segments:
|
26
32
|
- 0
|
27
33
|
- 6
|
28
34
|
- 1
|
29
35
|
version: 0.6.1
|
30
36
|
requirement: *id001
|
31
|
-
name: httparty
|
32
|
-
prerelease: false
|
33
|
-
type: :runtime
|
34
37
|
- !ruby/object:Gem::Dependency
|
38
|
+
type: :runtime
|
39
|
+
prerelease: false
|
40
|
+
name: caleb-chronic
|
35
41
|
version_requirements: &id002 !ruby/object:Gem::Requirement
|
42
|
+
none: false
|
36
43
|
requirements:
|
37
44
|
- - ">="
|
38
45
|
- !ruby/object:Gem::Version
|
46
|
+
hash: 19
|
39
47
|
segments:
|
40
48
|
- 0
|
41
49
|
- 3
|
42
50
|
- 0
|
43
51
|
version: 0.3.0
|
44
52
|
requirement: *id002
|
45
|
-
name: caleb-chronic
|
46
|
-
prerelease: false
|
47
|
-
type: :runtime
|
48
53
|
- !ruby/object:Gem::Dependency
|
54
|
+
type: :runtime
|
55
|
+
prerelease: false
|
56
|
+
name: gli
|
49
57
|
version_requirements: &id003 !ruby/object:Gem::Requirement
|
58
|
+
none: false
|
50
59
|
requirements:
|
51
60
|
- - "="
|
52
61
|
- !ruby/object:Gem::Version
|
62
|
+
hash: 17
|
53
63
|
segments:
|
54
64
|
- 1
|
55
65
|
- 1
|
56
66
|
- 1
|
57
67
|
version: 1.1.1
|
58
68
|
requirement: *id003
|
59
|
-
name: gli
|
60
|
-
prerelease: false
|
61
|
-
type: :runtime
|
62
69
|
- !ruby/object:Gem::Dependency
|
70
|
+
type: :runtime
|
71
|
+
prerelease: false
|
72
|
+
name: grit
|
63
73
|
version_requirements: &id004 !ruby/object:Gem::Requirement
|
74
|
+
none: false
|
64
75
|
requirements:
|
65
76
|
- - "="
|
66
77
|
- !ruby/object:Gem::Version
|
78
|
+
hash: 3
|
67
79
|
segments:
|
68
80
|
- 2
|
69
81
|
- 0
|
70
82
|
version: "2.0"
|
71
83
|
requirement: *id004
|
72
|
-
name: grit
|
73
|
-
prerelease: false
|
74
|
-
type: :runtime
|
75
84
|
- !ruby/object:Gem::Dependency
|
85
|
+
type: :development
|
86
|
+
prerelease: false
|
87
|
+
name: metric_fu
|
76
88
|
version_requirements: &id005 !ruby/object:Gem::Requirement
|
89
|
+
none: false
|
77
90
|
requirements:
|
78
91
|
- - "="
|
79
92
|
- !ruby/object:Gem::Version
|
93
|
+
hash: 27
|
80
94
|
segments:
|
81
95
|
- 1
|
82
96
|
- 3
|
83
97
|
- 0
|
84
98
|
version: 1.3.0
|
85
99
|
requirement: *id005
|
86
|
-
name: metric_fu
|
87
|
-
prerelease: false
|
88
|
-
type: :development
|
89
100
|
- !ruby/object:Gem::Dependency
|
101
|
+
type: :development
|
102
|
+
prerelease: false
|
103
|
+
name: rubigen
|
90
104
|
version_requirements: &id006 !ruby/object:Gem::Requirement
|
105
|
+
none: false
|
91
106
|
requirements:
|
92
107
|
- - "="
|
93
108
|
- !ruby/object:Gem::Version
|
109
|
+
hash: 9
|
94
110
|
segments:
|
95
111
|
- 1
|
96
112
|
- 5
|
97
113
|
- 5
|
98
114
|
version: 1.5.5
|
99
115
|
requirement: *id006
|
100
|
-
name: rubigen
|
101
|
-
prerelease: false
|
102
|
-
type: :development
|
103
116
|
- !ruby/object:Gem::Dependency
|
117
|
+
type: :development
|
118
|
+
prerelease: false
|
119
|
+
name: fakeweb
|
104
120
|
version_requirements: &id007 !ruby/object:Gem::Requirement
|
121
|
+
none: false
|
105
122
|
requirements:
|
106
123
|
- - "="
|
107
124
|
- !ruby/object:Gem::Version
|
125
|
+
hash: 15
|
108
126
|
segments:
|
109
127
|
- 1
|
110
128
|
- 2
|
111
129
|
- 8
|
112
130
|
version: 1.2.8
|
113
131
|
requirement: *id007
|
114
|
-
name: fakeweb
|
115
|
-
prerelease: false
|
116
|
-
type: :development
|
117
132
|
- !ruby/object:Gem::Dependency
|
133
|
+
type: :development
|
134
|
+
prerelease: false
|
135
|
+
name: activesupport
|
118
136
|
version_requirements: &id008 !ruby/object:Gem::Requirement
|
137
|
+
none: false
|
119
138
|
requirements:
|
120
139
|
- - "="
|
121
140
|
- !ruby/object:Gem::Version
|
141
|
+
hash: 9
|
122
142
|
segments:
|
123
143
|
- 2
|
124
144
|
- 3
|
125
145
|
- 5
|
126
146
|
version: 2.3.5
|
127
147
|
requirement: *id008
|
128
|
-
name: activesupport
|
129
|
-
prerelease: false
|
130
|
-
type: :development
|
131
148
|
- !ruby/object:Gem::Dependency
|
149
|
+
type: :development
|
150
|
+
prerelease: false
|
151
|
+
name: rspec
|
132
152
|
version_requirements: &id009 !ruby/object:Gem::Requirement
|
153
|
+
none: false
|
133
154
|
requirements:
|
134
155
|
- - ">="
|
135
156
|
- !ruby/object:Gem::Version
|
157
|
+
hash: 19
|
136
158
|
segments:
|
137
159
|
- 1
|
138
160
|
- 2
|
139
161
|
- 6
|
140
162
|
version: 1.2.6
|
141
163
|
requirement: *id009
|
142
|
-
name: rspec
|
143
|
-
prerelease: false
|
144
|
-
type: :development
|
145
164
|
- !ruby/object:Gem::Dependency
|
165
|
+
type: :development
|
166
|
+
prerelease: false
|
167
|
+
name: cucumber
|
146
168
|
version_requirements: &id010 !ruby/object:Gem::Requirement
|
169
|
+
none: false
|
147
170
|
requirements:
|
148
171
|
- - "="
|
149
172
|
- !ruby/object:Gem::Version
|
173
|
+
hash: 53
|
150
174
|
segments:
|
151
175
|
- 0
|
152
176
|
- 8
|
153
177
|
- 5
|
154
178
|
version: 0.8.5
|
155
179
|
requirement: *id010
|
156
|
-
name: cucumber
|
157
|
-
prerelease: false
|
158
|
-
type: :development
|
159
180
|
- !ruby/object:Gem::Dependency
|
181
|
+
type: :development
|
182
|
+
prerelease: false
|
183
|
+
name: aruba
|
160
184
|
version_requirements: &id011 !ruby/object:Gem::Requirement
|
185
|
+
none: false
|
161
186
|
requirements:
|
162
187
|
- - "="
|
163
188
|
- !ruby/object:Gem::Version
|
189
|
+
hash: 21
|
164
190
|
segments:
|
165
191
|
- 0
|
166
192
|
- 2
|
167
193
|
- 1
|
168
194
|
version: 0.2.1
|
169
195
|
requirement: *id011
|
170
|
-
name: aruba
|
171
|
-
prerelease: false
|
172
|
-
type: :development
|
173
196
|
- !ruby/object:Gem::Dependency
|
197
|
+
type: :development
|
198
|
+
prerelease: false
|
199
|
+
name: hoe
|
174
200
|
version_requirements: &id012 !ruby/object:Gem::Requirement
|
201
|
+
none: false
|
175
202
|
requirements:
|
176
203
|
- - ">="
|
177
204
|
- !ruby/object:Gem::Version
|
205
|
+
hash: 19
|
178
206
|
segments:
|
179
207
|
- 2
|
180
|
-
-
|
181
|
-
-
|
182
|
-
version: 2.
|
208
|
+
- 6
|
209
|
+
- 2
|
210
|
+
version: 2.6.2
|
183
211
|
requirement: *id012
|
184
|
-
name: hoe
|
185
|
-
prerelease: false
|
186
|
-
type: :development
|
187
212
|
description: |-
|
188
213
|
CodeFumes.com[http://codefumes.com] is a service intended to help people
|
189
214
|
involved with software projects who are interested in tracking, sharing,
|
@@ -210,6 +235,7 @@ extra_rdoc_files:
|
|
210
235
|
- README.txt
|
211
236
|
- LICENSE
|
212
237
|
files:
|
238
|
+
- .rvmrc
|
213
239
|
- Gemfile
|
214
240
|
- Gemfile.lock
|
215
241
|
- History.txt
|
@@ -222,6 +248,7 @@ files:
|
|
222
248
|
- cucumber.yml
|
223
249
|
- features/claiming_a_project.feature
|
224
250
|
- features/deleting_a_project.feature
|
251
|
+
- features/managing_project_build_status.feature
|
225
252
|
- features/releasing_a_project.feature
|
226
253
|
- features/step_definitions/cli_steps.rb
|
227
254
|
- features/step_definitions/common_steps.rb
|
@@ -259,9 +286,11 @@ files:
|
|
259
286
|
- spec/codefumes/source_control_spec.rb
|
260
287
|
- spec/codefumes_service_helpers.rb
|
261
288
|
- spec/fixtures/build.xml
|
289
|
+
- spec/fixtures/builds.xml
|
262
290
|
- spec/fixtures/commit.xml
|
263
291
|
- spec/fixtures/commit_with_custom_attrs.xml
|
264
292
|
- spec/fixtures/multiple_commits.xml
|
293
|
+
- spec/fixtures/no_builds.xml
|
265
294
|
- spec/fixtures/payload.xml
|
266
295
|
- spec/fixtures/project.xml
|
267
296
|
- spec/fixtures/project_update.xml
|
@@ -281,23 +310,27 @@ rdoc_options:
|
|
281
310
|
require_paths:
|
282
311
|
- lib
|
283
312
|
required_ruby_version: !ruby/object:Gem::Requirement
|
313
|
+
none: false
|
284
314
|
requirements:
|
285
315
|
- - ">="
|
286
316
|
- !ruby/object:Gem::Version
|
317
|
+
hash: 3
|
287
318
|
segments:
|
288
319
|
- 0
|
289
320
|
version: "0"
|
290
321
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
322
|
+
none: false
|
291
323
|
requirements:
|
292
324
|
- - ">="
|
293
325
|
- !ruby/object:Gem::Version
|
326
|
+
hash: 3
|
294
327
|
segments:
|
295
328
|
- 0
|
296
329
|
version: "0"
|
297
330
|
requirements: []
|
298
331
|
|
299
332
|
rubyforge_project: codefumes
|
300
|
-
rubygems_version: 1.3.
|
333
|
+
rubygems_version: 1.3.7
|
301
334
|
signing_key:
|
302
335
|
specification_version: 3
|
303
336
|
summary: A client-side implementation of the CodeFumes.com API.
|