admino 0.0.20 → 0.0.21

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 8099acd148d47f461992d023c4ae8d1bd76b3c5c
4
- data.tar.gz: 3dcf581e206ca9c8ff6536341efecdb2a63ce959
3
+ metadata.gz: 08aee39a2a0d4179c636d7dc88772521285d8d99
4
+ data.tar.gz: e1cc15bdf64a4dd1e8a2bec402d7ce6af144942e
5
5
  SHA512:
6
- metadata.gz: c2906889d6c3919913c07e119923cb4311c1d834082123907cf5d8a83a6369812811fb9cbbb1ced9b2ce1fbf10633f1c4ace1653db01a2ee855162e82fe3f08b
7
- data.tar.gz: 02da5a3a0fe4cb41c1e0473c663a1ee8bb13e157a94e16770b623bc292a2a5328b393e0d56923a45a0070c6f11335f7b708be83661d1438a1ef4af22ed46e5b3
6
+ metadata.gz: 488acd28c2ccd659fdb03d3cffb4efe823767d3a063b56fa0aadfc9c3b3af984132e0db417b2d4c13e5930c3c65a55868e6421eaba6ef82748f5264cb4a3f891
7
+ data.tar.gz: dd3008169e82d3fbd201a17afe6f882dcb304e3da0976ff2c5ff116a6ed5cb8d1d91dba16757142c05bf1b80d67299690200f72bd4e890b358cfdd854d1c9d3e
@@ -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
@@ -1,3 +1,3 @@
1
1
  module Admino
2
- VERSION = "0.0.20"
2
+ VERSION = "0.0.21"
3
3
  end
@@ -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.20
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-21 00:00:00.000000000 Z
11
+ date: 2016-04-22 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: showcase