semaphore_client 2.1.2 → 2.1.3

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: 233f6445c0fea8148557b7b1ddf8b5ab09104d02
4
- data.tar.gz: 1d57cc7003b566b378dbe462291378717c3865aa
3
+ metadata.gz: 1a9a08db0c4d653d5153087b7b962ad0ecb5e0ad
4
+ data.tar.gz: 797ed226c2c947e42769ab6872ba0a79ae3f9a21
5
5
  SHA512:
6
- metadata.gz: 798d8b603c162d9e39503218da46ebc1dfe7dab4e861ac3e304a651989ac88d142ec8c1b4ba2f4013c8b8daa1c94bd5d21a6f7649311924daf652ecbbd06c68a
7
- data.tar.gz: cb7ee819ae73ccfc02c66aea7e7d0da755640454086b908964ea8169988565a7d2d19f8fd580c99a75961e7a1fe004b25884c18d14f8599940189229de5c986c
6
+ metadata.gz: fe495f22fa71502fb95c1c633ba469dba84791c04a9be90a6ee75ecb782313a5706cce7311c829f57d13551342d9e2b614c3292a17556207c37dd1ef29e8163b
7
+ data.tar.gz: 64624e37b30c879554a0f52c4250aceae8009c75a0585ee4f485eb865a06d0eb15159d164f03a287c86b81d7c59f5db648f0e7fbea9ff53484c5d5f7cb511c26
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- semaphore_client (2.1.2)
4
+ semaphore_client (2.1.3)
5
5
  faraday
6
6
 
7
7
  GEM
@@ -46,7 +46,10 @@ class SemaphoreClient
46
46
  end
47
47
 
48
48
  def list_for_project!(project_id, query = nil)
49
- query_string = query.nil? ? nil : "?#{query}"
49
+ query_string =
50
+ unless query.nil? || query.empty?
51
+ "?" + query.map { |key, value| "#{key}=#{value}" }.join("&")
52
+ end
50
53
 
51
54
  response = @http_client.get([:projects, project_id, :config_files, query_string].compact)
52
55
 
@@ -72,7 +75,10 @@ class SemaphoreClient
72
75
  end
73
76
 
74
77
  def list_for_shared_config!(shared_config_id, query = nil)
75
- query_string = query.nil? ? nil : "?#{query}"
78
+ query_string =
79
+ unless query.nil? || query.empty?
80
+ "?" + query.map { |key, value| "#{key}=#{value}" }.join("&")
81
+ end
76
82
 
77
83
  response = @http_client.get([:shared_configs, shared_config_id, :config_files, query_string].compact)
78
84
 
@@ -46,7 +46,10 @@ class SemaphoreClient
46
46
  end
47
47
 
48
48
  def list_for_project!(project_id, query = nil)
49
- query_string = query.nil? ? nil : "?#{query}"
49
+ query_string =
50
+ unless query.nil? || query.empty?
51
+ "?" + query.map { |key, value| "#{key}=#{value}" }.join("&")
52
+ end
50
53
 
51
54
  response = @http_client.get([:projects, project_id, :env_vars, query_string].compact)
52
55
 
@@ -72,7 +75,10 @@ class SemaphoreClient
72
75
  end
73
76
 
74
77
  def list_for_shared_config!(shared_config_id, query = nil)
75
- query_string = query.nil? ? nil : "?#{query}"
78
+ query_string =
79
+ unless query.nil? || query.empty?
80
+ "?" + query.map { |key, value| "#{key}=#{value}" }.join("&")
81
+ end
76
82
 
77
83
  response = @http_client.get([:shared_configs, shared_config_id, :env_vars, query_string].compact)
78
84
 
@@ -31,7 +31,10 @@ class SemaphoreClient
31
31
  end
32
32
 
33
33
  def list_for_org!(org_id, query = nil)
34
- query_string = query.nil? ? nil : "?#{query}"
34
+ query_string =
35
+ unless query.nil? || query.empty?
36
+ "?" + query.map { |key, value| "#{key}=#{value}" }.join("&")
37
+ end
35
38
 
36
39
  response = @http_client.get([:orgs, org_id, :projects, query_string].compact)
37
40
 
@@ -45,7 +48,10 @@ class SemaphoreClient
45
48
  end
46
49
 
47
50
  def list_for_team!(team_id, query = nil)
48
- query_string = query.nil? ? nil : "?#{query}"
51
+ query_string =
52
+ unless query.nil? || query.empty?
53
+ "?" + query.map { |key, value| "#{key}=#{value}" }.join("&")
54
+ end
49
55
 
50
56
  response = @http_client.get([:teams, team_id, :projects, query_string].compact)
51
57
 
@@ -71,7 +77,10 @@ class SemaphoreClient
71
77
  end
72
78
 
73
79
  def list_for_shared_config!(shared_config_id, query = nil)
74
- query_string = query.nil? ? nil : "?#{query}"
80
+ query_string =
81
+ unless query.nil? || query.empty?
82
+ "?" + query.map { |key, value| "#{key}=#{value}" }.join("&")
83
+ end
75
84
 
