circleci 0.0.7 → 0.0.8
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +7 -0
- data/lib/circleci/http.rb +12 -4
- data/lib/circleci/project.rb +5 -2
- metadata +43 -43
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: b3689e0018a6ca32e4cb858956efb50df9ad9424
|
4
|
+
data.tar.gz: 98fdbf35ec3353c783ede39b592afc2efc13b6ee
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: ff1d1ae421450c0d5de5a0067715ade7512c49e198de8a44d08aa8a8270ba1b7f8acb1acbd527c5291dce47f294eee88cedb371c593ed7ea4be63f9041affec6
|
7
|
+
data.tar.gz: 9100c6957023e68ced9a0b82f925bf2368a9fd6ab26cfc7ac3036148401a7a5bdf393edbb650707116b825b35b7287822fc192d505e9907c88abb1e3a59f4e5b
|
data/README.md
CHANGED
@@ -284,6 +284,13 @@ Example response
|
|
284
284
|
}
|
285
285
|
```
|
286
286
|
|
287
|
+
It also supports the Experimental Parameterized Builds
|
288
|
+
|
289
|
+
```
|
290
|
+
build_environment_variables = {"ENV_VAR1" => "VALUE1", "ENV_VAR2" => "VALUE2"}
|
291
|
+
res = CircleCi::Project.build_branch 'username', 'reponame', 'branch', build_environment_variables
|
292
|
+
```
|
293
|
+
|
287
294
|
### Build
|
288
295
|
|
289
296
|
#### CircleCi::Build.get
|
data/lib/circleci/http.rb
CHANGED
@@ -14,8 +14,8 @@ module CircleCi
|
|
14
14
|
request 'get', "#{path}?#{RestClient::Payload.generate(build_params(params))}"
|
15
15
|
end
|
16
16
|
|
17
|
-
def post(path, params = {})
|
18
|
-
request 'post', "#{path}?#{RestClient::Payload.generate(build_params(params))}"
|
17
|
+
def post(path, params = {}, body = {})
|
18
|
+
request 'post', "#{path}?#{RestClient::Payload.generate(build_params(params))}", body
|
19
19
|
end
|
20
20
|
|
21
21
|
def delete(path, params = {})
|
@@ -30,9 +30,17 @@ module CircleCi
|
|
30
30
|
params.merge('circle-token' => @config.token)
|
31
31
|
end
|
32
32
|
|
33
|
-
def
|
33
|
+
def create_request_args(http_verb, url, body)
|
34
|
+
if http_verb == "post"
|
35
|
+
return [http_verb, url, body, headers]
|
36
|
+
end
|
37
|
+
|
38
|
+
[http_verb, url, headers]
|
39
|
+
end
|
40
|
+
|
41
|
+
def request(http_verb, path, body = {})
|
34
42
|
url = "#{@config.host}#{path}"
|
35
|
-
args =
|
43
|
+
args = create_request_args http_verb, url, body
|
36
44
|
|
37
45
|
RestClient.send(*args) do |res, req, raw_res|
|
38
46
|
body = res.body.to_s
|
data/lib/circleci/project.rb
CHANGED
@@ -60,10 +60,13 @@ module CircleCi
|
|
60
60
|
# @param username [String] - User or org name who owns project
|
61
61
|
# @param project [String] - Name of project
|
62
62
|
# @param branch [String] - Name of branch
|
63
|
+
# @param build_parameters [Hash] - Optional Build Parameters
|
63
64
|
# @return [CircleCi::Response] - Response object
|
64
65
|
|
65
|
-
def self.build_branch username, project, branch
|
66
|
-
|
66
|
+
def self.build_branch username, project, branch, build_parameters = {}
|
67
|
+
body = {}
|
68
|
+
body["build_parameters"] = build_parameters unless build_parameters.empty?
|
69
|
+
CircleCi.http.post "/project/#{username}/#{project}/tree/#{branch}", {}, body
|
67
70
|
end
|
68
71
|
|
69
72
|
##
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: circleci
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.8
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Chavez
|
@@ -16,80 +16,80 @@ dependencies:
|
|
16
16
|
requirements:
|
17
17
|
- - "~>"
|
18
18
|
- !ruby/object:Gem::Version
|
19
|
-
version:
|
19
|
+
version: 3.3.1
|
20
20
|
- - ">="
|
21
21
|
- !ruby/object:Gem::Version
|
22
|
-
version:
|
22
|
+
version: 3.3.1
|
23
23
|
type: :runtime
|
24
24
|
prerelease: false
|
25
25
|
version_requirements: !ruby/object:Gem::Requirement
|
26
26
|
requirements:
|
27
27
|
- - "~>"
|
28
28
|
- !ruby/object:Gem::Version
|
29
|
-
version:
|
29
|
+
version: 3.3.1
|
30
30
|
- - ">="
|
31
31
|
- !ruby/object:Gem::Version
|
32
|
-
version:
|
32
|
+
version: 3.3.1
|
33
33
|
- !ruby/object:Gem::Dependency
|
34
34
|
name: rest-client
|
35
35
|
requirement: !ruby/object:Gem::Requirement
|
36
36
|
requirements:
|
37
37
|
- - "~>"
|
38
38
|
- !ruby/object:Gem::Version
|
39
|
-
version: 1.
|
39
|
+
version: 1.7.2
|
40
40
|
- - ">="
|
41
41
|
- !ruby/object:Gem::Version
|
42
|
-
version: 1.
|
42
|
+
version: 1.7.2
|
43
43
|
type: :runtime
|
44
44
|
prerelease: false
|
45
45
|
version_requirements: !ruby/object:Gem::Requirement
|
46
46
|
requirements:
|
47
47
|
- - "~>"
|
48
48
|
- !ruby/object:Gem::Version
|
49
|
-
version: 1.
|
49
|
+
version: 1.7.2
|
50
50
|
- - ">="
|
51
51
|
- !ruby/object:Gem::Version
|
52
|
-
version: 1.
|
52
|
+
version: 1.7.2
|
53
53
|
- !ruby/object:Gem::Dependency
|
54
54
|
name: coveralls
|
55
55
|
requirement: !ruby/object:Gem::Requirement
|
56
56
|
requirements:
|
57
57
|
- - "~>"
|
58
58
|
- !ruby/object:Gem::Version
|
59
|
-
version: 0.7.
|
59
|
+
version: 0.7.1
|
60
60
|
- - ">="
|
61
61
|
- !ruby/object:Gem::Version
|
62
|
-
version: 0.7.
|
62
|
+
version: 0.7.1
|
63
63
|
type: :development
|
64
64
|
prerelease: false
|
65
65
|
version_requirements: !ruby/object:Gem::Requirement
|
66
66
|
requirements:
|
67
67
|
- - "~>"
|
68
68
|
- !ruby/object:Gem::Version
|
69
|
-
version: 0.7.
|
69
|
+
version: 0.7.1
|
70
70
|
- - ">="
|
71
71
|
- !ruby/object:Gem::Version
|
72
|
-
version: 0.7.
|
72
|
+
version: 0.7.1
|
73
73
|
- !ruby/object:Gem::Dependency
|
74
74
|
name: dotenv
|
75
75
|
requirement: !ruby/object:Gem::Requirement
|
76
76
|
requirements:
|
77
77
|
- - "~>"
|
78
78
|
- !ruby/object:Gem::Version
|
79
|
-
version: 0.
|
79
|
+
version: 1.0.2
|
80
80
|
- - ">="
|
81
81
|
- !ruby/object:Gem::Version
|
82
|
-
version: 0.
|
82
|
+
version: 1.0.2
|
83
83
|
type: :development
|
84
84
|
prerelease: false
|
85
85
|
version_requirements: !ruby/object:Gem::Requirement
|
86
86
|
requirements:
|
87
87
|
- - "~>"
|
88
88
|
- !ruby/object:Gem::Version
|
89
|
-
version: 0.
|
89
|
+
version: 1.0.2
|
90
90
|
- - ">="
|
91
91
|
- !ruby/object:Gem::Version
|
92
|
-
version: 0.
|
92
|
+
version: 1.0.2
|
93
93
|
- !ruby/object:Gem::Dependency
|
94
94
|
name: gemcutter
|
95
95
|
requirement: !ruby/object:Gem::Requirement
|
@@ -116,60 +116,60 @@ dependencies:
|
|
116
116
|
requirements:
|
117
117
|
- - "~>"
|
118
118
|
- !ruby/object:Gem::Version
|
119
|
-
version: 0.
|
119
|
+
version: 0.10.1
|
120
120
|
- - ">="
|
121
121
|
- !ruby/object:Gem::Version
|
122
|
-
version: 0.
|
122
|
+
version: 0.10.1
|
123
123
|
type: :development
|
124
124
|
prerelease: false
|
125
125
|
version_requirements: !ruby/object:Gem::Requirement
|
126
126
|
requirements:
|
127
127
|
- - "~>"
|
128
128
|
- !ruby/object:Gem::Version
|
129
|
-
version: 0.
|
129
|
+
version: 0.10.1
|
130
130
|
- - ">="
|
131
131
|
- !ruby/object:Gem::Version
|
132
|
-
version: 0.
|
132
|
+
version: 0.10.1
|
133
133
|
- !ruby/object:Gem::Dependency
|
134
134
|
name: rake
|
135
135
|
requirement: !ruby/object:Gem::Requirement
|
136
136
|
requirements:
|
137
137
|
- - "~>"
|
138
138
|
- !ruby/object:Gem::Version
|
139
|
-
version: 10.
|
139
|
+
version: 10.3.2
|
140
140
|
- - ">="
|
141
141
|
- !ruby/object:Gem::Version
|
142
|
-
version: 10.
|
142
|
+
version: 10.3.2
|
143
143
|
type: :development
|
144
144
|
prerelease: false
|
145
145
|
version_requirements: !ruby/object:Gem::Requirement
|
146
146
|
requirements:
|
147
147
|
- - "~>"
|
148
148
|
- !ruby/object:Gem::Version
|
149
|
-
version: 10.
|
149
|
+
version: 10.3.2
|
150
150
|
- - ">="
|
151
151
|
- !ruby/object:Gem::Version
|
152
|
-
version: 10.
|
152
|
+
version: 10.3.2
|
153
153
|
- !ruby/object:Gem::Dependency
|
154
154
|
name: redcarpet
|
155
155
|
requirement: !ruby/object:Gem::Requirement
|
156
156
|
requirements:
|
157
157
|
- - "~>"
|
158
158
|
- !ruby/object:Gem::Version
|
159
|
-
version: 3.
|
159
|
+
version: 3.2.0
|
160
160
|
- - ">="
|
161
161
|
- !ruby/object:Gem::Version
|
162
|
-
version: 3.
|
162
|
+
version: 3.2.0
|
163
163
|
type: :development
|
164
164
|
prerelease: false
|
165
165
|
version_requirements: !ruby/object:Gem::Requirement
|
166
166
|
requirements:
|
167
167
|
- - "~>"
|
168
168
|
- !ruby/object:Gem::Version
|
169
|
-
version: 3.
|
169
|
+
version: 3.2.0
|
170
170
|
- - ">="
|
171
171
|
- !ruby/object:Gem::Version
|
172
|
-
version: 3.
|
172
|
+
version: 3.2.0
|
173
173
|
- !ruby/object:Gem::Dependency
|
174
174
|
name: rspec
|
175
175
|
requirement: !ruby/object:Gem::Requirement
|
@@ -196,60 +196,60 @@ dependencies:
|
|
196
196
|
requirements:
|
197
197
|
- - "~>"
|
198
198
|
- !ruby/object:Gem::Version
|
199
|
-
version: 0.
|
199
|
+
version: 0.9.1
|
200
200
|
- - ">="
|
201
201
|
- !ruby/object:Gem::Version
|
202
|
-
version: 0.
|
202
|
+
version: 0.9.1
|
203
203
|
type: :development
|
204
204
|
prerelease: false
|
205
205
|
version_requirements: !ruby/object:Gem::Requirement
|
206
206
|
requirements:
|
207
207
|
- - "~>"
|
208
208
|
- !ruby/object:Gem::Version
|
209
|
-
version: 0.
|
209
|
+
version: 0.9.1
|
210
210
|
- - ">="
|
211
211
|
- !ruby/object:Gem::Version
|
212
|
-
version: 0.
|
212
|
+
version: 0.9.1
|
213
213
|
- !ruby/object:Gem::Dependency
|
214
214
|
name: typhoeus
|
215
215
|
requirement: !ruby/object:Gem::Requirement
|
216
216
|
requirements:
|
217
217
|
- - "~>"
|
218
218
|
- !ruby/object:Gem::Version
|
219
|
-
version: 0.6.
|
219
|
+
version: 0.6.9
|
220
220
|
- - ">="
|
221
221
|
- !ruby/object:Gem::Version
|
222
|
-
version: 0.6.
|
222
|
+
version: 0.6.9
|
223
223
|
type: :development
|
224
224
|
prerelease: false
|
225
225
|
version_requirements: !ruby/object:Gem::Requirement
|
226
226
|
requirements:
|
227
227
|
- - "~>"
|
228
228
|
- !ruby/object:Gem::Version
|
229
|
-
version: 0.6.
|
229
|
+
version: 0.6.9
|
230
230
|
- - ">="
|
231
231
|
- !ruby/object:Gem::Version
|
232
|
-
version: 0.6.
|
232
|
+
version: 0.6.9
|
233
233
|
- !ruby/object:Gem::Dependency
|
234
234
|
name: vcr
|
235
235
|
requirement: !ruby/object:Gem::Requirement
|
236
236
|
requirements:
|
237
237
|
- - "~>"
|
238
238
|
- !ruby/object:Gem::Version
|
239
|
-
version: 2.9.
|
239
|
+
version: 2.9.3
|
240
240
|
- - ">="
|
241
241
|
- !ruby/object:Gem::Version
|
242
|
-
version: 2.9.
|
242
|
+
version: 2.9.3
|
243
243
|
type: :development
|
244
244
|
prerelease: false
|
245
245
|
version_requirements: !ruby/object:Gem::Requirement
|
246
246
|
requirements:
|
247
247
|
- - "~>"
|
248
248
|
- !ruby/object:Gem::Version
|
249
|
-
version: 2.9.
|
249
|
+
version: 2.9.3
|
250
250
|
- - ">="
|
251
251
|
- !ruby/object:Gem::Version
|
252
|
-
version: 2.9.
|
252
|
+
version: 2.9.3
|
253
253
|
- !ruby/object:Gem::Dependency
|
254
254
|
name: webmock
|
255
255
|
requirement: !ruby/object:Gem::Requirement
|
@@ -279,7 +279,7 @@ dependencies:
|
|
279
279
|
version: 0.8.7
|
280
280
|
- - ">="
|
281
281
|
- !ruby/object:Gem::Version
|
282
|
-
version: 0.8.7.
|
282
|
+
version: 0.8.7.6
|
283
283
|
type: :development
|
284
284
|
prerelease: false
|
285
285
|
version_requirements: !ruby/object:Gem::Requirement
|
@@ -289,7 +289,7 @@ dependencies:
|
|
289
289
|
version: 0.8.7
|
290
290
|
- - ">="
|
291
291
|
- !ruby/object:Gem::Version
|
292
|
-
version: 0.8.7.
|
292
|
+
version: 0.8.7.6
|
293
293
|
description: Wraps Circle CI API calls in a gem.
|
294
294
|
email: nailsbrokeandfell@gmail.com
|
295
295
|
executables: []
|