pluck_all 2.3.2 → 2.3.3
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/ruby.yml +18 -3
- data/README.md +1 -1
- data/gemfiles/{mongoid_70.gemfile → mongoid_73.gemfile} +1 -1
- data/lib/pluck_all/models/mongoid_extension.rb +25 -7
- data/lib/pluck_all/version.rb +1 -1
- metadata +3 -3
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 55464889dce014da2aee195d7351c56f8f44e542fe699f3b0a28bcfba066c00d
|
|
4
|
+
data.tar.gz: 711b8a9978198ead995bb24b1fa871f020ea703f5d1d1656e4aa6e5de25437a9
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: c1ccc08b4ebec79fbfb8627fcfe5310bd07330a2bbff600e31a285009ad72f496c81c34df5b6cba235da705ecb7f393ed39ae4daed8f110c0175ef45e933ffab
|
|
7
|
+
data.tar.gz: dd8fcb450688f6ee31ff7a9c53dfd4a1d79cb4fabaf50e36a02afea96d58234a922f77c14128563842a84e1620ced8926a1f83d366a9e1da9e5b90ddddf61dae
|
data/.github/workflows/ruby.yml
CHANGED
|
@@ -26,6 +26,7 @@ jobs:
|
|
|
26
26
|
- 2.2
|
|
27
27
|
- 2.6
|
|
28
28
|
- 2.7
|
|
29
|
+
- 3.0
|
|
29
30
|
gemfile:
|
|
30
31
|
- active_record_32.gemfile
|
|
31
32
|
- active_record_42.gemfile
|
|
@@ -36,22 +37,32 @@ jobs:
|
|
|
36
37
|
- active_record_61.gemfile
|
|
37
38
|
- mongoid_54.gemfile
|
|
38
39
|
- mongoid_64.gemfile
|
|
39
|
-
-
|
|
40
|
+
- mongoid_73.gemfile
|
|
40
41
|
exclude:
|
|
41
42
|
- gemfile: active_record_32.gemfile
|
|
42
43
|
ruby: 2.6
|
|
43
44
|
- gemfile: active_record_32.gemfile
|
|
44
45
|
ruby: 2.7
|
|
46
|
+
- gemfile: active_record_32.gemfile
|
|
47
|
+
ruby: 3.0
|
|
45
48
|
- gemfile: active_record_32.gemfile
|
|
46
49
|
orm: MONGOID
|
|
47
50
|
- gemfile: active_record_42.gemfile
|
|
48
51
|
ruby: 2.7
|
|
52
|
+
- gemfile: active_record_42.gemfile
|
|
53
|
+
ruby: 3.0
|
|
49
54
|
- gemfile: active_record_42.gemfile
|
|
50
55
|
orm: MONGOID
|
|
56
|
+
- gemfile: active_record_50.gemfile
|
|
57
|
+
ruby: 3.0
|
|
51
58
|
- gemfile: active_record_50.gemfile
|
|
52
59
|
orm: MONGOID
|
|
60
|
+
- gemfile: active_record_51.gemfile
|
|
61
|
+
ruby: 3.0
|
|
53
62
|
- gemfile: active_record_51.gemfile
|
|
54
63
|
orm: MONGOID
|
|
64
|
+
- gemfile: active_record_52.gemfile
|
|
65
|
+
ruby: 3.0
|
|
55
66
|
- gemfile: active_record_52.gemfile
|
|
56
67
|
orm: MONGOID
|
|
57
68
|
- gemfile: active_record_60.gemfile
|
|
@@ -64,11 +75,15 @@ jobs:
|
|
|
64
75
|
orm: MONGOID
|
|
65
76
|
- gemfile: mongoid_54.gemfile
|
|
66
77
|
ruby: 2.7
|
|
78
|
+
- gemfile: mongoid_54.gemfile
|
|
79
|
+
ruby: 3.0
|
|
80
|
+
- gemfile: mongoid_73.gemfile
|
|
81
|
+
ruby: 2.2
|
|
67
82
|
- gemfile: mongoid_54.gemfile
|
|
68
83
|
orm: ACTIVE_RECORD
|
|
69
84
|
- gemfile: mongoid_64.gemfile
|
|
70
85
|
orm: ACTIVE_RECORD
|
|
71
|
-
- gemfile:
|
|
86
|
+
- gemfile: mongoid_73.gemfile
|
|
72
87
|
orm: ACTIVE_RECORD
|
|
73
88
|
env:
|
|
74
89
|
BUNDLE_GEMFILE: "gemfiles/${{ matrix.gemfile }}"
|
|
@@ -76,7 +91,7 @@ jobs:
|
|
|
76
91
|
|
|
77
92
|
services:
|
|
78
93
|
mongodb:
|
|
79
|
-
image: mongo:3.
|
|
94
|
+
image: mongo:3.6.23
|
|
80
95
|
ports:
|
|
81
96
|
- 27017:27017
|
|
82
97
|
|
data/README.md
CHANGED
|
@@ -15,7 +15,7 @@ If you have a Rails 3 project, and want to pluck not only one column,
|
|
|
15
15
|
feel free to use this gem and no need to worry about upgrading to Rails 4, 5, 6 in the future will break this.
|
|
16
16
|
|
|
17
17
|
## Supports
|
|
18
|
-
- Ruby 2.2 ~ 2.7
|
|
18
|
+
- Ruby 2.2 ~ 2.7, 3.0
|
|
19
19
|
- Rails 3.2, 4.2, 5.0, 5.1, 5.2, 6.0, 6.1
|
|
20
20
|
|
|
21
21
|
## Installation
|
|
@@ -1,21 +1,39 @@
|
|
|
1
1
|
# frozen_string_literal: true
|
|
2
2
|
module Mongoid
|
|
3
3
|
module Document::ClassMethods
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
4
|
+
if defined?(Mongoid::Errors::CriteriaArgumentRequired)
|
|
5
|
+
def pluck_array(*fields)
|
|
6
|
+
where.pluck_array(*fields)
|
|
7
|
+
end
|
|
8
|
+
|
|
9
|
+
def pluck_all(*fields)
|
|
10
|
+
where.pluck_all(*fields)
|
|
11
|
+
end
|
|
12
|
+
else
|
|
13
|
+
def pluck_array(*fields)
|
|
14
|
+
where(nil).pluck_array(*fields)
|
|
15
|
+
end
|
|
7
16
|
|
|
8
|
-
|
|
9
|
-
|
|
17
|
+
def pluck_all(*fields)
|
|
18
|
+
where(nil).pluck_all(*fields)
|
|
19
|
+
end
|
|
10
20
|
end
|
|
11
21
|
end
|
|
12
22
|
|
|
13
23
|
module Findable
|
|
14
|
-
|
|
24
|
+
if singleton_class < Forwardable
|
|
25
|
+
def_delegators :with_default_scope, :pluck_all, :pluck_array
|
|
26
|
+
else
|
|
27
|
+
delegate :pluck_all, :pluck_array, to: :with_default_scope
|
|
28
|
+
end
|
|
15
29
|
end
|
|
16
30
|
|
|
17
31
|
module Contextual
|
|
18
|
-
|
|
32
|
+
if singleton_class < Forwardable
|
|
33
|
+
def_delegators :context, :pluck_all, :pluck_array
|
|
34
|
+
else
|
|
35
|
+
delegate :pluck_all, :pluck_array, to: :context
|
|
36
|
+
end
|
|
19
37
|
|
|
20
38
|
class None
|
|
21
39
|
def pluck_array(*)
|
data/lib/pluck_all/version.rb
CHANGED
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: pluck_all
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 2.3.
|
|
4
|
+
version: 2.3.3
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- khiav reoy
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: exe
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date:
|
|
11
|
+
date: 2022-01-12 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: activesupport
|
|
@@ -115,7 +115,7 @@ files:
|
|
|
115
115
|
- gemfiles/active_record_61.gemfile
|
|
116
116
|
- gemfiles/mongoid_54.gemfile
|
|
117
117
|
- gemfiles/mongoid_64.gemfile
|
|
118
|
-
- gemfiles/
|
|
118
|
+
- gemfiles/mongoid_73.gemfile
|
|
119
119
|
- lib/pluck_all.rb
|
|
120
120
|
- lib/pluck_all/hooks.rb
|
|
121
121
|
- lib/pluck_all/models/active_record_extension.rb
|