composer 0.0.5 → 0.0.6

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.
@@ -0,0 +1,4 @@
1
+ rvm:
2
+ - 1.9.2
3
+ - 1.9.3
4
+ script: "rake spec"
data/CHANGELOG CHANGED
@@ -1,3 +1,7 @@
1
+ ## 0.0.6:
2
+
3
+ * Added proxy support through https_proxy variable
4
+
1
5
  ## 0.0.5:
2
6
 
3
7
  * Fixed region logic in key pairs
data/README.md CHANGED
@@ -1,3 +1,5 @@
1
+ [![Build Status](https://secure.travis-ci.org/intuit/composer.png)](http://travis-ci.org/intuit/composer)
2
+
1
3
  # Composer
2
4
 
3
5
  I help setup new projects on the Intuit Cloud Agility Platform
@@ -9,9 +9,21 @@ module Composer
9
9
  end
10
10
 
11
11
  def configure_aws
12
- ::AWS.config :access_key_id => aws_access_key,
13
- :secret_access_key => aws_secret_key,
14
- :region => region
12
+ options = { :access_key_id => aws_access_key,
13
+ :secret_access_key => aws_secret_key,
14
+ :region => region }
15
+
16
+ if https_proxy
17
+ options[:proxy_uri] = https_proxy
18
+ end
19
+
20
+ ::AWS.config options
21
+ end
22
+
23
+ private
24
+
25
+ def https_proxy
26
+ ENV['https_proxy']
15
27
  end
16
28
 
17
29
  end
@@ -1,3 +1,3 @@
1
1
  module Composer
2
- VERSION = "0.0.5"
2
+ VERSION = "0.0.6"
3
3
  end
@@ -60,6 +60,7 @@ describe Composer::Compose do
60
60
  @deploy_stack_mock.should_receive(:create).
61
61
  with(:directory => '/tmp/dir',
62
62
  :key => 'key',
63
+ :secret => 'test1234',
63
64
  :name => 'name')
64
65
 
65
66
  @compose.run
@@ -0,0 +1,32 @@
1
+ require 'spec_helper'
2
+
3
+ describe Composer::Config do
4
+
5
+ before do
6
+ @config = Composer::Config.new :log_level => 'info'
7
+ @config.aws_secret_key = 'secret'
8
+ @config.aws_access_key = 'key'
9
+ @config.region = 'region'
10
+ end
11
+
12
+ context "testing proxy settings" do
13
+ before do
14
+ @options = { :access_key_id => 'key',
15
+ :secret_access_key => 'secret',
16
+ :region => 'region' }
17
+ end
18
+
19
+ it "should set the https_proxy if https_proxy env set" do
20
+ @config.stub :https_proxy => 'theproxy'
21
+ @options[:proxy_uri] = 'theproxy'
22
+ ::AWS.should_receive(:config).with @options
23
+ @config.configure_aws
24
+ end
25
+
26
+ it "should not set the https_proxy if https_proxy env not set" do
27
+ @config.stub :https_proxy => nil
28
+ ::AWS.should_receive(:config).with @options
29
+ @config.configure_aws
30
+ end
31
+ end
32
+ end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: composer
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.5
4
+ version: 0.0.6
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,11 +9,11 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2012-12-18 00:00:00.000000000 Z
12
+ date: 2012-12-28 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: rake
16
- requirement: &70135633813960 !ruby/object:Gem::Requirement
16
+ requirement: &70095561528160 !ruby/object:Gem::Requirement
17
17
  none: false
18
18
  requirements:
19
19
  - - ! '>='
@@ -21,10 +21,10 @@ dependencies:
21
21
  version: '0'
22
22
  type: :development
23
23
  prerelease: false
24
- version_requirements: *70135633813960
24
+ version_requirements: *70095561528160
25
25
  - !ruby/object:Gem::Dependency
26
26
  name: rspec
27
- requirement: &70135633812960 !ruby/object:Gem::Requirement
27
+ requirement: &70095561527580 !ruby/object:Gem::Requirement
28
28
  none: false
29
29
  requirements:
30
30
  - - ! '>='
@@ -32,10 +32,10 @@ dependencies:
32
32
  version: '0'
33
33
  type: :development
34
34
  prerelease: false
35
- version_requirements: *70135633812960
35
+ version_requirements: *70095561527580
36
36
  - !ruby/object:Gem::Dependency
37
37
  name: aws-sdk
38
- requirement: &70135633812400 !ruby/object:Gem::Requirement
38
+ requirement: &70095561526320 !ruby/object:Gem::Requirement
39
39
  none: false
40
40
  requirements:
41
41
  - - =
@@ -43,7 +43,7 @@ dependencies:
43
43
  version: 1.7.1
44
44
  type: :runtime
45
45
  prerelease: false
46
- version_requirements: *70135633812400
46
+ version_requirements: *70095561526320
47
47
  description: I deploy and manage AWS resources.
48
48
  email:
49
49
  - brett@weav.net
@@ -54,6 +54,7 @@ extra_rdoc_files: []
54
54
  files:
55
55
  - .gitignore
56
56
  - .rvmrc
57
+ - .travis.yml
57
58
  - CHANGELOG
58
59
  - Gemfile
59
60
  - LICENSE.txt
@@ -85,6 +86,7 @@ files:
85
86
  - lib/composer/verify/secret.rb
86
87
  - lib/composer/version.rb
87
88
  - spec/compose_spec.rb
89
+ - spec/config_spec.rb
88
90
  - spec/spec_helper.rb
89
91
  homepage: ''
90
92
  licenses: []
@@ -100,7 +102,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
100
102
  version: '0'
101
103
  segments:
102
104
  - 0
103
- hash: -926317595969483121
105
+ hash: 2440372189325897542
104
106
  required_rubygems_version: !ruby/object:Gem::Requirement
105
107
  none: false
106
108
  requirements:
@@ -109,7 +111,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
109
111
  version: '0'
110
112
  segments:
111
113
  - 0
112
- hash: -926317595969483121
114
+ hash: 2440372189325897542
113
115
  requirements: []
114
116
  rubyforge_project:
115
117
  rubygems_version: 1.8.16
@@ -118,4 +120,5 @@ specification_version: 3
118
120
  summary: I deploy and manage AWS resources.
119
121
  test_files:
120
122
  - spec/compose_spec.rb
123
+ - spec/config_spec.rb
121
124
  - spec/spec_helper.rb