aptible-auth 0.1.3 → 0.1.4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +2 -2
- data/lib/aptible/auth.rb +3 -1
- data/lib/aptible/auth/version.rb +1 -1
- data/spec/aptible/auth_spec.rb +8 -0
- data/spec/shared/set_env.rb +10 -0
- data/spec/spec_helper.rb +4 -0
- metadata +4 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: db3c1ba550b3a777611816a3828b182d0e2d3a27
|
4
|
+
data.tar.gz: 97fe3444852024e2c306c40a85ac900179a4bfb1
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 2e106b93c20c79b736d18a7d7def5d381a1b6a956fce65c60acf06363f96d8ee336627e5d897bbe791be543900a1bc16e4a8d32c54cfcc1153c2a2a983d6b9c9
|
7
|
+
data.tar.gz: af94ac3a6532389de1a5daece03a11aee35441189dcc77ba63e9f9aca11a1a6c54f967a54d4314c5481118e2f42206a9dfd9fac7a01ca171259f7f4518e32e16
|
data/README.md
CHANGED
@@ -49,9 +49,9 @@ client.href
|
|
49
49
|
|
50
50
|
| Parameter | Description | Default |
|
51
51
|
| --------- | ----------- | --------------- |
|
52
|
-
| `root_url` | Root URL of the authorization server | `https://auth.aptible.com
|
52
|
+
| `root_url` | Root URL of the authorization server | `ENV['APTIBLE_AUTH_ROOT_URL']` or [https://auth.aptible.com](https://auth.aptible.com) |
|
53
53
|
|
54
|
-
To point the client at a different authorization server (e.g., during development), add the following to your application's initializers:
|
54
|
+
To point the client at a different authorization server (e.g., during development), add the following to your application's initializers (or set the `APTIBLE_AUTH_ROOT_URL` environment variable):
|
55
55
|
|
56
56
|
```ruby
|
57
57
|
Aptible::Auth.configure do |config|
|
data/lib/aptible/auth.rb
CHANGED
@@ -9,7 +9,9 @@ module Aptible
|
|
9
9
|
include GemConfig::Base
|
10
10
|
|
11
11
|
with_configuration do
|
12
|
-
has :root_url,
|
12
|
+
has :root_url,
|
13
|
+
classes: [String],
|
14
|
+
default: ENV['APTIBLE_AUTH_ROOT_URL'] || 'https://auth.aptible.com'
|
13
15
|
end
|
14
16
|
|
15
17
|
def self.public_key
|
data/lib/aptible/auth/version.rb
CHANGED
data/spec/aptible/auth_spec.rb
CHANGED
@@ -7,6 +7,14 @@ describe Aptible::Auth do
|
|
7
7
|
expect(config.root_url).to eq 'https://auth.aptible.com'
|
8
8
|
end
|
9
9
|
|
10
|
+
pending 'uses ENV["APTIBLE_AUTH_ROOT_URL"] if defined' do
|
11
|
+
config = described_class.configuration
|
12
|
+
set_env 'APTIBLE_AUTH_ROOT_URL', 'http://foobar.com' do
|
13
|
+
config.reset
|
14
|
+
expect(config.root_url).to eq 'http://foobar.com'
|
15
|
+
end
|
16
|
+
end
|
17
|
+
|
10
18
|
it 'should expose the server public key' do
|
11
19
|
get = double 'get'
|
12
20
|
Aptible::Auth::Client.any_instance.stub(:get) { get }
|
data/spec/spec_helper.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: aptible-auth
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Frank Macreery
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2014-02-
|
11
|
+
date: 2014-02-19 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: gem_config
|
@@ -158,6 +158,7 @@ files:
|
|
158
158
|
- spec/aptible/auth/client_spec.rb
|
159
159
|
- spec/aptible/auth/token_spec.rb
|
160
160
|
- spec/aptible/auth_spec.rb
|
161
|
+
- spec/shared/set_env.rb
|
161
162
|
- spec/spec_helper.rb
|
162
163
|
homepage: https://github.com/aptible/aptible-auth
|
163
164
|
licenses:
|
@@ -187,4 +188,5 @@ test_files:
|
|
187
188
|
- spec/aptible/auth/client_spec.rb
|
188
189
|
- spec/aptible/auth/token_spec.rb
|
189
190
|
- spec/aptible/auth_spec.rb
|
191
|
+
- spec/shared/set_env.rb
|
190
192
|
- spec/spec_helper.rb
|