puppet_forge 2.2.2 → 2.2.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +7 -0
- data/lib/puppet_forge/v3/base.rb +2 -2
- data/lib/puppet_forge/version.rb +1 -1
- data/puppet_forge.gemspec +1 -1
- data/spec/fixtures/uri/prefix/v3/bases/puppet.headers +14 -0
- data/spec/fixtures/uri/prefix/v3/bases/puppet.json +4 -0
- data/spec/fixtures/v3/bases/puppet.headers +14 -0
- data/spec/fixtures/v3/bases/puppet.json +4 -0
- data/spec/integration/forge/v3/module_spec.rb +0 -1
- data/spec/spec_helper.rb +10 -2
- data/spec/unit/forge/connection_spec.rb +4 -0
- data/spec/unit/forge/v3/base_spec.rb +31 -0
- metadata +15 -7
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 9d3ac1386618a86886bcc242c9cf8899241b7480
|
4
|
+
data.tar.gz: 9042c6e51d0fcfeb1ff492fb125dc35a4a19702c
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 755007e1ac00c2209976755d3891ee18c8c2e63a2e2f0aa4bdbe22f64a18bf9c847f288aab30c418dfb61432df5e03b5bc76a32111df1908f98e38cf45ccde37
|
7
|
+
data.tar.gz: 8557b39ff685e758b9550df9a5c55c01a707079cc7a1e345df6786a099bcc5fd17ed980a3b210b0a42f93d9f14b30205acaa071f21e3037eca548e8fccab42fc
|
data/CHANGELOG.md
CHANGED
@@ -3,6 +3,13 @@
|
|
3
3
|
Starting with v2.0.0, all notable changes to this project will be documented in this file.
|
4
4
|
This project adheres to [Semantic Versioning](http://semver.org/).
|
5
5
|
|
6
|
+
## v2.2.3 - 2017-01-17
|
7
|
+
|
8
|
+
### Changed
|
9
|
+
|
10
|
+
* Fixed an issue that was preventing PuppetForge.host from honoring any given path prefix.
|
11
|
+
* Upgraded gettext-setup dependency to 0.11 release.
|
12
|
+
|
6
13
|
## v2.2.2 - 2016-07-06
|
7
14
|
|
8
15
|
### Changed
|
data/lib/puppet_forge/v3/base.rb
CHANGED
@@ -61,9 +61,9 @@ module PuppetForge
|
|
61
61
|
end
|
62
62
|
|
63
63
|
if item.nil?
|
64
|
-
uri_path = "
|
64
|
+
uri_path = "v3/#{resource}"
|
65
65
|
else
|
66
|
-
uri_path = "
|
66
|
+
uri_path = "v3/#{resource}/#{item}"
|
67
67
|
end
|
68
68
|
|
69
69
|
PuppetForge::V3::Base.conn.get uri_path, params
|
data/lib/puppet_forge/version.rb
CHANGED
data/puppet_forge.gemspec
CHANGED
@@ -24,7 +24,7 @@ Gem::Specification.new do |spec|
|
|
24
24
|
spec.add_runtime_dependency "faraday_middleware", [">= 0.9.0", "< 0.11.0"]
|
25
25
|
spec.add_dependency 'semantic_puppet', '~> 0.1.0'
|
26
26
|
spec.add_dependency 'minitar'
|
27
|
-
spec.add_dependency 'gettext-setup', '
|
27
|
+
spec.add_dependency 'gettext-setup', '~> 0.11'
|
28
28
|
|
29
29
|
spec.add_development_dependency "bundler", "~> 1.6"
|
30
30
|
spec.add_development_dependency "rake"
|
@@ -0,0 +1,14 @@
|
|
1
|
+
HTTP/1.1 200 OK
|
2
|
+
Server: nginx
|
3
|
+
Date: Mon, 06 Jan 2014 22:42:07 GMT
|
4
|
+
Content-Type: application/json;charset=utf-8
|
5
|
+
Content-Length: 285
|
6
|
+
Connection: keep-alive
|
7
|
+
Status: 200 OK
|
8
|
+
X-Frame-Options: sameorigin
|
9
|
+
X-XSS-Protection: 1; mode=block
|
10
|
+
Cache-Control: public, must-revalidate
|
11
|
+
Last-Modified: Mon, 12 Nov 2012 14:51:00 GMT
|
12
|
+
X-Node: forgeapi02
|
13
|
+
X-Revision: 49f66e061b0021c081fb58e754898cd928f61494
|
14
|
+
|
@@ -0,0 +1,14 @@
|
|
1
|
+
HTTP/1.1 200 OK
|
2
|
+
Server: nginx
|
3
|
+
Date: Mon, 06 Jan 2014 22:42:07 GMT
|
4
|
+
Content-Type: application/json;charset=utf-8
|
5
|
+
Content-Length: 285
|
6
|
+
Connection: keep-alive
|
7
|
+
Status: 200 OK
|
8
|
+
X-Frame-Options: sameorigin
|
9
|
+
X-XSS-Protection: 1; mode=block
|
10
|
+
Cache-Control: public, must-revalidate
|
11
|
+
Last-Modified: Mon, 12 Nov 2012 14:51:00 GMT
|
12
|
+
X-Node: forgeapi02
|
13
|
+
X-Revision: 49f66e061b0021c081fb58e754898cd928f61494
|
14
|
+
|
@@ -2,7 +2,6 @@ require 'spec_helper'
|
|
2
2
|
|
3
3
|
describe PuppetForge::V3::Module do
|
4
4
|
before do
|
5
|
-
|
6
5
|
PuppetForge.host = "https://forge-aio01-petest.puppetlabs.com/"
|
7
6
|
PuppetForge::V3::Base.conn = PuppetForge::Connection.make_connection(PuppetForge.host, nil, {:ssl => {:verify => false} })
|
8
7
|
end
|
data/spec/spec_helper.rb
CHANGED
@@ -12,9 +12,9 @@ require 'puppet_forge'
|
|
12
12
|
|
13
13
|
module StubbingFaraday
|
14
14
|
|
15
|
-
def stub_api_for(klass)
|
15
|
+
def stub_api_for(klass, base_url = "http://api.example.com")
|
16
16
|
allow(klass).to receive(:conn) do
|
17
|
-
Faraday.new :url =>
|
17
|
+
Faraday.new :url => base_url do |builder|
|
18
18
|
builder.use PuppetForge::Middleware::SymbolifyJson
|
19
19
|
builder.response(:json, :content_type => /\bjson$/)
|
20
20
|
builder.response(:raise_error)
|
@@ -65,4 +65,12 @@ RSpec.configure do |config|
|
|
65
65
|
# the seed, which is printed after each run.
|
66
66
|
# --seed 1234
|
67
67
|
config.order = 'random'
|
68
|
+
|
69
|
+
config.before(:example) do
|
70
|
+
@old_host = PuppetForge.host
|
71
|
+
end
|
72
|
+
|
73
|
+
config.after(:example) do
|
74
|
+
PuppetForge.host = @old_host
|
75
|
+
end
|
68
76
|
end
|
@@ -57,4 +57,35 @@ describe PuppetForge::V3::Base do
|
|
57
57
|
expect(collection.total).to eq(0)
|
58
58
|
end
|
59
59
|
end
|
60
|
+
|
61
|
+
describe 'the host url setting' do
|
62
|
+
before do
|
63
|
+
end
|
64
|
+
|
65
|
+
it 'should handle a host url with no path prefix' do
|
66
|
+
stub_api_for(PuppetForge::V3::Base) do |stubs|
|
67
|
+
stub_fixture(stubs, :get, '/v3/bases/puppet')
|
68
|
+
end
|
69
|
+
|
70
|
+
# Trigger connection reset
|
71
|
+
PuppetForge::V3::Base.conn = PuppetForge::Connection.default_connection
|
72
|
+
|
73
|
+
base = PuppetForge::V3::Base.find 'puppet'
|
74
|
+
expect(base.username).to eq('foo')
|
75
|
+
end
|
76
|
+
|
77
|
+
it 'should handle a path prefix in the host' do
|
78
|
+
PuppetForge.host = 'https://api.example.com/uri/prefix'
|
79
|
+
|
80
|
+
stub_api_for(PuppetForge::V3::Base, PuppetForge.host) do |stubs|
|
81
|
+
stub_fixture(stubs, :get, '/uri/prefix/v3/bases/puppet')
|
82
|
+
end
|
83
|
+
|
84
|
+
# Trigger connection reset
|
85
|
+
PuppetForge::V3::Base.conn = PuppetForge::Connection.default_connection
|
86
|
+
|
87
|
+
base = PuppetForge::V3::Base.find 'puppet'
|
88
|
+
expect(base.username).to eq('bar')
|
89
|
+
end
|
90
|
+
end
|
60
91
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: puppet_forge
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.2.
|
4
|
+
version: 2.2.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Puppet Labs
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2017-01-17 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: faraday
|
@@ -76,16 +76,16 @@ dependencies:
|
|
76
76
|
name: gettext-setup
|
77
77
|
requirement: !ruby/object:Gem::Requirement
|
78
78
|
requirements:
|
79
|
-
- - "
|
79
|
+
- - "~>"
|
80
80
|
- !ruby/object:Gem::Version
|
81
|
-
version: '0.
|
81
|
+
version: '0.11'
|
82
82
|
type: :runtime
|
83
83
|
prerelease: false
|
84
84
|
version_requirements: !ruby/object:Gem::Requirement
|
85
85
|
requirements:
|
86
|
-
- - "
|
86
|
+
- - "~>"
|
87
87
|
- !ruby/object:Gem::Version
|
88
|
-
version: '0.
|
88
|
+
version: '0.11'
|
89
89
|
- !ruby/object:Gem::Dependency
|
90
90
|
name: bundler
|
91
91
|
requirement: !ruby/object:Gem::Requirement
|
@@ -233,6 +233,10 @@ files:
|
|
233
233
|
- lib/puppet_forge/version.rb
|
234
234
|
- locales/config.yaml
|
235
235
|
- puppet_forge.gemspec
|
236
|
+
- spec/fixtures/uri/prefix/v3/bases/puppet.headers
|
237
|
+
- spec/fixtures/uri/prefix/v3/bases/puppet.json
|
238
|
+
- spec/fixtures/v3/bases/puppet.headers
|
239
|
+
- spec/fixtures/v3/bases/puppet.json
|
236
240
|
- spec/fixtures/v3/files/puppetlabs-apache-0.0.1.tar.gz.headers
|
237
241
|
- spec/fixtures/v3/files/puppetlabs-apache-0.0.1.tar.gz.json
|
238
242
|
- spec/fixtures/v3/modules.headers
|
@@ -298,12 +302,16 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
298
302
|
version: '0'
|
299
303
|
requirements: []
|
300
304
|
rubyforge_project:
|
301
|
-
rubygems_version: 2.
|
305
|
+
rubygems_version: 2.6.8
|
302
306
|
signing_key:
|
303
307
|
specification_version: 4
|
304
308
|
summary: Access the Puppet Forge API from Ruby for resource information and to download
|
305
309
|
releases.
|
306
310
|
test_files:
|
311
|
+
- spec/fixtures/uri/prefix/v3/bases/puppet.headers
|
312
|
+
- spec/fixtures/uri/prefix/v3/bases/puppet.json
|
313
|
+
- spec/fixtures/v3/bases/puppet.headers
|
314
|
+
- spec/fixtures/v3/bases/puppet.json
|
307
315
|
- spec/fixtures/v3/files/puppetlabs-apache-0.0.1.tar.gz.headers
|
308
316
|
- spec/fixtures/v3/files/puppetlabs-apache-0.0.1.tar.gz.json
|
309
317
|
- spec/fixtures/v3/modules.headers
|