Skip to content

Commit 5d1c6ca

Browse files
Merge pull request #21 from fog/dependency-constraints
Remove Dependencies Version constraint
2 parents 4a2c552 + 8c7d566 commit 5d1c6ca

File tree

114 files changed

+1072
-853
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

114 files changed

+1072
-853
lines changed

.gitignore

Lines changed: 23 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,23 @@
1-
/.bundle/
2-
/.yardoc
3-
/Gemfile.lock
4-
/_yardoc/
5-
/coverage/
6-
/doc/
7-
/pkg/
8-
/spec/reports/
9-
/tmp/
10-
*~
1+
*.gem
2+
*.rbc
3+
.bundle
4+
.config
5+
.yardoc
6+
Gemfile.lock
7+
InstalledFiles
8+
_yardoc
9+
coverage
10+
doc/
11+
lib/bundler/man
12+
pkg
13+
rdoc
14+
spec/reports
15+
test/tmp
16+
test/version_tmp
17+
tmp
18+
*.bundle
19+
*.so
20+
*.o
21+
*.a
22+
mkmf.log
23+
gemfiles/*.lock

.rubocop.yml

Lines changed: 31 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,32 @@
1-
AllCops:
2-
Exclude:
3-
- bin/**/*
1+
inherit_from: .rubocop_todo.yml
42

5-
# inherit_from: .rubocop_todo.yml
3+
Style/Documentation:
4+
Enabled: false
5+
6+
Metrics/MethodLength:
7+
Enabled: false
8+
9+
Metrics/AbcSize:
10+
Enabled: false
11+
12+
Metrics/LineLength:
13+
Max: 120
14+
15+
Metrics/BlockLength:
16+
Enabled: false
17+
18+
Layout/ExtraSpacing:
19+
AllowForAlignment: false
20+
ForceEqualSignAlignment: false
21+
22+
Style/ExpandPathArguments:
23+
Enabled: false
24+
25+
Metrics/CyclomaticComplexity:
26+
Enabled: false
27+
28+
Naming/VariableName:
29+
Enabled: false
30+
31+
Lint/UnderscorePrefixedVariableName:
32+
Enabled: false

.rubocop_todo.yml

Lines changed: 83 additions & 55 deletions
Original file line numberDiff line numberDiff line change
@@ -1,32 +1,37 @@
11
# This configuration was generated by
22
# `rubocop --auto-gen-config`
3-
# on 2016-05-12 13:44:44 +0800 using RuboCop version 0.40.0.
3+
# on 2018-06-22 19:29:12 -0300 using RuboCop version 0.57.2.
44
# The point is for the user to remove these configuration records
55
# one by one as the offenses are removed from the code base.
66
# Note that changes in the inspected code, or installation of new
77
# versions of RuboCop, may require this file to be generated again.
88

9+
# Offense count: 1
10+
# Cop supports --auto-correct.
11+
# Configuration parameters: EnforcedStyleAlignWith, AutoCorrect, Severity.
12+
# SupportedStylesAlignWith: start_of_line, def
13+
Layout/DefEndAlignment:
14+
Exclude:
15+
- 'lib/fog/aliyun/requests/storage/put_object.rb'
16+
17+
# Offense count: 5
18+
# Cop supports --auto-correct.
19+
# Configuration parameters: EnforcedStyleAlignWith, AutoCorrect, Severity.
20+
# SupportedStylesAlignWith: keyword, variable, start_of_line
21+
Layout/EndAlignment:
22+
Exclude:
23+
- 'lib/fog/aliyun/compute.rb'
24+
- 'lib/fog/aliyun/models/storage/file.rb'
25+
- 'lib/fog/aliyun/requests/compute/create_server.rb'
26+
- 'lib/fog/aliyun/storage.rb'
27+
928
# Offense count: 4
1029
# Configuration parameters: AllowSafeAssignment.
1130
Lint/AssignmentInCondition:
1231
Exclude:
1332
- 'lib/fog/aliyun/requests/compute/create_server.rb'
1433
- 'lib/fog/aliyun/requests/compute/delete_server.rb'
1534

