circleci 0.0.6 → 0.0.7
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +88 -0
- data/lib/circleci/project.rb +13 -0
- metadata +21 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: c6ba5f9d5cc559ef47814ecc68534d0c329b148e
|
4
|
+
data.tar.gz: 3db6da9cde1261440166dcccf363d4ee56f42b3e
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: b8c8c4587415331cf8a714be701fba3f49429ab9e488eba5d4aa92a87f4495fe65d60882e8718320617aafbfc69ec80be97a1afcd3af4277abe9fcecfa684934
|
7
|
+
data.tar.gz: 3ee8acb3e00a0df306a7a14ae33accc70bbf645699b373001a87b0b6c1150b25affc1b9ce5053da41f76454ff1ec33f4652a7e87d22569bdd2ebc4cbd0ad8b46
|
data/README.md
CHANGED
@@ -3,6 +3,7 @@ circleci
|
|
3
3
|
|
4
4
|
[![Build Status](https://travis-ci.org/mtchavez/circleci.png)](https://travis-ci.org/mtchavez/circleci)
|
5
5
|
[![Code Climate](https://codeclimate.com/github/mtchavez/circleci.png)](https://codeclimate.com/github/mtchavez/circleci)
|
6
|
+
[![Coverage Status](https://coveralls.io/repos/mtchavez/circleci/badge.png)](https://coveralls.io/r/mtchavez/circleci)
|
6
7
|
|
7
8
|
Circle CI API Wrapper
|
8
9
|
|
@@ -196,6 +197,93 @@ Example response
|
|
196
197
|
}
|
197
198
|
```
|
198
199
|
|
200
|
+
#### CircleCI::Project.build_branch
|
201
|
+
|
202
|
+
Build a specific branch of a project
|
203
|
+
|
204
|
+
```ruby
|
205
|
+
res = CircleCi::Project.build_branch 'username', 'reponame', 'branch'
|
206
|
+
res.body['status'] # Not running
|
207
|
+
res.body['build_url'] # Get url of build
|
208
|
+
```
|
209
|
+
|
210
|
+
Example response
|
211
|
+
|
212
|
+
```json
|
213
|
+
{
|
214
|
+
"compare" : null,
|
215
|
+
"previous_successful_build" : {
|
216
|
+
"build_time_millis" : 40479,
|
217
|
+
"status" : "success",
|
218
|
+
"build_num" : 76
|
219
|
+
},
|
220
|
+
"build_parameters" : { },
|
221
|
+
"committer_date" : "2014-07-27T14:40:15Z",
|
222
|
+
"body" : "",
|
223
|
+
"usage_queued_at" : "2014-07-29T14:05:36.373Z",
|
224
|
+
"retry_of" : null,
|
225
|
+
"reponame" : "soapy_cake",
|
226
|
+
"build_url" : "https://circleci.com/gh/ad2games/soapy_cake/77",
|
227
|
+
"parallel" : 1,
|
228
|
+
"failed" : null,
|
229
|
+
"branch" : "master",
|
230
|
+
"username" : "ad2games",
|
231
|
+
"author_date" : "2014-07-27T14:40:15Z",
|
232
|
+
"why" : "edit",
|
233
|
+
"user" : {
|
234
|
+
"is_user" : true,
|
235
|
+
"login" : "hwartig",
|
236
|
+
"name" : "Harald Wartig",
|
237
|
+
"email" : "hw@ad2games.com"
|
238
|
+
},
|
239
|
+
"vcs_revision" : "f932ea1b564ceaaa8cdba06b1bb93e1869a9a905",
|
240
|
+
"build_num" : 77,
|
241
|
+
"infrastructure_fail" : false,
|
242
|
+
"ssh_enabled" : null,
|
243
|
+
"committer_email" : "hwartig@gmail.com",
|
244
|
+
"previous" : {
|
245
|
+
"build_time_millis" : 40479,
|
246
|
+
"status" : "success",
|
247
|
+
"build_num" : 76
|
248
|
+
},
|
249
|
+
"status" : "not_running",
|
250
|
+
"committer_name" : "Harald Wartig",
|
251
|
+
"retries" : null,
|
252
|
+
"subject" : "Fix link to api_versions.yml",
|
253
|
+
"timedout" : false,
|
254
|
+
"dont_build" : null,
|
255
|
+
"feature_flags" : { },
|
256
|
+
"lifecycle" : "not_running",
|
257
|
+
"stop_time" : null,
|
258
|
+
"build_time_millis" : null,
|
259
|
+
"circle_yml" : null,
|
260
|
+
"messages" : [ ],
|
261
|
+
"is_first_green_build" : false,
|
262
|
+
"job_name" : null,
|
263
|
+
"start_time" : null,
|
264
|
+
"all_commit_details" : [ {
|
265
|
+
"committer_date" : "2014-07-27T14:40:15Z",
|
266
|
+
"body" : "",
|
267
|
+
"author_date" : "2014-07-27T14:40:15Z",
|
268
|
+
"committer_email" : "hwartig@gmail.com",
|
269
|
+
"commit" : "f932ea1b564ceaaa8cdba06b1bb93e1869a9a905",
|
270
|
+
"committer_login" : "hwartig",
|
271
|
+
"committer_name" : "Harald Wartig",
|
272
|
+
"subject" : "Fix link to api_versions.yml",
|
273
|
+
"commit_url" : "https://github.com/ad2games/soapy_cake/commit/f932ea1b564ceaaa8cdba06b1bb93e1869a9a905",
|
274
|
+
"author_login" : "hwartig",
|
275
|
+
"author_name" : "Harald Wartig",
|
276
|
+
"author_email" : "hwartig@gmail.com"
|
277
|
+
} ],
|
278
|
+
"outcome" : null,
|
279
|
+
"vcs_url" : "https://github.com/ad2games/soapy_cake",
|
280
|
+
"author_name" : "Harald Wartig",
|
281
|
+
"node" : null,
|
282
|
+
"canceled" : false,
|
283
|
+
"author_email" : "hwartig@gmail.com"
|
284
|
+
}
|
285
|
+
```
|
286
|
+
|
199
287
|
### Build
|
200
288
|
|
201
289
|
#### CircleCi::Build.get
|
data/lib/circleci/project.rb
CHANGED
@@ -53,6 +53,19 @@ module CircleCi
|
|
53
53
|
CircleCi.http.get "/project/#{username}/#{project}/tree/#{branch}"
|
54
54
|
end
|
55
55
|
|
56
|
+
##
|
57
|
+
#
|
58
|
+
# Build the latest push for this branch of a specific project
|
59
|
+
#
|
60
|
+
# @param username [String] - User or org name who owns project
|
61
|
+
# @param project [String] - Name of project
|
62
|
+
# @param branch [String] - Name of branch
|
63
|
+
# @return [CircleCi::Response] - Response object
|
64
|
+
|
65
|
+
def self.build_branch username, project, branch
|
66
|
+
CircleCi.http.post "/project/#{username}/#{project}/tree/#{branch}"
|
67
|
+
end
|
68
|
+
|
56
69
|
##
|
57
70
|
#
|
58
71
|
# Clear the build cache for a specific project
|
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.7
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Chavez
|
@@ -50,6 +50,26 @@ dependencies:
|
|
50
50
|
- - ">="
|
51
51
|
- !ruby/object:Gem::Version
|
52
52
|
version: 1.6.7
|
53
|
+
- !ruby/object:Gem::Dependency
|
54
|
+
name: coveralls
|
55
|
+
requirement: !ruby/object:Gem::Requirement
|
56
|
+
requirements:
|
57
|
+
- - "~>"
|
58
|
+
- !ruby/object:Gem::Version
|
59
|
+
version: 0.7.0
|
60
|
+
- - ">="
|
61
|
+
- !ruby/object:Gem::Version
|
62
|
+
version: 0.7.0
|
63
|
+
type: :development
|
64
|
+
prerelease: false
|
65
|
+
version_requirements: !ruby/object:Gem::Requirement
|
66
|
+
requirements:
|
67
|
+
- - "~>"
|
68
|
+
- !ruby/object:Gem::Version
|
69
|
+
version: 0.7.0
|
70
|
+
- - ">="
|
71
|
+
- !ruby/object:Gem::Version
|
72
|
+
version: 0.7.0
|
53
73
|
- !ruby/object:Gem::Dependency
|
54
74
|
name: dotenv
|
55
75
|
requirement: !ruby/object:Gem::Requirement
|