cloudformation-ruby-dsl 0.4.14 → 0.5.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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 43b15a686475d1acda20a772af580ab8804c27f8
4
- data.tar.gz: 39959482afcaaf2ac04940e0e3aab6f666fb5257
3
+ metadata.gz: 87bc41b96021aaa4708bc3fed727fea5197b646a
4
+ data.tar.gz: 7cbb83021654a31310f32d52768addbc2fff5810
5
5
  SHA512:
6
- metadata.gz: 7ffa2dbb8e19ef047f9601c7113bbdd69667cc3a266d6a3eeb6d59696d8cd969fdc9ef180178a7236a842673b4a09d21b02f3e1851202153272b03e56fc24040
7
- data.tar.gz: 157629facd9413ae72a00798b143173b86a12ac4ce11261feb5b8a565dff27ecfbb386be59e0285a4f9c077a08678201eca44753500ad21598a832322acb36b1
6
+ metadata.gz: 76ab9cbc07eaf781bc1fbf91bcd51a7cc97832d1c7ebb61dd48830399623f87e5e4a83997f988bfdd16f04ebde318ff3d231cc935b0f00069e04309fc3a2f602
7
+ data.tar.gz: b2d320eece6c4248e7f5da0ac51c7c5db6ee3528323858dde0e53e7a091be6e30246664e3c2239a4b2b3ff59fcd5fb21afc7eafbd379ff57fa48517e05e1b764
@@ -25,6 +25,9 @@ require 'yaml'
25
25
  require 'erb'
26
26
  require 'xmlsimple'
27
27
 
28
+ VENDOR_PATH = File.expand_path("../../../vendor/AWSCloudFormation-1.0.12", __FILE__)
29
+ SYSTEM_ENV = "export PATH=#{VENDOR_PATH}/bin:$PATH; export AWS_CLOUDFORMATION_HOME=#{VENDOR_PATH}"
30
+
28
31
  ############################# Command-line and "cfn-cmd" Support
29
32
 
30
33
  # Parse command-line arguments based on cfn-cmd syntax (cfn-create-stack etc.) and return the parameters and region
@@ -141,7 +144,7 @@ def cfn_cmd(template)
141
144
  File.write(new_temp_file, tags_string + parameters_string + template_string)
142
145
 
143
146
  # Compare templates
