activerecord_dynamic_scope 1.1.0 → 1.2.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/.github/workflows/ci.yml +2 -2
- data/CHANGELOG.md +5 -0
- data/gemfiles/rails70.gemfile +4 -0
- data/lib/activerecord_dynamic_scope/version.rb +1 -1
- data/lib/activerecord_dynamic_scope.rb +10 -2
- metadata +2 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 58669ddbcf6468bf56edc3324683ffe9750773e48bc17f1292046dcf4b666b32
|
|
4
|
+
data.tar.gz: 38dfde30cdd440f962bce2e39b5eb7590ae83678ba8494a0947d4061059bbd0c
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 0a02b3153765f18b05fa3a230d692949b40c2b8738bfe72ef313c782658aa16faac3cb6b02056853fe09246dc244d96d2c7a6196585695ad14f40e4944c97ff9
|
|
7
|
+
data.tar.gz: 1b428d850a43542dd84e89e5f6ab5eb2b1ffd7cb0282be329c2ffcb08a57334e9fbe5c96b56c0ec12e71e43118cf289aab94bea8f1932650555b5b1306ecd74d
|
data/.github/workflows/ci.yml
CHANGED
|
@@ -4,7 +4,7 @@ on: [push, pull_request]
|
|
|
4
4
|
|
|
5
5
|
jobs:
|
|
6
6
|
test:
|
|
7
|
-
runs-on: ubuntu-
|
|
7
|
+
runs-on: ubuntu-24.04
|
|
8
8
|
services:
|
|
9
9
|
postgres:
|
|
10
10
|
image: postgres:15
|
|
@@ -48,7 +48,7 @@ jobs:
|
|
|
48
48
|
BUNDLE_GEMFILE: gemfiles/${{ matrix.gemfile }}.gemfile
|
|
49
49
|
|
|
50
50
|
steps:
|
|
51
|
-
- uses: actions/checkout@
|
|
51
|
+
- uses: actions/checkout@v7
|
|
52
52
|
- uses: ruby/setup-ruby@v1
|
|
53
53
|
with:
|
|
54
54
|
ruby-version: ${{ matrix.ruby }}
|
data/CHANGELOG.md
CHANGED
data/gemfiles/rails70.gemfile
CHANGED
|
@@ -22,12 +22,20 @@ module ActiveRecordDynamicScope
|
|
|
22
22
|
Thread.current[KEY] = old
|
|
23
23
|
end
|
|
24
24
|
|
|
25
|
-
def without(keys)
|
|
25
|
+
def without(*keys)
|
|
26
26
|
old = Thread.current[KEY]
|
|
27
|
-
Thread.current[KEY] = Thread.current[KEY].to_h.except(keys)
|
|
27
|
+
Thread.current[KEY] = Thread.current[KEY].to_h.except(*keys.flatten)
|
|
28
28
|
yield
|
|
29
29
|
ensure
|
|
30
30
|
Thread.current[KEY] = old
|
|
31
31
|
end
|
|
32
|
+
|
|
33
|
+
def with!(hash = {})
|
|
34
|
+
Thread.current[KEY] = Thread.current[KEY].to_h.merge(hash)
|
|
35
|
+
end
|
|
36
|
+
|
|
37
|
+
def without!(*keys)
|
|
38
|
+
Thread.current[KEY] = Thread.current[KEY].to_h.except(*keys.flatten)
|
|
39
|
+
end
|
|
32
40
|
end
|
|
33
41
|
end
|
metadata
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: activerecord_dynamic_scope
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 1.
|
|
4
|
+
version: 1.2.0
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Yoshikazu Kaneta
|
|
@@ -107,7 +107,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
|
107
107
|
- !ruby/object:Gem::Version
|
|
108
108
|
version: '0'
|
|
109
109
|
requirements: []
|
|
110
|
-
rubygems_version:
|
|
110
|
+
rubygems_version: 4.0.10
|
|
111
111
|
specification_version: 4
|
|
112
112
|
summary: Handling dynamic scope for ActiveRecord.
|
|
113
113
|
test_files: []
|