admino 0.0.20 → 0.0.21
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/admino/query/base.rb +3 -1
- data/lib/admino/version.rb +1 -1
- data/spec/admino/query/base_spec.rb +3 -2
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 08aee39a2a0d4179c636d7dc88772521285d8d99
|
4
|
+
data.tar.gz: e1cc15bdf64a4dd1e8a2bec402d7ce6af144942e
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 488acd28c2ccd659fdb03d3cffb4efe823767d3a063b56fa0aadfc9c3b3af984132e0db417b2d4c13e5930c3c65a55868e6421eaba6ef82748f5264cb4a3f891
|
7
|
+
data.tar.gz: dd3008169e82d3fbd201a17afe6f882dcb304e3da0976ff2c5ff116a6ed5cb8d1d91dba16757142c05bf1b80d67299690200f72bd4e890b358cfdd854d1c9d3e
|
data/lib/admino/query/base.rb
CHANGED
@@ -17,6 +17,7 @@ module Admino
|
|
17
17
|
extend Dsl
|
18
18
|
|
19
19
|
attr_reader :params
|
20
|
+
attr_reader :context
|
20
21
|
attr_reader :filter_groups
|
21
22
|
attr_reader :search_fields
|
22
23
|
attr_reader :sorting
|
@@ -25,9 +26,10 @@ module Admino
|
|
25
26
|
:query
|
26
27
|
end
|
27
28
|
|
28
|
-
def initialize(params = nil, config = nil)
|
29
|
+
def initialize(params = nil, context = {}, config = nil)
|
29
30
|
@params = ActiveSupport::HashWithIndifferentAccess.new(params)
|
30
31
|
@config = config
|
32
|
+
@context = context
|
31
33
|
|
32
34
|
init_filter_groups
|
33
35
|
init_search_fields
|
data/lib/admino/version.rb
CHANGED
@@ -3,8 +3,9 @@ require 'spec_helper'
|
|
3
3
|
module Admino
|
4
4
|
module Query
|
5
5
|
describe Base do
|
6
|
-
subject(:query) { Base.new(params, config) }
|
6
|
+
subject(:query) { Base.new(params, context, config) }
|
7
7
|
let(:params) { {} }
|
8
|
+
let(:context) { {} }
|
8
9
|
let(:config) { nil }
|
9
10
|
|
10
11
|
it 'takes a request params' do
|
@@ -162,7 +163,7 @@ module Admino
|
|
162
163
|
end
|
163
164
|
|
164
165
|
subject(:query) do
|
165
|
-
query_klass.new(params, config)
|
166
|
+
query_klass.new(params, context, config)
|
166
167
|
end
|
167
168
|
|
168
169
|
it 'chains from starting scope calling query object methods' do
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: admino
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.21
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Stefano Verna
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2016-04-
|
11
|
+
date: 2016-04-22 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: showcase
|