16-
# Offense count: 1
17-
# Cop supports --auto-correct.
18-
# Configuration parameters: AlignWith, SupportedStyles, AutoCorrect.
19-
# SupportedStyles: start_of_line, def
20-
Lint/DefEndAlignment:
21-
Enabled: false
22-
23-
# Offense count: 5
24-
# Cop supports --auto-correct.
25-
# Configuration parameters: AlignWith, SupportedStyles, AutoCorrect.
26-
# SupportedStyles: keyword, variable, start_of_line
27-
Lint/EndAlignment:
28-
Enabled: false
29-
3035
# Offense count: 4
3136
Lint/RandOne:
3237
Exclude:
@@ -35,19 +40,19 @@ Lint/RandOne:
3540
- 'lib/fog/aliyun/requests/compute/list_servers.rb'
3641
- 'lib/fog/aliyun/requests/compute/list_vrouters.rb'
3742

38-
# Offense count: 127
39-
Lint/UnderscorePrefixedVariableName:
40-
Enabled: false
41-
4243
# Offense count: 1
4344
Lint/UnreachableCode:
4445
Exclude:
4546
- 'lib/fog/aliyun/models/storage/directory.rb'
4647

47-
# Offense count: 38
48+
# Offense count: 26
49+
Lint/UriEscapeUnescape:
50+
Enabled: false
51+
52+
# Offense count: 37
4853
Lint/UselessAssignment:
4954
Exclude:
50-
- 'lib/fog/aliyun.rb'
55+
- 'lib/fog/aliyun/requests/compute/create_server.rb'
5156
- 'lib/fog/aliyun/requests/compute/list_disks.rb'
5257
- 'lib/fog/aliyun/requests/compute/list_security_groups.rb'
5358
- 'lib/fog/aliyun/requests/storage/delete_object.rb'
@@ -62,30 +67,17 @@ Lint/UselessAssignment:
6267
- 'lib/fog/aliyun/requests/storage/put_object.rb'
6368
- 'lib/fog/aliyun/storage.rb'
6469

65-
# Offense count: 78
66-
Metrics/AbcSize:
67-
Max: 100
68-
69-
# Offense count: 5
70+
# Offense count: 7
7071
# Configuration parameters: CountComments.
7172
Metrics/ClassLength:
7273
Max: 154
7374

74-
# Offense count: 18
75-
Metrics/CyclomaticComplexity:
76-
Max: 15
77-
78-
# Offense count: 257
79-
# Configuration parameters: AllowHeredoc, AllowURI, URISchemes.
75+
# Offense count: 87
76+
# Configuration parameters: AllowHeredoc, AllowURI, URISchemes, IgnoreCopDirectives, IgnoredPatterns.
8077
# URISchemes: http, https
8178
Metrics/LineLength:
8279
Max: 247
8380

84-
# Offense count: 110
85-
# Configuration parameters: CountComments.
86-
Metrics/MethodLength:
87-
Max: 97
88-
8981
# Offense count: 1
9082
# Configuration parameters: CountKeywordArgs.
9183
Metrics/ParameterLists:
@@ -95,20 +87,45 @@ Metrics/ParameterLists:
9587
Metrics/PerceivedComplexity:
9688
Max: 19
9789

90+
# Offense count: 7
91+
# Configuration parameters: EnforcedStyle.
92+
# SupportedStyles: snake_case, camelCase
93+
Naming/MethodName:
94+
Exclude:
95+
- 'lib/fog/aliyun/compute.rb'
96+
- 'lib/fog/aliyun/requests/storage/get_bucket.rb'
97+
98+
# Offense count: 48
99+
# Configuration parameters: MinNameLength, AllowNamesEndingInNumbers, AllowedNames, ForbiddenNames.
100+
# AllowedNames: io, id, to, by, on, in, at
101+
Naming/UncommunicativeMethodParamName:
102+
Enabled: false
103+
104+
# Offense count: 5
105+
Performance/Caller:
106+
Exclude:
107+
- 'lib/fog/aliyun/models/compute/images.rb'
108+
- 'lib/fog/aliyun/models/compute/snapshots.rb'
109+
- 'lib/fog/aliyun/models/compute/volumes.rb'
110+
- 'lib/fog/aliyun/models/compute/vpcs.rb'
111+
- 'lib/fog/aliyun/models/compute/vrouters.rb'
112+
98113
# Offense count: 1
99114
Style/ClassVars:
100115
Exclude:
101116
- 'lib/fog/bin/aliyun.rb'
102117

