bootic_cli 0.6.4 → 0.6.5
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/bootic_cli.gemspec +5 -0
- data/lib/bootic_cli/commands/themes.rb +10 -1
- data/lib/bootic_cli/themes/updated_theme.rb +10 -3
- 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: 5b387d8fd3e457f8d96ee99d8ef47cc9202ab52f2a161815a79138e0047b4613
|
4
|
+
data.tar.gz: e933918d22e7ce87854b905816cb1a20190f393f0c390209ba479e351599d8e9
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 5d87ca108ef8c9db618dd49e64731b7d910332b76900b7c3ca0db5fdc50a0781fb9078af96751dd3eedeba14ce680f96296e49554e2ce039f49989c70f88437e
|
7
|
+
data.tar.gz: ec3e339333a702508a32bce522a66a4580915e4140ef05faf6e5c9b459439cf7f56f0d9f0f671eae2885f5f4ee2b7f317bcb65a8585ccb188a15a2ed8d208d56
|
data/bootic_cli.gemspec
CHANGED
@@ -25,6 +25,11 @@ Gem::Specification.new do |spec|
|
|
25
25
|
spec.add_dependency 'listen', "~> 3.1"
|
26
26
|
spec.add_dependency 'launchy', "~> 2.4"
|
27
27
|
|
28
|
+
if Gem.win_platform?
|
29
|
+
spec.add_dependency 'diff-lcs'
|
30
|
+
spec.add_dependency 'wdm', '>= 0.1.0'
|
31
|
+
end
|
32
|
+
|
28
33
|
spec.add_development_dependency "bundler", "~> 1.9"
|
29
34
|
spec.add_development_dependency "rake", "~> 10.0"
|
30
35
|
spec.add_development_dependency "rspec", "~> 3.2"
|
@@ -89,7 +89,7 @@ module BooticCli
|
|
89
89
|
|
90
90
|
# if we just compared against the dev theme, redo the mumbo-jumbo but with the public one
|
91
91
|
unless remote_theme.public?
|
92
|
-
prompt.
|
92
|
+
prompt.pause "Comparing againt public theme now. Press any key to continue.", :cyan
|
93
93
|
local_theme, public_theme = theme_selector.select_theme_pair(default_subdomain, current_dir, true)
|
94
94
|
workflows.compare(local_theme, public_theme)
|
95
95
|
end
|
@@ -262,6 +262,15 @@ module BooticCli
|
|
262
262
|
!default_answer
|
263
263
|
end
|
264
264
|
|
265
|
+
def pause(string, color = nil)
|
266
|
+
begin
|
267
|
+
input = shell.ask(string, color)
|
268
|
+
rescue Interrupt
|
269
|
+
say "\nCtrl-C received. Bailing out!", :magenta
|
270
|
+
abort
|
271
|
+
end
|
272
|
+
end
|
273
|
+
|
265
274
|
def notice(str)
|
266
275
|
parts = [" --->", str]
|
267
276
|
puts highlight parts.join(' ')
|
@@ -1,5 +1,14 @@
|
|
1
1
|
require 'diffy'
|
2
2
|
|
3
|
+
module Diffy
|
4
|
+
class Diff
|
5
|
+
# monkey patch diffy to fix buggy bug: https://github.com/samg/diffy/pull/103
|
6
|
+
def diff_options
|
7
|
+
Array(options[:context] ? "-U#{options[:context]}" : options[:diff])
|
8
|
+
end
|
9
|
+
end
|
10
|
+
end
|
11
|
+
|
3
12
|
module BooticCli
|
4
13
|
module Themes
|
5
14
|
# given :source and :target themes,
|
@@ -21,9 +30,7 @@ module BooticCli
|
|
21
30
|
|
22
31
|
def templates
|
23
32
|
@templates ||= map_pair(source.templates, target.templates) do |a, b|
|
24
|
-
|
25
|
-
# diff = Diffy::Diff.new(normalize_endings(b.body), normalize_endings(a.body), context: 1)
|
26
|
-
diff = Diffy::Diff.new(normalize_endings(b.body), normalize_endings(a.body))
|
33
|
+
diff = Diffy::Diff.new(normalize_endings(b.body), normalize_endings(a.body), context: 1)
|
27
34
|
|
28
35
|
if !diff.to_s.empty? && should_update?(a, b)
|
29
36
|
c = TemplateWithDiff.new(a.file_name, a.body, a.updated_on, diff)
|
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.6.
|
4
|
+
version: 0.6.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: 2019-08-
|
12
|
+
date: 2019-08-23 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: thor
|