fog-artifactory 0.1.0 → 0.2.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/fog/artifactory/models/storage/file.rb +9 -5
- data/lib/fog/artifactory/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: b713fa3b7fe2d2fe96c54ddae16f06f9474ed5bf
|
4
|
+
data.tar.gz: 88fa88368f5dccf3e908ad57de011cab075d4604
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 386329e0290d459cd2af816e3a317d1fe26f86d1961d748003180bc25147854a85c7f3f260ff87009ce613f2e650f7b7e6b68582ba5d169cb803435814174129
|
7
|
+
data.tar.gz: b06698e4b789e43dc73c8269d80dc5f65db4c0676428070a5173f6aa2c16426f2edd1851debecf601e2ac799f1f0f892cffe16de18966a8e6e5e2c90d927df66
|
@@ -37,13 +37,11 @@ module Fog
|
|
37
37
|
requires :directory, :key
|
38
38
|
service.client.delete(attributes[:download_uri])
|
39
39
|
true
|
40
|
-
rescue Error::HTTPError
|
41
|
-
false
|
42
40
|
end
|
43
41
|
|
44
42
|
def save(_options = {})
|
45
43
|
requires :body, :directory, :key
|
46
|
-
endpoint = ::File.join(attributes[:
|
44
|
+
endpoint = ::File.join(attributes[:directory].key, attributes[:key])
|
47
45
|
|
48
46
|
service.client.put(endpoint, attributes[:body])
|
49
47
|
true
|
@@ -55,8 +53,14 @@ module Fog
|
|
55
53
|
end
|
56
54
|
alias_method :url, :public_url
|
57
55
|
|
58
|
-
|
59
|
-
|
56
|
+
def download_uri
|
57
|
+
return attributes[:download_uri] if attributes[:download_uri].present?
|
58
|
+
requires :directory, :key
|
59
|
+
::File.join(service.client.endpoint, attributes[:directory].key, attributes[:key])
|
60
|
+
end
|
61
|
+
|
62
|
+
# puts attributes[:directory].key
|
63
|
+
# URI.join(service.client.endpoint, attributes[:directory].key, attributes[:key]).to_s
|
60
64
|
# end
|
61
65
|
end
|
62
66
|
end
|