pebblebed 0.3.6 → 0.3.7
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 +4 -4
- data/lib/pebblebed/config.rb +2 -1
- data/lib/pebblebed/version.rb +1 -1
- data/spec/config_spec.rb +9 -0
- metadata +2 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA1:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 7e4e34a7978eddde52fa0208e765e5ba26e61733
|
|
4
|
+
data.tar.gz: 3b85e3ffc4ddab4b27276eb268b8bb525dbf31ce
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: b885714ad6c9757195293c731df6e9752f9625a52d1a1afc0329369f0743910d6c5a2c9c377138159c58170907c7d62949448b61984438a0c79c3ffdf5696e2a
|
|
7
|
+
data.tar.gz: e5d298afb68659ac1e3baf0aa37bcef2df999e46a635b70a8262db24113901790b932bb9a0f44e2729cefaf799142e4efe7d01c9d60869525b070b0e32dcb6a8
|
data/lib/pebblebed/config.rb
CHANGED
|
@@ -84,7 +84,8 @@ module Pebblebed
|
|
|
84
84
|
@services[service.to_sym][:path] || "/api/#{service}"
|
|
85
85
|
end
|
|
86
86
|
|
|
87
|
-
def root_url_for(service, url_opts={})
|
|
87
|
+
def root_url_for(service, url_opts = {})
|
|
88
|
+
url_opts = {host: (@services[service.to_sym] || {})[:host]}.merge(url_opts)
|
|
88
89
|
URI.join(base_url_for(url_opts), "#{path_of(service)}/v#{version_of(service)}/")
|
|
89
90
|
end
|
|
90
91
|
|
data/lib/pebblebed/version.rb
CHANGED
data/spec/config_spec.rb
CHANGED
|
@@ -49,6 +49,15 @@ describe Pebblebed do
|
|
|
49
49
|
Pebblebed.root_url_for(:foobar).to_s.should eq "http://example.org/api/foobar/v2/"
|
|
50
50
|
end
|
|
51
51
|
|
|
52
|
+
it "allows the host of a pebble to be overridden" do
|
|
53
|
+
Pebblebed.config do
|
|
54
|
+
service :checkpoint, host: 'example.net'
|
|
55
|
+
end
|
|
56
|
+
Pebblebed.host = "example.org"
|
|
57
|
+
Pebblebed.root_url_for(:checkpoint).to_s.should eq "http://example.net/api/checkpoint/v1/"
|
|
58
|
+
Pebblebed.root_url_for(:checkpoint, :host => 'checkpoint.dev').to_s.should eq "http://checkpoint.dev/api/checkpoint/v1/"
|
|
59
|
+
end
|
|
60
|
+
|
|
52
61
|
it "works with pebbles that are exposed via https" do
|
|
53
62
|
Pebblebed.config do
|
|
54
63
|
service :checkpoint
|
metadata
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: pebblebed
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.3.
|
|
4
|
+
version: 0.3.7
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Katrina Owen
|
|
@@ -9,7 +9,7 @@ authors:
|
|
|
9
9
|
autorequire:
|
|
10
10
|
bindir: bin
|
|
11
11
|
cert_chain: []
|
|
12
|
-
date: 2016-
|
|
12
|
+
date: 2016-07-23 00:00:00.000000000 Z
|
|
13
13
|
dependencies:
|
|
14
14
|
- !ruby/object:Gem::Dependency
|
|
15
15
|
name: rspec
|