filta 1.1.2 → 2.0.2

Sign up to get free protection for your applications and to get access to all the features.
Files changed (4) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +10 -9
  3. data/VERSION +1 -1
  4. metadata +12 -137
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 23d769fd7cd1a92c3f7fcaecf96f0dedc2b3b17c7e0a8e4f6d37d3b6aa20b789
4
- data.tar.gz: 7ac412d1477c09c4b4bbb108aedc914e84e91add14588196170085795d157450
3
+ metadata.gz: 7dd66a489286b10de86e4f1731bf2989624aa0a6634a8ec232183c95bfaf00d1
4
+ data.tar.gz: 3fc15087fd2ceb86c9eab1db18de8dbbccd33b13a12f390ebfb6962404351515
5
5
  SHA512:
6
- metadata.gz: b325fc443a3ae4e54762b1df20cae8f8460330dba0380039032bfb932205b90165fe93ba9cc5331855f478f2d21892a99d1b7266247894b5d28a7853570a2239
7
- data.tar.gz: 5a47d86aad98e5d88582312f7a893a624fa0d0a4c9e11a178238eddf2035cdc36a45a7d730b78c2a68286c01507b178f4dd513c434a8a236d937914519b33568
6
+ metadata.gz: 432b721cfc5a21b10927436dbfa0b539e1ce65a22c3d513f0c6ae0e2217495918dac825b573aa5d421e6d344bb943817cfc313cb8b4450f2dfff85af2acb2ae6
7
+ data.tar.gz: 4934f026cb28dbcc579d92f3212398ee3e3803c3a85c5e0f0de8e666856fab31fc8d70f494c397835368686c5a95a4b4ced0bbf55c045daaa9378889af90576b
data/README.md CHANGED
@@ -3,7 +3,11 @@
3
3
  Super simple filtering for ActiveRecord, inspired by [Justin Weiss' Gist](https://gist.github.com/justinweiss/9065666).
4
4
 
5
5
  [![Gem Version](https://badge.fury.io/rb/filta.svg)](https://badge.fury.io/rb/filta)
6
- [![CircleCI](https://circleci.com/gh/boxt/filta/tree/master.svg?style=svg)](https://circleci.com/gh/boxt/filta/tree/master)
6
+ [![CI](https://github.com/boxt/filta/actions/workflows/ci.yml/badge.svg)](https://github.com/boxt/filta/actions/workflows/ci.yml)
7
+ ## Requirements
8
+
9
+ * Ruby >= 2.7
10
+ * Rails >= 6, < 8
7
11
 
8
12
  ## Installation
9
13
 
@@ -30,20 +34,17 @@ $ gem install filta
30
34
  Use like you would any other kind of ActiveRecord scope.
31
35
 
32
36
  ```ruby
33
- @filtered = Klass.filta({ title: "Foo", something: "Bar" })
37
+ @filtered = Klass.filta(title: "Foo", something: "Bar")
38
+ @filtered = Klass.filta({ title: "Foo", something: "Bar" }) # Can also use with hash
34
39
  ```
35
40
 
36
- The `filter` method returns an ActiveRecord relation so you can chain the calls with other methods.
41
+ The `filta` method returns an ActiveRecord relation so you can chain the calls with other methods.
37
42
 
38
43
  ```ruby
39
- Klass.filta({ title: "Foo" }).order("created_at DESC")
44
+ Klass.filta(title: "Foo").order("created_at DESC")
40
45
  ```
41
46
 
42
- If using in a controller make sure you use the `params.permit` method to sanitise what you pass into the `filter` method.
43
-
44
- ## Notes
45
-
46
- The original `.filter` method is deprecated to avoid any confusion
47
+ If using in a controller make sure you use the `params.permit` method to sanitize what you pass into the `filta` method.
47
48
 
48
49
  ## Contributing
49
50
 
data/VERSION CHANGED
@@ -1 +1 @@
1
- 1.1.2
1
+ 2.0.2
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: filta
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.1.2
4
+ version: 2.0.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Boxt Developers
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2020-10-23 00:00:00.000000000 Z
11
+ date: 2022-04-14 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails
@@ -16,146 +16,20 @@ dependencies:
16
16
  requirements:
17
17
  - - ">="
18
18
  - !ruby/object:Gem::Version
19
- version: '5.2'
20
- - - "~>"
19
+ version: '6'
20
+ - - "<"
21
21
  - !ruby/object:Gem::Version
22
- version: '6.0'
22
+ version: '8'
23
23
  type: :runtime
24
24
  prerelease: false
25
25
  version_requirements: !ruby/object:Gem::Requirement
26
26
  requirements:
27
27
  - - ">="
28
28
  - !ruby/object:Gem::Version
29
- version: '5.2'
30
- - - "~>"
29
+ version: '6'
30
+ - - "<"
31
31
  - !ruby/object:Gem::Version
32
- version: '6.0'
33
- - !ruby/object:Gem::Dependency
34
- name: boxt_ruby_style_guide
35
- requirement: !ruby/object:Gem::Requirement
36
- requirements:
37
- - - '='
38
- - !ruby/object:Gem::Version
39
- version: 7.2.0
40
- type: :development
41
- prerelease: false
42
- version_requirements: !ruby/object:Gem::Requirement
43
- requirements:
44
- - - '='
45
- - !ruby/object:Gem::Version
46
- version: 7.2.0
47
- - !ruby/object:Gem::Dependency
48
- name: bundler
49
- requirement: !ruby/object:Gem::Requirement
50
- requirements:
51
- - - "~>"
52
- - !ruby/object:Gem::Version
53
- version: '2.1'
54
- type: :development
55
- prerelease: false
56
- version_requirements: !ruby/object:Gem::Requirement
57
- requirements:
58
- - - "~>"
59
- - !ruby/object:Gem::Version
60
- version: '2.1'
61
- - !ruby/object:Gem::Dependency
62
- name: rake
63
- requirement: !ruby/object:Gem::Requirement
64
- requirements:
65
- - - "~>"
66
- - !ruby/object:Gem::Version
67
- version: '13.0'
68
- type: :development
69
- prerelease: false
70
- version_requirements: !ruby/object:Gem::Requirement
71
- requirements:
72
- - - "~>"
73
- - !ruby/object:Gem::Version
74
- version: '13.0'
75
- - !ruby/object:Gem::Dependency
76
- name: rspec
77
- requirement: !ruby/object:Gem::Requirement
78
- requirements:
79
- - - "~>"
80
- - !ruby/object:Gem::Version
81
- version: '3.9'
82
- type: :development
83
- prerelease: false
84
- version_requirements: !ruby/object:Gem::Requirement
85
- requirements:
86
- - - "~>"
87
- - !ruby/object:Gem::Version
88
- version: '3.9'
89
- - !ruby/object:Gem::Dependency
90
- name: rspec-nc
91
- requirement: !ruby/object:Gem::Requirement
92
- requirements:
93
- - - "~>"
94
- - !ruby/object:Gem::Version
95
- version: '0.3'
96
- type: :development
97
- prerelease: false
98
- version_requirements: !ruby/object:Gem::Requirement
99
- requirements:
100
- - - "~>"
101
- - !ruby/object:Gem::Version
102
- version: '0.3'
103
- - !ruby/object:Gem::Dependency
104
- name: rspec-rails
105
- requirement: !ruby/object:Gem::Requirement
106
- requirements:
107
- - - "~>"
108
- - !ruby/object:Gem::Version
109
- version: '4.0'
110
- type: :development
111
- prerelease: false
112
- version_requirements: !ruby/object:Gem::Requirement
113
- requirements:
114
- - - "~>"
115
- - !ruby/object:Gem::Version
116
- version: '4.0'
117
- - !ruby/object:Gem::Dependency
118
- name: simplecov
119
- requirement: !ruby/object:Gem::Requirement
120
- requirements:
121
- - - "~>"
122
- - !ruby/object:Gem::Version
123
- version: '0.18'
124
- type: :development
125
- prerelease: false
126
- version_requirements: !ruby/object:Gem::Requirement
127
- requirements:
128
- - - "~>"
129
- - !ruby/object:Gem::Version
130
- version: '0.18'
131
- - !ruby/object:Gem::Dependency
132
- name: sqlite3
133
- requirement: !ruby/object:Gem::Requirement
134
- requirements:
135
- - - "~>"
136
- - !ruby/object:Gem::Version
137
- version: '1.3'
138
- type: :development
139
- prerelease: false
140
- version_requirements: !ruby/object:Gem::Requirement
141
- requirements:
142
- - - "~>"
143
- - !ruby/object:Gem::Version
144
- version: '1.3'
145
- - !ruby/object:Gem::Dependency
146
- name: with_model
147
- requirement: !ruby/object:Gem::Requirement
148
- requirements:
149
- - - "~>"
150
- - !ruby/object:Gem::Version
151
- version: '2.0'
152
- type: :development
153
- prerelease: false
154
- version_requirements: !ruby/object:Gem::Requirement
155
- requirements:
156
- - - "~>"
157
- - !ruby/object:Gem::Version
158
- version: '2.0'
32
+ version: '8'
159
33
  description: Simple filtering for ActiveRecord, inspired by Justin Weiss 'Gist - https://gist.github.com/justinweiss/9065666
160
34
  email:
161
35
  - developers@boxt.co.uk
@@ -174,7 +48,8 @@ files:
174
48
  homepage: https://github.com/boxt/filta
175
49
  licenses:
176
50
  - MIT
177
- metadata: {}
51
+ metadata:
52
+ rubygems_mfa_required: 'true'
178
53
  post_install_message:
179
54
  rdoc_options: []
180
55
  require_paths:
@@ -183,14 +58,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
183
58
  requirements:
184
59
  - - ">="
185
60
  - !ruby/object:Gem::Version
186
- version: '2.5'
61
+ version: '2.7'
187
62
  required_rubygems_version: !ruby/object:Gem::Requirement
188
63
  requirements:
189
64
  - - ">="
190
65
  - !ruby/object:Gem::Version
191
66
  version: '0'
192
67
  requirements: []
193
- rubygems_version: 3.1.4
68
+ rubygems_version: 3.3.10
194
69
  signing_key:
195
70
  specification_version: 4
196
71
  summary: Simple filtering for ActiveRecord