chef-provisioning-fog 0.10

Sign up to get free protection for your applications and to get access to all the features.
@@ -0,0 +1,45 @@
1
+ require 'chef/provisioning/fog_driver/providers/aws/credentials'
2
+
3
+ describe Chef::Provisioning::FogDriver::Providers::AWS::Credentials do
4
+ describe "#load_ini" do
5
+ let(:aws_credentials_ini_file) { File.join(File.expand_path('../../../../support', __FILE__), 'aws/ini-file.ini') }
6
+
7
+ before do
8
+ described_class.load_ini(aws_credentials_ini_file)
9
+ end
10
+
11
+ it "should load a default profile" do
12
+ expect(described_class['default']).to include(:aws_access_key_id)
13
+ end
14
+
15
+ it "should load the correct values" do
16
+ expect(described_class['default'][:aws_access_key_id]).to eq "12345"
17
+ expect(described_class['default'][:aws_secret_access_key]).to eq "abcde"
18
+ expect(described_class['default'][:region]).to eq "us-east-1"
19
+ expect(described_class['default'][:aws_session_token]).to eq "mysecret"
20
+ end
21
+
22
+ it "should load several profiles" do
23
+ expect(described_class.keys.length).to eq 2
24
+ end
25
+ end
26
+
27
+ describe "#load_csv" do
28
+ let(:aws_credentials_csv_file) { File.join(File.expand_path('../../../../support', __FILE__), 'aws/config-file.csv') }
29
+ before do
30
+ described_class.load_csv(aws_credentials_csv_file)
31
+ end
32
+
33
+ it "should load a single profile" do
34
+ expect(described_class['default']).to include(:aws_access_key_id)
35
+ end
36
+
37
+ it "should load the correct values" do
38
+ expect(described_class['default'][:aws_access_key_id]).to eq "12345"
39
+ end
40
+
41
+ it "should load several profiles" do
42
+ expect(described_class.keys.length).to eq 2
43
+ end
44
+ end
45
+ end
@@ -0,0 +1,16 @@
1
+ require 'chef/provisioning/fog_driver'
2
+ require 'chef/provisioning/fog_driver/providers/rackspace'
3
+
4
+ describe Chef::Provisioning::FogDriver::Providers::Rackspace do
5
+ subject { Chef::Provisioning::FogDriver.from_provider('Rackspace',{}) }
6
+
7
+ it "returns the correct driver" do
8
+ expect(subject).to be_an_instance_of Chef::Provisioning::FogDriver::Providers::Rackspace
9
+ end
10
+
11
+ it "has a fog backend" do
12
+ pending unless Fog.mock?
13
+ expect(subject.compute).to be_an_instance_of Fog::Compute::RackspaceV2::Mock
14
+ end
15
+
16
+ end
metadata ADDED
@@ -0,0 +1,152 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: chef-provisioning-fog
3
+ version: !ruby/object:Gem::Version
4
+ version: '0.10'
5
+ platform: ruby
6
+ authors:
7
+ - John Keiser
8
+ autorequire:
9
+ bindir: bin
10
+ cert_chain: []
11
+ date: 2014-11-01 00:00:00.000000000 Z
12
+ dependencies:
13
+ - !ruby/object:Gem::Dependency
14
+ name: chef
15
+ requirement: !ruby/object:Gem::Requirement
16
+ requirements:
17
+ - - ">="
18
+ - !ruby/object:Gem::Version
19
+ version: '0'
20
+ type: :runtime
21
+ prerelease: false
22
+ version_requirements: !ruby/object:Gem::Requirement
23
+ requirements:
24
+ - - ">="
25
+ - !ruby/object:Gem::Version
26
+ version: '0'
27
+ - !ruby/object:Gem::Dependency
28
+ name: cheffish
29
+ requirement: !ruby/object:Gem::Requirement
30
+ requirements:
31
+ - - ">="
32
+ - !ruby/object:Gem::Version
33
+ version: '0.4'
34
+ type: :runtime
35
+ prerelease: false
36
+ version_requirements: !ruby/object:Gem::Requirement
37
+ requirements:
38
+ - - ">="
39
+ - !ruby/object:Gem::Version
40
+ version: '0.4'
41
+ - !ruby/object:Gem::Dependency
42
+ name: chef-provisioning
43
+ requirement: !ruby/object:Gem::Requirement
44
+ requirements:
45
+ - - "~>"
46
+ - !ruby/object:Gem::Version
47
+ version: '0.15'
48
+ type: :runtime
49
+ prerelease: false
50
+ version_requirements: !ruby/object:Gem::Requirement
51
+ requirements:
52
+ - - "~>"
53
+ - !ruby/object:Gem::Version
54
+ version: '0.15'
55
+ - !ruby/object:Gem::Dependency
56
+ name: fog
57
+ requirement: !ruby/object:Gem::Requirement
58
+ requirements:
59
+ - - ">="
60
+ - !ruby/object:Gem::Version
61
+ version: '0'
62
+ type: :runtime
63
+ prerelease: false
64
+ version_requirements: !ruby/object:Gem::Requirement
65
+ requirements:
66
+ - - ">="
67
+ - !ruby/object:Gem::Version
68
+ version: '0'
69
+ - !ruby/object:Gem::Dependency
70
+ name: rspec
71
+ requirement: !ruby/object:Gem::Requirement
72
+ requirements:
73
+ - - ">="
74
+ - !ruby/object:Gem::Version
75
+ version: '0'
76
+ type: :development
77
+ prerelease: false
78
+ version_requirements: !ruby/object:Gem::Requirement
79
+ requirements:
80
+ - - ">="
81
+ - !ruby/object:Gem::Version
82
+ version: '0'
83
+ - !ruby/object:Gem::Dependency
84
+ name: rake
85
+ requirement: !ruby/object:Gem::Requirement
86
+ requirements:
87
+ - - ">="
88
+ - !ruby/object:Gem::Version
89
+ version: '0'
90
+ type: :development
91
+ prerelease: false
92
+ version_requirements: !ruby/object:Gem::Requirement
93
+ requirements:
94
+ - - ">="
95
+ - !ruby/object:Gem::Version
96
+ version: '0'
97
+ description: Driver for creating Fog instances in Chef Provisioning.
98
+ email: jkeiser@getchef.com
99
+ executables: []
100
+ extensions: []
101
+ extra_rdoc_files:
102
+ - README.md
103
+ - LICENSE
104
+ files:
105
+ - LICENSE
106
+ - README.md
107
+ - Rakefile
108
+ - lib/chef/provider/fog_key_pair.rb
109
+ - lib/chef/provisioning/driver_init/fog.rb
110
+ - lib/chef/provisioning/fog_driver/driver.rb
111
+ - lib/chef/provisioning/fog_driver/providers/aws.rb
112
+ - lib/chef/provisioning/fog_driver/providers/aws/credentials.rb
113
+ - lib/chef/provisioning/fog_driver/providers/cloudstack.rb
114
+ - lib/chef/provisioning/fog_driver/providers/digitalocean.rb
115
+ - lib/chef/provisioning/fog_driver/providers/joyent.rb
116
+ - lib/chef/provisioning/fog_driver/providers/openstack.rb
117
+ - lib/chef/provisioning/fog_driver/providers/rackspace.rb
118
+ - lib/chef/provisioning/fog_driver/recipe_dsl.rb
119
+ - lib/chef/provisioning/fog_driver/version.rb
120
+ - lib/chef/resource/fog_key_pair.rb
121
+ - spec/spec_helper.rb
122
+ - spec/support/aws/config-file.csv
123
+ - spec/support/aws/ini-file.ini
124
+ - spec/support/chef_metal_fog/providers/testdriver.rb
125
+ - spec/unit/fog_driver_spec.rb
126
+ - spec/unit/providers/aws/credentials_spec.rb
127
+ - spec/unit/providers/rackspace_spec.rb
128
+ homepage: https://github.com/opscode/chef-provisioning-fog
129
+ licenses: []
130
+ metadata: {}
131
+ post_install_message:
132
+ rdoc_options: []
133
+ require_paths:
134
+ - lib
135
+ required_ruby_version: !ruby/object:Gem::Requirement
136
+ requirements:
137
+ - - ">="
138
+ - !ruby/object:Gem::Version
139
+ version: '0'
140
+ required_rubygems_version: !ruby/object:Gem::Requirement
141
+ requirements:
142
+ - - ">="
143
+ - !ruby/object:Gem::Version
144
+ version: '0'
145
+ requirements: []
146
+ rubyforge_project:
147
+ rubygems_version: 2.2.2
148
+ signing_key:
149
+ specification_version: 4
150
+ summary: Driver for creating Fog instances in Chef Provisioning.
151
+ test_files: []
152
+ has_rdoc: