fog-core 2.2.1 → 2.2.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/changelog.md +5 -0
- data/lib/fog/core/provider.rb +16 -14
- data/lib/fog/core/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 0e12788f1604380c50ec19c246cacdd74d769a04d71ee56660bc3c5bc62238ae
|
4
|
+
data.tar.gz: d0bfdca7690d42db8771d84dd1fdb8b7d013b2d719071ee4165be900f14ae788
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 9f1e44a5714c271433bc108ba068006b98ab2acbb88319db688a63ef0ed0cb1d567fcb6c254fb96a6df527a4ff3e0e7f0f1d8e258f2eb6a8d43b05552e905c7f
|
7
|
+
data.tar.gz: afcb84b9410a1361aa87a019bdf6934a428780d50713edd5da98c32104d4d3a3c813aef048f2368888b74da2718f6fea6a0c0cdade6ced7b29837ebc515db2a3
|
data/changelog.md
CHANGED
data/lib/fog/core/provider.rb
CHANGED
@@ -8,10 +8,22 @@ module Fog
|
|
8
8
|
end
|
9
9
|
|
10
10
|
module Provider
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
11
|
+
class << self
|
12
|
+
def extended(base)
|
13
|
+
provider = base.to_s.split("::").last
|
14
|
+
Fog.providers[provider.downcase.to_sym] = provider
|
15
|
+
Fog.providers[underscore_name(provider)] = provider
|
16
|
+
end
|
17
|
+
|
18
|
+
private
|
19
|
+
|
20
|
+
def underscore_name(string)
|
21
|
+
string.gsub(/::/, '/').
|
22
|
+
gsub(/([A-Z]+)([A-Z][a-z])/,'\1_\2').
|
23
|
+
gsub(/([a-z\d])([A-Z])/,'\1_\2').
|
24
|
+
tr("-", "_").
|
25
|
+
downcase
|
26
|
+
end
|
15
27
|
end
|
16
28
|
|
17
29
|
def [](service_key)
|
@@ -47,15 +59,5 @@ module Fog
|
|
47
59
|
)
|
48
60
|
['Fog', constant_string, provider].join("::")
|
49
61
|
end
|
50
|
-
|
51
|
-
private
|
52
|
-
|
53
|
-
def underscore_name(string)
|
54
|
-
string.gsub(/::/, '/').
|
55
|
-
gsub(/([A-Z]+)([A-Z][a-z])/,'\1_\2').
|
56
|
-
gsub(/([a-z\d])([A-Z])/,'\1_\2').
|
57
|
-
tr("-", "_").
|
58
|
-
downcase
|
59
|
-
end
|
60
62
|
end
|
61
63
|
end
|
data/lib/fog/core/version.rb
CHANGED