sem 0.3.2 → 0.3.5
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/sem/api/shared_config.rb +1 -1
- data/lib/sem/cli.rb +2 -2
- data/lib/sem/version.rb +1 -1
- data/lib/sem.rb +1 -1
- data/sem.gemspec +2 -2
- metadata +32 -33
- data/lib/sem/pagination.rb +0 -29
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: a5c756f0ab72795c94aba3b3f7e93c50f24dd32c
|
4
|
+
data.tar.gz: 21b1f932e4c142076af6704103f52b9b7f572415
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: ad7e48574b8c7368708dc53d35840ef9002f5df136205e68a61100fcad23f0700d448664aabbcf52f665a8614b3060ff73034a50ebac1a57ec9cdd60749c2a54
|
7
|
+
data.tar.gz: 83d53d911f1184e22f67bf2b4ea96d21f668dbbfbbe1fb1290f9643f30f16214aed6fc6de2624ba05968ba19ef6d37c118e9f3e3ab3c75be967c2f4b3133e838
|
@@ -78,7 +78,7 @@ class Sem::API::SharedConfig < SimpleDelegator
|
|
78
78
|
env_var = env_vars.find { |var| var.name == name }
|
79
79
|
|
80
80
|
if env_var.nil?
|
81
|
-
raise Sem::Errors::
|
81
|
+
raise Sem::Errors::ResourceNotFound.new("Environment Variable", [org_name, name])
|
82
82
|
end
|
83
83
|
|
84
84
|
Sem::API::Base.client.env_vars.delete(env_var.id)
|
data/lib/sem/cli.rb
CHANGED
@@ -13,12 +13,12 @@ module Sem
|
|
13
13
|
end
|
14
14
|
|
15
15
|
desc "login", "Log in to semaphore from the command line"
|
16
|
-
option
|
16
|
+
option "auth-token", :required => true
|
17
17
|
long_desc <<-DESC
|
18
18
|
You can find your auth_token on the bottom of the users settings page https://semaphoreci.com/users/edit.
|
19
19
|
DESC
|
20
20
|
def login
|
21
|
-
auth_token = options[
|
21
|
+
auth_token = options["auth-token"]
|
22
22
|
|
23
23
|
if Sem::Configuration.valid_auth_token?(auth_token)
|
24
24
|
Sem::Configuration.export_auth_token(auth_token)
|
data/lib/sem/version.rb
CHANGED
data/lib/sem.rb
CHANGED
data/sem.gemspec
CHANGED
@@ -21,8 +21,8 @@ Gem::Specification.new do |spec|
|
|
21
21
|
spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
|
22
22
|
spec.require_paths = ["lib"]
|
23
23
|
|
24
|
-
spec.add_dependency "semaphore_client", "2.
|
25
|
-
spec.add_dependency "dracula", "~> 0.
|
24
|
+
spec.add_dependency "semaphore_client", "2.6.0"
|
25
|
+
spec.add_dependency "dracula", "~> 0.4.0"
|
26
26
|
spec.add_dependency "pmap", "~> 1.1.1"
|
27
27
|
|
28
28
|
spec.add_development_dependency "bundler", "~> 1.14"
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: sem
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.3.
|
4
|
+
version: 0.3.5
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Igor Šarčević
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2017-
|
11
|
+
date: 2017-10-05 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: semaphore_client
|
@@ -16,96 +16,96 @@ dependencies:
|
|
16
16
|
requirements:
|
17
17
|
- - '='
|
18
18
|
- !ruby/object:Gem::Version
|
19
|
-
version: 2.
|
19
|
+
version: 2.6.0
|
20
20
|
type: :runtime
|
21
21
|
prerelease: false
|
22
22
|
version_requirements: !ruby/object:Gem::Requirement
|
23
23
|
requirements:
|
24
24
|
- - '='
|
25
25
|
- !ruby/object:Gem::Version
|
26
|
-
version: 2.
|
26
|
+
version: 2.6.0
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
28
|
name: dracula
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
30
30
|
requirements:
|
31
|
-
- -
|
31
|
+
- - ~>
|
32
32
|
- !ruby/object:Gem::Version
|
33
|
-
version: 0.
|
33
|
+
version: 0.4.0
|
34
34
|
type: :runtime
|
35
35
|
prerelease: false
|
36
36
|
version_requirements: !ruby/object:Gem::Requirement
|
37
37
|
requirements:
|
38
|
-
- -
|
38
|
+
- - ~>
|
39
39
|
- !ruby/object:Gem::Version
|
40
|
-
version: 0.
|
40
|
+
version: 0.4.0
|
41
41
|
- !ruby/object:Gem::Dependency
|
42
42
|
name: pmap
|
43
43
|
requirement: !ruby/object:Gem::Requirement
|
44
44
|
requirements:
|
45
|
-
- -
|
45
|
+
- - ~>
|
46
46
|
- !ruby/object:Gem::Version
|
47
47
|
version: 1.1.1
|
48
48
|
type: :runtime
|
49
49
|
prerelease: false
|
50
50
|
version_requirements: !ruby/object:Gem::Requirement
|
51
51
|
requirements:
|
52
|
-
- -
|
52
|
+
- - ~>
|
53
53
|
- !ruby/object:Gem::Version
|
54
54
|
version: 1.1.1
|
55
55
|
- !ruby/object:Gem::Dependency
|
56
56
|
name: bundler
|
57
57
|
requirement: !ruby/object:Gem::Requirement
|
58
58
|
requirements:
|
59
|
-
- -
|
59
|
+
- - ~>
|
60
60
|
- !ruby/object:Gem::Version
|
61
61
|
version: '1.14'
|
62
62
|
type: :development
|
63
63
|
prerelease: false
|
64
64
|
version_requirements: !ruby/object:Gem::Requirement
|
65
65
|
requirements:
|
66
|
-
- -
|
66
|
+
- - ~>
|
67
67
|
- !ruby/object:Gem::Version
|
68
68
|
version: '1.14'
|
69
69
|
- !ruby/object:Gem::Dependency
|
70
70
|
name: rake
|
71
71
|
requirement: !ruby/object:Gem::Requirement
|
72
72
|
requirements:
|
73
|
-
- -
|
73
|
+
- - ~>
|
74
74
|
- !ruby/object:Gem::Version
|
75
75
|
version: '10.0'
|
76
76
|
type: :development
|
77
77
|
prerelease: false
|
78
78
|
version_requirements: !ruby/object:Gem::Requirement
|
79
79
|
requirements:
|
80
|
-
- -
|
80
|
+
- - ~>
|
81
81
|
- !ruby/object:Gem::Version
|
82
82
|
version: '10.0'
|
83
83
|
- !ruby/object:Gem::Dependency
|
84
84
|
name: rspec
|
85
85
|
requirement: !ruby/object:Gem::Requirement
|
86
86
|
requirements:
|
87
|
-
- -
|
87
|
+
- - ~>
|
88
88
|
- !ruby/object:Gem::Version
|
89
89
|
version: '3.0'
|
90
90
|
type: :development
|
91
91
|
prerelease: false
|
92
92
|
version_requirements: !ruby/object:Gem::Requirement
|
93
93
|
requirements:
|
94
|
-
- -
|
94
|
+
- - ~>
|
95
95
|
- !ruby/object:Gem::Version
|
96
96
|
version: '3.0'
|
97
97
|
- !ruby/object:Gem::Dependency
|
98
98
|
name: rubocop
|
99
99
|
requirement: !ruby/object:Gem::Requirement
|
100
100
|
requirements:
|
101
|
-
- -
|
101
|
+
- - ~>
|
102
102
|
- !ruby/object:Gem::Version
|
103
103
|
version: 0.47.1
|
104
104
|
type: :development
|
105
105
|
prerelease: false
|
106
106
|
version_requirements: !ruby/object:Gem::Requirement
|
107
107
|
requirements:
|
108
|
-
- -
|
108
|
+
- - ~>
|
109
109
|
- !ruby/object:Gem::Version
|
110
110
|
version: 0.47.1
|
111
111
|
- !ruby/object:Gem::Dependency
|
@@ -126,56 +126,56 @@ dependencies:
|
|
126
126
|
name: simplecov
|
127
127
|
requirement: !ruby/object:Gem::Requirement
|
128
128
|
requirements:
|
129
|
-
- -
|
129
|
+
- - ~>
|
130
130
|
- !ruby/object:Gem::Version
|
131
131
|
version: '0.13'
|
132
132
|
type: :development
|
133
133
|
prerelease: false
|
134
134
|
version_requirements: !ruby/object:Gem::Requirement
|
135
135
|
requirements:
|
136
|
-
- -
|
136
|
+
- - ~>
|
137
137
|
- !ruby/object:Gem::Version
|
138
138
|
version: '0.13'
|
139
139
|
- !ruby/object:Gem::Dependency
|
140
140
|
name: byebug
|
141
141
|
requirement: !ruby/object:Gem::Requirement
|
142
142
|
requirements:
|
143
|
-
- -
|
143
|
+
- - ~>
|
144
144
|
- !ruby/object:Gem::Version
|
145
145
|
version: 9.0.0
|
146
146
|
type: :development
|
147
147
|
prerelease: false
|
148
148
|
version_requirements: !ruby/object:Gem::Requirement
|
149
149
|
requirements:
|
150
|
-
- -
|
150
|
+
- - ~>
|
151
151
|
- !ruby/object:Gem::Version
|
152
152
|
version: 9.0.0
|
153
153
|
- !ruby/object:Gem::Dependency
|
154
154
|
name: public_suffix
|
155
155
|
requirement: !ruby/object:Gem::Requirement
|
156
156
|
requirements:
|
157
|
-
- -
|
157
|
+
- - ~>
|
158
158
|
- !ruby/object:Gem::Version
|
159
159
|
version: 2.0.5
|
160
160
|
type: :development
|
161
161
|
prerelease: false
|
162
162
|
version_requirements: !ruby/object:Gem::Requirement
|
163
163
|
requirements:
|
164
|
-
- -
|
164
|
+
- - ~>
|
165
165
|
- !ruby/object:Gem::Version
|
166
166
|
version: 2.0.5
|
167
167
|
- !ruby/object:Gem::Dependency
|
168
168
|
name: webmock
|
169
169
|
requirement: !ruby/object:Gem::Requirement
|
170
170
|
requirements:
|
171
|
-
- -
|
171
|
+
- - ~>
|
172
172
|
- !ruby/object:Gem::Version
|
173
173
|
version: 3.0.1
|
174
174
|
type: :development
|
175
175
|
prerelease: false
|
176
176
|
version_requirements: !ruby/object:Gem::Requirement
|
177
177
|
requirements:
|
178
|
-
- -
|
178
|
+
- - ~>
|
179
179
|
- !ruby/object:Gem::Version
|
180
180
|
version: 3.0.1
|
181
181
|
description: Semaphore CLI
|
@@ -186,9 +186,9 @@ executables:
|
|
186
186
|
extensions: []
|
187
187
|
extra_rdoc_files: []
|
188
188
|
files:
|
189
|
-
-
|
190
|
-
-
|
191
|
-
-
|
189
|
+
- .gitignore
|
190
|
+
- .rspec
|
191
|
+
- .rubocop.yml
|
192
192
|
- Gemfile
|
193
193
|
- README.md
|
194
194
|
- Rakefile
|
@@ -214,7 +214,6 @@ files:
|
|
214
214
|
- lib/sem/cli/teams.rb
|
215
215
|
- lib/sem/configuration.rb
|
216
216
|
- lib/sem/errors.rb
|
217
|
-
- lib/sem/pagination.rb
|
218
217
|
- lib/sem/srn.rb
|
219
218
|
- lib/sem/version.rb
|
220
219
|
- lib/sem/views.rb
|
@@ -237,17 +236,17 @@ require_paths:
|
|
237
236
|
- lib
|
238
237
|
required_ruby_version: !ruby/object:Gem::Requirement
|
239
238
|
requirements:
|
240
|
-
- -
|
239
|
+
- - '>='
|
241
240
|
- !ruby/object:Gem::Version
|
242
241
|
version: '0'
|
243
242
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
244
243
|
requirements:
|
245
|
-
- -
|
244
|
+
- - '>='
|
246
245
|
- !ruby/object:Gem::Version
|
247
246
|
version: '0'
|
248
247
|
requirements: []
|
249
248
|
rubyforge_project:
|
250
|
-
rubygems_version: 2.
|
249
|
+
rubygems_version: 2.0.14.1
|
251
250
|
signing_key:
|
252
251
|
specification_version: 4
|
253
252
|
summary: Semaphore CLI
|
data/lib/sem/pagination.rb
DELETED
@@ -1,29 +0,0 @@
|
|
1
|
-
module Sem
|
2
|
-
class Pagination
|
3
|
-
class << self
|
4
|
-
def pages(pages_per_call, &block)
|
5
|
-
instances = []
|
6
|
-
index = 1
|
7
|
-
|
8
|
-
loop do
|
9
|
-
pages = range_map(index, pages_per_call, &block)
|
10
|
-
|
11
|
-
instances += pages.select { |page| !(page.nil? || page.empty?) }
|
12
|
-
index += pages_per_call
|
13
|
-
|
14
|
-
break instances if pages.any? { |page| page.nil? || page.empty? }
|
15
|
-
end
|
16
|
-
end
|
17
|
-
|
18
|
-
private
|
19
|
-
|
20
|
-
def range_map(start_index, pages_per_call)
|
21
|
-
end_index = start_index + pages_per_call - 1
|
22
|
-
|
23
|
-
(start_index..end_index).to_a.pmap do |page_index|
|
24
|
-
yield(page_index)
|
25
|
-
end
|
26
|
-
end
|
27
|
-
end
|
28
|
-
end
|
29
|
-
end
|