76
85
  response = @http_client.get([:shared_configs, shared_config_id, :projects, query_string].compact)
77
86
 
@@ -61,7 +61,10 @@ class SemaphoreClient
61
61
  end
62
62
 
63
63
  def list_for_org!(org_id, query = nil)
64
- query_string = query.nil? ? nil : "?#{query}"
64
+ query_string =
65
+ unless query.nil? || query.empty?
66
+ "?" + query.map { |key, value| "#{key}=#{value}" }.join("&")
67
+ end
65
68
 
66
69
  response = @http_client.get([:orgs, org_id, :shared_configs, query_string].compact)
67
70
 
@@ -85,7 +88,10 @@ class SemaphoreClient
85
88
  end
86
89
 
87
90
  def list_for_team!(team_id, query = nil)
88
- query_string = query.nil? ? nil : "?#{query}"
91
+ query_string =
92
+ unless query.nil? || query.empty?
93
+ "?" + query.map { |key, value| "#{key}=#{value}" }.join("&")
94
+ end
89
95
 
90
96
  response = @http_client.get([:teams, team_id, :shared_configs, query_string].compact)
91
97
 
@@ -111,7 +117,10 @@ class SemaphoreClient
111
117
  end
112
118
 
113
119
  def list_for_project!(project_id, query = nil)
114
- query_string = query.nil? ? nil : "?#{query}"
120
+ query_string =
121
+ unless query.nil? || query.empty?
122
+ "?" + query.map { |key, value| "#{key}=#{value}" }.join("&")
123
+ end
115
124
 
116
125
  response = @http_client.get([:projects, project_id, :shared_configs, query_string].compact)
117
126
 
@@ -41,7 +41,10 @@ class SemaphoreClient
41
41
  end
42
42
 
43
43
  def list_for_org!(org_id, query = nil)
44
- query_string = query.nil? ? nil : "?#{query}"
44
+ query_string =
45
+ unless query.nil? || query.empty?
46
+ "?" + query.map { |key, value| "#{key}=#{value}" }.join("&")
47
+ end
45
48
 
46
49
  response = @http_client.get([:orgs, org_id, :teams, query_string].compact)
47
50
 
@@ -91,7 +94,10 @@ class SemaphoreClient
91
94
  end
92
95
 
93
96
  def list_for_project!(project_id, query = nil)
94
- query_string = query.nil? ? nil : "?#{query}"
97
+ query_string =
98
+ unless query.nil? || query.empty?
99
+ "?" + query.map { |key, value| "#{key}=#{value}" }.join("&")
100
+ end
95
101
 
96
102
  response = @http_client.get([:projects, project_id, :teams, query_string].compact)
97
103
 
@@ -105,7 +111,10 @@ class SemaphoreClient
105
111
  end
106
112
 
107
113
  def list_for_shared_config!(shared_config_id, query = nil)
108
- query_string = query.nil? ? nil : "?#{query}"
114
+ query_string =
115
+ unless query.nil? || query.empty?
116
+ "?" + query.map { |key, value| "#{key}=#{value}" }.join("&")
117
+ end
109
118
 
110
119
  response = @http_client.get([:shared_configs, shared_config_id, :teams, query_string].compact)
111
120
 
@@ -31,7 +31,10 @@ class SemaphoreClient
31
31
  end
32
32
 
33
33
  def list_for_org!(org_id, query = nil)
34
- query_string = query.nil? ? nil : "?#{query}"
34
+ query_string =
35
+ unless query.nil? || query.empty?
36
+ "?" + query.map { |key, value| "#{key}=#{value}" }.join("&")
37
+ end
35
38
 
36
39
  response = @http_client.get([:orgs, org_id, :users, query_string].compact)
37
40
 
@@ -45,7 +48,10 @@ class SemaphoreClient
45
48
  end
46
49
 
47
50
  def list_for_team!(team_id, query = nil)
48
- query_string = query.nil? ? nil : "?#{query}"
51
+ query_string =
52
+ unless query.nil? || query.empty?
53
+ "?" + query.map { |key, value| "#{key}=#{value}" }.join("&")
54
+ end
49
55
 
50
56
  response = @http_client.get([:teams, team_id, :users, query_string].compact)
51
57
 
@@ -71,7 +77,10 @@ class SemaphoreClient
71
77
  end
72
78
 
73
79
  def list_for_project!(project_id, query = nil)
74
- query_string = query.nil? ? nil : "?#{query}"
80
+ query_string =
81
+ unless query.nil? || query.empty?
82
+ "?" + query.map { |key, value| "#{key}=#{value}" }.join("&")
83
+ end
75
84
 
76
85
  response = @http_client.get([:projects, project_id, :users, query_string].compact)
77
86
 
@@ -1,3 +1,3 @@
1
1
  class SemaphoreClient
2
- VERSION = "2.1.2"
2
+ VERSION = "2.1.3"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: semaphore_client
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.1.2
4
+ version: 2.1.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jovan Ivanović