aws-cfn-compiler 0.9.4 → 0.9.5

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 CHANGED
@@ -1,15 +1,15 @@
1
1
  ---
2
2
  !binary "U0hBMQ==":
3
3
  metadata.gz: !binary |-
4
- NWQ2NjYyYzZmNmE5ZmU1ODhiYTU3YzA0NDhlOWEzNDY0YzU3NTM1Yg==
4
+ MjY0MjBiNmNjZTVlZThkZmNmNzJiNmFlMzIxNjU0MGM2MGQ3OTg2MA==
5
5
  data.tar.gz: !binary |-
6
- MzY4NzNlMzk3MjFmYzJhM2QwYTQxMDcxZTU1ZmFjZjdkYjE0OGQyYw==
6
+ OTIyMTEzODg3NGExMmU0MTZjNjVmMTkyZTNlMGY2YzRlYmJmNDgwYQ==
7
7
  SHA512:
8
8
  metadata.gz: !binary |-
9
- MmIwZGVkN2RjZDU1NDVjZGQ0MjA2YWU2ZWFjOWEwYzk3MzEzM2EzMWJkM2I1
10
- OGM3ZjYzZGJmOWIxZTY4MmU3Mjk3YTFhZjRjMzQxN2EwMzI0MmVhMjlhYTFk
11
- ZTM0MTEzYTY3ZGI1OGRjN2I2MzdhZmNlZTNkYjRhZDQxYmZjYWQ=
9
+ YjA2OWZiODA0ODYzNjgyODc1ZDNmYjFiOGE2MGI0N2ExMGI3MDM5ZWEyZTQ5
10
+ YjY4NGRlMGU4ODE5NzkyNGEwZmJmOTE0OGViMmI1MmM5YzgwZmI2ODMxMDk4
11
+ MDJiMTI2NjhmZTFlMDI5MTIzOGU4ZWU1MjM3ZTViOTZiODVhYzA=
12
12
  data.tar.gz: !binary |-
13
- NGJiYjQyYjgzYTczYjZiNDVkOWY0ZDZlNTVhYWMwMjQ0YTMxMzIyZGZiYmYx
14
- ZGY2NTgxZjkyMDk1M2VhYTkyNDZkNDg0OWEwMjJiZjZiMzBmZmM3YmYzZjg4
15
- NzIwOTllMTc4MzRmZDI5NGU2ZGIxMDhjMmU1ZTdlNDk4YWQzNTE=
13
+ OTY4ZGU4ZDYzMzYxM2MxNWYyMjgwOWE4ZDJlMWZhYTQwMzgxNmRiMmM2NDlk
14
+ NzFiZmRiMWRjODFkZmQzYmYyODdlN2Q1ZGExM2JkMjUxYzlkZWE3OGY2ZjA1
15
+ ZDJkYTZmYWMyOTQ3MWE1OGZhOTZiMjFmODM2ZmVmMmM5YzkyYTg=
@@ -24,7 +24,8 @@ Gem::Specification.new do |spec|
24
24
  spec.add_dependency 'slop'
25
25
  spec.add_dependency 'inifile'
26
26
  spec.add_dependency 'semverse', '>= 1.1.0'
27
- spec.add_dependency 'aws-cfn-dsl', '>= 0.9.2'
27
+ spec.add_dependency 'aws-cfn-dsl', '>= 0.9.4'
28
+ spec.add_dependency 'mixlib-cli', '> 0'
28
29
  spec.add_dependency 'dldinternet-mixlib-cli', '>= 0.2.0'
29
30
  spec.add_dependency 'dldinternet-mixlib-logging', '>= 0.4.0'
30
31
 
data/aws-cfn-compiler.iml CHANGED
@@ -6,41 +6,57 @@
6
6
  <component name="NewModuleRootManager" inherit-compiler-output="true">
7
7
  <exclude-output />
8
8
  <content url="file://$MODULE_DIR$" />
