artifactory-ruby 0.0.1 → 0.0.2

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
2
  SHA1:
3
- metadata.gz: 60b1ba3ee0e3e8e73c67bf3183837ba477edc2c0
4
- data.tar.gz: 8eb5c22de96241ddd66fdafaf58bdcabd97c8da8
3
+ metadata.gz: a79eac0819c280d08856922ddfa8650b5e928c68
4
+ data.tar.gz: 776d6e71a1b66adb4802f7553c3261b45aba82ca
5
5
  SHA512:
6
- metadata.gz: f61eef69170467bd2a829de851d9371da8a76f1b30d76b1a8a261f63f03b7290bec8ed1bfcdb4602caedcf8fa61a5fe2afc701b69afa389a82483a06d7300b3f
7
- data.tar.gz: c60c0ba0e330be0105acac73f26a0440bfc5c322ee5313eb9d103ce3faf94e61e4c915c7f4932cef9df08d988dfabd2e9b543e8e791a838662fbe8fa0e24dcc2
6
+ metadata.gz: fa79e9c9ab2eb105952adefc80b3d5ae7c5d98b288464f22a08bb1cadb047eeea01eb7258da1884c490ce12d8e2a39a445454317b90d4aad6724724265457f31
7
+ data.tar.gz: 5f3bc6db1d365a00204de5bc5f6e072e6f10372c6c1ea68b25cde2497b92f60c742245ba5f5c06407f2309e4d566e2672a37d738083deac71c7d581ee100b19b
data/README.md CHANGED
@@ -10,5 +10,9 @@ To install it simply issue the following command:
10
10
  gem install artifactory-ruby
11
11
  ```
12
12
 
13
+ ## Usage
14
+
15
+ Online documentation is available at [rubydoc](http://www.rubydoc.info/gems/artifactory-ruby/)
16
+
13
17
  ## Contact
14
18
  Matteo Cerutti - matteo.cerutti@hotmail.co.uk
@@ -146,6 +146,28 @@ module Artifactory
146
146
  files
147
147
  end
148
148
 
149
+ # Get file information like last modification time, creation time etc.
150
+ #
151
+ # @param repo_key [String] Repository key
152
+ # @param path [String] Path of the file to look up
153
+ # @return [Hash] File information
154
+ #
155
+ def file_info(repo_key:, path:)
156
+ ret = {}
157
+
158
+ api_get(File.join("/storage", repo_key, path).chomp('/')).each do |k, v|
159
+ case k
160
+ when "created", "lastModified", "lastUpdated"
161
+ ret[k] = Time.parse(v)
162
+
163
+ else
164
+ ret[k] = v
165
+ end
166
+ end
167
+
168
+ ret
169
+ end
170
+
149
171
  # Get file statistics like the number of times an item was downloaded, last download date and last downloader.
150
172
  #
151
173
  # @param repo_key [String] Repository key
@@ -3,7 +3,7 @@
3
3
  #
4
4
 
5
5
  module Artifactory
6
- VERSION = "0.0.1"
6
+ VERSION = "0.0.2"
7
7
 
8
8
  def self.version
9
9
  VERSION
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: artifactory-ruby
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.1
4
+ version: 0.0.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Matteo Cerutti
@@ -24,26 +24,6 @@ dependencies:
24
24
  - - ">="
25
25
  - !ruby/object:Gem::Version
26
26
  version: 1.7.0
27
- - !ruby/object:Gem::Dependency
28
- name: deep_merge
29
- requirement: !ruby/object:Gem::Requirement
30
- requirements:
31
- - - ">="
32
- - !ruby/object:Gem::Version
33
- version: 1.1.0
34
- - - "<"
35
- - !ruby/object:Gem::Version
36
- version: 2.0.0
37
- type: :runtime
38
- prerelease: false
39
- version_requirements: !ruby/object:Gem::Requirement
40
- requirements:
41
- - - ">="
42
- - !ruby/object:Gem::Version
43
- version: 1.1.0
44
- - - "<"
45
- - !ruby/object:Gem::Version
46
- version: 2.0.0
47
27
  description: Ruby client library for Kapacitor JSON REST API
48
28
  email: matteo.cerutti@hotmail.co.uk
49
29
  executables: []