composer 0.0.5 → 0.0.6
Sign up to get free protection for your applications and to get access to all the features.
- data/.travis.yml +4 -0
- data/CHANGELOG +4 -0
- data/README.md +2 -0
- data/lib/composer/config.rb +15 -3
- data/lib/composer/version.rb +1 -1
- data/spec/compose_spec.rb +1 -0
- data/spec/config_spec.rb +32 -0
- metadata +13 -10
data/.travis.yml
ADDED
data/CHANGELOG
CHANGED
data/README.md
CHANGED
data/lib/composer/config.rb
CHANGED
@@ -9,9 +9,21 @@ module Composer
|
|
9
9
|
end
|
10
10
|
|
11
11
|
def configure_aws
|
12
|
-
|
13
|
-
|
14
|
-
|
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
|
data/lib/composer/version.rb
CHANGED
data/spec/compose_spec.rb
CHANGED
data/spec/config_spec.rb
ADDED
@@ -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.
|
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-
|
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: &
|
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: *
|
24
|
+
version_requirements: *70095561528160
|
25
25
|
- !ruby/object:Gem::Dependency
|
26
26
|
name: rspec
|
27
|
-
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: *
|
35
|
+
version_requirements: *70095561527580
|
36
36
|
- !ruby/object:Gem::Dependency
|
37
37
|
name: aws-sdk
|
38
|
-
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: *
|
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:
|
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:
|
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
|