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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 2ea33a3e608936d3bc7ba5dfa2e844cfa425f979
4
- data.tar.gz: b062f1064cac523af1372d5197001b06ffd5c7e1
3
+ metadata.gz: e1e5215c6b2a2e43e74fc04c1d3edbdf085db2c0
4
+ data.tar.gz: 40ae3c1877969e31dea223d4594fec1fa0b88cf2
5
5
  SHA512:
6
- metadata.gz: c0c03e39ab625727c7a1570ccecb581e16d0a188eda16d7e91cfbe5213975e7340fd8133fd5f4d453627f1f62d82251f1b7c802471ff40897d3bedf8e255c5bf
7
- data.tar.gz: 2b8cc76a6b3d749978e72800a1dde63f03bdf2db741f77b2a4001aebe67cc67d1f34ad9d8b2824544d376685f806373c626197b104d5d3e868def67ee30b2822
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
@@ -1,5 +1,5 @@
1
1
  # coding: utf-8
2
2
 
3
3
  module Fig
4
- VERSION = '1.24.1.beta.1'
4
+ VERSION = '1.24.1.beta.2'
5
5
  end
@@ -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 --list-json>
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 --list-json --list-all-configs>
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 --list-yaml>
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 --list-yaml --list-all-configs>
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::JSON
21
21
  include Fig::Command::Action::Role::ListWalkingDependencyTree
22
22
 
23
23
  def options()
24
- return %w<--list-variables --list-json>
24
+ return %w<--list-variables --json>
25
25
  end
26
26
  end
@@ -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 --list-json --list-all-configs>
24
+ return %w<--list-variables --json --list-all-configs>
25
25
  end
26
26
  end
@@ -21,6 +21,6 @@ class Fig::Command::Action::ListVariables::YAML
21
21
  include Fig::Command::Action::Role::ListWalkingDependencyTree
22
22
 
23
23
  def options()
24
- return %w<--list-variables --list-yaml>
24
+ return %w<--list-variables --yaml>
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 --list-yaml --list-all-configs>
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[base_package].keys.collect do
26
+ @object_to_be_serialized = @package_configs[base_id].keys.collect do
26
27
  |config_name|
27
28
 
28
- @package_configs[base_package][config_name]
29
+ @package_configs[base_id][config_name]
29
30
  end
30
31
  else
31
- @object_to_be_serialized = @package_configs[base_package][base_configs[0]]
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
- including_hash = @package_configs[including_package][including_config]
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[included_package][included_config]
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
- @package_configs[package] ||= {}
68
- @package_configs[package][config_name] =
69
- node_content package, config_name
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
@@ -197,12 +197,12 @@ Running commands:
197
197
  return @list_tree
198
198
  end
199
199
 
200
- def list_json?()
201
- return @list_json
200
+ def json?()
201
+ return @json
202
202
  end
203
203
 
204
- def list_yaml?()
205
- return @list_yaml
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
- '--list-json', 'for listings, output JSON (http://json.org)'
653
+ '--json', 'for listings, output JSON (http://json.org)'
654
654
  ) do
655
- @list_json = true
655
+ @json = true
656
656
  end
657
657
 
658
658
  @parser.on(
659
- '--list-yaml', 'for listings, output YAML (http://yaml.org)'
659
+ '--yaml', 'for listings, output YAML (http://yaml.org)'
660
660
  ) do
661
- @list_yaml = true
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 list_json?
877
+ elsif json?
878
878
  raise Fig::Command::OptionError.new(
879
- 'Cannot use --suppress-all-includes/--suppress-cross-package-includes with --list-json.'
879
+ 'Cannot use --suppress-all-includes/--suppress-cross-package-includes with --json.'
880
880
  )
881
- elsif list_yaml?
881
+ elsif yaml?
882
882
  raise Fig::Command::OptionError.new(
883
- 'Cannot use --suppress-all-includes/--suppress-cross-package-includes with --list-yaml.'
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 list_json?
909
- validate_list_option '--list-json'
910
- elsif list_yaml?
911
- validate_list_option '--list-yaml'
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 list_json?
923
+ elsif json?
924
924
  raise Fig::Command::OptionError.new(
925
- 'Cannot use --list-tree and --list-json at the same time.'
925
+ 'Cannot use --list-tree and --json at the same time.'
926
926
  )
927
- elsif list_yaml?
927
+ elsif yaml?
928
928
  raise Fig::Command::OptionError.new(
929
- 'Cannot use --list-tree and --list-json at the same time.'
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 list_json?
934
+ if json?
935
935
  raise Fig::Command::OptionError.new(
936
- 'Cannot use --graphviz and --list-json at the same time.'
936
+ 'Cannot use --graphviz and --json at the same time.'
937
937
  )
938
- elsif list_yaml?
938
+ elsif yaml?
939
939
  raise Fig::Command::OptionError.new(
940
- 'Cannot use --graphviz and --list-yaml at the same time.'
940
+ 'Cannot use --graphviz and --yaml at the same time.'
941
941
  )
942
942
  end
943
943
  end
944
- if list_json? and list_yaml?
944
+ if json? and yaml?
945
945
  raise Fig::Command::OptionError.new(
946
- 'Cannot use --list-json and --list-yaml at the same time.'
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 list_json?
992
+ elsif json?
993
993
  sub_action_name = list_all_configs? ? :JSONAllConfigs : :JSON
994
- elsif list_yaml?
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
@@ -68,7 +68,7 @@ Querying:
68
68
 
69
69
  List options (represented as "[...list options...]" above):
70
70
 
71
- [--list-tree | --graphviz]
71
+ [--list-tree | --json | --yaml | --graphviz]
72
72
  [--list-all-configs]
73
73
 
74
74
  Standard options (represented as "[...]" above):
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.1
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-23 00:00:00.000000000 Z
11
+ date: 2015-04-24 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: colorize