144
- system(*["diff"] + diff_options + [old_temp_file, new_temp_file])
147
+ puts %x( #{SYSTEM_ENV}; #{(["diff"] + diff_options + [old_temp_file, new_temp_file]).join(' ')} )
145
148
 
146
149
  File.delete(old_temp_file)
147
150
  File.delete(new_temp_file)
@@ -196,7 +199,8 @@ def cfn_cmd(template)
196
199
  end
197
200
 
198
201
  # Execute command cmdline
199
- unless system(*cmdline)
202
+ puts %x( #{SYSTEM_ENV}; #{cmdline.map {|i| "\"#{i}\" "}.join} )
203
+ unless $?
200
204
  $stderr.puts "\nExecution of 'cfn-cmd' failed. To facilitate debugging, the generated JSON template " +
201
205
  "file was not deleted. You may delete the file manually if it isn't needed: #{temp_file}"
202
206
  exit(false)
@@ -220,7 +224,7 @@ def exec_describe_stack cfn_options_string
220
224
  end
221
225
 
222
226
  def exec_capture_stdout command
223
- stdout = `#{command}`
227
+ stdout = %x( #{SYSTEM_ENV}; #{command} )
224
228
  unless $?.success?
225
229
  $stderr.puts stdout unless stdout.empty? # cfn-cmd sometimes writes error messages to stdout
226
230
  exit(false)
@@ -15,7 +15,7 @@
15
15
  module Cfn
16
16
  module Ruby
17
17
  module Dsl
18
- VERSION = "0.4.14"
18
+ VERSION = "0.5.0"
19
19
  end
20
20
  end
21
21
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: cloudformation-ruby-dsl
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.4.14
4
+ version: 0.5.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Shawn Smith
@@ -15,7 +15,7 @@ authors:
15
15
  autorequire:
16
16
  bindir: bin
17
17
  cert_chain: []
18
- date: 2015-04-16 00:00:00.000000000 Z
18
+ date: 2015-05-07 00:00:00.000000000 Z
19
19
  dependencies:
20
20
  - !ruby/object:Gem::Dependency
21
21
  name: detabulator
@@ -84,37 +84,7 @@ email:
84
84
  - Jona.Fenocchi@bazaarvoice.com
85
85
  - Tony.Cui@bazaarvoice.com
86
86
  executables:
87
- - cfn-cancel-update-stack
88
- - cfn-cancel-update-stack.cmd
89
- - cfn-cmd
90
- - cfn-cmd.cmd
91
- - cfn-create-stack
92
- - cfn-create-stack.cmd
93
- - cfn-delete-stack
94
- - cfn-delete-stack.cmd
95
- - cfn-describe-stack-events
96
- - cfn-describe-stack-events.cmd
97
- - cfn-describe-stack-resource
98
- - cfn-describe-stack-resource.cmd
99
- - cfn-describe-stack-resources
100
- - cfn-describe-stack-resources.cmd
101
- - cfn-describe-stacks
102
- - cfn-describe-stacks.cmd
103
- - cfn-get-template
104
- - cfn-get-template.cmd
105
- - cfn-list-stack-resources
106
- - cfn-list-stack-resources.cmd
107
- - cfn-list-stacks
108
- - cfn-list-stacks.cmd
109
- - cfn-update-stack
110
- - cfn-update-stack.cmd
111
- - cfn-validate-template
112
- - cfn-validate-template.cmd
113
- - cfn-version
114
- - cfn-version.cmd
115
87
  - cfntemplate-to-ruby
116
- - service
117
- - service.cmd
118
88
  - vendor-cfn-bin
119
89
  extensions: []
120
90
  extra_rdoc_files: []
@@ -124,37 +94,7 @@ files:
124
94
  - LICENSE.txt
125
95
  - README.md
126
96
  - Rakefile
127
- - bin/cfn-cancel-update-stack
128
- - bin/cfn-cancel-update-stack.cmd
129
- - bin/cfn-cmd
130
- - bin/cfn-cmd.cmd
131
- - bin/cfn-create-stack
132
- - bin/cfn-create-stack.cmd
133
- - bin/cfn-delete-stack
134
- - bin/cfn-delete-stack.cmd
135
- - bin/cfn-describe-stack-events
136
- - bin/cfn-describe-stack-events.cmd
137
- - bin/cfn-describe-stack-resource
138
- - bin/cfn-describe-stack-resource.cmd
139
- - bin/cfn-describe-stack-resources
140
- - bin/cfn-describe-stack-resources.cmd
141
- - bin/cfn-describe-stacks
142
- - bin/cfn-describe-stacks.cmd
143
- - bin/cfn-get-template
144
- - bin/cfn-get-template.cmd
145
- - bin/cfn-list-stack-resources
146
- - bin/cfn-list-stack-resources.cmd
147
- - bin/cfn-list-stacks
148
- - bin/cfn-list-stacks.cmd
149
- - bin/cfn-update-stack
150
- - bin/cfn-update-stack.cmd
151
- - bin/cfn-validate-template
152
- - bin/cfn-validate-template.cmd
153
- - bin/cfn-version
154
- - bin/cfn-version.cmd
155
97
  - bin/cfntemplate-to-ruby
156
- - bin/service
157
- - bin/service.cmd
158
98
  - bin/vendor-cfn-bin
159
99
  - cloudformation-ruby-dsl.gemspec
160
100
  - examples/cloudformation-ruby-script.rb
@@ -1,6 +0,0 @@
1
- #!/usr/bin/env ruby
2
- # This script proxies the commands to service like cfn-cmd does, but in ruby so that gemstubs work
3
- vendor=File.expand_path('../../vendor/AWSCloudFormation-1.0.12',__FILE__)
4
- command=File.basename(__FILE__)
5
-
6
- exec "AWS_CLOUDFORMATION_HOME=#{vendor} SERVICE_HOME=#{vendor} #{vendor}/bin/#{command} \"#{ARGV.join('" "')}\""
@@ -1,6 +0,0 @@
1
- #!/usr/bin/env ruby
2
- # This script proxies the commands to service like cfn-cmd does, but in ruby so that gemstubs work
3
- vendor=File.expand_path('../../vendor/AWSCloudFormation-1.0.12',__FILE__)
4
- command=File.basename(__FILE__)
5
-
6
- exec "AWS_CLOUDFORMATION_HOME=#{vendor} SERVICE_HOME=#{vendor} #{vendor}/bin/#{command} \"#{ARGV.join('" "')}\""
@@ -1,6 +0,0 @@
1
- #!/usr/bin/env ruby
2
- # This script proxies the commands to service like cfn-cmd does, but in ruby so that gemstubs work
3
- vendor=File.expand_path('../../vendor/AWSCloudFormation-1.0.12',__FILE__)
4
- command=File.basename(__FILE__)
5
-
6
- exec "AWS_CLOUDFORMATION_HOME=#{vendor} SERVICE_HOME=#{vendor} #{vendor}/bin/#{command} \"#{ARGV.join('" "')}\""
@@ -1,6 +0,0 @@
1
- #!/usr/bin/env ruby
2
- # This script proxies the commands to service like cfn-cmd does, but in ruby so that gemstubs work
3
- vendor=File.expand_path('../../vendor/AWSCloudFormation-1.0.12',__FILE__)
4
- command=File.basename(__FILE__)
5
-
6
- exec "AWS_CLOUDFORMATION_HOME=#{vendor} SERVICE_HOME=#{vendor} #{vendor}/bin/#{command} \"#{ARGV.join('" "')}\""
@@ -1,6 +0,0 @@
1
- #!/usr/bin/env ruby
2
- # This script proxies the commands to service like cfn-cmd does, but in ruby so that gemstubs work
3
- vendor=File.expand_path('../../vendor/AWSCloudFormation-1.0.12',__FILE__)
4
- command=File.basename(__FILE__)
5
-
6
- exec "AWS_CLOUDFORMATION_HOME=#{vendor} SERVICE_HOME=#{vendor} #{vendor}/bin/#{command} \"#{ARGV.join('" "')}\""
@@ -1,6 +0,0 @@
1
- #!/usr/bin/env ruby
2
- # This script proxies the commands to service like cfn-cmd does, but in ruby so that gemstubs work
3
- vendor=File.expand_path('../../vendor/AWSCloudFormation-1.0.12',__FILE__)
4
- command=File.basename(__FILE__)
5
-
6
- exec "AWS_CLOUDFORMATION_HOME=#{vendor} SERVICE_HOME=#{vendor} #{vendor}/bin/#{command} \"#{ARGV.join('" "')}\""
@@ -1,6 +0,0 @@
1
- #!/usr/bin/env ruby
2
- # This script proxies the commands to service like cfn-cmd does, but in ruby so that gemstubs work
3
- vendor=File.expand_path('../../vendor/AWSCloudFormation-1.0.12',__FILE__)
4
- command=File.basename(__FILE__)
5
-
6
- exec "AWS_CLOUDFORMATION_HOME=#{vendor} SERVICE_HOME=#{vendor} #{vendor}/bin/#{command} \"#{ARGV.join('" "')}\""
@@ -1,6 +0,0 @@
1
- #!/usr/bin/env ruby
2
- # This script proxies the commands to service like cfn-cmd does, but in ruby so that gemstubs work
3
- vendor=File.expand_path('../../vendor/AWSCloudFormation-1.0.12',__FILE__)
4
- command=File.basename(__FILE__)
5
-
6
- exec "AWS_CLOUDFORMATION_HOME=#{vendor} SERVICE_HOME=#{vendor} #{vendor}/bin/#{command} \"#{ARGV.join('" "')}\""
@@ -1,6 +0,0 @@
1
- #!/usr/bin/env ruby
2
- # This script proxies the commands to service like cfn-cmd does, but in ruby so that gemstubs work
3
- vendor=File.expand_path('../../vendor/AWSCloudFormation-1.0.12',__FILE__)
4
- command=File.basename(__FILE__)
5
-
6
- exec "AWS_CLOUDFORMATION_HOME=#{vendor} SERVICE_HOME=#{vendor} #{vendor}/bin/#{command} \"#{ARGV.join('" "')}\""
@@ -1,6 +0,0 @@
1
- #!/usr/bin/env ruby
2
- # This script proxies the commands to service like cfn-cmd does, but in ruby so that gemstubs work
3
- vendor=File.expand_path('../../vendor/AWSCloudFormation-1.0.12',__FILE__)
4
- command=File.basename(__FILE__)
5
-
6
- exec "AWS_CLOUDFORMATION_HOME=#{vendor} SERVICE_HOME=#{vendor} #{vendor}/bin/#{command} \"#{ARGV.join('" "')}\""
@@ -1,6 +0,0 @@
1
- #!/usr/bin/env ruby
2
- # This script proxies the commands to service like cfn-cmd does, but in ruby so that gemstubs work
3
- vendor=File.expand_path('../../vendor/AWSCloudFormation-1.0.12',__FILE__)
4
- command=File.basename(__FILE__)
5
-
6
- exec "AWS_CLOUDFORMATION_HOME=#{vendor} SERVICE_HOME=#{vendor} #{vendor}/bin/#{command} \"#{ARGV.join('" "')}\""
@@ -1,6 +0,0 @@
1
- #!/usr/bin/env ruby
2
- # This script proxies the commands to service like cfn-cmd does, but in ruby so that gemstubs work
3
- vendor=File.expand_path('../../vendor/AWSCloudFormation-1.0.12',__FILE__)
4
- command=File.basename(__FILE__)
5
-
6
- exec "AWS_CLOUDFORMATION_HOME=#{vendor} SERVICE_HOME=#{vendor} #{vendor}/bin/#{command} \"#{ARGV.join('" "')}\""
@@ -1,6 +0,0 @@
1
- #!/usr/bin/env ruby
2
- # This script proxies the commands to service like cfn-cmd does, but in ruby so that gemstubs work
3
- vendor=File.expand_path('../../vendor/AWSCloudFormation-1.0.12',__FILE__)
4
- command=File.basename(__FILE__)
5
-
6
- exec "AWS_CLOUDFORMATION_HOME=#{vendor} SERVICE_HOME=#{vendor} #{vendor}/bin/#{command} \"#{ARGV.join('" "')}\""
@@ -1,6 +0,0 @@
1
- #!/usr/bin/env ruby
2
- # This script proxies the commands to service like cfn-cmd does, but in ruby so that gemstubs work
3
- vendor=File.expand_path('../../vendor/AWSCloudFormation-1.0.12',__FILE__)
4
- command=File.basename(__FILE__)
5
-
6
- exec "AWS_CLOUDFORMATION_HOME=#{vendor} SERVICE_HOME=#{vendor} #{vendor}/bin/#{command} \"#{ARGV.join('" "')}\""
@@ -1,6 +0,0 @@
1
- #!/usr/bin/env ruby
2
- # This script proxies the commands to service like cfn-cmd does, but in ruby so that gemstubs work
3
- vendor=File.expand_path('../../vendor/AWSCloudFormation-1.0.12',__FILE__)
4
- command=File.basename(__FILE__)
5
-
6
- exec "AWS_CLOUDFORMATION_HOME=#{vendor} SERVICE_HOME=#{vendor} #{vendor}/bin/#{command} \"#{ARGV.join('" "')}\""
@@ -1,6 +0,0 @@
1
- #!/usr/bin/env ruby
2
- # This script proxies the commands to service like cfn-cmd does, but in ruby so that gemstubs work
3
- vendor=File.expand_path('../../vendor/AWSCloudFormation-1.0.12',__FILE__)
4
- command=File.basename(__FILE__)
5
-
6
- exec "AWS_CLOUDFORMATION_HOME=#{vendor} SERVICE_HOME=#{vendor} #{vendor}/bin/#{command} \"#{ARGV.join('" "')}\""
@@ -1,6 +0,0 @@
1
- #!/usr/bin/env ruby
2
- # This script proxies the commands to service like cfn-cmd does, but in ruby so that gemstubs work
3
- vendor=File.expand_path('../../vendor/AWSCloudFormation-1.0.12',__FILE__)
4
- command=File.basename(__FILE__)
5
-
6
- exec "AWS_CLOUDFORMATION_HOME=#{vendor} SERVICE_HOME=#{vendor} #{vendor}/bin/#{command} \"#{ARGV.join('" "')}\""
@@ -1,6 +0,0 @@
1
- #!/usr/bin/env ruby
2
- # This script proxies the commands to service like cfn-cmd does, but in ruby so that gemstubs work
3
- vendor=File.expand_path('../../vendor/AWSCloudFormation-1.0.12',__FILE__)
4
- command=File.basename(__FILE__)
5
-
6
- exec "AWS_CLOUDFORMATION_HOME=#{vendor} SERVICE_HOME=#{vendor} #{vendor}/bin/#{command} \"#{ARGV.join('" "')}\""
@@ -1,6 +0,0 @@
1
- #!/usr/bin/env ruby
2
- # This script proxies the commands to service like cfn-cmd does, but in ruby so that gemstubs work
3
- vendor=File.expand_path('../../vendor/AWSCloudFormation-1.0.12',__FILE__)
4
- command=File.basename(__FILE__)
5
-
6
- exec "AWS_CLOUDFORMATION_HOME=#{vendor} SERVICE_HOME=#{vendor} #{vendor}/bin/#{command} \"#{ARGV.join('" "')}\""
@@ -1,6 +0,0 @@
1
- #!/usr/bin/env ruby
2
- # This script proxies the commands to service like cfn-cmd does, but in ruby so that gemstubs work
3
- vendor=File.expand_path('../../vendor/AWSCloudFormation-1.0.12',__FILE__)
4
- command=File.basename(__FILE__)
5
-
6
- exec "AWS_CLOUDFORMATION_HOME=#{vendor} SERVICE_HOME=#{vendor} #{vendor}/bin/#{command} \"#{ARGV.join('" "')}\""
@@ -1,6 +0,0 @@
1
- #!/usr/bin/env ruby
2
- # This script proxies the commands to service like cfn-cmd does, but in ruby so that gemstubs work
3
- vendor=File.expand_path('../../vendor/AWSCloudFormation-1.0.12',__FILE__)
4
- command=File.basename(__FILE__)
5
-
6
- exec "AWS_CLOUDFORMATION_HOME=#{vendor} SERVICE_HOME=#{vendor} #{vendor}/bin/#{command} \"#{ARGV.join('" "')}\""
@@ -1,6 +0,0 @@
1
- #!/usr/bin/env ruby
2
- # This script proxies the commands to service like cfn-cmd does, but in ruby so that gemstubs work
3
- vendor=File.expand_path('../../vendor/AWSCloudFormation-1.0.12',__FILE__)
4
- command=File.basename(__FILE__)
5
-
6
- exec "AWS_CLOUDFORMATION_HOME=#{vendor} SERVICE_HOME=#{vendor} #{vendor}/bin/#{command} \"#{ARGV.join('" "')}\""
@@ -1,6 +0,0 @@
1
- #!/usr/bin/env ruby
2
- # This script proxies the commands to service like cfn-cmd does, but in ruby so that gemstubs work
3
- vendor=File.expand_path('../../vendor/AWSCloudFormation-1.0.12',__FILE__)
4
- command=File.basename(__FILE__)
5
-
6
- exec "AWS_CLOUDFORMATION_HOME=#{vendor} SERVICE_HOME=#{vendor} #{vendor}/bin/#{command} \"#{ARGV.join('" "')}\""
@@ -1,6 +0,0 @@
1
- #!/usr/bin/env ruby
2
- # This script proxies the commands to service like cfn-cmd does, but in ruby so that gemstubs work
3
- vendor=File.expand_path('../../vendor/AWSCloudFormation-1.0.12',__FILE__)
4
- command=File.basename(__FILE__)
5
-
6
- exec "AWS_CLOUDFORMATION_HOME=#{vendor} SERVICE_HOME=#{vendor} #{vendor}/bin/#{command} \"#{ARGV.join('" "')}\""
@@ -1,6 +0,0 @@
1
- #!/usr/bin/env ruby
2
- # This script proxies the commands to service like cfn-cmd does, but in ruby so that gemstubs work
3
- vendor=File.expand_path('../../vendor/AWSCloudFormation-1.0.12',__FILE__)
4
- command=File.basename(__FILE__)
5
-
6
- exec "AWS_CLOUDFORMATION_HOME=#{vendor} SERVICE_HOME=#{vendor} #{vendor}/bin/#{command} \"#{ARGV.join('" "')}\""
@@ -1,6 +0,0 @@
1
- #!/usr/bin/env ruby
2
- # This script proxies the commands to service like cfn-cmd does, but in ruby so that gemstubs work
3
- vendor=File.expand_path('../../vendor/AWSCloudFormation-1.0.12',__FILE__)
4
- command=File.basename(__FILE__)
5
-
6
- exec "AWS_CLOUDFORMATION_HOME=#{vendor} SERVICE_HOME=#{vendor} #{vendor}/bin/#{command} \"#{ARGV.join('" "')}\""
@@ -1,6 +0,0 @@
1
- #!/usr/bin/env ruby
2
- # This script proxies the commands to service like cfn-cmd does, but in ruby so that gemstubs work
3
- vendor=File.expand_path('../../vendor/AWSCloudFormation-1.0.12',__FILE__)
4
- command=File.basename(__FILE__)
5
-
6
- exec "AWS_CLOUDFORMATION_HOME=#{vendor} SERVICE_HOME=#{vendor} #{vendor}/bin/#{command} \"#{ARGV.join('" "')}\""
@@ -1,6 +0,0 @@
1
- #!/usr/bin/env ruby
2
- # This script proxies the commands to service like cfn-cmd does, but in ruby so that gemstubs work
3
- vendor=File.expand_path('../../vendor/AWSCloudFormation-1.0.12',__FILE__)
4
- command=File.basename(__FILE__)
5
-
6
- exec "AWS_CLOUDFORMATION_HOME=#{vendor} SERVICE_HOME=#{vendor} #{vendor}/bin/#{command} \"#{ARGV.join('" "')}\""
@@ -1,6 +0,0 @@
1
- #!/usr/bin/env ruby
2
- # This script proxies the commands to service like cfn-cmd does, but in ruby so that gemstubs work
3
- vendor=File.expand_path('../../vendor/AWSCloudFormation-1.0.12',__FILE__)
4
- command=File.basename(__FILE__)
5
-
6
- exec "AWS_CLOUDFORMATION_HOME=#{vendor} SERVICE_HOME=#{vendor} #{vendor}/bin/#{command} \"#{ARGV.join('" "')}\""
@@ -1,6 +0,0 @@
1
- #!/usr/bin/env ruby
2
- # This script proxies the commands to service like cfn-cmd does, but in ruby so that gemstubs work
3
- vendor=File.expand_path('../../vendor/AWSCloudFormation-1.0.12',__FILE__)
4
- command=File.basename(__FILE__)
5
-
6
- exec "AWS_CLOUDFORMATION_HOME=#{vendor} SERVICE_HOME=#{vendor} #{vendor}/bin/#{command} \"#{ARGV.join('" "')}\""