attr_filters 0.3.1 → 0.3.2
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/.gitignore +1 -0
- data/.overcommit.yml +9 -0
- data/.rubocop.yml +9 -3
- data/.travis.yml +8 -0
- data/README.md +5 -4
- data/attr_filters.gemspec +1 -0
- data/lib/attr_filters/version.rb +1 -1
- metadata +17 -3
- data/Gemfile.lock +0 -51
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 1d7462f6d9eb45b31f802dd03559d35cb187af65ae95717f70f0688b4f235360
|
|
4
|
+
data.tar.gz: 6fd639cc323eaa80e28b3be710dd5f6c9750e32af89ac8323678a23554360532
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 4d309deacfb33b904f986e3131d0c0b201b75baa3f52af20ed7e1840fb60215ca8d99960dd229dd254996cd48249e4c0d02dc6f78c64b3b6960cf8bafdfc244e
|
|
7
|
+
data.tar.gz: fd84ad1a8c69b7a2efce914e1d408d10f8e55299192f5fe5868c4449e971f93d4329c960d9e611d52025ada54f51c31a3c845a3db65350e7baa7801c77abb95b
|
data/.gitignore
CHANGED
data/.overcommit.yml
ADDED
data/.rubocop.yml
CHANGED
|
@@ -1,17 +1,23 @@
|
|
|
1
|
+
AllCops:
|
|
2
|
+
DisplayCopNames: true
|
|
3
|
+
DisplayStyleGuide: true
|
|
4
|
+
ExtraDetails: false
|
|
5
|
+
Exclude:
|
|
6
|
+
- "bin/**/*"
|
|
1
7
|
Style/StringLiterals:
|
|
2
8
|
EnforcedStyle: double_quotes
|
|
3
9
|
Style/BlockDelimiters:
|
|
4
10
|
Exclude:
|
|
5
11
|
- "spec/**/*"
|
|
12
|
+
Style/Documentation:
|
|
13
|
+
Enabled: false
|
|
6
14
|
|
|
7
15
|
Metrics/LineLength:
|
|
8
16
|
Max: 120
|
|
9
17
|
Metrics/BlockLength:
|
|
10
18
|
Exclude:
|
|
11
19
|
- "spec/**/*"
|
|
20
|
+
- "attr_filters.gemspec"
|
|
12
21
|
|
|
13
22
|
Layout/IndentationConsistency:
|
|
14
23
|
EnforcedStyle: indented_internal_methods
|
|
15
|
-
|
|
16
|
-
Documentation:
|
|
17
|
-
Enabled: false
|
data/.travis.yml
CHANGED
|
@@ -2,17 +2,25 @@
|
|
|
2
2
|
sudo: false
|
|
3
3
|
language: ruby
|
|
4
4
|
cache: bundler
|
|
5
|
+
|
|
5
6
|
gemfile:
|
|
6
7
|
- Gemfile
|
|
7
8
|
- gemfiles/rails_4.2.10.gemfile
|
|
8
9
|
- gemfiles/rails_5.2.1.gemfile
|
|
9
10
|
- gemfiles/rails_6.0.0.gemfile
|
|
11
|
+
|
|
10
12
|
rvm:
|
|
11
13
|
- 2.4
|
|
12
14
|
- 2.5
|
|
13
15
|
- 2.6
|
|
16
|
+
|
|
14
17
|
jobs:
|
|
15
18
|
exclude:
|
|
16
19
|
- rvm: 2.4
|
|
17
20
|
gemfile: gemfiles/rails_6.0.0.gemfile
|
|
21
|
+
|
|
18
22
|
before_install: gem install bundler -v 2.0.1
|
|
23
|
+
|
|
24
|
+
script:
|
|
25
|
+
- bundle exec rspec
|
|
26
|
+
- bundle exec rubocop
|
data/README.md
CHANGED
|
@@ -2,13 +2,14 @@
|
|
|
2
2
|
|
|
3
3
|
[](https://travis-ci.com/Syndicode/attr-filters)
|
|
4
4
|
[](https://badge.fury.io/rb/attr_filters)
|
|
5
|
+
[](https://app.fossa.com/projects/git%2Bgithub.com%2FSyndicode%2Fattr-filters?ref=badge_shield)
|
|
5
6
|
|
|
6
7
|
Light weight gem for filtering PORO (Plain Old Ruby Objects) attributes with zero dependencies.
|
|
7
8
|
|
|
8
9
|
## Description
|
|
9
10
|
|
|
10
11
|
AttrFilters brings simple DSL for adding filters to your PORO attributes.<br>
|
|
11
|
-
|
|
12
|
+
Easy to integrate with Rails validation.
|
|
12
13
|
|
|
13
14
|
## Requirements
|
|
14
15
|
- Ruby >= 2.4
|
|
@@ -45,7 +46,7 @@ class SingupForm
|
|
|
45
46
|
end
|
|
46
47
|
```
|
|
47
48
|
|
|
48
|
-
And call `#filter!` method to apply filters
|
|
49
|
+
And call `#filter!` method to apply filters to attributes values
|
|
49
50
|
|
|
50
51
|
|
|
51
52
|
```ruby
|
|
@@ -125,7 +126,7 @@ To install this gem onto your local machine, run `bundle exec rake install`. To
|
|
|
125
126
|
|
|
126
127
|
## Contributing
|
|
127
128
|
|
|
128
|
-
Bug reports and pull requests are welcome on GitHub at https://github.com/
|
|
129
|
+
Bug reports and pull requests are welcome on GitHub at https://github.com/Syndicode/attr_filters. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the [Contributor Covenant](http://contributor-covenant.org) code of conduct.
|
|
129
130
|
|
|
130
131
|
## License
|
|
131
132
|
|
|
@@ -133,7 +134,7 @@ The gem is available as open source under the terms of the [MIT License](https:/
|
|
|
133
134
|
|
|
134
135
|
## Code of Conduct
|
|
135
136
|
|
|
136
|
-
Everyone interacting in the AttrFilters project’s codebases, issue trackers, chat rooms and mailing lists is expected to follow the [code of conduct](https://github.com/
|
|
137
|
+
Everyone interacting in the AttrFilters project’s codebases, issue trackers, chat rooms and mailing lists is expected to follow the [code of conduct](https://github.com/Syndicode/attr_filters/blob/master/CODE_OF_CONDUCT.md).
|
|
137
138
|
|
|
138
139
|
## Authors
|
|
139
140
|
|
data/attr_filters.gemspec
CHANGED
|
@@ -34,6 +34,7 @@ Gem::Specification.new do |spec|
|
|
|
34
34
|
spec.require_paths = ["lib"]
|
|
35
35
|
|
|
36
36
|
spec.add_development_dependency "bundler", "~> 2.0"
|
|
37
|
+
spec.add_development_dependency "overcommit", "~> 0.51.0"
|
|
37
38
|
spec.add_development_dependency "rake", "~> 10.0"
|
|
38
39
|
spec.add_development_dependency "rspec", "~> 3.0"
|
|
39
40
|
spec.add_development_dependency "rubocop", "~> 0.75.0"
|
data/lib/attr_filters/version.rb
CHANGED
metadata
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: attr_filters
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.3.
|
|
4
|
+
version: 0.3.2
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Anton Holovko
|
|
@@ -9,7 +9,7 @@ authors:
|
|
|
9
9
|
autorequire:
|
|
10
10
|
bindir: exe
|
|
11
11
|
cert_chain: []
|
|
12
|
-
date: 2019-10-
|
|
12
|
+
date: 2019-10-28 00:00:00.000000000 Z
|
|
13
13
|
dependencies:
|
|
14
14
|
- !ruby/object:Gem::Dependency
|
|
15
15
|
name: bundler
|
|
@@ -25,6 +25,20 @@ dependencies:
|
|
|
25
25
|
- - "~>"
|
|
26
26
|
- !ruby/object:Gem::Version
|
|
27
27
|
version: '2.0'
|
|
28
|
+
- !ruby/object:Gem::Dependency
|
|
29
|
+
name: overcommit
|
|
30
|
+
requirement: !ruby/object:Gem::Requirement
|
|
31
|
+
requirements:
|
|
32
|
+
- - "~>"
|
|
33
|
+
- !ruby/object:Gem::Version
|
|
34
|
+
version: 0.51.0
|
|
35
|
+
type: :development
|
|
36
|
+
prerelease: false
|
|
37
|
+
version_requirements: !ruby/object:Gem::Requirement
|
|
38
|
+
requirements:
|
|
39
|
+
- - "~>"
|
|
40
|
+
- !ruby/object:Gem::Version
|
|
41
|
+
version: 0.51.0
|
|
28
42
|
- !ruby/object:Gem::Dependency
|
|
29
43
|
name: rake
|
|
30
44
|
requirement: !ruby/object:Gem::Requirement
|
|
@@ -77,12 +91,12 @@ extensions: []
|
|
|
77
91
|
extra_rdoc_files: []
|
|
78
92
|
files:
|
|
79
93
|
- ".gitignore"
|
|
94
|
+
- ".overcommit.yml"
|
|
80
95
|
- ".rspec"
|
|
81
96
|
- ".rubocop.yml"
|
|
82
97
|
- ".travis.yml"
|
|
83
98
|
- CODE_OF_CONDUCT.md
|
|
84
99
|
- Gemfile
|
|
85
|
-
- Gemfile.lock
|
|
86
100
|
- LICENSE.txt
|
|
87
101
|
- README.md
|
|
88
102
|
- Rakefile
|
data/Gemfile.lock
DELETED
|
@@ -1,51 +0,0 @@
|
|
|
1
|
-
PATH
|
|
2
|
-
remote: .
|
|
3
|
-
specs:
|
|
4
|
-
attr_filters (0.3.0)
|
|
5
|
-
|
|
6
|
-
GEM
|
|
7
|
-
remote: https://rubygems.org/
|
|
8
|
-
specs:
|
|
9
|
-
ast (2.4.0)
|
|
10
|
-
diff-lcs (1.3)
|
|
11
|
-
jaro_winkler (1.5.3)
|
|
12
|
-
parallel (1.18.0)
|
|
13
|
-
parser (2.6.5.0)
|
|
14
|
-
ast (~> 2.4.0)
|
|
15
|
-
rainbow (3.0.0)
|
|
16
|
-
rake (10.5.0)
|
|
17
|
-
rspec (3.9.0)
|
|
18
|
-
rspec-core (~> 3.9.0)
|
|
19
|
-
rspec-expectations (~> 3.9.0)
|
|
20
|
-
rspec-mocks (~> 3.9.0)
|
|
21
|
-
rspec-core (3.9.0)
|
|
22
|
-
rspec-support (~> 3.9.0)
|
|
23
|
-
rspec-expectations (3.9.0)
|
|
24
|
-
diff-lcs (>= 1.2.0, < 2.0)
|
|
25
|
-
rspec-support (~> 3.9.0)
|
|
26
|
-
rspec-mocks (3.9.0)
|
|
27
|
-
diff-lcs (>= 1.2.0, < 2.0)
|
|
28
|
-
rspec-support (~> 3.9.0)
|
|
29
|
-
rspec-support (3.9.0)
|
|
30
|
-
rubocop (0.75.1)
|
|
31
|
-
jaro_winkler (~> 1.5.1)
|
|
32
|
-
parallel (~> 1.10)
|
|
33
|
-
parser (>= 2.6)
|
|
34
|
-
rainbow (>= 2.2.2, < 4.0)
|
|
35
|
-
ruby-progressbar (~> 1.7)
|
|
36
|
-
unicode-display_width (>= 1.4.0, < 1.7)
|
|
37
|
-
ruby-progressbar (1.10.1)
|
|
38
|
-
unicode-display_width (1.6.0)
|
|
39
|
-
|
|
40
|
-
PLATFORMS
|
|
41
|
-
ruby
|
|
42
|
-
|
|
43
|
-
DEPENDENCIES
|
|
44
|
-
attr_filters!
|
|
45
|
-
bundler (~> 2.0)
|
|
46
|
-
rake (~> 10.0)
|
|
47
|
-
rspec (~> 3.0)
|
|
48
|
-
rubocop (~> 0.75.0)
|
|
49
|
-
|
|
50
|
-
BUNDLED WITH
|
|
51
|
-
2.0.1
|