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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: fefced9410731434feab9ba2f07d5accf136d8fc
4
- data.tar.gz: db5eda5f8773c96f9e16e2bca555a6949468c7c5
3
+ metadata.gz: b713fa3b7fe2d2fe96c54ddae16f06f9474ed5bf
4
+ data.tar.gz: 88fa88368f5dccf3e908ad57de011cab075d4604
5
5
  SHA512:
6
- metadata.gz: 6328ac7261c84ee53bc7aa69238c923dec0f8b5b6539d55c058c587d2fe7cde6ee940bdd24051eb064b1114efc2df17f7087df28fe97638a53e87ca7dc95bebd
7
- data.tar.gz: 205676729e870f226e01f352d0e0bc95b5804ec5f39ce448c112d66eb175c9577f633c72da81fddeb5cf517b3ecec8baecb0ebff7ff3ef50bd4255e199480c3b
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[:repo], attributes[:key])
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
- # def url
59
- # # TODO: implement
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
@@ -1,5 +1,5 @@
1
1
  module Fog
2
2
  module Artifactory
3
- VERSION = "0.1.0"
3
+ VERSION = "0.2.0"
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: fog-artifactory
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.2.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Dmitry Zuev