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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 1a9a08db0c4d653d5153087b7b962ad0ecb5e0ad
4
- data.tar.gz: 797ed226c2c947e42769ab6872ba0a79ae3f9a21
3
+ metadata.gz: e13b12eab27e311546fbde248689c2b79678fe14
4
+ data.tar.gz: 2ee2dea6c671e41fdeade95d5a91c0eb45d5590e
5
5
  SHA512:
6
- metadata.gz: fe495f22fa71502fb95c1c633ba469dba84791c04a9be90a6ee75ecb782313a5706cce7311c829f57d13551342d9e2b614c3292a17556207c37dd1ef29e8163b
7
- data.tar.gz: 64624e37b30c879554a0f52c4250aceae8009c75a0585ee4f485eb865a06d0eb15159d164f03a287c86b81d7c59f5db648f0e7fbea9ff53484c5d5f7cb511c26
6
+ metadata.gz: cb4a144dfb295d64ed6d42f26f86f0d7c0b16158e0b62e000e2c418eaf7854e051957db480f6f94bbf6d35c81b16b727b281f33ec35c94d2799e883bb59d0bea
7
+ data.tar.gz: d349a2d38cbac2987a3b44857fb1d4e3fc55a39384eafbd94377b7d1065e7f53c0d11b2e6fca59b08da86097240b405da554684cbadee6303e784c58b5268acb
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- semaphore_client (2.1.3)
4
+ semaphore_client (2.2.0)
5
5
  faraday
6
6
 
7
7
  GEM
@@ -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?
@@ -1,3 +1,3 @@
1
1
  class SemaphoreClient
2
- VERSION = "2.1.3"
2
+ VERSION = "2.2.0"
3
3
  end
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.1.3
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-23 00:00:00.000000000 Z
11
+ date: 2017-08-31 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: faraday