fog-aws 1.4.1 → 2.0.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (67) hide show
  1. checksums.yaml +4 -4
  2. data/.travis.yml +9 -8
  3. data/CHANGELOG.md +40 -2
  4. data/CONTRIBUTING.md +6 -6
  5. data/CONTRIBUTORS.md +104 -1
  6. data/LICENSE.md +1 -1
  7. data/fog-aws.gemspec +4 -2
  8. data/lib/fog/aws.rb +1 -0
  9. data/lib/fog/aws/compute.rb +86 -2
  10. data/lib/fog/aws/credential_fetcher.rb +4 -2
  11. data/lib/fog/aws/mock.rb +8 -0
  12. data/lib/fog/aws/models/compute/flavors.rb +40 -0
  13. data/lib/fog/aws/models/compute/subnet.rb +1 -0
  14. data/lib/fog/aws/models/compute/vpc.rb +11 -2
  15. data/lib/fog/aws/models/iam/access_keys.rb +0 -2
  16. data/lib/fog/aws/models/rds/instance_option.rb +6 -0
  17. data/lib/fog/aws/parsers/compute/create_subnet.rb +2 -0
  18. data/lib/fog/aws/parsers/compute/describe_subnets.rb +1 -1
  19. data/lib/fog/aws/parsers/compute/describe_vpcs.rb +71 -37
  20. data/lib/fog/aws/parsers/iam/list_access_keys.rb +1 -1
  21. data/lib/fog/aws/parsers/rds/describe_orderable_db_instance_options.rb +4 -3
  22. data/lib/fog/aws/requests/auto_scaling/detach_instances.rb +3 -4
  23. data/lib/fog/aws/requests/compute/authorize_security_group_egress.rb +8 -6
  24. data/lib/fog/aws/requests/compute/authorize_security_group_ingress.rb +25 -21
  25. data/lib/fog/aws/requests/compute/copy_snapshot.rb +22 -9
  26. data/lib/fog/aws/requests/compute/create_network_interface.rb +2 -2
  27. data/lib/fog/aws/requests/compute/create_route_table.rb +1 -1
  28. data/lib/fog/aws/requests/compute/create_security_group.rb +24 -19
  29. data/lib/fog/aws/requests/compute/create_subnet.rb +14 -10
  30. data/lib/fog/aws/requests/compute/create_vpc.rb +38 -10
  31. data/lib/fog/aws/requests/compute/delete_security_group.rb +9 -9
  32. data/lib/fog/aws/requests/compute/describe_network_interface_attribute.rb +16 -14
  33. data/lib/fog/aws/requests/compute/describe_security_groups.rb +30 -6
  34. data/lib/fog/aws/requests/compute/describe_subnets.rb +12 -11
  35. data/lib/fog/aws/requests/compute/modify_network_interface_attribute.rb +3 -3
  36. data/lib/fog/aws/requests/compute/revoke_security_group_egress.rb +19 -25
  37. data/lib/fog/aws/requests/compute/revoke_security_group_ingress.rb +18 -25
  38. data/lib/fog/aws/requests/compute/run_instances.rb +1 -1
  39. data/lib/fog/aws/requests/efs/create_mount_target.rb +8 -4
  40. data/lib/fog/aws/requests/elb/create_load_balancer.rb +6 -37
  41. data/lib/fog/aws/requests/kinesis/put_record.rb +1 -2
  42. data/lib/fog/aws/requests/kinesis/put_records.rb +1 -2
  43. data/lib/fog/aws/requests/lambda/invoke.rb +1 -1
  44. data/lib/fog/aws/requests/rds/describe_orderable_db_instance_options.rb +12 -6
  45. data/lib/fog/aws/requests/storage/put_object.rb +0 -1
  46. data/lib/fog/aws/service_mapper.rb +129 -0
  47. data/lib/fog/aws/version.rb +1 -1
  48. data/tests/helpers/collection_helper.rb +0 -6
  49. data/tests/models/efs/mount_target_tests.rb +3 -1
  50. data/tests/models/elasticache/subnet_groups_tests.rb +0 -1
  51. data/tests/models/storage/file_tests.rb +0 -4
  52. data/tests/models/storage/url_tests.rb +1 -20
  53. data/tests/models/storage/versions_tests.rb +0 -5
  54. data/tests/requests/compute/network_interface_tests.rb +2 -13
  55. data/tests/requests/compute/subnet_tests.rb +3 -1
  56. data/tests/requests/compute/vpc_tests.rb +8 -6
  57. data/tests/requests/dns/dns_tests.rb +0 -4
  58. data/tests/requests/efs/file_system_tests.rb +1 -1
  59. data/tests/requests/iam/managed_policy_tests.rb +0 -1
  60. data/tests/requests/iam/versioned_managed_policy_tests.rb +3 -12
  61. data/tests/requests/lambda/helper.rb +2 -2
  62. data/tests/requests/rds/helper.rb +7 -2
  63. data/tests/requests/rds/instance_option_tests.rb +7 -1
  64. data/tests/requests/storage/object_tests.rb +2 -11
  65. metadata +9 -10
  66. data/gemfiles/Gemfile-ruby-1.8.7 +0 -6
  67. data/gemfiles/Gemfile-ruby-1.9 +0 -7
