passages 1.2.0 → 1.3.0
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/Gemfile.lock +1 -1
- data/app/controllers/passages/routes_controller.rb +0 -2
- data/config/config.rb +5 -0
- data/config/initializers/basic_auth.rb +2 -6
- data/lib/passages/engine.rb +4 -0
- data/spec/config/config_spec.rb +25 -0
- data/spec/config/initializers/basic_auth_spec.rb +24 -0
- data/version.rb +1 -1
- 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: cdf91b2b9b795e55d35094069080cae3bc4cb3a3
|
4
|
+
data.tar.gz: 01af8a0a8a8eefde4ead9975f30f6d8070573796
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: d4468e59aa8db907d391ac761ba15dfebf5a693aa3673ac973516ffcfca9af1ae158a4eb35b75b8f9a99c533f922365597ced87e2c036c0561ba52c4990cae99
|
7
|
+
data.tar.gz: d38ce30b6db356ac5b49613f26fdefa167941e5e97c31554ee2c2ef811487212e261c2035d3336b06bb5dd8c5f11cddda1fcb55e35bb79fac2fb143e36bd14e7
|
data/Gemfile.lock
CHANGED
data/config/config.rb
CHANGED
@@ -7,13 +7,9 @@ module Passages
|
|
7
7
|
ENV['passages_password'] || ENV['PASSAGES_PASSWORD'] || 'password'
|
8
8
|
end
|
9
9
|
|
10
|
-
def no_auth=(no_auth)
|
11
|
-
@no_auth = no_auth
|
12
|
-
end
|
13
|
-
|
14
10
|
def no_auth?
|
15
|
-
|
11
|
+
Passages.config.no_auth?
|
16
12
|
end
|
17
13
|
|
18
|
-
module_function :username, :password, :no_auth
|
14
|
+
module_function :username, :password, :no_auth?
|
19
15
|
end
|
data/lib/passages/engine.rb
CHANGED
@@ -0,0 +1,25 @@
|
|
1
|
+
require 'spec_helper'
|
2
|
+
|
3
|
+
module Passages
|
4
|
+
describe Config do
|
5
|
+
describe '#no_auth?' do
|
6
|
+
context '@basic_auth is a truthy value' do
|
7
|
+
[true, 'yes', ['1'], { a: :b }].each do |value|
|
8
|
+
it "#{ value } returns true" do
|
9
|
+
Passages.config.no_auth = value
|
10
|
+
expect(Passages.config.no_auth?).to eq(true)
|
11
|
+
end
|
12
|
+
end
|
13
|
+
end
|
14
|
+
|
15
|
+
context '@basic_auth is a falsey value' do
|
16
|
+
[false, nil].each do |value|
|
17
|
+
it "#{ value } returns false" do
|
18
|
+
Passages.config.no_auth = value
|
19
|
+
expect(Passages.config.no_auth?).to eq(false)
|
20
|
+
end
|
21
|
+
end
|
22
|
+
end
|
23
|
+
end
|
24
|
+
end
|
25
|
+
end
|
@@ -62,4 +62,28 @@ describe Passages do
|
|
62
62
|
end
|
63
63
|
end
|
64
64
|
end
|
65
|
+
|
66
|
+
describe '.no_auth?' do
|
67
|
+
let(:value) { nil }
|
68
|
+
|
69
|
+
before do
|
70
|
+
Passages.config.no_auth = value
|
71
|
+
end
|
72
|
+
|
73
|
+
context 'Passages.config is set to true' do
|
74
|
+
let(:value) { true }
|
75
|
+
|
76
|
+
it 'returns true' do
|
77
|
+
expect(described_class.no_auth?).to eq(true)
|
78
|
+
end
|
79
|
+
end
|
80
|
+
|
81
|
+
context 'Passages.config is set to false' do
|
82
|
+
let(:value) { false }
|
83
|
+
|
84
|
+
it 'returns false' do
|
85
|
+
expect(described_class.no_auth?).to eq(false)
|
86
|
+
end
|
87
|
+
end
|
88
|
+
end
|
65
89
|
end
|
data/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: passages
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.
|
4
|
+
version: 1.3.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Jake Yesbeck
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2016-01-
|
11
|
+
date: 2016-01-19 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|
@@ -71,6 +71,7 @@ files:
|
|
71
71
|
- lib/passages/route.rb
|
72
72
|
- lib/passages/route_collection.rb
|
73
73
|
- passages.gemspec
|
74
|
+
- spec/config/config_spec.rb
|
74
75
|
- spec/config/initializers/basic_auth_spec.rb
|
75
76
|
- spec/controllers/passages/routes_controller_spec.rb
|
76
77
|
- spec/lib/passages/engine_route_collection_spec.rb
|
@@ -114,6 +115,7 @@ signing_key:
|
|
114
115
|
specification_version: 4
|
115
116
|
summary: Display and search capabilities for Ruby on Rails routes
|
116
117
|
test_files:
|
118
|
+
- spec/config/config_spec.rb
|
117
119
|
- spec/config/initializers/basic_auth_spec.rb
|
118
120
|
- spec/controllers/passages/routes_controller_spec.rb
|
119
121
|
- spec/lib/passages/engine_route_collection_spec.rb
|