9
- <orderEntry type="jdk" jdkName="RVM: ruby-1.9.3-p547 [aws-cfn-yats]" jdkType="RUBY_SDK" />
9
+ <orderEntry type="jdk" jdkName="RVM: ruby-1.9.3-p547 [aws-cfn-compile]" jdkType="RUBY_SDK" />
10
10
  <orderEntry type="sourceFolder" forTests="false" />
11
11
  <orderEntry type="module" module-name="aws-cfn-dsl" />
12
+ <orderEntry type="module" module-name="cloudformation-ruby-dsl" />
12
13
  <orderEntry type="module-library">
13
- <library name="cloudformation-ruby-dsl (v[path], /Users/cdelange/Dropbox/DLDInternet/ws/gems-ws/cloudformation-ruby-dsl) [path][gem]">
14
+ <library name="dldinternet-mixlib-cli (v0.2.0, /Users/cdelange/Dropbox/DLDInternet/ws/gems-ws/dldinternet-mixlib-cli) [path][gem]">
14
15
  <CLASSES>
15
- <root url="file://$MODULE_DIR$/../cloudformation-ruby-dsl/bin" />
16
- <root url="file://$MODULE_DIR$/../cloudformation-ruby-dsl/lib" />
17
- <root url="file://$MODULE_DIR$/../cloudformation-ruby-dsl/.idea" />
18
- <root url="file://$MODULE_DIR$/../cloudformation-ruby-dsl/vendor" />
16
+ <root url="file://$MODULE_DIR$/../dldinternet-mixlib-cli/bin" />
17
+ <root url="file://$MODULE_DIR$/../dldinternet-mixlib-cli/lib" />
18
+ <root url="file://$MODULE_DIR$/../dldinternet-mixlib-cli/pkg" />
19
+ <root url="file://$MODULE_DIR$/../dldinternet-mixlib-cli/.idea" />
19
20
  </CLASSES>
20
21
  <JAVADOC />
21
22
  <SOURCES>
22
- <root url="file://$MODULE_DIR$/../cloudformation-ruby-dsl/bin" />
23
- <root url="file://$MODULE_DIR$/../cloudformation-ruby-dsl/lib" />
24
- <root url="file://$MODULE_DIR$/../cloudformation-ruby-dsl/.idea" />
25
- <root url="file://$MODULE_DIR$/../cloudformation-ruby-dsl/vendor" />
23
+ <root url="file://$MODULE_DIR$/../dldinternet-mixlib-cli/bin" />
24
+ <root url="file://$MODULE_DIR$/../dldinternet-mixlib-cli/lib" />
25
+ <root url="file://$MODULE_DIR$/../dldinternet-mixlib-cli/pkg" />
26
+ <root url="file://$MODULE_DIR$/../dldinternet-mixlib-cli/.idea" />
26
27
  </SOURCES>
27
28
  </library>
28
29
  </orderEntry>