@@ -1,7 +1,7 @@
1
1
  class AWS
2
2
  class Lambda
3
3
  module Formats
4
- require 'zip/zip'
4
+ require 'zip'
5
5
 
6
6
  GET_FUNCTION_CONFIGURATION = {
7
7
  'CodeSize' => Integer,
@@ -65,7 +65,7 @@ class AWS
65
65
  DELETE_EVENT_SOURCE_MAPPING = GET_EVENT_SOURCE_MAPPING
66
66
 
67
67
  def self.zip(data, filename='index.js')
68
- data_io = Zip::ZipOutputStream.write_buffer do |zio|
68
+ data_io = Zip::OutputStream.write_buffer do |zio|
69
69
  zio.put_next_entry(filename)
70
70
  zio.write(data)
71
71
  end
@@ -6,8 +6,7 @@ class AWS
6
6
  }
7
7
 
8
8
  DB_AVAILABILITY_ZONE_OPTION = {
9
- 'Name' => String,
10
- 'ProvisionedIopsCapable' => Fog::Boolean
9
+ 'Name' => String
11
10
  }
12
11
 
13
12
  DB_PARAMETER_GROUP = {
@@ -89,6 +88,12 @@ class AWS
89
88
  'EngineVersion' => String,
90
89
  'AvailabilityZones' => [DB_AVAILABILITY_ZONE_OPTION],
91
90
  'DBInstanceClass' => String,
91
+ 'SupportsStorageEncryption' => Fog::Boolean,
92
+ 'SupportsPerformanceInsights' => Fog::Boolean,
93
+ 'StorageType' => String,
94
+ 'SupportsIops' => Fog::Boolean,
95
+ 'SupportsIAMDatabaseAuthentication' => Fog::Boolean,
96
+ 'SupportsEnhancedMonitoring' => Fog::Boolean,
92
97
  'Vpc' => Fog::Boolean
93
98
  }
94
99
 
@@ -12,7 +12,13 @@ Shindo.tests('AWS::RDS | db instance option requests', ['aws', 'rds']) do
12
12
  returns( 'mysql' ) { group['Engine'] }
13
13
  returns( true ) { group['ReadReplicaCapable'] }
14
14
  returns( true ) { group['AvailabilityZones'].length >= 1 }
15
-
15
+ returns( true ) { group['StorageType'].length > 2 }
16
+ returns( false ) { group['SupportsIops'] }
17
+ returns( true ) { group['SupportsStorageEncryption'] }
18
+ returns( false ) { group['SupportsPerformanceInsights'] }
19
+ returns( false ) { group['SupportsIops'] }
20
+ returns( false ) { group['SupportsIAMDatabaseAuthentication'] }
21
+ returns( true ) { group['SupportsEnhancedMonitoring'] }
16
22
  body
17
23
  end
18
24
 
@@ -18,12 +18,6 @@ Shindo.tests('AWS::Storage | object requests', ['aws']) do
18
18
  Fog::Storage[:aws].put_object(@directory.identity, 'fog_object', lorem_file)
19
19
  end
20
20
 
21
- if RUBY_VERSION =~ /^1\.8\./
22
- tests("#put_object('#{@directory.identity}', 'fog_object', lorem_file, {'x-amz-meta-json' => 'ä'}").succeeds do
23
- Fog::Storage[:aws].put_object(@directory.identity, 'fog_object', lorem_file, {'x-amz-meta-json' => 'ä'})
24
- end
25
- end
26
-
27
21
  tests("#copy_object('#{@directory.identity}', 'fog_object', '#{@directory.identity}', 'fog_other_object')").succeeds do
28
22
  Fog::Storage[:aws].copy_object(@directory.identity, 'fog_object', @directory.identity, 'fog_other_object')
29
23
  end
@@ -156,7 +150,6 @@ Shindo.tests('AWS::Storage | object requests', ['aws']) do
156
150
 
157
151
  tests("#head_object_url('#{@directory.identity}', 'fog_object', expiration timestamp)").returns(true) do
158
152
  object_url = Fog::Storage[:aws].head_object_url(@directory.identity, 'fog_object', (Time.now + 60))
