thor-tropo 2.0.0 → 2.0.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (4) hide show
  1. data/VERSION +1 -1
  2. data/changelog.md +4 -0
  3. data/lib/thor-tropo/uploader.rb +12 -11
  4. metadata +1 -1
data/VERSION CHANGED
@@ -1 +1 @@
1
- 2.0.0
1
+ 2.0.1
data/changelog.md CHANGED
@@ -1,3 +1,7 @@
1
+ # 2.0.1
2
+
3
+ * Fixed issue with using IAM profiles for uploads
4
+
1
5
  # 2.0.0
2
6
 
3
7
  * Support multiple cookbooks via .deployer
@@ -11,9 +11,11 @@ module ThorTropo
11
11
 
12
12
  def initialize(opts={})
13
13
  @debug_mode = opts[:debug_mode]
14
+ @use_iam = opts[:use_iam]
15
+
14
16
  @connection = setup_connection(opts[:access_key],opts[:secret_key])
15
17
  @bucket_name = get_bucket( opts[:bucket] || 'artifacts.voxeolabs.net' )
16
- @use_iam = opts[:use_iam]
18
+
17
19
  end
18
20
 
19
21
  def upload(opts={})
@@ -57,19 +59,18 @@ module ThorTropo
57
59
  private
58
60
 
59
61
  def setup_connection(u,p)
62
+
63
+ fog_args = { :provider => 'AWS' }
64
+
60
65
  if @use_iam
61
- opts = {
62
- :provider => 'AWS',
63
- :use_iam_profile => true
64
- }
66
+ fog_args[:use_iam_profile] = true
65
67
  else
66
- opts = {
67
- :provider => 'AWS',
68
- :aws_access_key_id => u,
69
- :aws_secret_access_key => p
70
- }
68
+ fog_args[:aws_access_key_id] = u
69
+ fog_args[:aws_secret_access_key] = p
71
70
  end
72
- Fog::Storage.new(opts)
71
+
72
+ Fog::Storage.new fog_args
73
+
73
74
  end
74
75
 
75
76
  def get_bucket(bucket_name)
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: thor-tropo
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.0.0
4
+ version: 2.0.1
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors: