artifactory 2.5.1 → 2.5.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: debdaf9656756bf1f7068230636025e40b3a0aec
4
- data.tar.gz: b6a4d23d52134bae4a126386b4afa2abe7159df8
3
+ metadata.gz: 807a2f1639d5c32dff15a9cc23d7d129396d9847
4
+ data.tar.gz: 063be4bd80cb37f69f04492bf9cdcda5c92fb565
5
5
  SHA512:
6
- metadata.gz: 677aa4dc20927179229f4fa6733a74565a928aedbb3d6300f698f485ee769848b618e0de60080595c52f93ba1a359df3e49ec18abe590a4fedef65afa6e830ca
7
- data.tar.gz: f2e1802388c8c0ae0cc8561ba453f56dd84c6a6bdf8f109812dbb73f87d8faedffe45f48f708f40fe5484558af6df59bd0110b74ba5250787b5d3b57ca975559
6
+ metadata.gz: 20e6cdf9a45f0da723ff60dc4bcab19c5cf06dd1be1ce54fab35cad878b167474740cb807fbe1aa2818edcd26993342bcce7d2cbee1283c82e77f36601f99161
7
+ data.tar.gz: 4646fa8579e83c41a2733c35c336257aab79fb869d3f4ea8f8122a03ef8e6d85a21dd093dcbe148d1fbc48992fec903d1b4616c721fba463dae18fb263a39bad
@@ -3,8 +3,16 @@ Artifactory Client CHANGELOG
3
3
  This file is used to document the changes between releases of the Artifactory
4
4
  Ruby client.
5
5
 
6
+ v2.5.2 (01-27-2017)
7
+ -------------------
8
+ - Update tests to run properly on Windows
9
+ - Begin testing PRs with Appveyor
10
+ - Ensure URI from artifacts are escaped
11
+
6
12
  v2.5.1 (11-10-2016)
7
13
  -------------------
14
+ - Ensure `Artifact#Upload_from_archive` returns empty response
15
+ - Additional test coverage
8
16
 
9
17
  v2.5.0 (09-15-2016)
10
18
  -------------------
@@ -0,0 +1,28 @@
1
+ version: '{build}'
2
+
3
+ skip_tags: true
4
+
5
+ environment:
6
+ matrix:
7
+ - RUBY_VERSION: 21
8
+ - RUBY_VERSION: 21-x64
9
+ - RUBY_VERSION: 200
10
+ - RUBY_VERSION: 193
11
+
12
+ install:
13
+ - set PATH=C:\Ruby%RUBY_VERSION%\bin;%PATH%
14
+ - gem install bundler
15
+ - bundle install --path=vendor/bundle --retry=3 --jobs=7
16
+
17
+ cache:
18
+ - vendor/bundle
19
+
20
+ build: off
21
+
22
+ before_test:
23
+ - ruby -v
24
+ - gem -v
25
+ - bundle -v
26
+
27
+ test_script:
28
+ - bundle exec rake travis:ci
@@ -107,7 +107,7 @@ module Artifactory
107
107
  def from_url(url, options = {})
108
108
  # Parse the URL and only use the path so the configured
109
109
  # endpoint/proxy/SSL settings are used in the GET request.
110
- path = URI.parse(url).path
110
+ path = URI.parse(url_safe(url)).path
111
111
  client = extract_client!(options)
112
112
  # If the endpoint contains a path part, we must remove the
113
113
  # endpoint path part from path, because the client uses
@@ -241,7 +241,7 @@ module Artifactory
241
241
  # the URL-safe version of the string
242
242
  #
243
243
  def url_safe(value)
244
- URI.escape(value.to_s)
244
+ URI.escape(URI.unescape(value.to_s))
245
245
  end
246
246
  end
247
247
 
@@ -15,5 +15,5 @@
15
15
  #
16
16
 
17
17
  module Artifactory
18
- VERSION = '2.5.1'
18
+ VERSION = '2.5.2'
19
19
  end
@@ -6,7 +6,7 @@ module Artifactory
6
6
  it "finds artifacts by #{name}" do
7
7
  response = described_class.send(name, options)
8
8
  expect(response).to be_a(Array)
