katalyst-basic-auth 0.5.0 → 1.0.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/lib/katalyst/basic/auth/config.rb +8 -8
- data/lib/katalyst-basic-auth.rb +3 -0
- metadata +6 -22
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 6986b0c9b3f2e9731aaead2c1b74db0008be2ab82ee91e377b772caad2a9397d
|
4
|
+
data.tar.gz: 87daff02ae81a92bcb90d3d24be50e7109e70fcf865521fc5edb8bcf861dfde5
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 7936209ed48a5403081c7a89f5842af9fd9bb5828cb15a6c82a57fa0a8ae2708aa25dd797acbd6b92bd675174853365fd2b8a01fc30d2de356235d151b5f7ad5
|
7
|
+
data.tar.gz: 1371ef21dd3f0a059d929e2e4e095567873b440002a449fd2e35a622cc85753e9679dd368ea432d8595465db03c4cc3ebc238215af64d6849d2f0a1a46d3e915
|
@@ -19,8 +19,8 @@ module Katalyst
|
|
19
19
|
def for_path(path)
|
20
20
|
path ||= ROOT_PATH
|
21
21
|
all.sort_by(&:path)
|
22
|
-
|
23
|
-
|
22
|
+
.reverse
|
23
|
+
.detect { |i| path.match(/^#{i.path}/) } || global
|
24
24
|
end
|
25
25
|
|
26
26
|
# @return [Config] The global configuration
|
@@ -39,7 +39,7 @@ module Katalyst
|
|
39
39
|
username: username,
|
40
40
|
password: password,
|
41
41
|
enabled: enabled,
|
42
|
-
ip_allowlist: ip_allowlist
|
42
|
+
ip_allowlist: ip_allowlist,
|
43
43
|
)
|
44
44
|
all.delete(all.detect { |i| i.path == config.path })
|
45
45
|
all << config
|
@@ -58,8 +58,8 @@ module Katalyst
|
|
58
58
|
@all = [new, up]
|
59
59
|
end
|
60
60
|
|
61
|
-
def each(&
|
62
|
-
all.each(&
|
61
|
+
def each(&)
|
62
|
+
all.each(&)
|
63
63
|
end
|
64
64
|
|
65
65
|
def description
|
@@ -79,7 +79,7 @@ module Katalyst
|
|
79
79
|
def enabled_rails_env?
|
80
80
|
return false unless rails?
|
81
81
|
|
82
|
-
|
82
|
+
%w[staging uat].include?(Rails.env)
|
83
83
|
end
|
84
84
|
|
85
85
|
def rails?
|
@@ -107,7 +107,7 @@ module Katalyst
|
|
107
107
|
if rails? && Rails.application.respond_to?(:secret_key_base)
|
108
108
|
Rails.application.secret_key_base
|
109
109
|
else
|
110
|
-
ENV
|
110
|
+
ENV.fetch("SECRET_KEY_BASE", nil)
|
111
111
|
end
|
112
112
|
end
|
113
113
|
|
@@ -136,7 +136,7 @@ module Katalyst
|
|
136
136
|
|
137
137
|
def description
|
138
138
|
output = []
|
139
|
-
output << "path: #{root_path? ?
|
139
|
+
output << "path: #{root_path? ? '(global)' : path}"
|
140
140
|
output << "enabled: #{enabled?}"
|
141
141
|
output << "username: #{username}"
|
142
142
|
output << "password: #{password}"
|
metadata
CHANGED
@@ -1,29 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: katalyst-basic-auth
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 1.0.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Katalyst Interactive
|
8
|
-
autorequire:
|
9
8
|
bindir: bin
|
10
9
|
cert_chain: []
|
11
|
-
date:
|
12
|
-
dependencies:
|
13
|
-
- !ruby/object:Gem::Dependency
|
14
|
-
name: rack
|
15
|
-
requirement: !ruby/object:Gem::Requirement
|
16
|
-
requirements:
|
17
|
-
- - ">="
|
18
|
-
- !ruby/object:Gem::Version
|
19
|
-
version: '0'
|
20
|
-
type: :runtime
|
21
|
-
prerelease: false
|
22
|
-
version_requirements: !ruby/object:Gem::Requirement
|
23
|
-
requirements:
|
24
|
-
- - ">="
|
25
|
-
- !ruby/object:Gem::Version
|
26
|
-
version: '0'
|
10
|
+
date: 1980-01-02 00:00:00.000000000 Z
|
11
|
+
dependencies: []
|
27
12
|
description: Makes it easy to add basic auth on staging and development apps.
|
28
13
|
email:
|
29
14
|
- developers@katalyst.com.au
|
@@ -34,6 +19,7 @@ files:
|
|
34
19
|
- CHANGELOG.md
|
35
20
|
- LICENSE.txt
|
36
21
|
- README.md
|
22
|
+
- lib/katalyst-basic-auth.rb
|
37
23
|
- lib/katalyst/basic/auth.rb
|
38
24
|
- lib/katalyst/basic/auth/config.rb
|
39
25
|
- lib/katalyst/basic/auth/middleware.rb
|
@@ -48,7 +34,6 @@ metadata:
|
|
48
34
|
homepage_uri: https://github.com/katalyst/katalyst-basic-auth
|
49
35
|
source_code_uri: https://github.com/katalyst/basic-auth
|
50
36
|
changelog_uri: https://github.com/katalyst/basic-auth/blob/main/CHANGELOG.md
|
51
|
-
post_install_message:
|
52
37
|
rdoc_options: []
|
53
38
|
require_paths:
|
54
39
|
- lib
|
@@ -56,15 +41,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
56
41
|
requirements:
|
57
42
|
- - ">="
|
58
43
|
- !ruby/object:Gem::Version
|
59
|
-
version:
|
44
|
+
version: '3.3'
|
60
45
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
61
46
|
requirements:
|
62
47
|
- - ">="
|
63
48
|
- !ruby/object:Gem::Version
|
64
49
|
version: '0'
|
65
50
|
requirements: []
|
66
|
-
rubygems_version: 3.
|
67
|
-
signing_key:
|
51
|
+
rubygems_version: 3.6.9
|
68
52
|
specification_version: 4
|
69
53
|
summary: Gem to add basic auth on staging websites
|
70
54
|
test_files: []
|