29
- <orderEntry type="module" module-name="dldinternet-mixlib-cli" />
30
- <orderEntry type="module" module-name="dldinternet-mixlib-logging" />
31
- <orderEntry type="library" scope="PROVIDED" name="awesome_print (v1.2.0, RVM: ruby-1.9.3-p547 [aws-cfn-yats]) [gem]" level="application" />
32
- <orderEntry type="library" scope="PROVIDED" name="detabulator (v0.1.0, RVM: ruby-1.9.3-p547 [aws-cfn-yats]) [gem]" level="application" />
33
- <orderEntry type="library" scope="PROVIDED" name="inifile (v2.0.2, RVM: ruby-1.9.3-p547 [aws-cfn-yats]) [gem]" level="application" />
34
- <orderEntry type="library" scope="PROVIDED" name="json (v1.8.1, RVM: ruby-1.9.3-p547 [aws-cfn-yats]) [gem]" level="application" />
35
- <orderEntry type="library" scope="PROVIDED" name="json_pure (v1.8.1, RVM: ruby-1.9.3-p547 [aws-cfn-yats]) [gem]" level="application" />
36
- <orderEntry type="library" scope="PROVIDED" name="little-plugger (v1.1.3, RVM: ruby-1.9.3-p547 [aws-cfn-yats]) [gem]" level="application" />
37
- <orderEntry type="library" scope="PROVIDED" name="logging (v1.8.2, RVM: ruby-1.9.3-p547 [aws-cfn-yats]) [gem]" level="application" />
38
- <orderEntry type="library" scope="PROVIDED" name="mixlib-cli (v1.5.0, RVM: ruby-1.9.3-p547 [aws-cfn-yats]) [gem]" level="application" />
39
- <orderEntry type="library" scope="PROVIDED" name="multi_json (v1.10.1, RVM: ruby-1.9.3-p547 [aws-cfn-yats]) [gem]" level="application" />
40
- <orderEntry type="library" scope="PROVIDED" name="psych (v2.0.5, RVM: ruby-1.9.3-p547 [aws-cfn-yats]) [gem]" level="application" />
41
- <orderEntry type="library" scope="PROVIDED" name="rake (v10.3.2, RVM: ruby-1.9.3-p547 [aws-cfn-yats]) [gem]" level="application" />
42
- <orderEntry type="library" scope="PROVIDED" name="semverse (v1.1.0, RVM: ruby-1.9.3-p547 [aws-cfn-yats]) [gem]" level="application" />
43
- <orderEntry type="library" scope="PROVIDED" name="slop (v3.5.0, RVM: ruby-1.9.3-p547 [aws-cfn-yats]) [gem]" level="application" />
30
+ <orderEntry type="module-library">
31
+ <library name="dldinternet-mixlib-logging (v0.4.0, /Users/cdelange/Dropbox/DLDInternet/ws/gems-ws/dldinternet-mixlib-logging) [path][gem]">
32
+ <CLASSES>
33
+ <root url="file://$MODULE_DIR$/../dldinternet-mixlib-logging/bin" />
34
+ <root url="file://$MODULE_DIR$/../dldinternet-mixlib-logging/lib" />
35
+ <root url="file://$MODULE_DIR$/../dldinternet-mixlib-logging/pkg" />
36
+ <root url="file://$MODULE_DIR$/../dldinternet-mixlib-logging/.idea" />
37
+ </CLASSES>
38
+ <JAVADOC />
39
+ <SOURCES>
40
+ <root url="file://$MODULE_DIR$/../dldinternet-mixlib-logging/bin" />
41
+ <root url="file://$MODULE_DIR$/../dldinternet-mixlib-logging/lib" />
42
+ <root url="file://$MODULE_DIR$/../dldinternet-mixlib-logging/pkg" />
43
+ <root url="file://$MODULE_DIR$/../dldinternet-mixlib-logging/.idea" />
44
+ </SOURCES>
45
+ </library>
46
+ </orderEntry>
47
+ <orderEntry type="library" scope="PROVIDED" name="awesome_print (v1.2.0, RVM: ruby-1.9.3-p547 [aws-cfn-compile]) [gem]" level="application" />
48
+ <orderEntry type="library" scope="PROVIDED" name="detabulator (v0.1.0, RVM: ruby-1.9.3-p547 [aws-cfn-compile]) [gem]" level="application" />
49
+ <orderEntry type="library" scope="PROVIDED" name="inifile (v2.0.2, RVM: ruby-1.9.3-p547 [aws-cfn-compile]) [gem]" level="application" />
50
+ <orderEntry type="library" scope="PROVIDED" name="json (v1.8.1, RVM: ruby-1.9.3-p547 [aws-cfn-compile]) [gem]" level="application" />
51
+ <orderEntry type="library" scope="PROVIDED" name="json_pure (v1.8.1, RVM: ruby-1.9.3-p547 [aws-cfn-compile]) [gem]" level="application" />
52
+ <orderEntry type="library" scope="PROVIDED" name="little-plugger (v1.1.3, RVM: ruby-1.9.3-p547 [aws-cfn-compile]) [gem]" level="application" />
53
+ <orderEntry type="library" scope="PROVIDED" name="logging (v1.8.2, RVM: ruby-1.9.3-p547 [aws-cfn-compile]) [gem]" level="application" />
54
+ <orderEntry type="library" scope="PROVIDED" name="mixlib-cli (v1.5.0, RVM: ruby-1.9.3-p547 [aws-cfn-compile]) [gem]" level="application" />
55
+ <orderEntry type="library" scope="PROVIDED" name="multi_json (v1.10.1, RVM: ruby-1.9.3-p547 [aws-cfn-compile]) [gem]" level="application" />
56
+ <orderEntry type="library" scope="PROVIDED" name="psych (v2.0.5, RVM: ruby-1.9.3-p547 [aws-cfn-compile]) [gem]" level="application" />
57
+ <orderEntry type="library" scope="PROVIDED" name="rake (v10.3.2, RVM: ruby-1.9.3-p547 [aws-cfn-compile]) [gem]" level="application" />
58
+ <orderEntry type="library" scope="PROVIDED" name="semverse (v1.1.0, RVM: ruby-1.9.3-p547 [aws-cfn-compile]) [gem]" level="application" />
59
+ <orderEntry type="library" scope="PROVIDED" name="slop (v3.5.0, RVM: ruby-1.9.3-p547 [aws-cfn-compile]) [gem]" level="application" />
44
60
  </component>
