app_stack 1.5.0 → 1.6.0
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 +8 -8
- data/lib/app_stack/cli_options.rb +5 -1
- data/lib/app_stack/operator.rb +22 -0
- data/lib/app_stack/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,15 +1,15 @@
|
|
1
1
|
---
|
2
2
|
!binary "U0hBMQ==":
|
3
3
|
metadata.gz: !binary |-
|
4
|
-
|
4
|
+
ZTk2N2NhYjI5MjYyNzhiOWY0NDA2NzY4NWRmNWY1M2IxMjk3NGQyMA==
|
5
5
|
data.tar.gz: !binary |-
|
6
|
-
|
6
|
+
NDcxNzJmMTI2M2E1ZDU5ZmNmOTZhYjVhY2U0NmM3Y2Y4MTEyYWUyMg==
|
7
7
|
!binary "U0hBNTEy":
|
8
8
|
metadata.gz: !binary |-
|
9
|
-
|
10
|
-
|
11
|
-
|
9
|
+
YmE3NjFkM2U4YmRkMjU0NjM2NDhhMjQ2NzJhYTVlMjcxMjJjOTE5YTA4Njll
|
10
|
+
ODY5Zjg3ZjE1NmJmMzc3YTBjMDFiOGE0MjVkNjJkYWE5NjY3MzlmZTU0MjUz
|
11
|
+
MWJlODBjMjA5NWM2ZGViZTg2OWNkNmU0Mjg3YzMyMDdmNzE1NWI=
|
12
12
|
data.tar.gz: !binary |-
|
13
|
-
|
14
|
-
|
15
|
-
|
13
|
+
OTFjNGNiYzkyMjA4ZjFkOGNkMjg5YmMyNWZiNGI0YWQ5MjNhYzcyNTc2OGUy
|
14
|
+
YzkxY2M3MGQxMTdiYmFlNzgxYTQ3NzBmNTFmNDNhY2E1YzNmYjEyZjAzMGMy
|
15
|
+
ZDA5ZGUyZGY5NjJiOGYxMDlmMmIwYjgxNDJlODVhMzFhY2E1NTQ=
|
@@ -6,7 +6,7 @@ module AppStack
|
|
6
6
|
# parse command line options based
|
7
7
|
# rubocop:disable MethodLength
|
8
8
|
class CliOptions
|
9
|
-
attr_accessor :force, :simulate, :verbose, :reverse, :conf_file
|
9
|
+
attr_accessor :force, :simulate, :verbose, :reverse, :print, :conf_file
|
10
10
|
|
11
11
|
def initialize(argv = ARGV)
|
12
12
|
parse_opt!(argv)
|
@@ -37,6 +37,10 @@ module AppStack
|
|
37
37
|
self.reverse = true
|
38
38
|
end
|
39
39
|
|
40
|
+
opts.on('-p', '--print', 'print copy relationships') do
|
41
|
+
self.print = true
|
42
|
+
end
|
43
|
+
|
40
44
|
opts.on('--verbose', 'show debug messages') do
|
41
45
|
self.verbose = true
|
42
46
|
end
|
data/lib/app_stack/operator.rb
CHANGED
@@ -29,6 +29,7 @@ module AppStack
|
|
29
29
|
|
30
30
|
def merge!
|
31
31
|
case
|
32
|
+
when AppStack.options.print then do_print!
|
32
33
|
when AppStack.options.force then do_copy!
|
33
34
|
when AppStack.options.simulate then do_simulate!
|
34
35
|
else diff_list.size > 0 ? do_warn : do_copy!
|
@@ -50,6 +51,27 @@ module AppStack
|
|
50
51
|
lists.each { |i| @rev_list[i.to_i].process }
|
51
52
|
end
|
52
53
|
|
54
|
+
def do_print!
|
55
|
+
print_list = {}
|
56
|
+
compare_list.each do |f|
|
57
|
+
next unless File.exists?(f.to_file)
|
58
|
+
|
59
|
+
print_list[f.to_file] = f
|
60
|
+
end
|
61
|
+
|
62
|
+
mapper = {}
|
63
|
+
app_stacks.keys.each { |k| mapper[k] = [] }
|
64
|
+
print_list.keys.sort.each do |k|
|
65
|
+
f = print_list[k]
|
66
|
+
mapper[f.from_app.app_name] << f
|
67
|
+
end
|
68
|
+
|
69
|
+
mapper.each do |k, list|
|
70
|
+
puts "From #{k.to_s.bold.green}"
|
71
|
+
list.each { |f| puts " - #{f.to_file_short_name.blue}" }
|
72
|
+
end
|
73
|
+
end
|
74
|
+
|
53
75
|
private
|
54
76
|
|
55
77
|
def do_copy!
|
data/lib/app_stack/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: app_stack
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.
|
4
|
+
version: 1.6.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Huang Wei
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2013-12-
|
11
|
+
date: 2013-12-05 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: tilt
|