action_ip_filter 0.4.0 → 0.4.1
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/CHANGELOG.md +6 -0
- data/lib/action_ip_filter/ip_filterable.rb +3 -3
- data/lib/action_ip_filter/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 3ab37d67a38831a742018eff90badafe4bd649e39a4947607d771fec81cc1240
|
|
4
|
+
data.tar.gz: 0261b32eb41b2fcfcc5fae68a05f620a0396ebc100f190c5cf3d8f85fb7fd646
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 7e311296f966af5e21a750be237775288405f80f4e556a52805c13966edece9cdde41d8e6a3a10e4c2d5aa8fc48b88c1671f0b87694975ff8cc6409697da6676
|
|
7
|
+
data.tar.gz: 38982121736b2a629323f0ee517f02154da973d7b7c051d191ab5705e4eb86593f662eb4676a3e979a35f3680655974063a2d013d3a4d7d5955f8365aa5db748
|
data/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,11 @@
|
|
|
1
1
|
## [Unreleased]
|
|
2
2
|
|
|
3
|
+
## [0.4.1] - 2025-12-01
|
|
4
|
+
|
|
5
|
+
### Bug Fix
|
|
6
|
+
|
|
7
|
+
- Fix to allow an `Array[String]` to be used as the list of allowed IP addresses [#7](https://github.com/smartbank-inc/action_ip_filter/pull/7)
|
|
8
|
+
|
|
3
9
|
## [0.4.0] - 2025-12-01
|
|
4
10
|
|
|
5
11
|
### Breaking Changes
|
|
@@ -12,7 +12,7 @@ module ActionIpFilter
|
|
|
12
12
|
# def before_action: (*untyped, **untyped) -> void
|
|
13
13
|
|
|
14
14
|
class_methods do
|
|
15
|
-
# @rbs allowed_ips: String | ^() -> Array[String]
|
|
15
|
+
# @rbs allowed_ips: String | Array[String] | ^() -> Array[String]
|
|
16
16
|
# @rbs on_denied: (^() -> void)?
|
|
17
17
|
# @rbs only: Array[Symbol]?
|
|
18
18
|
# @rbs except: Array[Symbol]?
|
|
@@ -24,7 +24,7 @@ module ActionIpFilter
|
|
|
24
24
|
|
|
25
25
|
private
|
|
26
26
|
|
|
27
|
-
# @rbs allowed_ips: Array[String | ^() -> Array[String]]
|
|
27
|
+
# @rbs allowed_ips: Array[String | Array[String] | ^() -> Array[String]]
|
|
28
28
|
# @rbs on_denied: (^() -> void)?
|
|
29
29
|
# @rbs return: void
|
|
30
30
|
def verify_ip_access(allowed_ips:, on_denied:)
|
|
@@ -38,7 +38,7 @@ module ActionIpFilter
|
|
|
38
38
|
instance_exec(&allowed_ip)
|
|
39
39
|
else
|
|
40
40
|
[allowed_ip]
|
|
41
|
-
end
|
|
41
|
+
end.flatten
|
|
42
42
|
|
|
43
43
|
IpMatcher.allowed?(client_ip, ips)
|
|
44
44
|
end
|