thor-aws 0.0.1 → 0.0.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: 634180d416277d86f63e90d24bba4424fecf6990
4
- data.tar.gz: aa388aee4b73137e61d396dbc6968295a9093882
3
+ metadata.gz: 30c282c16eec2450dd0a2fc511795c0c30a2459e
4
+ data.tar.gz: 8f6c3476f1de624ff95864a301ac036858ad1530
5
5
  SHA512:
6
- metadata.gz: acb35e7a549f3a9466ee524c063aca4ba52efb8babb181f7d7c0eadd1d479b1e8fcde84498e428aefb2971f57db6e9722bfeccc40ade6ef1472e122278a4a690
7
- data.tar.gz: 03d76cd1ffe979e8cb21d1c0267f22bb1a0d8c64eb57cab0e30ce57424db313e5eb22679d55f315f75468133f658cbbdb8ae6e51bafe5e4e7f7796bf62f9dd39
6
+ metadata.gz: 3ffd713c06d1b71d5a412408d854dc5701c5b1bd4a589bfdcff731d53724d45166eefcce84c278cd0ef334819a969576a6015c1d5fe49faf7fe28675c737072c
7
+ data.tar.gz: cfd04a26ca4893acbe2cbe912b7770260314b1b9b8a350d0a808f20812ce649f685b22b5221e2f7010e7765f1d616e802067c7f5b8f4801e7d6987be60a2ff9d
data/lib/thor/aws.rb CHANGED
@@ -55,6 +55,10 @@ module Thor::Aws
55
55
  end
56
56
  end
57
57
 
58
+ def instance_variable_get_or_set(name, object)
59
+ instance_variable_get(name) or instance_variable_set(name, object)
60
+ end
61
+
58
62
  {
59
63
  autoscaling: Aws::AutoScaling::Resource,
60
64
  cloudformation: Aws::CloudFormation::Resource,
@@ -101,7 +105,7 @@ module Thor::Aws
101
105
  swf: Aws::SWF::Resource,
102
106
  }.each do |name, klass|
103
107
  define_method name do
104
- klass.new aws_configuration
108
+ instance_variable_get_or_set :"@#{name}", klass.new(aws_configuration)
105
109
  end
106
110
  end
107
111
  end
@@ -1,3 +1,3 @@
1
1
  module Thor::Aws
2
- VERSION = "0.0.1"
2
+ VERSION = "0.0.2"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: thor-aws
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.1
4
+ version: 0.0.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - y13i