45
61
  </module>
46
62
 
@@ -33,8 +33,22 @@ module Aws
33
33
  when :DescriptionString
34
34
  v = nil
35
35
  begin
36
- parents = "Parents: #{meta(:DependsOn)} "
36
+ dependson = meta(:DependsOn)
37
37
  rescue
38
+ dependson = ''
39
+ end
40
+ begin
41
+ required = meta(:Require)['Template'].map { |e| e.keys }.flatten
42
+ rescue
43
+ required = ''
44
+ end
45
+ if dependson or required
46
+ # noinspection RubyHashKeysTypesInspection
47
+ parents = {}
48
+ dependson.each { |i| parents[i] = true }
49
+ required.each { |i| parents[i] = true }
50
+ parents = "Parents: [#{parents.keys.join(',')}] "
51
+ else
38
52
  parents = ''
39
53
  end
40
54
  # noinspection RubyExpressionInStringInspection
@@ -91,6 +91,10 @@ module Aws
91
91
  break
92
92
  end
93
93
  end
94
+ unless path
95
+ @logger.error " !! error: Cannot calculate brick dirname in #{dir} for #{rsrc} with brick path: \n\t#{@config[:brick_path_list].join("\n\t")} \n"
96
+ abort!
97
+ end
94
98
  patn = path
95
99
  unless @config[:expandedpaths]
96
100
  patn = short_path(path,3)
@@ -104,8 +108,12 @@ module Aws
104
108
  end
105
109
 
106
110
  def short_path(path,n=2)
107
- patn = path.split(File::SEPARATOR)[0-n..-1]
108
- patn = patn.join(File::SEPARATOR)
111
+ if path
112
+ patn = path.split(File::SEPARATOR)[0-n..-1]
113
+ patn = patn.join(File::SEPARATOR)
114
+ else
115
+ path
116
+ end
109
117
  end
110
118
  end
111
119
  end
@@ -45,7 +45,7 @@ module Aws
45
45
  @optional[:directory] = true
46
46
  setup_config
47
47
 
48
- set_config_path_option(@config[:stack_path],'STACK_PATH',@config[:directory] || '.',:stack_path_list,'stack path')
48
+ set_config_path_option(@config[:stack_path],'STACK_PATH','.',:stack_path_list,'stack path')
49
49
  set_config_path_option(@config[:brick_path],'BRICK_PATH',@config[:directory],:brick_path_list,'brick path',:stack_path_list)
