fig 1.24.1.beta.1 → 1.24.1.beta.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Changes +11 -0
- data/lib/fig.rb +1 -1
- data/lib/fig/command/action/list_dependencies/json.rb +1 -1
- data/lib/fig/command/action/list_dependencies/json_all_configs.rb +1 -1
- data/lib/fig/command/action/list_dependencies/yaml.rb +1 -1
- data/lib/fig/command/action/list_dependencies/yaml_all_configs.rb +1 -1
- data/lib/fig/command/action/list_variables/json.rb +1 -1
- data/lib/fig/command/action/list_variables/json_all_configs.rb +1 -1
- data/lib/fig/command/action/list_variables/yaml.rb +1 -1
- data/lib/fig/command/action/list_variables/yaml_all_configs.rb +1 -1
- data/lib/fig/command/action/role/list_from_data_structure.rb +16 -8
- data/lib/fig/command/options.rb +28 -28
- data/lib/fig/command/options/parser.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: e1e5215c6b2a2e43e74fc04c1d3edbdf085db2c0
|
4
|
+
data.tar.gz: 40ae3c1877969e31dea223d4594fec1fa0b88cf2
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 88d441ff92224c341e3e79346eb4952b50b00841205fe17c2f7c2179ba2cc67ccc06c4ccdfc6a8c116f220656c5266d875e83813773cc7623bdd7c5486629f37
|
7
|
+
data.tar.gz: 6e30cb231f647fc7b50b09c7570c1ce7bf9415eda4df9e5a70db3ac543f3cd302d44ec48213749e31571d0979af72d375e4098536c4a866e429606c115938505
|
data/Changes
CHANGED
@@ -1,3 +1,14 @@
|
|
1
|
+
v1.24.1.beta.2 - 2015/04/24
|
2
|
+
|
3
|
+
Bug fix:
|
4
|
+
|
5
|
+
- Fixed crash when combining --list-all-configs with JSON and YAML output.
|
6
|
+
|
7
|
+
Miscellaneous:
|
8
|
+
|
9
|
+
- Renamed --list-yaml & --list-json to --yaml & --json to make them more
|
10
|
+
consistent with the existing --graphviz.
|
11
|
+
|
1
12
|
v1.24.1.beta.1 - 2015/04/23
|
2
13
|
|
3
14
|
Announcement:
|
data/lib/fig.rb
CHANGED
@@ -21,7 +21,7 @@ class Fig::Command::Action::ListDependencies::JSON
|
|
21
21
|
include Fig::Command::Action::Role::ListWalkingDependencyTree
|
22
22
|
|
23
23
|
def options()
|
24
|
-
return %w<--list-dependencies --
|
24
|
+
return %w<--list-dependencies --json>
|
25
25
|
end
|
26
26
|
|
27
27
|
def descriptor_requirement()
|
@@ -21,7 +21,7 @@ class Fig::Command::Action::ListDependencies::JSONAllConfigs
|
|
21
21
|
include Fig::Command::Action::Role::ListWalkingDependencyTree
|
22
22
|
|
23
23
|
def options()
|
24
|
-
return %w<--list-dependencies --
|
24
|
+
return %w<--list-dependencies --json --list-all-configs>
|
25
25
|
end
|
26
26
|
|
27
27
|
def descriptor_requirement()
|
@@ -21,7 +21,7 @@ class Fig::Command::Action::ListDependencies::YAML
|
|
21
21
|
include Fig::Command::Action::Role::ListWalkingDependencyTree
|
22
22
|
|
23
23
|
def options()
|
24
|
-
return %w<--list-dependencies --
|
24
|
+
return %w<--list-dependencies --yaml>
|
25
25
|
end
|
26
26
|
|
27
27
|
def descriptor_requirement()
|
@@ -21,7 +21,7 @@ class Fig::Command::Action::ListDependencies::YAMLAllConfigs
|
|
21
21
|
include Fig::Command::Action::Role::ListWalkingDependencyTree
|
22
22
|
|
23
23
|
def options()
|
24
|
-
return %w<--list-dependencies --
|
24
|
+
return %w<--list-dependencies --yaml --list-all-configs>
|
25
25
|
end
|
26
26
|
|
27
27
|
def descriptor_requirement()
|
@@ -21,6 +21,6 @@ class Fig::Command::Action::ListVariables::JSONAllConfigs
|
|
21
21
|
include Fig::Command::Action::Role::ListWalkingDependencyTree
|
22
22
|
|
23
23
|
def options()
|
24
|
-
return %w<--list-variables --
|
24
|
+
return %w<--list-variables --json --list-all-configs>
|
25
25
|
end
|
26
26
|
end
|
@@ -21,6 +21,6 @@ class Fig::Command::Action::ListVariables::YAMLAllConfigs
|
|
21
21
|
include Fig::Command::Action::Role::ListWalkingDependencyTree
|
22
22
|
|
23
23
|
def options()
|
24
|
-
return %w<--list-variables --
|
24
|
+
return %w<--list-variables --yaml --list-all-configs>
|
25
25
|
end
|
26
26
|
end
|
@@ -21,14 +21,15 @@ module Fig::Command::Action::Role::ListFromDataStructure
|
|
21
21
|
base_package, base_configs, include_gather, &package_gather
|
22
22
|
)
|
23
23
|
|
24
|
+
base_id = package_id base_package
|
24
25
|
if base_configs.size > 1
|
25
|
-
@object_to_be_serialized = @package_configs[
|
26
|
+
@object_to_be_serialized = @package_configs[base_id].keys.collect do
|
26
27
|
|config_name|
|
27
28
|
|
28
|
-
@package_configs[
|
29
|
+
@package_configs[base_id][config_name]
|
29
30
|
end
|
30
31
|
else
|
31
|
-
@object_to_be_serialized = @package_configs[
|
32
|
+
@object_to_be_serialized = @package_configs[base_id][base_configs[0]]
|
32
33
|
end
|
33
34
|
end
|
34
35
|
|
@@ -45,10 +46,13 @@ module Fig::Command::Action::Role::ListFromDataStructure
|
|
45
46
|
if ! visited.include? edge
|
46
47
|
visited << edge
|
47
48
|
|
48
|
-
|
49
|
+
included_id = package_id included_package
|
50
|
+
including_id = package_id including_package
|
51
|
+
including_hash = @package_configs[including_id][including_config]
|
52
|
+
|
49
53
|
including_hash['dependencies'] ||= []
|
50
54
|
including_hash['dependencies'] <<
|
51
|
-
@package_configs[
|
55
|
+
@package_configs[included_id][included_config]
|
52
56
|
end
|
53
57
|
end
|
54
58
|
end
|
@@ -64,9 +68,9 @@ module Fig::Command::Action::Role::ListFromDataStructure
|
|
64
68
|
if ! visited.include? name
|
65
69
|
visited << name
|
66
70
|
|
67
|
-
|
68
|
-
@package_configs[
|
69
|
-
|
71
|
+
id = package_id package
|
72
|
+
@package_configs[id] ||= {}
|
73
|
+
@package_configs[id][config_name] = node_content package, config_name
|
70
74
|
end
|
71
75
|
end
|
72
76
|
end
|
@@ -87,4 +91,8 @@ module Fig::Command::Action::Role::ListFromDataStructure
|
|
87
91
|
|
88
92
|
return hash
|
89
93
|
end
|
94
|
+
|
95
|
+
def package_id(package)
|
96
|
+
return package.name || "description: #{package.description}"
|
97
|
+
end
|
90
98
|
end
|
data/lib/fig/command/options.rb
CHANGED
@@ -197,12 +197,12 @@ Running commands:
|
|
197
197
|
return @list_tree
|
198
198
|
end
|
199
199
|
|
200
|
-
def
|
201
|
-
return @
|
200
|
+
def json?()
|
201
|
+
return @json
|
202
202
|
end
|
203
203
|
|
204
|
-
def
|
205
|
-
return @
|
204
|
+
def yaml?()
|
205
|
+
return @yaml
|
206
206
|
end
|
207
207
|
|
208
208
|
def graphviz?()
|
@@ -650,15 +650,15 @@ Running commands:
|
|
650
650
|
end
|
651
651
|
|
652
652
|
@parser.on(
|
653
|
-
'--
|
653
|
+
'--json', 'for listings, output JSON (http://json.org)'
|
654
654
|
) do
|
655
|
-
@
|
655
|
+
@json = true
|
656
656
|
end
|
657
657
|
|
658
658
|
@parser.on(
|
659
|
-
'--
|
659
|
+
'--yaml', 'for listings, output YAML (http://yaml.org)'
|
660
660
|
) do
|
661
|
-
@
|
661
|
+
@yaml = true
|
662
662
|
end
|
663
663
|
|
664
664
|
@parser.on(
|
@@ -874,13 +874,13 @@ Running commands:
|
|
874
874
|
raise Fig::Command::OptionError.new(
|
875
875
|
'Cannot use --suppress-all-includes/--suppress-cross-package-includes with --list-tree.'
|
876
876
|
)
|
877
|
-
elsif
|
877
|
+
elsif json?
|
878
878
|
raise Fig::Command::OptionError.new(
|
879
|
-
'Cannot use --suppress-all-includes/--suppress-cross-package-includes with --
|
879
|
+
'Cannot use --suppress-all-includes/--suppress-cross-package-includes with --json.'
|
880
880
|
)
|
881
|
-
elsif
|
881
|
+
elsif yaml?
|
882
882
|
raise Fig::Command::OptionError.new(
|
883
|
-
'Cannot use --suppress-all-includes/--suppress-cross-package-includes with --
|
883
|
+
'Cannot use --suppress-all-includes/--suppress-cross-package-includes with --yaml.'
|
884
884
|
)
|
885
885
|
elsif graphviz?
|
886
886
|
raise Fig::Command::OptionError.new(
|
@@ -905,10 +905,10 @@ Running commands:
|
|
905
905
|
end
|
906
906
|
elsif list_tree?
|
907
907
|
validate_list_option '--list-tree'
|
908
|
-
elsif
|
909
|
-
validate_list_option '--
|
910
|
-
elsif
|
911
|
-
validate_list_option '--
|
908
|
+
elsif json?
|
909
|
+
validate_list_option '--json'
|
910
|
+
elsif yaml?
|
911
|
+
validate_list_option '--yaml'
|
912
912
|
elsif graphviz?
|
913
913
|
validate_list_option '--graphviz'
|
914
914
|
elsif list_all_configs?
|
@@ -920,30 +920,30 @@ Running commands:
|
|
920
920
|
raise Fig::Command::OptionError.new(
|
921
921
|
'Cannot use --list-tree and --graphviz at the same time.'
|
922
922
|
)
|
923
|
-
elsif
|
923
|
+
elsif json?
|
924
924
|
raise Fig::Command::OptionError.new(
|
925
|
-
'Cannot use --list-tree and --
|
925
|
+
'Cannot use --list-tree and --json at the same time.'
|
926
926
|
)
|
927
|
-
elsif
|
927
|
+
elsif yaml?
|
928
928
|
raise Fig::Command::OptionError.new(
|
929
|
-
'Cannot use --list-tree and --
|
929
|
+
'Cannot use --list-tree and --json at the same time.'
|
930
930
|
)
|
931
931
|
end
|
932
932
|
end
|
933
933
|
if graphviz?
|
934
|
-
if
|
934
|
+
if json?
|
935
935
|
raise Fig::Command::OptionError.new(
|
936
|
-
'Cannot use --graphviz and --
|
936
|
+
'Cannot use --graphviz and --json at the same time.'
|
937
937
|
)
|
938
|
-
elsif
|
938
|
+
elsif yaml?
|
939
939
|
raise Fig::Command::OptionError.new(
|
940
|
-
'Cannot use --graphviz and --
|
940
|
+
'Cannot use --graphviz and --yaml at the same time.'
|
941
941
|
)
|
942
942
|
end
|
943
943
|
end
|
944
|
-
if
|
944
|
+
if json? and yaml?
|
945
945
|
raise Fig::Command::OptionError.new(
|
946
|
-
'Cannot use --
|
946
|
+
'Cannot use --json and --yaml at the same time.'
|
947
947
|
)
|
948
948
|
end
|
949
949
|
|
@@ -989,9 +989,9 @@ Running commands:
|
|
989
989
|
sub_action_name = :Default
|
990
990
|
if list_tree?
|
991
991
|
sub_action_name = list_all_configs? ? :TreeAllConfigs : :Tree
|
992
|
-
elsif
|
992
|
+
elsif json?
|
993
993
|
sub_action_name = list_all_configs? ? :JSONAllConfigs : :JSON
|
994
|
-
elsif
|
994
|
+
elsif yaml?
|
995
995
|
sub_action_name = list_all_configs? ? :YAMLAllConfigs : :YAML
|
996
996
|
elsif graphviz?
|
997
997
|
sub_action_name = list_all_configs? ? :GraphvizAllConfigs : :Graphviz
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: fig
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.24.1.beta.
|
4
|
+
version: 1.24.1.beta.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Matthew Foemmel
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-04-
|
11
|
+
date: 2015-04-24 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: colorize
|