semaphore_client 2.1.3 → 2.2.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile.lock +1 -1
- data/lib/semaphore_client/api/project.rb +15 -0
- data/lib/semaphore_client/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: e13b12eab27e311546fbde248689c2b79678fe14
|
4
|
+
data.tar.gz: 2ee2dea6c671e41fdeade95d5a91c0eb45d5590e
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: cb4a144dfb295d64ed6d42f26f86f0d7c0b16158e0b62e000e2c418eaf7854e051957db480f6f94bbf6d35c81b16b727b281f33ec35c94d2799e883bb59d0bea
|
7
|
+
data.tar.gz: d349a2d38cbac2987a3b44857fb1d4e3fc55a39384eafbd94377b7d1065e7f53c0d11b2e6fca59b08da86097240b405da554684cbadee6303e784c58b5268acb
|
data/Gemfile.lock
CHANGED
@@ -10,6 +10,11 @@ class SemaphoreClient
|
|
10
10
|
rescue SemaphoreClient::Exceptions::RequestFailed
|
11
11
|
end
|
12
12
|
|
13
|
+
def create_for_org(org_id, params)
|
14
|
+
create_for_org!(org_id, params)
|
15
|
+
rescue SemaphoreClient::Exceptions::RequestFailed
|
16
|
+
end
|
17
|
+
|
13
18
|
def list_for_team(team_id, query = nil)
|
14
19
|
list_for_team!(team_id, query)
|
15
20
|
rescue SemaphoreClient::Exceptions::RequestFailed
|
@@ -47,6 +52,16 @@ class SemaphoreClient
|
|
47
52
|
end
|
48
53
|
end
|
49
54
|
|
55
|
+
def create_for_org!(org_id, params)
|
56
|
+
response = @http_client.post([:orgs, org_id, :projects], params.to_json)
|
57
|
+
|
58
|
+
assert_response_status(response, 200)
|
59
|
+
|
60
|
+
content = JSON.parse(response.body)
|
61
|
+
|
62
|
+
SemaphoreClient::Model::Project.load(content)
|
63
|
+
end
|
64
|
+
|
50
65
|
def list_for_team!(team_id, query = nil)
|
51
66
|
query_string =
|
52
67
|
unless query.nil? || query.empty?
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: semaphore_client
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.
|
4
|
+
version: 2.2.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Jovan Ivanović
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2017-08-
|
11
|
+
date: 2017-08-31 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: faraday
|