jsonapi-resources-filterer 0.1.1 → 0.2.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.ruby-version +1 -0
- data/.travis.yml +3 -1
- data/CHANGELOG.md +15 -3
- data/LICENSE.txt +1 -1
- data/README.md +3 -1
- data/jsonapi-resources-filterer.gemspec +2 -3
- data/lib/jsonapi/resources/filterer.rb +1 -1
- data/lib/jsonapi/resources/filterer/version.rb +1 -1
- metadata +9 -22
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 1e8d5381f3dc279279a24d7c0273972965957c6c
|
4
|
+
data.tar.gz: 4b54a82512d09f3efd7de6e66898d773cb53f6af
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 37bb8010075da6fccd8d6bc6ffb4e24bd7672cad71ce57ee8537ef0a507913b3167e112a52f4a42bfdc0654c5791ac12626fed6b4c8794778d60f760be48aa3d
|
7
|
+
data.tar.gz: 7128f0fc7e5a07eee6c78534d59bc7faa084f1bbe4e85eb97f22ce14fd03016ab597afe35cb45cc2b588450c05b503ff172ef72089d3ed9ed728f48cc70de070
|
data/.ruby-version
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
ruby-2.3.1
|
data/.travis.yml
CHANGED
data/CHANGELOG.md
CHANGED
@@ -1,7 +1,19 @@
|
|
1
|
-
#
|
1
|
+
# Change Log
|
2
|
+
All notable changes to this project will be documented in this file.
|
2
3
|
|
3
|
-
|
4
|
+
The format is based on [Keep a Changelog](http://keepachangelog.com/)
|
5
|
+
and this project adheres to [Semantic Versioning](http://semver.org/).
|
6
|
+
|
7
|
+
## [0.2.0] - 2017-02-28
|
8
|
+
### Changed
|
9
|
+
- Use latest versions of jsonapi-resources and filterer
|
10
|
+
- jsonapi-resources 0.9.0
|
11
|
+
- filterer ~> 2.0
|
4
12
|
|
5
|
-
|
13
|
+
## [0.1.1]
|
14
|
+
### Fixed
|
15
|
+
- Define JSONAPI::Resources::Filterer::ClassMethods#apply_filter to use `filterer`
|
6
16
|
|
17
|
+
## [0.1.0]
|
18
|
+
### Added
|
7
19
|
- Initial release
|
data/LICENSE.txt
CHANGED
data/README.md
CHANGED
@@ -1,5 +1,7 @@
|
|
1
1
|
# JSONAPI::Resources::Filterer
|
2
2
|
|
3
|
+
[![Build Status](https://travis-ci.org/G5/jsonapi-resources-filterer.svg?branch=master)](https://travis-ci.org/G5/jsonapi-resources-filterer)
|
4
|
+
|
3
5
|
This gem integrates [filterer gem](https://github.com/dobtco/filterer) to [jsonapi-resources gem](https://github.com/cerebris/jsonapi-resources).
|
4
6
|
|
5
7
|
## Installation
|
@@ -88,7 +90,7 @@ To install this gem onto your local machine, run `bundle exec rake install`. To
|
|
88
90
|
|
89
91
|
## MIT License
|
90
92
|
|
91
|
-
Copyright
|
93
|
+
Copyright 2017 G5
|
92
94
|
|
93
95
|
Permission is hereby granted, free of charge, to any person obtaining
|
94
96
|
a copy of this software and associated documentation files (the
|
@@ -27,10 +27,9 @@ Gem::Specification.new do |spec|
|
|
27
27
|
spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
|
28
28
|
spec.require_paths = ["lib"]
|
29
29
|
|
30
|
-
spec.add_dependency "jsonapi-resources"
|
31
|
-
spec.add_dependency "filterer"
|
30
|
+
spec.add_dependency "jsonapi-resources", ">= 0.9.0"
|
31
|
+
spec.add_dependency "filterer", "~> 2.0"
|
32
32
|
|
33
|
-
spec.add_development_dependency "bundler", "~> 1.9"
|
34
33
|
spec.add_development_dependency "rake", "~> 10.0"
|
35
34
|
spec.add_development_dependency "activerecord", ">= 3.0"
|
36
35
|
spec.add_development_dependency "sqlite3"
|
@@ -36,7 +36,7 @@ module JSONAPI
|
|
36
36
|
|
37
37
|
def apply_filter(records, filter, value, _options = {})
|
38
38
|
if self._filterer
|
39
|
-
self._filterer.
|
39
|
+
self._filterer.filter({filter => value}, {starting_query: records})
|
40
40
|
else
|
41
41
|
super(records, filter, value, _options = {})
|
42
42
|
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: jsonapi-resources-filterer
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.2.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- G5
|
@@ -10,7 +10,7 @@ authors:
|
|
10
10
|
autorequire:
|
11
11
|
bindir: exe
|
12
12
|
cert_chain: []
|
13
|
-
date:
|
13
|
+
date: 2017-02-28 00:00:00.000000000 Z
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|
16
16
|
name: jsonapi-resources
|
@@ -18,42 +18,28 @@ dependencies:
|
|
18
18
|
requirements:
|
19
19
|
- - ">="
|
20
20
|
- !ruby/object:Gem::Version
|
21
|
-
version:
|
21
|
+
version: 0.9.0
|
22
22
|
type: :runtime
|
23
23
|
prerelease: false
|
24
24
|
version_requirements: !ruby/object:Gem::Requirement
|
25
25
|
requirements:
|
26
26
|
- - ">="
|
27
27
|
- !ruby/object:Gem::Version
|
28
|
-
version:
|
28
|
+
version: 0.9.0
|
29
29
|
- !ruby/object:Gem::Dependency
|
30
30
|
name: filterer
|
31
|
-
requirement: !ruby/object:Gem::Requirement
|
32
|
-
requirements:
|
33
|
-
- - ">="
|
34
|
-
- !ruby/object:Gem::Version
|
35
|
-
version: '0'
|
36
|
-
type: :runtime
|
37
|
-
prerelease: false
|
38
|
-
version_requirements: !ruby/object:Gem::Requirement
|
39
|
-
requirements:
|
40
|
-
- - ">="
|
41
|
-
- !ruby/object:Gem::Version
|
42
|
-
version: '0'
|
43
|
-
- !ruby/object:Gem::Dependency
|
44
|
-
name: bundler
|
45
31
|
requirement: !ruby/object:Gem::Requirement
|
46
32
|
requirements:
|
47
33
|
- - "~>"
|
48
34
|
- !ruby/object:Gem::Version
|
49
|
-
version: '
|
50
|
-
type: :
|
35
|
+
version: '2.0'
|
36
|
+
type: :runtime
|
51
37
|
prerelease: false
|
52
38
|
version_requirements: !ruby/object:Gem::Requirement
|
53
39
|
requirements:
|
54
40
|
- - "~>"
|
55
41
|
- !ruby/object:Gem::Version
|
56
|
-
version: '
|
42
|
+
version: '2.0'
|
57
43
|
- !ruby/object:Gem::Dependency
|
58
44
|
name: rake
|
59
45
|
requirement: !ruby/object:Gem::Requirement
|
@@ -149,6 +135,7 @@ extra_rdoc_files: []
|
|
149
135
|
files:
|
150
136
|
- ".gitignore"
|
151
137
|
- ".rspec"
|
138
|
+
- ".ruby-version"
|
152
139
|
- ".travis.yml"
|
153
140
|
- CHANGELOG.md
|
154
141
|
- CODE_OF_CONDUCT.md
|
@@ -183,7 +170,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
183
170
|
version: '0'
|
184
171
|
requirements: []
|
185
172
|
rubyforge_project:
|
186
|
-
rubygems_version: 2.
|
173
|
+
rubygems_version: 2.6.10
|
187
174
|
signing_key:
|
188
175
|
specification_version: 4
|
189
176
|
summary: Filterer integration with jsonapi-resources
|