9
- expect(response.size).to eq(2)
9
+ expect(response.size).to eq(3)
10
10
 
11
11
  artifact_1 = response[0]
12
12
  expect(artifact_1).to be_a(described_class)
@@ -15,6 +15,10 @@ module Artifactory
15
15
  artifact_2 = response[1]
16
16
  expect(artifact_2).to be_a(described_class)
17
17
  expect(artifact_2.repo).to eq('ext-release-local')
18
+
19
+ artifact_3 = response[2]
20
+ expect(artifact_3).to be_a(described_class)
21
+ expect(artifact_3.repo).to eq('bin-release-local')
18
22
  end
19
23
 
20
24
  it "finds artifacts by repo" do
@@ -111,6 +111,31 @@ module Artifactory
111
111
  )
112
112
  end
113
113
 
114
+ app.get('/api/storage/bin-release-local/org/acme/artifact 1.0.0.msi') do
115
+ content_type 'application/vnd.org.jfrog.artifactory.storage.FileInfo+json'
116
+ JSON.fast_generate(
117
+ 'uri' => server_url.join('/api/storage/bin-release-local/org/acme/artifact 1.0.0.msi'),
118
+ 'downloadUri' => server_url.join('/artifactory/bin-release-local/org/acme/artifact 1.0.0.msi'),
119
+ 'repo' => 'bin-release-local',
120
+ 'path' => '/org/acme/artifact 1.0.0.msi',
121
+ 'created' => Time.parse('1995-04-11 11:05am'),
122
+ 'createdBy' => 'yzl',
123
+ 'lastModified' => Time.parse('2013-11-10 10:10pm'),
124
+ 'modifiedBy' => 'schisamo',
125
+ 'lastUpdated' => Time.parse('2014-02-02 2:00pm'),
126
+ 'size' => '1024',
127
+ 'mimeType' => 'application/octet-stream',
128
+ 'checksums' => {
129
+ 'md5' => 'MD5789',
130
+ 'sha' => 'SHA101'
131
+ },
132
+ 'originalChecksums' => {
133
+ 'md5' => 'MD5789',
134
+ 'sha' => 'SHA101'
135
+ }
136
+ )
137
+ end
138
+
114
139
  app.class_eval do
115
140
  def artifacts_for_conditions(&block)
116
141
  if block.call
@@ -125,6 +150,7 @@ module Artifactory
125
150
  'results' => [
126
151
  { 'uri' => server_url.join('/api/storage/libs-release-local/org/acme/artifact.deb') },
127
152
  { 'uri' => server_url.join('/api/storage/ext-release-local/org/acme/artifact.deb') },
153
+ { 'uri' => server_url.join('/api/storage/bin-release-local/org/acme/artifact 1.0.0.msi') },
128
154
  ]
129
155
  )
130
156
  end
@@ -44,7 +44,7 @@ module Artifactory
44
44
  subject { described_class.new(client: client, local_path: local_path) }
45
45
 
46
46
  before do
47
- allow(File).to receive(:new).with(local_path).and_return(file)
47
+ allow(File).to receive(:new).with(/\A(\w:)?#{local_path}\z/).and_return(file)
48
48
  end
49
49
 
50
50
  context 'when the artifact is a file path' do
@@ -129,7 +129,7 @@ module Artifactory
129
129
  before do
130
130
  subject.client = client
131
131
  subject.key = 'libs-release-local'
132
- allow(File).to receive(:new).with('/fake/path').and_return(file)
132
+ allow(File).to receive(:new).with(/\A(\w:)?#{path}\z/).and_return(file)
133
133
  end
134
134
 
135
135
  context 'when the artifact is a file path' do
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: artifactory
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.5.1
4
+ version: 2.5.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Seth Vargo
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2016-11-10 00:00:00.000000000 Z
11
+ date: 2017-01-27 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -51,6 +51,7 @@ files:
51
51
  - LICENSE
52
52
  - README.md
53
53
  - Rakefile
54
+ - appveyor.yml
54
55
  - artifactory.gemspec
55
56
  - lib/artifactory.rb
56
57
  - lib/artifactory/client.rb