50
50
 
51
51
  end
@@ -1,6 +1,8 @@
1
1
  require 'rubygems/dependency'
2
2
  require 'semverse'
3
3
  require 'awesome_print'
4
+ require 'aws/cfn/dsl/version'
5
+ require 'aws/cfn/decompiler/version'
4
6
 
5
7
  module Aws
6
8
  module Cfn
@@ -24,7 +26,7 @@ module Aws
24
26
  end
25
27
  end
26
28
  rescue Exception => e
27
- # pass ... abort! e
29
+ abort! e
28
30
  end
29
31
  end
30
32
 
@@ -44,13 +46,29 @@ module Aws
44
46
  version,constraint = case name
45
47
  when /Compiler/
46
48
  [Aws::Cfn::Compiler::VERSION,constraint]
49
+ when /^(DeCompiler|Decompiler)/
50
+ [Aws::Cfn::DeCompiler::VERSION,constraint]
51
+ when /^(Dsl|DSL)/
52
+ [Aws::Cfn::Dsl::VERSION,constraint]
53
+ when /Gems/
54
+ constraint.map { |h|
55
+ h.map { |k,v|
56
+ ver = eval "#{k}::VERSION"
57
+ semver = ::Semverse::Version.new(ver)
58
+ raise "The constraint failed: #{k} #{v} (Found #{ver})" unless ::Semverse::Constraint.new(v).satisfies?(semver)
59
+ }
60
+ }
61
+ return
62
+ when /Template/
63
+ @logger.warn "Template constraint check supported but not implemented in version #{VERSION}: #{constraint}"
64
+ return
47
65
  # when /MinVersion/
48
66
  # [Aws::Cfn::Compiler::VERSION,">= #{constraint}"]
49
67
  else
50
68
  raise "#{name} constraint not supported"
51
69
  end
52
70
 
53
- raise "The constraint failed: #{name} #{constraint}" unless ::Semverse::Constraint.new(constraint).satisfies?(::Semverse::Version.new(version))
71
+ raise "The constraint failed: #{name} #{constraint} (Found #{version})" unless ::Semverse::Constraint.new(constraint).satisfies?(::Semverse::Version.new(version))
54
72
 
55
73
  end
56
74
 
@@ -1,7 +1,7 @@
1
1
  module Aws
2
2
  module Cfn
3
3
  module Compiler
4
- VERSION = '0.9.4'
4
+ VERSION = '0.9.5'
5
5
  end
6
6
  end
7
7
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: aws-cfn-compiler
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.9.4
4
+ version: 0.9.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - PKinney
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-07-07 00:00:00.000000000 Z
11
+ date: 2014-07-15 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: awesome_print
@@ -106,14 +106,28 @@ dependencies:
106
106
  requirements:
107
107
  - - ! '>='
108
108
  - !ruby/object:Gem::Version
109
- version: 0.9.2
109
+ version: 0.9.4
110
110
  type: :runtime
111
111
  prerelease: false
112
112
  version_requirements: !ruby/object:Gem::Requirement
113
113
  requirements:
114
114
  - - ! '>='
115
115
  - !ruby/object:Gem::Version
116
- version: 0.9.2
116
+ version: 0.9.4
117
+ - !ruby/object:Gem::Dependency
118
+ name: mixlib-cli
119
+ requirement: !ruby/object:Gem::Requirement
120
+ requirements:
121
+ - - ! '>'
122
+ - !ruby/object:Gem::Version
123
+ version: '0'
124
+ type: :runtime
125
+ prerelease: false
126
+ version_requirements: !ruby/object:Gem::Requirement
127
+ requirements:
128
+ - - ! '>'
129
+ - !ruby/object:Gem::Version
130
+ version: '0'
117
131
  - !ruby/object:Gem::Dependency
118
132
  name: dldinternet-mixlib-cli
119
133
  requirement: !ruby/object:Gem::Requirement