will_filter 3.1.7 → 3.1.8
Sign up to get free protection for your applications and to get access to all the features.
- data/.rspec +1 -0
- data/.watchr +18 -0
- data/Gemfile.lock +79 -104
- data/README.rdoc +17 -1
- data/VERSION +1 -0
- data/app/controllers/will_filter/filter_controller.rb +1 -0
- data/app/models/will_filter/filter.rb +47 -7
- data/app/views/will_filter/common/_results_table.html.erb +81 -48
- data/lib/will_filter/extensions/action_view_extension.rb +19 -19
- data/lib/will_filter/extensions/array_extension.rb +6 -0
- data/lib/will_filter/filter_condition.rb +2 -2
- data/lib/will_filter/version.rb +1 -1
- data/spec/{containers → lib/will_filter/containers}/double_spec.rb +10 -5
- data/spec/{extensions → lib/will_filter/extensions}/active_record_extension_spec.rb +7 -2
- data/spec/models/will_filter/filter_spec.rb +249 -0
- data/spec/spec_helper.rb +26 -26
- data/test/dummy/.sass-cache/f9cb1ef521115be73f1c61d3d5d64f66c947af63/actions.css.scssc +0 -0
- data/test/dummy/.sass-cache/f9cb1ef521115be73f1c61d3d5d64f66c947af63/results.css.scssc +0 -0
- data/test/dummy/app/controllers/application_controller.rb +5 -0
- data/test/dummy/app/models/merchant/order.rb +1 -1
- data/test/dummy/app/models/merchant/order_item.rb +1 -1
- data/test/dummy/app/views/advanced/event_members.html.erb +1 -1
- data/test/dummy/app/views/advanced/events.html.erb +1 -1
- data/test/dummy/app/views/advanced/users.html.erb +1 -1
- data/test/dummy/app/views/advanced/users_with_actions.html.erb +1 -1
- data/test/dummy/app/views/common/_event_members.html.erb +14 -1
- data/test/dummy/app/views/common/_events.html.erb +1 -0
- data/test/dummy/app/views/common/_menu.html.erb +2 -2
- data/test/dummy/app/views/common/_users.html.erb +39 -1
- data/test/dummy/app/views/simple/event_members.html.erb +1 -1
- data/test/dummy/app/views/simple/events.html.erb +1 -1
- data/test/dummy/app/views/simple/users.html.erb +1 -1
- data/will_filter.gemspec +5 -9
- metadata +42 -62
- data/spec/fake_app.rb +0 -51
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: will_filter
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 3.1.
|
4
|
+
version: 3.1.8
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -9,22 +9,22 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2012-04-
|
12
|
+
date: 2012-04-19 00:00:00.000000000Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: rails
|
16
|
-
requirement: &
|
16
|
+
requirement: &2152663880 !ruby/object:Gem::Requirement
|
17
17
|
none: false
|
18
18
|
requirements:
|
19
19
|
- - ! '>='
|
20
20
|
- !ruby/object:Gem::Version
|
21
|
-
version: 3.
|
21
|
+
version: 3.2.3
|
22
22
|
type: :runtime
|
23
23
|
prerelease: false
|
24
|
-
version_requirements: *
|
24
|
+
version_requirements: *2152663880
|
25
25
|
- !ruby/object:Gem::Dependency
|
26
26
|
name: kaminari
|
27
|
-
requirement: &
|
27
|
+
requirement: &2152662420 !ruby/object:Gem::Requirement
|
28
28
|
none: false
|
29
29
|
requirements:
|
30
30
|
- - ! '>='
|
@@ -32,10 +32,10 @@ dependencies:
|
|
32
32
|
version: '0'
|
33
33
|
type: :runtime
|
34
34
|
prerelease: false
|
35
|
-
version_requirements: *
|
35
|
+
version_requirements: *2152662420
|
36
36
|
- !ruby/object:Gem::Dependency
|
37
37
|
name: sass
|
38
|
-
requirement: &
|
38
|
+
requirement: &2152652700 !ruby/object:Gem::Requirement
|
39
39
|
none: false
|
40
40
|
requirements:
|
41
41
|
- - ! '>='
|
@@ -43,21 +43,21 @@ dependencies:
|
|
43
43
|
version: '0'
|
44
44
|
type: :runtime
|
45
45
|
prerelease: false
|
46
|
-
version_requirements: *
|
46
|
+
version_requirements: *2152652700
|
47
47
|
- !ruby/object:Gem::Dependency
|
48
|
-
name:
|
49
|
-
requirement: &
|
48
|
+
name: pry
|
49
|
+
requirement: &2152651440 !ruby/object:Gem::Requirement
|
50
50
|
none: false
|
51
51
|
requirements:
|
52
52
|
- - ! '>='
|
53
53
|
- !ruby/object:Gem::Version
|
54
54
|
version: '0'
|
55
|
-
type: :
|
55
|
+
type: :development
|
56
56
|
prerelease: false
|
57
|
-
version_requirements: *
|
57
|
+
version_requirements: *2152651440
|
58
58
|
- !ruby/object:Gem::Dependency
|
59
59
|
name: bundler
|
60
|
-
requirement: &
|
60
|
+
requirement: &2152650160 !ruby/object:Gem::Requirement
|
61
61
|
none: false
|
62
62
|
requirements:
|
63
63
|
- - ! '>='
|
@@ -65,10 +65,10 @@ dependencies:
|
|
65
65
|
version: 1.0.0
|
66
66
|
type: :development
|
67
67
|
prerelease: false
|
68
|
-
version_requirements: *
|
68
|
+
version_requirements: *2152650160
|
69
69
|
- !ruby/object:Gem::Dependency
|
70
70
|
name: sqlite3
|
71
|
-
requirement: &
|
71
|
+
requirement: &2152648340 !ruby/object:Gem::Requirement
|
72
72
|
none: false
|
73
73
|
requirements:
|
74
74
|
- - ! '>='
|
@@ -76,10 +76,10 @@ dependencies:
|
|
76
76
|
version: '0'
|
77
77
|
type: :development
|
78
78
|
prerelease: false
|
79
|
-
version_requirements: *
|
79
|
+
version_requirements: *2152648340
|
80
80
|
- !ruby/object:Gem::Dependency
|
81
81
|
name: rspec
|
82
|
-
requirement: &
|
82
|
+
requirement: &2152647000 !ruby/object:Gem::Requirement
|
83
83
|
none: false
|
84
84
|
requirements:
|
85
85
|
- - ! '>='
|
@@ -87,21 +87,21 @@ dependencies:
|
|
87
87
|
version: '0'
|
88
88
|
type: :development
|
89
89
|
prerelease: false
|
90
|
-
version_requirements: *
|
90
|
+
version_requirements: *2152647000
|
91
91
|
- !ruby/object:Gem::Dependency
|
92
92
|
name: rspec-rails
|
93
|
-
requirement: &
|
93
|
+
requirement: &2152645580 !ruby/object:Gem::Requirement
|
94
94
|
none: false
|
95
95
|
requirements:
|
96
96
|
- - ! '>='
|
97
97
|
- !ruby/object:Gem::Version
|
98
|
-
version:
|
98
|
+
version: 2.1.0
|
99
99
|
type: :development
|
100
100
|
prerelease: false
|
101
|
-
version_requirements: *
|
101
|
+
version_requirements: *2152645580
|
102
102
|
- !ruby/object:Gem::Dependency
|
103
|
-
name:
|
104
|
-
requirement: &
|
103
|
+
name: spork
|
104
|
+
requirement: &2152643440 !ruby/object:Gem::Requirement
|
105
105
|
none: false
|
106
106
|
requirements:
|
107
107
|
- - ! '>='
|
@@ -109,10 +109,10 @@ dependencies:
|
|
109
109
|
version: '0'
|
110
110
|
type: :development
|
111
111
|
prerelease: false
|
112
|
-
version_requirements: *
|
112
|
+
version_requirements: *2152643440
|
113
113
|
- !ruby/object:Gem::Dependency
|
114
|
-
name:
|
115
|
-
requirement: &
|
114
|
+
name: watchr
|
115
|
+
requirement: &2152642600 !ruby/object:Gem::Requirement
|
116
116
|
none: false
|
117
117
|
requirements:
|
118
118
|
- - ! '>='
|
@@ -120,32 +120,10 @@ dependencies:
|
|
120
120
|
version: '0'
|
121
121
|
type: :development
|
122
122
|
prerelease: false
|
123
|
-
version_requirements: *
|
123
|
+
version_requirements: *2152642600
|
124
124
|
- !ruby/object:Gem::Dependency
|
125
|
-
name:
|
126
|
-
requirement: &
|
127
|
-
none: false
|
128
|
-
requirements:
|
129
|
-
- - ! '>='
|
130
|
-
- !ruby/object:Gem::Version
|
131
|
-
version: '0'
|
132
|
-
type: :development
|
133
|
-
prerelease: false
|
134
|
-
version_requirements: *2152912020
|
135
|
-
- !ruby/object:Gem::Dependency
|
136
|
-
name: capybara
|
137
|
-
requirement: &2152909700 !ruby/object:Gem::Requirement
|
138
|
-
none: false
|
139
|
-
requirements:
|
140
|
-
- - ! '>='
|
141
|
-
- !ruby/object:Gem::Version
|
142
|
-
version: '0'
|
143
|
-
type: :development
|
144
|
-
prerelease: false
|
145
|
-
version_requirements: *2152909700
|
146
|
-
- !ruby/object:Gem::Dependency
|
147
|
-
name: database_cleaner
|
148
|
-
requirement: &2152897720 !ruby/object:Gem::Requirement
|
125
|
+
name: rr
|
126
|
+
requirement: &2152641600 !ruby/object:Gem::Requirement
|
149
127
|
none: false
|
150
128
|
requirements:
|
151
129
|
- - ! '>='
|
@@ -153,7 +131,7 @@ dependencies:
|
|
153
131
|
version: '0'
|
154
132
|
type: :development
|
155
133
|
prerelease: false
|
156
|
-
version_requirements: *
|
134
|
+
version_requirements: *2152641600
|
157
135
|
description: will_filter is a powerful customizable framework for filtering active_record
|
158
136
|
models.
|
159
137
|
email:
|
@@ -166,12 +144,14 @@ files:
|
|
166
144
|
- .gitignore
|
167
145
|
- .rspec
|
168
146
|
- .rvmrc
|
147
|
+
- .watchr
|
169
148
|
- CHANGELOG.rdoc
|
170
149
|
- Gemfile
|
171
150
|
- Gemfile.lock
|
172
151
|
- MIT-LICENSE
|
173
152
|
- README.rdoc
|
174
153
|
- Rakefile
|
154
|
+
- VERSION
|
175
155
|
- app/assets/images/will_filter/.gitkeep
|
176
156
|
- app/assets/images/will_filter/buttons.png
|
177
157
|
- app/assets/images/will_filter/calendar.png
|
@@ -254,9 +234,9 @@ files:
|
|
254
234
|
- lib/will_filter/version.rb
|
255
235
|
- script/rails
|
256
236
|
- spec/config/config_spec.rb
|
257
|
-
- spec/containers/double_spec.rb
|
258
|
-
- spec/extensions/active_record_extension_spec.rb
|
259
|
-
- spec/
|
237
|
+
- spec/lib/will_filter/containers/double_spec.rb
|
238
|
+
- spec/lib/will_filter/extensions/active_record_extension_spec.rb
|
239
|
+
- spec/models/will_filter/filter_spec.rb
|
260
240
|
- spec/spec_helper.rb
|
261
241
|
- test/dummy/.sass-cache/f9cb1ef521115be73f1c61d3d5d64f66c947af63/actions.css.scssc
|
262
242
|
- test/dummy/.sass-cache/f9cb1ef521115be73f1c61d3d5d64f66c947af63/results.css.scssc
|
@@ -362,7 +342,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
362
342
|
version: '0'
|
363
343
|
segments:
|
364
344
|
- 0
|
365
|
-
hash:
|
345
|
+
hash: -4303547157894045742
|
366
346
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
367
347
|
none: false
|
368
348
|
requirements:
|
@@ -371,18 +351,18 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
371
351
|
version: '0'
|
372
352
|
segments:
|
373
353
|
- 0
|
374
|
-
hash:
|
354
|
+
hash: -4303547157894045742
|
375
355
|
requirements: []
|
376
|
-
rubyforge_project:
|
356
|
+
rubyforge_project:
|
377
357
|
rubygems_version: 1.8.11
|
378
358
|
signing_key:
|
379
359
|
specification_version: 3
|
380
360
|
summary: A filtering engine plugin for Rails 3.1
|
381
361
|
test_files:
|
382
362
|
- spec/config/config_spec.rb
|
383
|
-
- spec/containers/double_spec.rb
|
384
|
-
- spec/extensions/active_record_extension_spec.rb
|
385
|
-
- spec/
|
363
|
+
- spec/lib/will_filter/containers/double_spec.rb
|
364
|
+
- spec/lib/will_filter/extensions/active_record_extension_spec.rb
|
365
|
+
- spec/models/will_filter/filter_spec.rb
|
386
366
|
- spec/spec_helper.rb
|
387
367
|
- test/dummy/.sass-cache/f9cb1ef521115be73f1c61d3d5d64f66c947af63/actions.css.scssc
|
388
368
|
- test/dummy/.sass-cache/f9cb1ef521115be73f1c61d3d5d64f66c947af63/results.css.scssc
|
data/spec/fake_app.rb
DELETED
@@ -1,51 +0,0 @@
|
|
1
|
-
require 'active_record'
|
2
|
-
require 'action_controller/railtie'
|
3
|
-
require 'action_view/railtie'
|
4
|
-
|
5
|
-
# database
|
6
|
-
ActiveRecord::Base.configurations = {'test' => {:adapter => 'sqlite3', :database => ':memory:'}}
|
7
|
-
ActiveRecord::Base.establish_connection('test')
|
8
|
-
|
9
|
-
# config
|
10
|
-
app = Class.new(Rails::Application)
|
11
|
-
app.config.secret_token = "3b7cd727ee24e8444053437c36cc66c4"
|
12
|
-
app.config.session_store :cookie_store, :key => "_myapp_session"
|
13
|
-
app.config.active_support.deprecation = :log
|
14
|
-
app.initialize!
|
15
|
-
|
16
|
-
# routes
|
17
|
-
app.routes.draw do
|
18
|
-
resources :users
|
19
|
-
end
|
20
|
-
|
21
|
-
# models
|
22
|
-
Dir["#{File.dirname(__FILE__)}/../test/dummy/app/models/*.rb"].each do |f|
|
23
|
-
if [:user, :event, :event_user].include?(f.split("/").last.gsub('.rb', '').to_sym)
|
24
|
-
require f
|
25
|
-
end
|
26
|
-
end
|
27
|
-
|
28
|
-
# controllers
|
29
|
-
class ApplicationController < ActionController::Base; end
|
30
|
-
class UsersController < ApplicationController
|
31
|
-
def index
|
32
|
-
@users = User.filter(:params => params)
|
33
|
-
render :inline => <<-ERB
|
34
|
-
<%= will_filter_tag(@users) %>
|
35
|
-
<%= will_filter_table_tag(@users) %>
|
36
|
-
ERB
|
37
|
-
end
|
38
|
-
end
|
39
|
-
|
40
|
-
# helpers
|
41
|
-
Object.const_set(:ApplicationHelper, Module.new)
|
42
|
-
|
43
|
-
#migrations
|
44
|
-
class CreateAllTables < ActiveRecord::Migration
|
45
|
-
def self.up
|
46
|
-
Dir["#{File.dirname(__FILE__)}/../test/dummy/db/migrate/*.rb"].each do |f|
|
47
|
-
require f
|
48
|
-
f.split("/").last.gsub('.rb', '').split('_')[1..-1].join('_').camelcase.constantize.up
|
49
|
-
end
|
50
|
-
end
|
51
|
-
end
|