bootic_cli 0.8.1 → 0.9.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +5 -5
- data/bootic_cli.gemspec +5 -5
- data/lib/bootic_cli/cli.rb +1 -1
- data/lib/bootic_cli/commands/themes.rb +1 -1
- data/lib/bootic_cli/themes/api_theme.rb +13 -2
- data/lib/bootic_cli/themes/fs_theme.rb +8 -6
- data/lib/bootic_cli/themes/workflows.rb +10 -2
- data/lib/bootic_cli/version.rb +1 -1
- metadata +17 -32
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
|
-
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
2
|
+
SHA256:
|
3
|
+
metadata.gz: df9158fc3f75121f0e571cdafc877ed233ce4b38430358049b15eff28fcc7fd3
|
4
|
+
data.tar.gz: 410cdec382233f16e2859d746fe6e67b494100b8ec6d5dfd7b2cd205bef303d9
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: e5054a723f0f28eac24408591c4dde2f8bdc34c106ab15246a9f9c0f12cbf190849a0f56a1f83dea9fe76def3f953873305113f54bbcddb5154fcf450200dd18
|
7
|
+
data.tar.gz: e6bf1ef49ac94044c57c26b25fd168c61be8b897a49961d98654fb50c3fcf29d066133220a356148e15bec19472c7033af4aedd9b611f197f280bec814cf0594
|
data/bootic_cli.gemspec
CHANGED
@@ -20,7 +20,7 @@ Gem::Specification.new do |spec|
|
|
20
20
|
spec.require_paths = ['lib']
|
21
21
|
|
22
22
|
spec.add_dependency 'thor', '~> 0'
|
23
|
-
spec.add_dependency 'bootic_client', "~> 0.0.
|
23
|
+
spec.add_dependency 'bootic_client', "~> 0.0.30"
|
24
24
|
spec.add_dependency 'diffy', "~> 3.2"
|
25
25
|
spec.add_dependency 'listen', "~> 3.1"
|
26
26
|
spec.add_dependency 'launchy', "~> 2.4"
|
@@ -30,10 +30,10 @@ Gem::Specification.new do |spec|
|
|
30
30
|
spec.add_dependency 'wdm', '>= 0.1.0'
|
31
31
|
end
|
32
32
|
|
33
|
-
spec.add_development_dependency "bundler", "~> 1.9"
|
34
|
-
spec.add_development_dependency "rake"
|
35
|
-
spec.add_development_dependency "rspec"
|
36
|
-
spec.add_development_dependency "byebug"
|
33
|
+
# spec.add_development_dependency "bundler", "~> 1.9"
|
34
|
+
spec.add_development_dependency "rake" #, "~> 10.0"
|
35
|
+
spec.add_development_dependency "rspec" #, "~> 3.2"
|
36
|
+
spec.add_development_dependency "byebug" #, "~> 9"
|
37
37
|
|
38
38
|
spec.post_install_message = <<-END
|
39
39
|
-------------------------------------------------------------
|
data/lib/bootic_cli/cli.rb
CHANGED
@@ -21,7 +21,7 @@ module BooticCli
|
|
21
21
|
map %w[--version -v] => :__print_version
|
22
22
|
desc "--version, -v", "Prints package version"
|
23
23
|
def __print_version
|
24
|
-
puts BooticCli::VERSION
|
24
|
+
puts "#{BooticCli::VERSION} (Ruby #{RUBY_VERSION})"
|
25
25
|
end
|
26
26
|
|
27
27
|
desc 'setup', 'Setup Bootic application credentials'
|
@@ -58,7 +58,12 @@ module BooticCli
|
|
58
58
|
|
59
59
|
class APITheme
|
60
60
|
|
61
|
-
class
|
61
|
+
class RequestFailed < StandardError; end
|
62
|
+
class InvalidRequest < RequestFailed; end
|
63
|
+
class EntityTooLargeError < InvalidRequest; end
|
64
|
+
class UnknownResponse < RequestFailed; end
|
65
|
+
|
66
|
+
class EntityErrors < RequestFailed
|
62
67
|
attr_reader :errors
|
63
68
|
def initialize(errors)
|
64
69
|
@errors = errors
|
@@ -173,7 +178,13 @@ module BooticCli
|
|
173
178
|
end
|
174
179
|
|
175
180
|
def check_errors!(entity)
|
176
|
-
if entity.
|
181
|
+
if !entity.respond_to?(:has?)
|
182
|
+
if entity.body['Request Entity Too Large']
|
183
|
+
raise EntityTooLargeError.new("Request Entity Too Large")
|
184
|
+
else
|
185
|
+
raise UnknownResponse.new(entity.body)
|
186
|
+
end
|
187
|
+
elsif entity.has?(:errors)
|
177
188
|
raise EntityErrors.new(entity.errors)
|
178
189
|
end
|
179
190
|
|
@@ -103,10 +103,12 @@ module BooticCli
|
|
103
103
|
def assets
|
104
104
|
@assets ||= (
|
105
105
|
paths_for(ASSET_PATTERNS).sort.map do |path|
|
106
|
-
|
107
|
-
|
108
|
-
|
109
|
-
|
106
|
+
if File.file?(path)
|
107
|
+
fname = File.basename(path)
|
108
|
+
file = File.new(path)
|
109
|
+
ThemeAsset.new(fname, file, file.mtime.utc)
|
110
|
+
end
|
111
|
+
end.compact
|
110
112
|
)
|
111
113
|
end
|
112
114
|
|
@@ -132,7 +134,7 @@ module BooticCli
|
|
132
134
|
|
133
135
|
def remove_template(file_name)
|
134
136
|
path = File.join(dir, file_name)
|
135
|
-
return false unless File.
|
137
|
+
return false unless File.exist?(path)
|
136
138
|
File.unlink path
|
137
139
|
@templates = nil
|
138
140
|
end
|
@@ -149,7 +151,7 @@ module BooticCli
|
|
149
151
|
|
150
152
|
def remove_asset(file_name)
|
151
153
|
path = File.join(dir, ASSETS_DIR, file_name)
|
152
|
-
return false unless File.
|
154
|
+
return false unless File.exist?(path)
|
153
155
|
|
154
156
|
File.unlink path
|
155
157
|
@assets = nil
|
@@ -226,7 +226,7 @@ module BooticCli
|
|
226
226
|
exit
|
227
227
|
}
|
228
228
|
|
229
|
-
prompt.say "Preview changes at #{remote_theme.path}
|
229
|
+
prompt.say "Preview changes at #{remote_theme.path} -- Hit Ctrl-C to stop watching for changes.", :cyan
|
230
230
|
Kernel.sleep
|
231
231
|
end
|
232
232
|
|
@@ -377,12 +377,20 @@ module BooticCli
|
|
377
377
|
end
|
378
378
|
|
379
379
|
prompt.say("#{file.file_name} #{error_msg}. Skipping...", :red)
|
380
|
-
false # abort
|
380
|
+
false # just continue, don't abort
|
381
381
|
|
382
382
|
rescue JSON::GeneratorError => e
|
383
383
|
prompt.say("#{file.file_name} looks like a binary file, not a template. Skipping...", :red)
|
384
384
|
false # just continue, don't abort
|
385
385
|
|
386
|
+
rescue APITheme::InvalidRequest => e
|
387
|
+
prompt.say("Invalid request: #{e.message}. Skipping...", :red)
|
388
|
+
false # just continue, don't abort
|
389
|
+
|
390
|
+
rescue APITheme::UnknownResponse => e # 502s, 503s, etc
|
391
|
+
prompt.say("Got an unknown response from server: #{e.message}. Please try again in a minute.", :red)
|
392
|
+
abort
|
393
|
+
|
386
394
|
rescue Net::OpenTimeout, Net::ReadTimeout => e
|
387
395
|
prompt.say("I'm having trouble connecting to the server. Please try again in a minute.", :red)
|
388
396
|
abort
|
data/lib/bootic_cli/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: bootic_cli
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.9.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Ismael Celis
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date:
|
12
|
+
date: 2023-02-02 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: thor
|
@@ -31,14 +31,14 @@ dependencies:
|
|
31
31
|
requirements:
|
32
32
|
- - "~>"
|
33
33
|
- !ruby/object:Gem::Version
|
34
|
-
version: 0.0.
|
34
|
+
version: 0.0.30
|
35
35
|
type: :runtime
|
36
36
|
prerelease: false
|
37
37
|
version_requirements: !ruby/object:Gem::Requirement
|
38
38
|
requirements:
|
39
39
|
- - "~>"
|
40
40
|
- !ruby/object:Gem::Version
|
41
|
-
version: 0.0.
|
41
|
+
version: 0.0.30
|
42
42
|
- !ruby/object:Gem::Dependency
|
43
43
|
name: diffy
|
44
44
|
requirement: !ruby/object:Gem::Requirement
|
@@ -81,62 +81,48 @@ dependencies:
|
|
81
81
|
- - "~>"
|
82
82
|
- !ruby/object:Gem::Version
|
83
83
|
version: '2.4'
|
84
|
-
- !ruby/object:Gem::Dependency
|
85
|
-
name: bundler
|
86
|
-
requirement: !ruby/object:Gem::Requirement
|
87
|
-
requirements:
|
88
|
-
- - "~>"
|
89
|
-
- !ruby/object:Gem::Version
|
90
|
-
version: '1.9'
|
91
|
-
type: :development
|
92
|
-
prerelease: false
|
93
|
-
version_requirements: !ruby/object:Gem::Requirement
|
94
|
-
requirements:
|
95
|
-
- - "~>"
|
96
|
-
- !ruby/object:Gem::Version
|
97
|
-
version: '1.9'
|
98
84
|
- !ruby/object:Gem::Dependency
|
99
85
|
name: rake
|
100
86
|
requirement: !ruby/object:Gem::Requirement
|
101
87
|
requirements:
|
102
|
-
- - "
|
88
|
+
- - ">="
|
103
89
|
- !ruby/object:Gem::Version
|
104
|
-
version: '
|
90
|
+
version: '0'
|
105
91
|
type: :development
|
106
92
|
prerelease: false
|
107
93
|
version_requirements: !ruby/object:Gem::Requirement
|
108
94
|
requirements:
|
109
|
-
- - "
|
95
|
+
- - ">="
|
110
96
|
- !ruby/object:Gem::Version
|
111
|
-
version: '
|
97
|
+
version: '0'
|
112
98
|
- !ruby/object:Gem::Dependency
|
113
99
|
name: rspec
|
114
100
|
requirement: !ruby/object:Gem::Requirement
|
115
101
|
requirements:
|
116
|
-
- - "
|
102
|
+
- - ">="
|
117
103
|
- !ruby/object:Gem::Version
|
118
|
-
version: '
|
104
|
+
version: '0'
|
119
105
|
type: :development
|
120
106
|
prerelease: false
|
121
107
|
version_requirements: !ruby/object:Gem::Requirement
|
122
108
|
requirements:
|
123
|
-
- - "
|
109
|
+
- - ">="
|
124
110
|
- !ruby/object:Gem::Version
|
125
|
-
version: '
|
111
|
+
version: '0'
|
126
112
|
- !ruby/object:Gem::Dependency
|
127
113
|
name: byebug
|
128
114
|
requirement: !ruby/object:Gem::Requirement
|
129
115
|
requirements:
|
130
|
-
- - "
|
116
|
+
- - ">="
|
131
117
|
- !ruby/object:Gem::Version
|
132
|
-
version: '
|
118
|
+
version: '0'
|
133
119
|
type: :development
|
134
120
|
prerelease: false
|
135
121
|
version_requirements: !ruby/object:Gem::Requirement
|
136
122
|
requirements:
|
137
|
-
- - "
|
123
|
+
- - ">="
|
138
124
|
- !ruby/object:Gem::Version
|
139
|
-
version: '
|
125
|
+
version: '0'
|
140
126
|
description: Bootic command-line client.
|
141
127
|
email:
|
142
128
|
- ismael@bootic.io
|
@@ -200,8 +186,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
200
186
|
- !ruby/object:Gem::Version
|
201
187
|
version: '0'
|
202
188
|
requirements: []
|
203
|
-
|
204
|
-
rubygems_version: 2.6.13
|
189
|
+
rubygems_version: 3.4.1
|
205
190
|
signing_key:
|
206
191
|
specification_version: 4
|
207
192
|
summary: Bootic command-line client.
|