bootic_cli 0.9.4 → 0.9.5
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/bootic_cli/commands/themes.rb +2 -0
- data/lib/bootic_cli/themes/fs_theme.rb +1 -1
- data/lib/bootic_cli/themes/missing_items_theme.rb +4 -0
- data/lib/bootic_cli/themes/theme_diff.rb +10 -0
- data/lib/bootic_cli/themes/updated_theme.rb +4 -0
- data/lib/bootic_cli/themes/workflows.rb +3 -1
- data/lib/bootic_cli/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 4e9689455a4845de27825aa295f27f84c1e45035bbb350413f85f171a26e4bd0
|
4
|
+
data.tar.gz: ce296652260b9f18af912d636272b6df039be1207584c2b6d619ecfd3cfb1331
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: e3b44f183224b102820bc1f8a4f200d43d277fb385e973d5a792144cda1cc16ea852209c084d364436226dd72a7b377f444e4c9e6aecf70dcf9abe8618367756
|
7
|
+
data.tar.gz: 855814910c7e021eee1386a2fc1fea56384fd8dad25eead5d4438be5824ff0a9afaecd51c8d3c7ae439d049e17c43eabfd1fc3a49ca5a6527f11d1ce40dcd760
|
@@ -147,6 +147,8 @@ module BooticCli
|
|
147
147
|
|
148
148
|
diff = BooticCli::Themes::ThemeDiff.new(source: local_theme, target: remote_theme)
|
149
149
|
if diff.any?
|
150
|
+
# puts diff.summary
|
151
|
+
|
150
152
|
if prompt.yes_or_no?("There are differences between the remote theme and your local copy. Sync now?", true)
|
151
153
|
workflows.sync(local_theme, remote_theme)
|
152
154
|
prompt.say "Synced!", :cyan
|
@@ -30,7 +30,7 @@ module BooticCli
|
|
30
30
|
end
|
31
31
|
|
32
32
|
ASSETS_DIR = 'assets'.freeze
|
33
|
-
TEMPLATE_PATTERNS = ['sections/*.html', '*.html', '*.css', '*.js', '*.json', '
|
33
|
+
TEMPLATE_PATTERNS = ['sections/*.html', '*.html', '*.css', '*.js', '*.json', '*.yml'].freeze
|
34
34
|
ASSET_PATTERNS = [File.join(ASSETS_DIR, '*')].freeze
|
35
35
|
|
36
36
|
ASSET_PATH_REGEX = /^assets\/[^\/]+$/.freeze
|
@@ -9,6 +9,16 @@ module BooticCli
|
|
9
9
|
@force_update = force_update
|
10
10
|
end
|
11
11
|
|
12
|
+
def summary
|
13
|
+
msg = []
|
14
|
+
msg.push(" - Updated in source: #{updated_in_source.count}") if updated_in_source.any?
|
15
|
+
msg.push(" - Updated in target: #{updated_in_target.count}") if updated_in_target.any?
|
16
|
+
msg.push(" - Missing in target: #{missing_in_target.count}") if missing_in_target.any?
|
17
|
+
msg.push(" - Missing in source: #{missing_in_source.count}") if missing_in_source.any?
|
18
|
+
msg.unshift("Summary:") if msg.any?
|
19
|
+
msg.join("\n")
|
20
|
+
end
|
21
|
+
|
12
22
|
def any?
|
13
23
|
updated_in_source.any? || updated_in_target.any? || missing_in_target.any? || missing_in_source.any?
|
14
24
|
end
|
@@ -28,6 +28,10 @@ module BooticCli
|
|
28
28
|
templates.any? # || assets.any?
|
29
29
|
end
|
30
30
|
|
31
|
+
def count
|
32
|
+
templates.count
|
33
|
+
end
|
34
|
+
|
31
35
|
def templates
|
32
36
|
@templates ||= map_pair(source.templates, target.templates) do |a, b|
|
33
37
|
diff = Diffy::Diff.new(normalize_endings(b.body), normalize_endings(a.body), context: 1)
|
@@ -168,6 +168,8 @@ module BooticCli
|
|
168
168
|
changes = ThemeDiff.new(source: local_theme, target: remote_theme)
|
169
169
|
if changes.any?
|
170
170
|
prompt.say "There are differences between your local and the remote version of your shop's development theme."
|
171
|
+
puts changes.summary
|
172
|
+
|
171
173
|
if prompt.yes_or_no? "Push your local changes now?", true
|
172
174
|
push(local_theme, remote_theme, delete: true)
|
173
175
|
else
|
@@ -327,7 +329,7 @@ module BooticCli
|
|
327
329
|
|
328
330
|
item, type = FSTheme.resolve_file(path, dir)
|
329
331
|
unless item
|
330
|
-
|
332
|
+
puts "Not a template or asset: #{path}"
|
331
333
|
return
|
332
334
|
end
|
333
335
|
|
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.9.
|
4
|
+
version: 0.9.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: 2023-
|
12
|
+
date: 2023-06-03 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: thor
|