bootic_cli 0.5.4 → 0.5.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/lib/bootic_cli/themes/api_theme.rb +10 -4
- data/lib/bootic_cli/themes/fs_theme.rb +3 -1
- data/lib/bootic_cli/themes/workflows.rb +7 -5
- data/lib/bootic_cli/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: c0ca07dc72c5128ad36d0238086d41432565e60a
|
4
|
+
data.tar.gz: 18647ebabc38ea74417ffc4ba4beb627e463494d
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 14fbbce3f9176faab1138b03e511d57b214ee19dbdf6289f7780cfe8bc3d6052ea87b681706ba38922e17d6f6ad4947eed85d1f3f58af2afded64dc55a2c913e
|
7
|
+
data.tar.gz: a4fec4c63aea720c868bea2f48dbfb865db4677e1054433edb8fb6258ddeab3b72c4dc2836dc6d9e62232a169089d67da955b6391242946f0edbb5c6f1adde94
|
@@ -9,6 +9,7 @@ module BooticCli
|
|
9
9
|
end
|
10
10
|
|
11
11
|
def ==(other)
|
12
|
+
# puts "Comparing with time #{self.updated_on} vs #{other.updated_on}"
|
12
13
|
self.updated_on == other.updated_on
|
13
14
|
end
|
14
15
|
end
|
@@ -24,8 +25,13 @@ module BooticCli
|
|
24
25
|
end
|
25
26
|
|
26
27
|
def ==(other)
|
27
|
-
|
28
|
-
|
28
|
+
if digest.to_s == '' || other.digest.to_s == ''
|
29
|
+
# puts "One or the other digest is empty: #{digest} -- #{other.digest}"
|
30
|
+
return super
|
31
|
+
end
|
32
|
+
|
33
|
+
# file sizes may differ as they are served by CDN (that shrinks them)
|
34
|
+
self.digest == other.digest # && self.file_size == other.file_size
|
29
35
|
end
|
30
36
|
|
31
37
|
def fetch_data(attempt = 1)
|
@@ -53,12 +59,13 @@ module BooticCli
|
|
53
59
|
attr_reader :errors
|
54
60
|
def initialize(errors)
|
55
61
|
@errors = errors
|
56
|
-
super "Entity has errors: #{errors.map(&:field)}"
|
62
|
+
super "Entity has errors: #{errors.map(&:field).join(', ')}"
|
57
63
|
end
|
58
64
|
end
|
59
65
|
|
60
66
|
def initialize(theme)
|
61
67
|
@theme = theme
|
68
|
+
puts "Entity has errors: #{theme.errors.map(&:messages).join(', ')}" if theme.has?(:errors)
|
62
69
|
end
|
63
70
|
|
64
71
|
# this is unique to API themes
|
@@ -124,7 +131,6 @@ module BooticCli
|
|
124
131
|
private
|
125
132
|
attr_reader :theme
|
126
133
|
|
127
|
-
|
128
134
|
def check_errors!(entity)
|
129
135
|
if entity.has?(:errors)
|
130
136
|
raise EntityErrors.new(entity.errors)
|
@@ -19,10 +19,12 @@ module BooticCli
|
|
19
19
|
|
20
20
|
def ==(other)
|
21
21
|
if other.digest.to_s == '' # api theme asset without a digest set
|
22
|
+
# puts "Other has no digest, so comparing dates: #{self.updated_on} vs #{other.updated_on}"
|
22
23
|
return self.updated_on == other.updated_on
|
23
24
|
end
|
24
25
|
|
25
|
-
|
26
|
+
# file sizes may differ as they are served by CDN (that shrinks them)
|
27
|
+
self.digest == other.digest # self.file_size == other.file_size
|
26
28
|
end
|
27
29
|
end
|
28
30
|
|
@@ -284,18 +284,20 @@ module BooticCli
|
|
284
284
|
files = from.assets.find_all do |a|
|
285
285
|
if opts[:overwrite]
|
286
286
|
true
|
287
|
-
|
288
|
-
|
289
|
-
|
290
|
-
opts[:interactive] && prompt.yes_or_no?("Asset exists: #{highlight(a.file_name)}. Overwrite?", false)
|
287
|
+
elsif existing = to.assets.find { |t| t.file_name == a.file_name }
|
288
|
+
if existing == a # exact copy, no need to overwrite
|
289
|
+
false
|
291
290
|
else
|
292
|
-
|
291
|
+
opts[:interactive] && prompt.yes_or_no?("Asset exists: #{highlight(a.file_name)}. Overwrite?", false)
|
293
292
|
end
|
293
|
+
else
|
294
|
+
true
|
294
295
|
end
|
295
296
|
end
|
296
297
|
|
297
298
|
pool = BooticCli::WorkerPool.new(CONCURRENCY)
|
298
299
|
|
300
|
+
# puts "Downloading assets: #{files.count}"
|
299
301
|
files.each do |a|
|
300
302
|
pool.schedule do
|
301
303
|
handle_file_errors(:asset, a) do
|
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.5.
|
4
|
+
version: 0.5.5
|
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: 2019-01-16 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: thor
|