103-
# Offense count: 138
104-
Style/Documentation:
105-
Enabled: false
106-
107118
# Offense count: 7
108-
# Configuration parameters: EnforcedStyle, SupportedStyles.
109-
# SupportedStyles: for, each
119+
# Configuration parameters: EnforcedStyle.
120+
# SupportedStyles: each, for
110121
Style/For:
111-
Enabled: false
122+
Exclude:
123+
- 'lib/fog/aliyun/models/storage/files.rb'
124+
- 'lib/fog/aliyun/requests/compute/list_images.rb'
125+
- 'lib/fog/aliyun/requests/compute/list_route_tables.rb'
126+
- 'lib/fog/aliyun/requests/compute/list_servers.rb'
127+
- 'lib/fog/aliyun/requests/compute/list_vrouters.rb'
128+
- 'lib/fog/aliyun/requests/storage/put_object.rb'
112129

113130
# Offense count: 4
114131
# Configuration parameters: AllowedVariables.
@@ -119,12 +136,21 @@ Style/GlobalVars:
119136
- 'lib/fog/aliyun/models/compute/vrouter.rb'
120137
- 'lib/fog/aliyun/models/compute/vswitch.rb'
121138

122-
# Offense count: 2
139+
# Offense count: 11
123140
# Configuration parameters: MinBodyLength.
124141
Style/GuardClause:
125142
Exclude:
143+
- 'lib/fog/aliyun/models/compute/security_groups.rb'
144+
- 'lib/fog/aliyun/models/compute/snapshots.rb'
145+
- 'lib/fog/aliyun/models/compute/volumes.rb'
146+
- 'lib/fog/aliyun/models/storage/file.rb'
147+
- 'lib/fog/aliyun/requests/compute/delete_security_group.rb'
148+
- 'lib/fog/aliyun/requests/compute/delete_server.rb'
126149
- 'lib/fog/aliyun/requests/compute/delete_vpc.rb'
150+
- 'lib/fog/aliyun/requests/compute/delete_vpn_connection.rb'
151+
- 'lib/fog/aliyun/requests/compute/delete_vpn_customergateway.rb'
127152
- 'lib/fog/aliyun/requests/compute/delete_vswitch.rb'
153+
- 'lib/fog/aliyun/requests/compute/list_security_group_rules.rb'
128154

129155
# Offense count: 2
130156
Style/IdenticalConditionalBranches:
@@ -136,14 +162,16 @@ Style/IfInsideElse:
136162
Exclude:
137163
- 'lib/fog/aliyun/models/compute/security_group_rule.rb'
138164

139-
# Offense count: 4
140-
# Configuration parameters: EnforcedStyle, SupportedStyles.
141-
# SupportedStyles: snake_case, camelCase
142-
Style/MethodName:
143-
Enabled: false
165+
# Offense count: 2
166+
Style/MultipleComparison:
167+
Exclude:
168+
- 'lib/fog/aliyun/requests/storage/get_object_http_url.rb'
169+
- 'lib/fog/aliyun/requests/storage/get_object_https_url.rb'
144170

145-
# Offense count: 741
146-
# Configuration parameters: EnforcedStyle, SupportedStyles.
147-
# SupportedStyles: snake_case, camelCase
148-
Style/VariableName:
149-
Enabled: false
171+
# Offense count: 1
172+
# Cop supports --auto-correct.
173+
# Configuration parameters: EnforcedStyle, AllowInnerSlashes.
174+
# SupportedStyles: slashes, percent_r, mixed
175+
Style/RegexpLiteral:
176+
Exclude:
177+
- 'lib/fog/aliyun/models/storage/files.rb'

Gemfile

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
# frozen_string_literal: true
2+
13
source 'https://rubygems.org'
24

35
# Specify your gem's dependencies in fog-aliyun.gemspec

Rakefile

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
# frozen_string_literal: true
2+
13
require 'bundler/gem_tasks'
24
require 'rspec/core/rake_task'
35

