semaphoreci_api 0.1.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/.gitignore +9 -0
- data/.rspec +2 -0
- data/Gemfile +4 -0
- data/README.md +36 -0
- data/Rakefile +32 -0
- data/bin/console +14 -0
- data/bin/setup +7 -0
- data/config/client-config.rb +13 -0
- data/lib/semaphoreci_api.rb +10 -0
- data/lib/semaphoreci_api/client.rb +478 -0
- data/lib/semaphoreci_api/version.rb +3 -0
- data/semaphoreci_api.gemspec +27 -0
- metadata +125 -0
checksums.yaml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
SHA1:
|
3
|
+
metadata.gz: 642c9c6d80c2a3f692ae767fde541f2e9be6caea
|
4
|
+
data.tar.gz: f4030fffc7074657cd5dbab2caee0576d8c1b06a
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: 3c53c0957c336b2646ef62893b74c1bcc59cfc0db49c7ad214201e46a34752b4423bcc8013213178b930101fe34f69fdedd0f564669fc203ac1f1665eb5b7547
|
7
|
+
data.tar.gz: 42818913131d6220c44185eb304bd27377e7493f5cace474c74e7f087f53021dccb62cb6ba77714ad17490dbdb7b14c61c7566c896207eb79beb253c53561f69
|
data/.gitignore
ADDED
data/.rspec
ADDED
data/Gemfile
ADDED
data/README.md
ADDED
@@ -0,0 +1,36 @@
|
|
1
|
+
# SemaphoreciApi
|
2
|
+
|
3
|
+
Welcome to your new gem! In this directory, you'll find the files you need to be able to package up your Ruby library into a gem. Put your Ruby code in the file `lib/semaphoreci_api`. To experiment with that code, run `bin/console` for an interactive prompt.
|
4
|
+
|
5
|
+
TODO: Delete this and the text above, and describe your gem
|
6
|
+
|
7
|
+
## Installation
|
8
|
+
|
9
|
+
Add this line to your application's Gemfile:
|
10
|
+
|
11
|
+
```ruby
|
12
|
+
gem 'semaphoreci_api'
|
13
|
+
```
|
14
|
+
|
15
|
+
And then execute:
|
16
|
+
|
17
|
+
$ bundle
|
18
|
+
|
19
|
+
Or install it yourself as:
|
20
|
+
|
21
|
+
$ gem install semaphoreci_api
|
22
|
+
|
23
|
+
## Usage
|
24
|
+
|
25
|
+
TODO: Write usage instructions here
|
26
|
+
|
27
|
+
## Development
|
28
|
+
|
29
|
+
After checking out the repo, run `bin/setup` to install dependencies. Then, run `rake rspec` to run the tests. You can also run `bin/console` for an interactive prompt that will allow you to experiment.
|
30
|
+
|
31
|
+
To install this gem onto your local machine, run `bundle exec rake install`. To release a new version, update the version number in `version.rb`, and then run `bundle exec rake release`, which will create a git tag for the version, push git commits and tags, and push the `.gem` file to [rubygems.org](https://rubygems.org).
|
32
|
+
|
33
|
+
## Contributing
|
34
|
+
|
35
|
+
Bug reports and pull requests are welcome on GitHub at https://github.com/[USERNAME]/semaphoreci_api.
|
36
|
+
|
data/Rakefile
ADDED
@@ -0,0 +1,32 @@
|
|
1
|
+
require "bundler/gem_tasks"
|
2
|
+
require 'yard'
|
3
|
+
|
4
|
+
desc 'Generate API documentation'
|
5
|
+
YARD::Rake::YardocTask.new
|
6
|
+
|
7
|
+
desc 'Download the latest schema and build a new client'
|
8
|
+
task :build do
|
9
|
+
sh 'curl -o schema.json http://api-docs.semaphoreci.com/schema.json'
|
10
|
+
sh 'bundle exec heroics-generate ./config/client-config.rb > lib/semaphoreci_api/client.rb'
|
11
|
+
sh 'rm schema.json'
|
12
|
+
end
|
13
|
+
|
14
|
+
desc 'Publish API documentation'
|
15
|
+
task :publish do
|
16
|
+
sh 'rake yard'
|
17
|
+
sh 'cp -R doc /tmp/semaphoreci-api-doc'
|
18
|
+
sh 'git checkout gh-pages'
|
19
|
+
sh 'cp -R /tmp/semaphoreci-api-doc/* .'
|
20
|
+
sh 'rm -rf /tmp/semaphoreci-api-doc'
|
21
|
+
sh 'git add .'
|
22
|
+
sh 'git commit -am "Rebuild documentation"'
|
23
|
+
sh 'git push origin gh-pages'
|
24
|
+
sh 'git checkout master'
|
25
|
+
end
|
26
|
+
|
27
|
+
begin
|
28
|
+
require "rspec/core/rake_task"
|
29
|
+
RSpec::Core::RakeTask.new(:spec)
|
30
|
+
task :default => :spec
|
31
|
+
rescue LoadError
|
32
|
+
end
|
data/bin/console
ADDED
@@ -0,0 +1,14 @@
|
|
1
|
+
#!/usr/bin/env ruby
|
2
|
+
|
3
|
+
require "bundler/setup"
|
4
|
+
require "semaphoreci_api"
|
5
|
+
|
6
|
+
# You can add fixtures and/or initialization code here to make experimenting
|
7
|
+
# with your gem easier. You can also use a different console, if you like.
|
8
|
+
|
9
|
+
# (If you use this, don't forget to add pry to your Gemfile!)
|
10
|
+
# require "pry"
|
11
|
+
# Pry.start
|
12
|
+
|
13
|
+
require "irb"
|
14
|
+
IRB.start
|
data/bin/setup
ADDED
@@ -0,0 +1,13 @@
|
|
1
|
+
require 'heroics'
|
2
|
+
|
3
|
+
Heroics.default_configuration do |config|
|
4
|
+
config.base_url = 'https://semaphoreci.com/api/v2'
|
5
|
+
config.module_name = 'SemaphoreciApi'
|
6
|
+
config.schema_filepath = 'schema.json'
|
7
|
+
|
8
|
+
config.headers = { 'Accept' => 'application/vnd.semaphoreci+json; version=1' }
|
9
|
+
|
10
|
+
# Note: Don't use doublequotes below -- we want to interpolate at runtime,
|
11
|
+
# not when the client is generated
|
12
|
+
config.cache_path = '#{Dir.home}/.heroics/example'
|
13
|
+
end
|
@@ -0,0 +1,478 @@
|
|
1
|
+
# encoding: utf-8
|
2
|
+
# frozen_string_literal: true
|
3
|
+
|
4
|
+
#
|
5
|
+
# WARNING: Do not edit by hand, this file was generated by Heroics:
|
6
|
+
#
|
7
|
+
# https://github.com/interagent/heroics
|
8
|
+
#
|
9
|
+
|
10
|
+
require 'heroics'
|
11
|
+
require 'uri'
|
12
|
+
|
13
|
+
module SemaphoreciApi
|
14
|
+
# Get a Client configured to use HTTP Basic or header-based authentication.
|
15
|
+
#
|
16
|
+
# @param api_key [String] The API key to use when connecting.
|
17
|
+
# @param options [Hash<Symbol,String>] Optionally, custom settings
|
18
|
+
# to use with the client. Allowed options are `default_headers`,
|
19
|
+
# `cache`, `user` and `url`.
|
20
|
+
# @return [Client] A client configured to use the API with HTTP Basic
|
21
|
+
# or header-based authentication.
|
22
|
+
def self.connect(api_key, options=nil)
|
23
|
+
options = custom_options(options)
|
24
|
+
uri = URI.parse(options[:url])
|
25
|
+
|
26
|
+
if options[:user]
|
27
|
+
uri.user = URI.encode_www_form_component options[:user]
|
28
|
+
end
|
29
|
+
|
30
|
+
if api_key
|
31
|
+
uri.user ||= 'user'
|
32
|
+
uri.password = api_key
|
33
|
+
end
|
34
|
+
|
35
|
+
client = Heroics.client_from_schema(SCHEMA, uri.to_s, options)
|
36
|
+
Client.new(client)
|
37
|
+
end
|
38
|
+
|
39
|
+
# Get a Client configured to use OAuth authentication.
|
40
|
+
#
|
41
|
+
# @param oauth_token [String] The OAuth token to use with the API.
|
42
|
+
# @param options [Hash<Symbol,String>] Optionally, custom settings
|
43
|
+
# to use with the client. Allowed options are `default_headers`,
|
44
|
+
# `cache` and `url`.
|
45
|
+
# @return [Client] A client configured to use the API with OAuth
|
46
|
+
# authentication.
|
47
|
+
def self.connect_oauth(oauth_token, options=nil)
|
48
|
+
options = custom_options(options)
|
49
|
+
url = options[:url]
|
50
|
+
client = Heroics.oauth_client_from_schema(oauth_token, SCHEMA, url, options)
|
51
|
+
Client.new(client)
|
52
|
+
end
|
53
|
+
|
54
|
+
# Get a Client configured to use Token authentication.
|
55
|
+
#
|
56
|
+
# @param token [String] The token to use with the API.
|
57
|
+
# @param options [Hash<Symbol,String>] Optionally, custom settings
|
58
|
+
# to use with the client. Allowed options are `default_headers`,
|
59
|
+
# `cache` and `url`.
|
60
|
+
# @return [Client] A client configured to use the API with OAuth
|
61
|
+
# authentication.
|
62
|
+
def self.connect_token(token, options=nil)
|
63
|
+
options = custom_options(options)
|
64
|
+
url = options[:url]
|
65
|
+
client = Heroics.token_client_from_schema(token, SCHEMA, url, options)
|
66
|
+
Client.new(client)
|
67
|
+
end
|
68
|
+
|
69
|
+
# Get customized options.
|
70
|
+
def self.custom_options(options)
|
71
|
+
return default_options if options.nil?
|
72
|
+
|
73
|
+
final_options = default_options
|
74
|
+
if options[:default_headers]
|
75
|
+
final_options[:default_headers].merge!(options[:default_headers])
|
76
|
+
end
|
77
|
+
final_options[:cache] = options[:cache] || Moneta.new(:File, dir: "#{Dir.home}/.heroics/example")
|
78
|
+
final_options[:url] = options[:url] if options[:url]
|
79
|
+
final_options[:user] = options[:user] if options[:user]
|
80
|
+
final_options
|
81
|
+
end
|
82
|
+
|
83
|
+
# Get the default options.
|
84
|
+
def self.default_options
|
85
|
+
default_headers = {"Accept"=>"application/vnd.semaphoreci+json; version=1"}
|
86
|
+
{
|
87
|
+
default_headers: default_headers,
|
88
|
+
url: "https://semaphoreci.com/api/v2"
|
89
|
+
}
|
90
|
+
end
|
91
|
+
|
92
|
+
private_class_method :default_options, :custom_options
|
93
|
+
|
94
|
+
# Semaphore
|
95
|
+
class Client
|
96
|
+
def initialize(client)
|
97
|
+
@client = client
|
98
|
+
end
|
99
|
+
|
100
|
+
# Get basic information about your organizations
|
101
|
+
#
|
102
|
+
# @return [Org]
|
103
|
+
def org
|
104
|
+
@org_resource ||= Org.new(@client)
|
105
|
+
end
|
106
|
+
|
107
|
+
# All aspects of team management
|
108
|
+
#
|
109
|
+
# @return [Team]
|
110
|
+
def team
|
111
|
+
@team_resource ||= Team.new(@client)
|
112
|
+
end
|
113
|
+
end
|
114
|
+
|
115
|
+
private
|
116
|
+
|
117
|
+
# Get basic information about your organizations
|
118
|
+
class Org
|
119
|
+
def initialize(client)
|
120
|
+
@client = client
|
121
|
+
end
|
122
|
+
|
123
|
+
# Info for existing organization.
|
124
|
+
#
|
125
|
+
# @param org_username: unique username of organization
|
126
|
+
def info(org_username)
|
127
|
+
@client.org.info(org_username)
|
128
|
+
end
|
129
|
+
|
130
|
+
# List existing organizations.
|
131
|
+
def list()
|
132
|
+
@client.org.list()
|
133
|
+
end
|
134
|
+
end
|
135
|
+
|
136
|
+
# All aspects of team management
|
137
|
+
class Team
|
138
|
+
def initialize(client)
|
139
|
+
@client = client
|
140
|
+
end
|
141
|
+
|
142
|
+
# Create a new team.
|
143
|
+
#
|
144
|
+
# @param org_username: unique username of organization
|
145
|
+
# @param body: the object to pass as the request payload
|
146
|
+
def create(org_username, body = {})
|
147
|
+
@client.team.create(org_username, body)
|
148
|
+
end
|
149
|
+
|
150
|
+
# Delete an existing team.
|
151
|
+
#
|
152
|
+
# @param team_id: unique identifier of team
|
153
|
+
def delete(team_id)
|
154
|
+
@client.team.delete(team_id)
|
155
|
+
end
|
156
|
+
|
157
|
+
# Info for existing team.
|
158
|
+
#
|
159
|
+
# @param team_id: unique identifier of team
|
160
|
+
def info(team_id)
|
161
|
+
@client.team.info(team_id)
|
162
|
+
end
|
163
|
+
|
164
|
+
# List existing teams for an org.
|
165
|
+
#
|
166
|
+
# @param org_username: unique username of organization
|
167
|
+
def list(org_username)
|
168
|
+
@client.team.list(org_username)
|
169
|
+
end
|
170
|
+
|
171
|
+
# Update an existing team.
|
172
|
+
#
|
173
|
+
# @param team_id: unique identifier of team
|
174
|
+
# @param body: the object to pass as the request payload
|
175
|
+
def update(team_id, body = {})
|
176
|
+
@client.team.update(team_id, body)
|
177
|
+
end
|
178
|
+
end
|
179
|
+
|
180
|
+
SCHEMA = Heroics::Schema.new(MultiJson.load(<<-'HEROICS_SCHEMA'))
|
181
|
+
{
|
182
|
+
"$schema": "http://interagent.github.io/interagent-hyper-schema",
|
183
|
+
"type": [
|
184
|
+
"object"
|
185
|
+
],
|
186
|
+
"definitions": {
|
187
|
+
"org": {
|
188
|
+
"$schema": "http://json-schema.org/draft-04/hyper-schema",
|
189
|
+
"title": "Organizations",
|
190
|
+
"description": "Get basic information about your organizations",
|
191
|
+
"stability": "prototype",
|
192
|
+
"strictProperties": true,
|
193
|
+
"type": [
|
194
|
+
"object"
|
195
|
+
],
|
196
|
+
"definitions": {
|
197
|
+
"id": {
|
198
|
+
"description": "unique identifier of organization",
|
199
|
+
"readOnly": true,
|
200
|
+
"format": "uuid",
|
201
|
+
"type": [
|
202
|
+
"string"
|
203
|
+
]
|
204
|
+
},
|
205
|
+
"identity": {
|
206
|
+
"anyOf": [
|
207
|
+
{
|
208
|
+
"$ref": "#/definitions/org/definitions/username"
|
209
|
+
}
|
210
|
+
]
|
211
|
+
},
|
212
|
+
"url": {
|
213
|
+
"description": "a link to the organization",
|
214
|
+
"example": "https://api.semaphoreci.com/api/v2/orgs/{org_username}",
|
215
|
+
"readOnly": true,
|
216
|
+
"type": [
|
217
|
+
"string"
|
218
|
+
]
|
219
|
+
},
|
220
|
+
"username": {
|
221
|
+
"description": "unique username of organization",
|
222
|
+
"readOnly": true,
|
223
|
+
"type": [
|
224
|
+
"string"
|
225
|
+
]
|
226
|
+
},
|
227
|
+
"name": {
|
228
|
+
"description": "name of organization",
|
229
|
+
"readOnly": true,
|
230
|
+
"type": [
|
231
|
+
"string"
|
232
|
+
]
|
233
|
+
},
|
234
|
+
"updated_at": {
|
235
|
+
"description": "when organization was updated",
|
236
|
+
"format": "date-time",
|
237
|
+
"type": [
|
238
|
+
"string"
|
239
|
+
]
|
240
|
+
},
|
241
|
+
"created_at": {
|
242
|
+
"description": "when organization was created",
|
243
|
+
"format": "date-time",
|
244
|
+
"type": [
|
245
|
+
"string"
|
246
|
+
]
|
247
|
+
}
|
248
|
+
},
|
249
|
+
"links": [
|
250
|
+
{
|
251
|
+
"description": "Info for existing organization.",
|
252
|
+
"href": "/orgs/{(%23%2Fdefinitions%2Forg%2Fdefinitions%2Fidentity)}",
|
253
|
+
"method": "GET",
|
254
|
+
"rel": "self",
|
255
|
+
"title": "Info"
|
256
|
+
},
|
257
|
+
{
|
258
|
+
"description": "List existing organizations.",
|
259
|
+
"href": "/orgs",
|
260
|
+
"method": "GET",
|
261
|
+
"rel": "instances",
|
262
|
+
"title": "List"
|
263
|
+
}
|
264
|
+
],
|
265
|
+
"properties": {
|
266
|
+
"id": {
|
267
|
+
"$ref": "#/definitions/org/definitions/id"
|
268
|
+
},
|
269
|
+
"url": {
|
270
|
+
"$ref": "#/definitions/org/definitions/url"
|
271
|
+
},
|
272
|
+
"username": {
|
273
|
+
"$ref": "#/definitions/org/definitions/username"
|
274
|
+
},
|
275
|
+
"name": {
|
276
|
+
"$ref": "#/definitions/org/definitions/name"
|
277
|
+
},
|
278
|
+
"updated_at": {
|
279
|
+
"$ref": "#/definitions/org/definitions/updated_at"
|
280
|
+
},
|
281
|
+
"created_at": {
|
282
|
+
"$ref": "#/definitions/org/definitions/created_at"
|
283
|
+
}
|
284
|
+
}
|
285
|
+
},
|
286
|
+
"team": {
|
287
|
+
"$schema": "http://json-schema.org/draft-04/hyper-schema",
|
288
|
+
"title": "Team",
|
289
|
+
"description": "All aspects of team management",
|
290
|
+
"stability": "prototype",
|
291
|
+
"strictProperties": true,
|
292
|
+
"type": [
|
293
|
+
"object"
|
294
|
+
],
|
295
|
+
"definitions": {
|
296
|
+
"id": {
|
297
|
+
"description": "unique identifier of team",
|
298
|
+
"readOnly": true,
|
299
|
+
"format": "uuid",
|
300
|
+
"type": [
|
301
|
+
"string"
|
302
|
+
]
|
303
|
+
},
|
304
|
+
"identity": {
|
305
|
+
"anyOf": [
|
306
|
+
{
|
307
|
+
"$ref": "#/definitions/team/definitions/id"
|
308
|
+
}
|
309
|
+
]
|
310
|
+
},
|
311
|
+
"permission": {
|
312
|
+
"description": "unique name of team",
|
313
|
+
"readOnly": true,
|
314
|
+
"example": "admin",
|
315
|
+
"type": [
|
316
|
+
"string"
|
317
|
+
],
|
318
|
+
"enum": [
|
319
|
+
"read",
|
320
|
+
"write",
|
321
|
+
"admin"
|
322
|
+
]
|
323
|
+
},
|
324
|
+
"name": {
|
325
|
+
"description": "name of team",
|
326
|
+
"readOnly": true,
|
327
|
+
"type": [
|
328
|
+
"string"
|
329
|
+
]
|
330
|
+
},
|
331
|
+
"description": {
|
332
|
+
"description": "team description",
|
333
|
+
"readOnly": true,
|
334
|
+
"type": [
|
335
|
+
"string"
|
336
|
+
]
|
337
|
+
},
|
338
|
+
"url": {
|
339
|
+
"description": "a link to the team",
|
340
|
+
"example": "https://api.semaphoreci.com/api/v2/teams/{team_id}",
|
341
|
+
"readOnly": true,
|
342
|
+
"type": [
|
343
|
+
"string"
|
344
|
+
]
|
345
|
+
},
|
346
|
+
"updated_at": {
|
347
|
+
"description": "when team was updated",
|
348
|
+
"format": "date-time",
|
349
|
+
"type": [
|
350
|
+
"string"
|
351
|
+
]
|
352
|
+
},
|
353
|
+
"created_at": {
|
354
|
+
"description": "when team was created",
|
355
|
+
"format": "date-time",
|
356
|
+
"type": [
|
357
|
+
"string"
|
358
|
+
]
|
359
|
+
}
|
360
|
+
},
|
361
|
+
"links": [
|
362
|
+
{
|
363
|
+
"description": "Create a new team.",
|
364
|
+
"href": "/orgs/{(%23%2Fdefinitions%2Forg%2Fdefinitions%2Fidentity)}/teams",
|
365
|
+
"method": "POST",
|
366
|
+
"rel": "create",
|
367
|
+
"schema": {
|
368
|
+
"properties": {
|
369
|
+
"name": {
|
370
|
+
"$ref": "#/definitions/team/definitions/name"
|
371
|
+
},
|
372
|
+
"description": {
|
373
|
+
"$ref": "#/definitions/team/definitions/description"
|
374
|
+
},
|
375
|
+
"permission": {
|
376
|
+
"$ref": "#/definitions/team/definitions/permission"
|
377
|
+
}
|
378
|
+
},
|
379
|
+
"required": [
|
380
|
+
"name",
|
381
|
+
"permission"
|
382
|
+
],
|
383
|
+
"type": [
|
384
|
+
"object"
|
385
|
+
]
|
386
|
+
},
|
387
|
+
"title": "Create"
|
388
|
+
},
|
389
|
+
{
|
390
|
+
"description": "Delete an existing team.",
|
391
|
+
"href": "/teams/{(%23%2Fdefinitions%2Fteam%2Fdefinitions%2Fidentity)}",
|
392
|
+
"method": "DELETE",
|
393
|
+
"rel": "destroy",
|
394
|
+
"title": "Delete"
|
395
|
+
},
|
396
|
+
{
|
397
|
+
"description": "Info for existing team.",
|
398
|
+
"href": "/teams/{(%23%2Fdefinitions%2Fteam%2Fdefinitions%2Fidentity)}",
|
399
|
+
"method": "GET",
|
400
|
+
"rel": "self",
|
401
|
+
"title": "Info"
|
402
|
+
},
|
403
|
+
{
|
404
|
+
"description": "List existing teams for an org.",
|
405
|
+
"href": "/orgs/{(%23%2Fdefinitions%2Forg%2Fdefinitions%2Fidentity)}/teams",
|
406
|
+
"method": "GET",
|
407
|
+
"rel": "instances",
|
408
|
+
"title": "List"
|
409
|
+
},
|
410
|
+
{
|
411
|
+
"description": "Update an existing team.",
|
412
|
+
"href": "/teams/{(%23%2Fdefinitions%2Fteam%2Fdefinitions%2Fidentity)}",
|
413
|
+
"method": "PATCH",
|
414
|
+
"rel": "update",
|
415
|
+
"schema": {
|
416
|
+
"properties": {
|
417
|
+
"name": {
|
418
|
+
"$ref": "#/definitions/team/definitions/name"
|
419
|
+
},
|
420
|
+
"description": {
|
421
|
+
"$ref": "#/definitions/team/definitions/description"
|
422
|
+
},
|
423
|
+
"permission": {
|
424
|
+
"$ref": "#/definitions/team/definitions/permission"
|
425
|
+
}
|
426
|
+
},
|
427
|
+
"type": [
|
428
|
+
"object"
|
429
|
+
]
|
430
|
+
},
|
431
|
+
"title": "Update"
|
432
|
+
}
|
433
|
+
],
|
434
|
+
"properties": {
|
435
|
+
"id": {
|
436
|
+
"$ref": "#/definitions/team/definitions/id"
|
437
|
+
},
|
438
|
+
"url": {
|
439
|
+
"$ref": "#/definitions/team/definitions/url"
|
440
|
+
},
|
441
|
+
"name": {
|
442
|
+
"$ref": "#/definitions/team/definitions/name"
|
443
|
+
},
|
444
|
+
"description": {
|
445
|
+
"$ref": "#/definitions/team/definitions/description"
|
446
|
+
},
|
447
|
+
"permission": {
|
448
|
+
"$ref": "#/definitions/team/definitions/permission"
|
449
|
+
},
|
450
|
+
"updated_at": {
|
451
|
+
"$ref": "#/definitions/team/definitions/updated_at"
|
452
|
+
},
|
453
|
+
"created_at": {
|
454
|
+
"$ref": "#/definitions/team/definitions/created_at"
|
455
|
+
}
|
456
|
+
}
|
457
|
+
}
|
458
|
+
},
|
459
|
+
"properties": {
|
460
|
+
"org": {
|
461
|
+
"$ref": "#/definitions/org"
|
462
|
+
},
|
463
|
+
"team": {
|
464
|
+
"$ref": "#/definitions/team"
|
465
|
+
}
|
466
|
+
},
|
467
|
+
"description": "Semaphore",
|
468
|
+
"id": "hello-prmd",
|
469
|
+
"links": [
|
470
|
+
{
|
471
|
+
"href": "https://api.semaphoreci.com/api/v2",
|
472
|
+
"rel": "self"
|
473
|
+
}
|
474
|
+
],
|
475
|
+
"title": "Hello Prmd"
|
476
|
+
}
|
477
|
+
HEROICS_SCHEMA
|
478
|
+
end
|
@@ -0,0 +1,27 @@
|
|
1
|
+
# coding: utf-8
|
2
|
+
lib = File.expand_path('../lib', __FILE__)
|
3
|
+
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
4
|
+
require 'semaphoreci_api/version'
|
5
|
+
|
6
|
+
Gem::Specification.new do |spec|
|
7
|
+
spec.name = "semaphoreci_api"
|
8
|
+
spec.version = SemaphoreciApi::VERSION
|
9
|
+
spec.authors = ["Darko Fabijan"]
|
10
|
+
spec.email = ["darko@renderedtext.com"]
|
11
|
+
|
12
|
+
spec.summary = "Ruby HTTP client for the Semaphore CI API."
|
13
|
+
spec.description = "Ruby HTTP client for the Semaphore CI API."
|
14
|
+
spec.homepage = "https://github.com/renderedtext/semaphoreci_api"
|
15
|
+
|
16
|
+
spec.files = `git ls-files -z`.split("\x0").reject { |f| f.match(%r{^(test|spec|features)/}) }
|
17
|
+
spec.bindir = "exe"
|
18
|
+
spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
|
19
|
+
spec.require_paths = ["lib"]
|
20
|
+
|
21
|
+
spec.add_development_dependency "bundler", "~> 1.10"
|
22
|
+
spec.add_development_dependency "rake", "~> 10.0"
|
23
|
+
spec.add_development_dependency "rspec"
|
24
|
+
spec.add_development_dependency "yard"
|
25
|
+
|
26
|
+
spec.add_dependency "heroics", "~> 0.0.21"
|
27
|
+
end
|
metadata
ADDED
@@ -0,0 +1,125 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: semaphoreci_api
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 0.1.1
|
5
|
+
platform: ruby
|
6
|
+
authors:
|
7
|
+
- Darko Fabijan
|
8
|
+
autorequire:
|
9
|
+
bindir: exe
|
10
|
+
cert_chain: []
|
11
|
+
date: 2017-04-30 00:00:00.000000000 Z
|
12
|
+
dependencies:
|
13
|
+
- !ruby/object:Gem::Dependency
|
14
|
+
name: bundler
|
15
|
+
requirement: !ruby/object:Gem::Requirement
|
16
|
+
requirements:
|
17
|
+
- - "~>"
|
18
|
+
- !ruby/object:Gem::Version
|
19
|
+
version: '1.10'
|
20
|
+
type: :development
|
21
|
+
prerelease: false
|
22
|
+
version_requirements: !ruby/object:Gem::Requirement
|
23
|
+
requirements:
|
24
|
+
- - "~>"
|
25
|
+
- !ruby/object:Gem::Version
|
26
|
+
version: '1.10'
|
27
|
+
- !ruby/object:Gem::Dependency
|
28
|
+
name: rake
|
29
|
+
requirement: !ruby/object:Gem::Requirement
|
30
|
+
requirements:
|
31
|
+
- - "~>"
|
32
|
+
- !ruby/object:Gem::Version
|
33
|
+
version: '10.0'
|
34
|
+
type: :development
|
35
|
+
prerelease: false
|
36
|
+
version_requirements: !ruby/object:Gem::Requirement
|
37
|
+
requirements:
|
38
|
+
- - "~>"
|
39
|
+
- !ruby/object:Gem::Version
|
40
|
+
version: '10.0'
|
41
|
+
- !ruby/object:Gem::Dependency
|
42
|
+
name: rspec
|
43
|
+
requirement: !ruby/object:Gem::Requirement
|
44
|
+
requirements:
|
45
|
+
- - ">="
|
46
|
+
- !ruby/object:Gem::Version
|
47
|
+
version: '0'
|
48
|
+
type: :development
|
49
|
+
prerelease: false
|
50
|
+
version_requirements: !ruby/object:Gem::Requirement
|
51
|
+
requirements:
|
52
|
+
- - ">="
|
53
|
+
- !ruby/object:Gem::Version
|
54
|
+
version: '0'
|
55
|
+
- !ruby/object:Gem::Dependency
|
56
|
+
name: yard
|
57
|
+
requirement: !ruby/object:Gem::Requirement
|
58
|
+
requirements:
|
59
|
+
- - ">="
|
60
|
+
- !ruby/object:Gem::Version
|
61
|
+
version: '0'
|
62
|
+
type: :development
|
63
|
+
prerelease: false
|
64
|
+
version_requirements: !ruby/object:Gem::Requirement
|
65
|
+
requirements:
|
66
|
+
- - ">="
|
67
|
+
- !ruby/object:Gem::Version
|
68
|
+
version: '0'
|
69
|
+
- !ruby/object:Gem::Dependency
|
70
|
+
name: heroics
|
71
|
+
requirement: !ruby/object:Gem::Requirement
|
72
|
+
requirements:
|
73
|
+
- - "~>"
|
74
|
+
- !ruby/object:Gem::Version
|
75
|
+
version: 0.0.21
|
76
|
+
type: :runtime
|
77
|
+
prerelease: false
|
78
|
+
version_requirements: !ruby/object:Gem::Requirement
|
79
|
+
requirements:
|
80
|
+
- - "~>"
|
81
|
+
- !ruby/object:Gem::Version
|
82
|
+
version: 0.0.21
|
83
|
+
description: Ruby HTTP client for the Semaphore CI API.
|
84
|
+
email:
|
85
|
+
- darko@renderedtext.com
|
86
|
+
executables: []
|
87
|
+
extensions: []
|
88
|
+
extra_rdoc_files: []
|
89
|
+
files:
|
90
|
+
- ".gitignore"
|
91
|
+
- ".rspec"
|
92
|
+
- Gemfile
|
93
|
+
- README.md
|
94
|
+
- Rakefile
|
95
|
+
- bin/console
|
96
|
+
- bin/setup
|
97
|
+
- config/client-config.rb
|
98
|
+
- lib/semaphoreci_api.rb
|
99
|
+
- lib/semaphoreci_api/client.rb
|
100
|
+
- lib/semaphoreci_api/version.rb
|
101
|
+
- semaphoreci_api.gemspec
|
102
|
+
homepage: https://github.com/renderedtext/semaphoreci_api
|
103
|
+
licenses: []
|
104
|
+
metadata: {}
|
105
|
+
post_install_message:
|
106
|
+
rdoc_options: []
|
107
|
+
require_paths:
|
108
|
+
- lib
|
109
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
110
|
+
requirements:
|
111
|
+
- - ">="
|
112
|
+
- !ruby/object:Gem::Version
|
113
|
+
version: '0'
|
114
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
115
|
+
requirements:
|
116
|
+
- - ">="
|
117
|
+
- !ruby/object:Gem::Version
|
118
|
+
version: '0'
|
119
|
+
requirements: []
|
120
|
+
rubyforge_project:
|
121
|
+
rubygems_version: 2.4.5
|
122
|
+
signing_key:
|
123
|
+
specification_version: 4
|
124
|
+
summary: Ruby HTTP client for the Semaphore CI API.
|
125
|
+
test_files: []
|