rao-query 0.0.12.pre → 0.0.13.pre
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +5 -5
- data/app/concerns/rao/query/controller/query_concern.rb +2 -1
- data/lib/generators/rao/query/install_generator.rb +15 -0
- data/lib/generators/rao/query/templates/initializer.rb +7 -0
- data/lib/rao/query/configuration.rb +2 -0
- data/lib/rao/query.rb +3 -1
- data/lib/rao-query.rb +2 -0
- metadata +5 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
|
-
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
2
|
+
SHA256:
|
3
|
+
metadata.gz: 3f003263ba9386ccfb87dfa59bb973ac14bba696543e9a37c39f4e5d012a0f2e
|
4
|
+
data.tar.gz: 73b0a754ccad61f19328566d3d3f4cd7897e16ed2e88ae9587fec8cf4f8da2cb
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 891abb214dc871471b8a7457fdd2655b0b468c85cd59376ee38a1dfa35dbbc5ad4e5a9e5fb5cad7d2b306f106ac4391978d248b5233bc39f5edcd1409f441d8f
|
7
|
+
data.tar.gz: c5e00bce7a067ff71dbb735f4437a37495a2aae2a64a9c1c13cefcbe7e1ec57b2d8ff08afba0bfd89d9b8e8be12965576dccc4cd5b3f0e2a21e001279f3630cc
|
@@ -51,10 +51,11 @@ module Rao
|
|
51
51
|
end
|
52
52
|
|
53
53
|
def default_query_params_exceptions
|
54
|
-
|
54
|
+
Rao::Query::Configuration.default_query_params_exceptions
|
55
55
|
end
|
56
56
|
|
57
57
|
def normalize_query_params(params)
|
58
|
+
return {} unless params['q'].respond_to?(:each_with_object)
|
58
59
|
params['q'].each_with_object({}) { |(k, v), m| m[normalize_key(k)] = v }
|
59
60
|
end
|
60
61
|
|
@@ -0,0 +1,15 @@
|
|
1
|
+
module Rao
|
2
|
+
module Query
|
3
|
+
module Generators
|
4
|
+
class InstallGenerator < Rails::Generators::Base
|
5
|
+
desc 'Generates the initializer'
|
6
|
+
|
7
|
+
source_root File.expand_path('../templates', __FILE__)
|
8
|
+
|
9
|
+
def generate_initializer
|
10
|
+
template 'initializer.rb', 'config/initializers/rao_query.rb'
|
11
|
+
end
|
12
|
+
end
|
13
|
+
end
|
14
|
+
end
|
15
|
+
end
|
@@ -0,0 +1,7 @@
|
|
1
|
+
Rao::Query.configure do |config|
|
2
|
+
# Set the parameter names that will be ignored for building conditions.
|
3
|
+
#
|
4
|
+
# Default: config.default_query_params_exceptions = %w(sort_by sort_direction utf8 commit page locale)
|
5
|
+
#
|
6
|
+
config.default_query_params_exceptions = %w(sort_by sort_direction utf8 commit page locale)
|
7
|
+
end
|
data/lib/rao/query.rb
CHANGED
data/lib/rao-query.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: rao-query
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.13.pre
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Roberto Vasquez Angel
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2019-
|
11
|
+
date: 2019-03-19 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|
@@ -139,6 +139,8 @@ files:
|
|
139
139
|
- app/view_helpers/rao/query/application_helper.rb
|
140
140
|
- config/locales/de.yml
|
141
141
|
- config/locales/en.yml
|
142
|
+
- lib/generators/rao/query/install_generator.rb
|
143
|
+
- lib/generators/rao/query/templates/initializer.rb
|
142
144
|
- lib/rao-query.rb
|
143
145
|
- lib/rao/query.rb
|
144
146
|
- lib/rao/query/configuration.rb
|
@@ -163,8 +165,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
163
165
|
- !ruby/object:Gem::Version
|
164
166
|
version: 1.3.1
|
165
167
|
requirements: []
|
166
|
-
|
167
|
-
rubygems_version: 2.6.14
|
168
|
+
rubygems_version: 3.0.2
|
168
169
|
signing_key:
|
169
170
|
specification_version: 4
|
170
171
|
summary: Simple Filter Queries for Ruby on Rails.
|