159
- puts object_url
160
153
  (object_url =~ /https:\/\/#{Regexp.quote(@directory.identity)}\.s3\.amazonaws\.com\/fog_object/) != nil
161
154
  end
162
155
 
@@ -178,10 +171,8 @@ Shindo.tests('AWS::Storage | object requests', ['aws']) do
178
171
  Fog::Storage[:aws].put_object(fognonbucket, 'fog_non_object', lorem_file)
179
172
  end
180
173
 
181
- unless RUBY_VERSION =~ /^1\.8\./
182
- tests("#put_object('#{@directory.identity}', 'fog_object', lorem_file, {'x-amz-meta-json' => 'ä'}").raises(Excon::Errors::BadRequest) do
183
- Fog::Storage[:aws].put_object(@directory.identity, 'fog_object', lorem_file, {'x-amz-meta-json' => 'ä'})
184
- end
174
+ tests("#put_object('#{@directory.identity}', 'fog_object', lorem_file, {'x-amz-meta-json' => 'ä'}").raises(Excon::Errors::BadRequest) do
175
+ Fog::Storage[:aws].put_object(@directory.identity, 'fog_object', lorem_file, {'x-amz-meta-json' => 'ä'})
185
176
  end
186
177
 
187
178
  tests("#copy_object('#{fognonbucket}', 'fog_object', '#{@directory.identity}', 'fog_other_object')").raises(Excon::Errors::NotFound) do
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: fog-aws
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.4.1
4
+ version: 2.0.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Josh Lane
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2017-08-23 00:00:00.000000000 Z
12
+ date: 2017-11-28 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: bundler
@@ -17,14 +17,14 @@ dependencies:
17
17
  requirements:
18
18
  - - "~>"
19
19
  - !ruby/object:Gem::Version
20
- version: '1.6'
20
+ version: '1.15'
21
21
  type: :development
22
22
  prerelease: false
23
23
  version_requirements: !ruby/object:Gem::Requirement
24
24
  requirements:
25
25
  - - "~>"
26
26
  - !ruby/object:Gem::Version
27
- version: '1.6'
27
+ version: '1.15'
28
28
  - !ruby/object:Gem::Dependency
29
29
  name: rake
30
30
  requirement: !ruby/object:Gem::Requirement
@@ -59,14 +59,14 @@ dependencies:
59
59
  requirements:
60
60
  - - "~>"
61
61
  - !ruby/object:Gem::Version
62
- version: 0.9.9
62
+ version: 1.2.1
63
63
  type: :development
64
64
  prerelease: false
65
65
  version_requirements: !ruby/object:Gem::Requirement
66
66
  requirements:
67
67
  - - "~>"
68
68
  - !ruby/object:Gem::Version
69
- version: 0.9.9
69
+ version: 1.2.1
70
70
  - !ruby/object:Gem::Dependency
71
71
  name: fog-core
72
72
  requirement: !ruby/object:Gem::Requirement
@@ -144,8 +144,6 @@ files:
144
144
  - Rakefile
145
145
  - fog-aws.gemspec
146
146
  - gemfiles/Gemfile-edge
147
- - gemfiles/Gemfile-ruby-1.8.7
148
- - gemfiles/Gemfile-ruby-1.9
149
147
  - gemfiles/Gemfile-ruby-2.0
150
148
  - lib/fog-aws.rb
151
149
  - lib/fog/aws.rb
@@ -1415,6 +1413,7 @@ files:
1415
1413
  - lib/fog/aws/requests/sts/get_session_token.rb
1416
1414
  - lib/fog/aws/requests/support/describe_trusted_advisor_check_result.rb
1417
1415
  - lib/fog/aws/requests/support/describe_trusted_advisor_checks.rb
1416
+ - lib/fog/aws/service_mapper.rb
1418
1417
  - lib/fog/aws/ses.rb
1419
1418
  - lib/fog/aws/signaturev4.rb
1420
1419
  - lib/fog/aws/simpledb.rb
@@ -1692,7 +1691,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
1692
1691
  requirements:
1693
1692
  - - ">="
1694
1693
  - !ruby/object:Gem::Version
1695
- version: '0'
1694
+ version: 2.0.0
1696
1695
  required_rubygems_version: !ruby/object:Gem::Requirement
1697
1696
  requirements:
1698
1697
  - - ">="
@@ -1700,7 +1699,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
1700
1699
  version: '0'
1701
1700
  requirements: []
1702
1701
  rubyforge_project:
1703
- rubygems_version: 2.6.11
1702
+ rubygems_version: 2.6.13
1704
1703
  signing_key:
1705
1704
  specification_version: 4
1706
1705
  summary: Module for the 'fog' gem to support Amazon Web Services.
@@ -1,6 +0,0 @@
1
- source "https://rubygems.org"
2
-
3
- gem 'mime-types', '~> 1.16'
4
- gem 'nokogiri', '~> 1.5.11'
5
-
6
- gemspec :path => "../"
@@ -1,7 +0,0 @@
1
- source "https://rubygems.org"
2
-
3
- gem 'json', '~> 1.8'
4
- gem 'mime-types', '~> 2.6', '>= 2.6.2'
5
- gem 'nokogiri', '~> 1.6.8'
6
-
7
- gemspec :path => "../"