fridge 0.4.3 → 0.4.5
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/.travis.yml +1 -0
- data/Gemfile +0 -3
- data/fridge.gemspec +0 -1
- data/lib/fridge/rails_helpers.rb +5 -1
- data/lib/fridge/version.rb +1 -1
- data/spec/fridge/rails_helpers_spec.rb +20 -0
- metadata +3 -17
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: f95fc7ff6e87f6f8d584736fe30f491611b63fc216e0d4453fccfa6f83d46c98
|
4
|
+
data.tar.gz: 02b45faa47f7bcfa6bb572247d1f331a99d254e28e6d28eb982589ebc812dcdc
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 1fd27cadc2aadbf83e25d3b6215d504123438f401a36e614ed2c6734476cf53acb78f2d8a9d1957bffeecec071202ddca4f4ce746c319a4fcdc14ec771763ab7
|
7
|
+
data.tar.gz: 00ade0f6d5133df541f4859904cc76951407d058d90c93ddb7b4e8f4925848242c6d86c6e91fca9bb0efbc0438b93c5e211f8f85273cf5e4a0259c0d5eb161f7
|
data/.travis.yml
CHANGED
data/Gemfile
CHANGED
data/fridge.gemspec
CHANGED
@@ -24,7 +24,6 @@ Gem::Specification.new do |spec|
|
|
24
24
|
spec.add_dependency 'jwt', '~> 1.5.6'
|
25
25
|
|
26
26
|
spec.add_development_dependency 'aptible-tasks'
|
27
|
-
spec.add_development_dependency 'bundler', '~> 1.5'
|
28
27
|
spec.add_development_dependency 'pry'
|
29
28
|
spec.add_development_dependency 'rails'
|
30
29
|
spec.add_development_dependency 'rake'
|
data/lib/fridge/rails_helpers.rb
CHANGED
@@ -126,7 +126,11 @@ module Fridge
|
|
126
126
|
end
|
127
127
|
|
128
128
|
def auth_domain
|
129
|
-
Aptible::Auth.configuration.root_url.
|
129
|
+
domain = URI.parse(Aptible::Auth.configuration.root_url).host
|
130
|
+
|
131
|
+
# On localhost we fall back to the default setting b/c browsers won't set
|
132
|
+
# cookies if localhost is named
|
133
|
+
domain == 'localhost' ? :all : domain
|
130
134
|
rescue StandardError
|
131
135
|
'auth.aptible.com'
|
132
136
|
end
|
data/lib/fridge/version.rb
CHANGED
@@ -215,5 +215,25 @@ describe Fridge::RailsHelpers do
|
|
215
215
|
expect(options[:domain]).to eq 'auth.aptible.com'
|
216
216
|
expect(options[:foobar]).to eq true
|
217
217
|
end
|
218
|
+
|
219
|
+
it 'restricts cookies to the specific subdomain' do
|
220
|
+
auth = class_double('Aptible::Auth').as_stubbed_const
|
221
|
+
allow(auth).to receive_message_chain(:configuration, :root_url) do
|
222
|
+
'https://auth-bob.aptible-sandbox.com'
|
223
|
+
end
|
224
|
+
|
225
|
+
options = controller.fridge_cookie_options
|
226
|
+
expect(options[:domain]).to eq 'auth-bob.aptible-sandbox.com'
|
227
|
+
end
|
228
|
+
|
229
|
+
it 'handles local development using defaults' do
|
230
|
+
auth = class_double('Aptible::Auth').as_stubbed_const
|
231
|
+
allow(auth).to receive_message_chain(:configuration, :root_url) do
|
232
|
+
'https://localhost:4000'
|
233
|
+
end
|
234
|
+
|
235
|
+
options = controller.fridge_cookie_options
|
236
|
+
expect(options[:domain]).to eq :all
|
237
|
+
end
|
218
238
|
end
|
219
239
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: fridge
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.4.
|
4
|
+
version: 0.4.5
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Frank Macreery
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2022-11-30 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: gem_config
|
@@ -52,20 +52,6 @@ dependencies:
|
|
52
52
|
- - ">="
|
53
53
|
- !ruby/object:Gem::Version
|
54
54
|
version: '0'
|
55
|
-
- !ruby/object:Gem::Dependency
|
56
|
-
name: bundler
|
57
|
-
requirement: !ruby/object:Gem::Requirement
|
58
|
-
requirements:
|
59
|
-
- - "~>"
|
60
|
-
- !ruby/object:Gem::Version
|
61
|
-
version: '1.5'
|
62
|
-
type: :development
|
63
|
-
prerelease: false
|
64
|
-
version_requirements: !ruby/object:Gem::Requirement
|
65
|
-
requirements:
|
66
|
-
- - "~>"
|
67
|
-
- !ruby/object:Gem::Version
|
68
|
-
version: '1.5'
|
69
55
|
- !ruby/object:Gem::Dependency
|
70
56
|
name: pry
|
71
57
|
requirement: !ruby/object:Gem::Requirement
|
@@ -183,7 +169,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
183
169
|
- !ruby/object:Gem::Version
|
184
170
|
version: '0'
|
185
171
|
requirements: []
|
186
|
-
rubygems_version: 3.0.3
|
172
|
+
rubygems_version: 3.0.3.1
|
187
173
|
signing_key:
|
188
174
|
specification_version: 4
|
189
175
|
summary: Token validation for distributed resource servers
|