fog-aliyun 0.2.2 → 0.3.0

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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
- SHA1:
3
- metadata.gz: cffd78ea3a1c223ae9e0b45b3ec996c3e8baa55d
4
- data.tar.gz: 54de6ae02cece427a30c90aeb3fc98b055a59cbb
2
+ SHA256:
3
+ metadata.gz: 1b3239804802fddbe8b34af2bd07865c504cd75644b8ffd345afc3c6032ffa05
4
+ data.tar.gz: e72e6d448071244c1c5ee3c453e010840f77af32ca25f390b7bd6c371adcde15
5
5
  SHA512:
6
- metadata.gz: ca783c81990b44dbd811460e10a72bdc749e0bb5c862fc29ab1a84e6c1403e4e9c34f8f33ec23d3c5cac1e044016cacdaa388ff51092f2566a5fcf383d26521c
7
- data.tar.gz: b6a0937a7e9bb735638645e2b040c0ddb6b660d81b8703eab3288e442ffdb39e8cbed73e582ac8bee5a08af1c337d38ef937a4103e160cc42f746e7fcee92f25
6
+ metadata.gz: 9f2df310bb9c3ee8a03e772631f24e5552599749f40b22a13b96fa1533978d8c117d1a91871f3e88a6951a45b62945cb381f95cda8dc92d94f8099ebeb61a809
7
+ data.tar.gz: 619a3e800919cb95b6ee6ab7f6f91177eff9434a2a9d7fe0f32568611f587938397830bb81086d7406a49de80bc8804a355bbef1f9557cb84d9b72b0f5c5d279
data/.ruby-version CHANGED
@@ -1 +1 @@
1
- 2.4
1
+ 2.5.1
data/fog-aliyun.gemspec CHANGED
@@ -22,7 +22,7 @@ Gem::Specification.new do |spec|
22
22
  spec.add_development_dependency 'bundler', '~> 1.10'
23
23
  spec.add_development_dependency 'rake', '~> 10.0'
24
24
  spec.add_development_dependency 'rspec', '~> 3.3'
25
- spec.add_development_dependency 'rubocop', '~> 0.40.0'
25
+ spec.add_development_dependency 'rubocop', '~> 0.49.0'
26
26
  spec.add_development_dependency 'mime-types', '~> 2.6', '>= 2.6.2'
27
27
  spec.add_development_dependency 'pry-nav'
28
28
 
@@ -190,41 +190,43 @@ module Fog
190
190
  end
191
191
 
192
192
  def initialize(options = {})
193
- @openstack_username = options[:openstack_username]
194
- @openstack_user_domain = options[:openstack_user_domain] || options[:openstack_domain]
195
- @openstack_project_domain = options[:openstack_project_domain] || options[:openstack_domain] || 'Default'
196
- @openstack_auth_uri = URI.parse(options[:openstack_auth_url])
193
+ @aliyun_username = options[:aliyun_username]
194
+ @aliyun_user_domain = options[:aliyun_user_domain] || options[:aliyun_domain]
195
+ @aliyun_project_domain = options[:aliyun_project_domain] || options[:aliyun_domain] || 'Default'
197
196
 
198
- @current_tenant = options[:openstack_tenant]
199
- @current_tenant_id = options[:openstack_tenant_id]
197
+ raise ArgumentError, "Missing required arguments: :aliyun_auth_url" unless options.key?[:aliyun_auth_url]
198
+ @aliyun_auth_uri = URI.parse(options[:aliyun_auth_url])
199
+
200
+ @current_tenant = options[:aliyun_tenant]
201
+ @current_tenant_id = options[:aliyun_tenant_id]
200
202
 
201
203
  @auth_token = Fog::Mock.random_base64(64)
202
204
  @auth_token_expiration = (Time.now.utc + 86_400).iso8601
203
205
 
204
- management_url = URI.parse(options[:openstack_auth_url])
206
+ management_url = URI.parse(@aliyun_auth_url)
205
207
  management_url.port = 8774
206
208
  management_url.path = '/v1.1/1'
207
- @openstack_management_url = management_url.to_s
209
+ @aliyun_management_url = management_url.to_s
208
210
 
209
- identity_public_endpoint = URI.parse(options[:openstack_auth_url])
211
+ identity_public_endpoint = URI.parse(@aliyun_auth_url)
210
212
  identity_public_endpoint.port = 5000
211
- @openstack_identity_public_endpoint = identity_public_endpoint.to_s
213
+ @aliyun_identity_public_endpoint = identity_public_endpoint.to_s
212
214
  end
213
215
 
214
216
  def data
215
- self.class.data["#{@openstack_username}-#{@current_tenant}"]
217
+ self.class.data["#{@aliyun_username}-#{@current_tenant}"]
216
218
  end
217
219
 
218
220
  def reset_data
219
- self.class.data.delete("#{@openstack_username}-#{@current_tenant}")
221
+ self.class.data.delete("#{@aliyun_username}-#{@current_tenant}")
220
222
  end
221
223
 
222
224
  def credentials
223
- { provider: 'openstack',
224
- openstack_auth_url: @openstack_auth_uri.to_s,
225
- openstack_auth_token: @auth_token,
226
- openstack_management_url: @openstack_management_url,
227
- openstack_identity_endpoint: @openstack_identity_public_endpoint }
225
+ { provider: 'aliyun',
226
+ aliyun_auth_url: @aliyun_auth_uri.to_s,
227
+ aliyun_auth_token: @auth_token,
228
+ aliyun_management_url: @aliyun_management_url,
229
+ aliyun_identity_endpoint: @aliyun_identity_public_endpoint }
228
230
  end
229
231
  end
230
232
 
@@ -1,5 +1,5 @@
1
1
  module Fog
2
2
  module Aliyun
3
- VERSION = '0.2.2'.freeze
3
+ VERSION = '0.3.0'.freeze
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: fog-aliyun
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.2
4
+ version: 0.3.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Qinsi Deng, Jianxun Li, Jane Han
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2018-05-18 00:00:00.000000000 Z
11
+ date: 2018-06-21 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -58,14 +58,14 @@ dependencies:
58
58
  requirements:
59
59
  - - "~>"
60
60
  - !ruby/object:Gem::Version
61
- version: 0.40.0
61
+ version: 0.49.0
62
62
  type: :development
63
63
  prerelease: false
64
64
  version_requirements: !ruby/object:Gem::Requirement
65
65
  requirements:
66
66
  - - "~>"
67
67
  - !ruby/object:Gem::Version
68
- version: 0.40.0
68
+ version: 0.49.0
69
69
  - !ruby/object:Gem::Dependency
70
70
  name: mime-types
71
71
  requirement: !ruby/object:Gem::Requirement
@@ -304,7 +304,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
304
304
  version: '0'
305
305
  requirements: []
306
306
  rubyforge_project:
307
- rubygems_version: 2.5.2.1
307
+ rubygems_version: 2.7.6
308
308
  signing_key:
309
309
  specification_version: 4
310
310
  summary: Fog provider for Aliyun Web Services.