bin/console

100644100755
Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
11
#!/usr/bin/env ruby
2+
# frozen_string_literal: true
23

3-
require "bundler/setup"
4-
require "fog/aliyun"
4+
require 'bundler/setup'
5+
require 'fog/aliyun'
56

67
# You can add fixtures and/or initialization code here to make experimenting
78
# with your gem easier. You can also use a different console, if you like.
@@ -10,5 +11,5 @@ require "fog/aliyun"
1011
# require "pry"
1112
# Pry.start
1213

13-
require "irb"
14+
require 'irb'
1415
IRB.start

fog-aliyun.gemspec

Lines changed: 19 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,33 +1,34 @@
1-
# coding: utf-8
1+
# frozen_string_literal: true
2+
23
lib = File.expand_path('../lib', __FILE__)
34
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
45
require 'fog/aliyun/version'
56

67
Gem::Specification.new do |spec|
7-
spec.name = 'fog-aliyun'
8-
spec.version = Fog::Aliyun::VERSION
9-
spec.authors = ['Qinsi Deng, Jianxun Li, Jane Han']
10-
spec.email = ['dengqinsi@sina.com']
8+
spec.name = 'fog-aliyun'
9+
spec.version = Fog::Aliyun::VERSION
10+
spec.authors = ['Qinsi Deng, Jianxun Li, Jane Han']
11+
spec.email = ['dengqinsi@sina.com']
1112

12-
spec.summary = 'Fog provider for Aliyun Web Services.'
13-
spec.description = 'As a FOG provider, fog-aliyun support aliyun OSS/ECS. It will support more aliyun services later.'
14-
spec.homepage = 'https://github.com/fog/fog-aliyun'
15-
spec.license = 'MIT'
13+
spec.summary = 'Fog provider for Aliyun Web Services.'
14+
spec.description = 'As a FOG provider, fog-aliyun support aliyun OSS/ECS. It will support more aliyun services later.'
15+
spec.homepage = 'https://github.com/fog/fog-aliyun'
16+
spec.license = 'MIT'
1617

17-
spec.files = `git ls-files -z`.split("\x0").reject { |f| f.match(%r{^(test|spec|features)/}) }
18-
spec.bindir = 'exe'
19-
spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
18+
spec.files = `git ls-files -z`.split("\x0").reject { |f| f.match(%r{^(test|spec|features)/}) }
19+
spec.bindir = 'exe'
20+
spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
2021
spec.require_paths = ['lib']
2122

22-
spec.add_development_dependency 'bundler', '~> 1.10'
23-
spec.add_development_dependency 'rake', '~> 10.0'
24-
spec.add_development_dependency 'rspec', '~> 3.3'
25-
spec.add_development_dependency 'rubocop', '~> 0.49.0'
23+
spec.add_development_dependency 'bundler'
2624
spec.add_development_dependency 'mime-types', '~> 2.6', '>= 2.6.2'
2725
spec.add_development_dependency 'pry-nav'
26+
spec.add_development_dependency 'rake'
27+
spec.add_development_dependency 'rspec'
28+
spec.add_development_dependency 'rubocop'
2829

29-
spec.add_dependency 'fog-core', '~> 1.27'
30-
spec.add_dependency 'fog-json', '~> 1.0'
30+
spec.add_dependency 'fog-core'
31+
spec.add_dependency 'fog-json'
3132
spec.add_dependency 'ipaddress', '~> 0.8'
3233
spec.add_dependency 'xml-simple', '~> 1.1'
3334
end

lib/fog/aliyun.rb

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,16 @@
1+
# frozen_string_literal: true
2+
13
require 'fog/core'
24
require 'fog/json'
35
require 'fog/aliyun/version'
46

57
module Fog
68
module Compute
7-
ret = autoload :Aliyun, 'fog/aliyun/compute'
9+
autoload :Aliyun, 'fog/aliyun/compute'
810
end
911

1012
module Storage
11-
ret = autoload :Aliyun, 'fog/aliyun/storage'
13+
autoload :Aliyun, 'fog/aliyun/storage'
1214
end
1315

1416
module Aliyun

0 commit comments

Comments
 (0)