will_filter 3.1.11 → 5.1.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (99) hide show
  1. checksums.yaml +7 -0
  2. data/.gitignore +1 -0
  3. data/Gemfile +8 -3
  4. data/Gemfile.lock +182 -127
  5. data/README.rdoc +1 -10
  6. data/app/assets/images/will_filter/loading.gif +0 -0
  7. data/app/assets/javascripts/will_filter/filter.js +526 -517
  8. data/app/assets/stylesheets/will_filter/filter.css.scss +405 -108
  9. data/app/controllers/will_filter/calendar_controller.rb +10 -1
  10. data/app/controllers/will_filter/exporter_controller.rb +12 -3
  11. data/app/controllers/will_filter/filter_controller.rb +19 -10
  12. data/app/models/will_filter/filter.rb +254 -203
  13. data/app/views/will_filter/calendar/index.html.erb +55 -43
  14. data/app/views/will_filter/common/_actions_bar.html.erb +3 -3
  15. data/app/views/will_filter/common/_results_table.html.erb +55 -39
  16. data/app/views/will_filter/common/_scripts.html.erb +2 -12
  17. data/app/views/will_filter/exporter/index.html.erb +26 -22
  18. data/app/views/will_filter/filter/_condition.html.erb +25 -9
  19. data/app/views/will_filter/filter/_conditions.html.erb +12 -9
  20. data/app/views/will_filter/filter/_conditions_footer.html.erb +25 -10
  21. data/app/views/will_filter/filter/_conditions_header.html.erb +38 -24
  22. data/app/views/will_filter/filter/_container.html.erb +10 -9
  23. data/app/views/will_filter/filter/containers/_date.html.erb +8 -10
  24. data/app/views/will_filter/filter/containers/_date_range.html.erb +21 -13
  25. data/app/views/will_filter/filter/containers/_date_time.html.erb +8 -10
  26. data/app/views/will_filter/filter/containers/_date_time_range.html.erb +21 -13
  27. data/app/views/will_filter/filter/containers/_list.html.erb +16 -6
  28. data/config/routes.rb +26 -16
  29. data/deploy +63 -0
  30. data/lib/generators/will_filter/templates/config.yml +18 -5
  31. data/lib/generators/will_filter/templates/create_will_filter_filters.rb +12 -1
  32. data/lib/generators/will_filter/will_filter_generator.rb +10 -1
  33. data/lib/tasks/will_filter_tasks.rake +10 -2
  34. data/lib/will_filter.rb +10 -1
  35. data/lib/will_filter/calendar.rb +10 -1
  36. data/lib/will_filter/config.rb +31 -4
  37. data/lib/will_filter/containers/boolean.rb +10 -1
  38. data/lib/will_filter/containers/date.rb +10 -1
  39. data/lib/will_filter/containers/date_range.rb +10 -1
  40. data/lib/will_filter/containers/date_time.rb +10 -1
  41. data/lib/will_filter/containers/date_time_range.rb +10 -1
  42. data/lib/will_filter/containers/double.rb +10 -1
  43. data/lib/will_filter/containers/double_delimited.rb +10 -1
  44. data/lib/will_filter/containers/double_range.rb +10 -1
  45. data/lib/will_filter/containers/filter_list.rb +21 -7
  46. data/lib/will_filter/containers/list.rb +10 -1
  47. data/lib/will_filter/containers/nil.rb +10 -1
  48. data/lib/will_filter/containers/numeric.rb +10 -1
  49. data/lib/will_filter/containers/numeric_delimited.rb +10 -1
  50. data/lib/will_filter/containers/numeric_range.rb +10 -1
  51. data/lib/will_filter/containers/single_date.rb +12 -1
  52. data/lib/will_filter/containers/text.rb +10 -1
  53. data/lib/will_filter/containers/text_delimited.rb +11 -2
  54. data/lib/will_filter/engine.rb +10 -1
  55. data/lib/will_filter/extensions/action_controller_extension.rb +34 -10
  56. data/lib/will_filter/extensions/action_view_extension.rb +12 -3
  57. data/lib/will_filter/extensions/active_record_extension.rb +11 -1
  58. data/lib/will_filter/extensions/active_record_relation_extension.rb +51 -0
  59. data/lib/will_filter/extensions/array_extension.rb +10 -1
  60. data/lib/will_filter/filter_condition.rb +11 -7
  61. data/lib/will_filter/filter_container.rb +10 -1
  62. data/lib/will_filter/filter_exception.rb +10 -1
  63. data/lib/will_filter/railtie.rb +14 -4
  64. data/lib/will_filter/version.rb +11 -2
  65. data/spec/config/config_spec.rb +5 -5
  66. data/spec/models/will_filter/filter_spec.rb +130 -131
  67. data/test/dummy/app/assets/javascripts/application.js +3 -0
  68. data/test/dummy/app/assets/javascripts/bootstrap.js +1951 -0
  69. data/test/dummy/app/assets/javascripts/jquery-2.1.3.min.js +4 -0
  70. data/test/dummy/app/assets/javascripts/select2.min.js +3 -0
  71. data/test/dummy/app/assets/stylesheets/{application.css → application.css.sass} +5 -2
  72. data/test/dummy/app/assets/stylesheets/bootstrap.min.css +7 -0
  73. data/test/dummy/app/assets/stylesheets/select2.min.css +1 -0
  74. data/test/dummy/app/controllers/advanced_controller.rb +4 -4
  75. data/test/dummy/app/controllers/orders_controller.rb +2 -2
  76. data/test/dummy/app/controllers/simple_controller.rb +3 -3
  77. data/test/dummy/app/models/event.rb +1 -1
  78. data/test/dummy/app/models/user.rb +1 -1
  79. data/test/dummy/app/views/common/_events.html.erb +7 -13
  80. data/test/dummy/app/views/common/_menu.html.erb +25 -27
  81. data/test/dummy/app/views/layouts/application.html.erb +3 -5
  82. data/test/dummy/config/environments/development.rb +2 -0
  83. data/test/dummy/config/environments/production.rb +2 -0
  84. data/test/dummy/config/environments/test.rb +2 -0
  85. data/test/dummy/config/initializers/assets.rb +12 -0
  86. data/test/dummy/config/routes.rb +10 -10
  87. data/test/dummy/db/schema.rb +46 -50
  88. data/will_filter.gemspec +3 -3
  89. metadata +39 -44
  90. data/.rvmrc +0 -1
  91. data/app/assets/javascripts/will_filter/filter_prototype_effects.js +0 -38
  92. data/app/assets/stylesheets/will_filter/actions.css.scss +0 -27
  93. data/app/assets/stylesheets/will_filter/buttons.css.scss +0 -24
  94. data/app/assets/stylesheets/will_filter/calendar.css.scss +0 -102
  95. data/app/assets/stylesheets/will_filter/exporter.css.scss +0 -89
  96. data/app/assets/stylesheets/will_filter/results.css.scss +0 -63
  97. data/app/views/layouts/will_filter/application.html.erb +0 -14
  98. data/test/dummy/app/assets/javascripts/orders.js +0 -2
  99. data/test/dummy/app/assets/stylesheets/orders.css +0 -4
@@ -1,5 +1,14 @@
1
1
  #--
2
- # Copyright (c) 2010-2013 Michael Berkovich
2
+ # Copyright (c) 2017 Michael Berkovich, theiceberk@gmail.com
3
+ #
4
+ # __ __ ____ _ _ _____ ____ _ ______ ___ ____
5
+ # | |__| || || | | | | || || | | | / _]| \
6
+ # | | | | | | | | | | | __| | | | | | | / [_ | D )
7
+ # | | | | | | | |___ | |___ | |_ | | | |___|_| |_|| _]| /
8
+ # | ` ' | | | | || | | _] | | | | | | | [_ | \
9
+ # \ / | | | || | | | | | | | | | | || . \
10
+ # \_/\_/ |____||_____||_____| |__| |____||_____| |__| |_____||__|\_|
11
+ #
3
12
  #
4
13
  # Permission is hereby granted, free of charge, to any person obtaining
5
14
  # a copy of this software and associated documentation files (the
@@ -1,5 +1,14 @@
1
1
  #--
2
- # Copyright (c) 2010-2013 Michael Berkovich
2
+ # Copyright (c) 2017 Michael Berkovich, theiceberk@gmail.com
3
+ #
4
+ # __ __ ____ _ _ _____ ____ _ ______ ___ ____
5
+ # | |__| || || | | | | || || | | | / _]| \
6
+ # | | | | | | | | | | | __| | | | | | | / [_ | D )
7
+ # | | | | | | | |___ | |___ | |_ | | | |___|_| |_|| _]| /
8
+ # | ` ' | | | | || | | _] | | | | | | | [_ | \
9
+ # \ / | | | || | | | | | | | | | | || . \
10
+ # \_/\_/ |____||_____||_____| |__| |____||_____| |__| |_____||__|\_|
11
+ #
3
12
  #
4
13
  # Permission is hereby granted, free of charge, to any person obtaining
5
14
  # a copy of this software and associated documentation files (the
@@ -1,5 +1,14 @@
1
1
  #--
2
- # Copyright (c) 2010-2013 Michael Berkovich
2
+ # Copyright (c) 2017 Michael Berkovich, theiceberk@gmail.com
3
+ #
4
+ # __ __ ____ _ _ _____ ____ _ ______ ___ ____
5
+ # | |__| || || | | | | || || | | | / _]| \
6
+ # | | | | | | | | | | | __| | | | | | | / [_ | D )
7
+ # | | | | | | | |___ | |___ | |_ | | | |___|_| |_|| _]| /
8
+ # | ` ' | | | | || | | _] | | | | | | | [_ | \
9
+ # \ / | | | || | | | | | | | | | | || . \
10
+ # \_/\_/ |____||_____||_____| |__| |____||_____| |__| |_____||__|\_|
11
+ #
3
12
  #
4
13
  # Permission is hereby granted, free of charge, to any person obtaining
5
14
  # a copy of this software and associated documentation files (the
@@ -20,6 +29,7 @@
20
29
  # OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
21
30
  # WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
22
31
  #++
32
+
23
33
  module WillFilter
24
34
  module Containers
25
35
  class SingleDate < WillFilter::FilterContainer
@@ -49,6 +59,7 @@ module WillFilter
49
59
  end
50
60
 
51
61
  def sql_condition
62
+ return [' 1 = 0'] if time.nil?
52
63
  return [" #{condition.full_key} >= ? and #{condition.full_key} < ? ", time, time + 1.day] if operator == :is_on
53
64
  return [" #{condition.full_key} < ? and #{condition.full_key} >= ? ", time, time + 1.day] if operator == :is_not_on
54
65
  end
@@ -1,5 +1,14 @@
1
1
  #--
2
- # Copyright (c) 2010-2013 Michael Berkovich
2
+ # Copyright (c) 2017 Michael Berkovich, theiceberk@gmail.com
3
+ #
4
+ # __ __ ____ _ _ _____ ____ _ ______ ___ ____
5
+ # | |__| || || | | | | || || | | | / _]| \
6
+ # | | | | | | | | | | | __| | | | | | | / [_ | D )
7
+ # | | | | | | | |___ | |___ | |_ | | | |___|_| |_|| _]| /
8
+ # | ` ' | | | | || | | _] | | | | | | | [_ | \
9
+ # \ / | | | || | | | | | | | | | | || . \
10
+ # \_/\_/ |____||_____||_____| |__| |____||_____| |__| |_____||__|\_|
11
+ #
3
12
  #
4
13
  # Permission is hereby granted, free of charge, to any person obtaining
5
14
  # a copy of this software and associated documentation files (the
@@ -1,5 +1,14 @@
1
1
  #--
2
- # Copyright (c) 2010-2013 Michael Berkovich
2
+ # Copyright (c) 2017 Michael Berkovich, theiceberk@gmail.com
3
+ #
4
+ # __ __ ____ _ _ _____ ____ _ ______ ___ ____
5
+ # | |__| || || | | | | || || | | | / _]| \
6
+ # | | | | | | | | | | | __| | | | | | | / [_ | D )
7
+ # | | | | | | | |___ | |___ | |_ | | | |___|_| |_|| _]| /
8
+ # | ` ' | | | | || | | _] | | | | | | | [_ | \
9
+ # \ / | | | || | | | | | | | | | | || . \
10
+ # \_/\_/ |____||_____||_____| |__| |____||_____| |__| |_____||__|\_|
11
+ #
3
12
  #
4
13
  # Permission is hereby granted, free of charge, to any person obtaining
5
14
  # a copy of this software and associated documentation files (the
@@ -39,7 +48,7 @@ module WillFilter
39
48
  end
40
49
 
41
50
  def split_values
42
- value.split(TEXT_DELIMITER)
51
+ value.to_s.split(TEXT_DELIMITER)
43
52
  end
44
53
 
45
54
  def sql_condition
@@ -1,5 +1,14 @@
1
1
  #--
2
- # Copyright (c) 2010-2013 Michael Berkovich
2
+ # Copyright (c) 2017 Michael Berkovich, theiceberk@gmail.com
3
+ #
4
+ # __ __ ____ _ _ _____ ____ _ ______ ___ ____
5
+ # | |__| || || | | | | || || | | | / _]| \
6
+ # | | | | | | | | | | | __| | | | | | | / [_ | D )
7
+ # | | | | | | | |___ | |___ | |_ | | | |___|_| |_|| _]| /
8
+ # | ` ' | | | | || | | _] | | | | | | | [_ | \
9
+ # \ / | | | || | | | | | | | | | | || . \
10
+ # \_/\_/ |____||_____||_____| |__| |____||_____| |__| |_____||__|\_|
11
+ #
3
12
  #
4
13
  # Permission is hereby granted, free of charge, to any person obtaining
5
14
  # a copy of this software and associated documentation files (the
@@ -1,5 +1,14 @@
1
1
  #--
2
- # Copyright (c) 2010-2013 Michael Berkovich
2
+ # Copyright (c) 2017 Michael Berkovich, theiceberk@gmail.com
3
+ #
4
+ # __ __ ____ _ _ _____ ____ _ ______ ___ ____
5
+ # | |__| || || | | | | || || | | | / _]| \
6
+ # | | | | | | | | | | | __| | | | | | | / [_ | D )
7
+ # | | | | | | | |___ | |___ | |_ | | | |___|_| |_|| _]| /
8
+ # | ` ' | | | | || | | _] | | | | | | | [_ | \
9
+ # \ / | | | || | | | | | | | | | | || . \
10
+ # \_/\_/ |____||_____||_____| |__| |____||_____| |__| |_____||__|\_|
11
+ #
3
12
  #
4
13
  # Permission is hereby granted, free of charge, to any person obtaining
5
14
  # a copy of this software and associated documentation files (the
@@ -25,22 +34,37 @@ module WillFilter
25
34
  module ActionControllerExtension
26
35
  def self.included(base)
27
36
  base.send(:include, InstanceMethods)
28
- base.before_filter :init_will_filter
37
+ base.before_action :init_will_filter
38
+ base.after_action :reset_will_filter
29
39
  end
30
40
 
31
41
  module InstanceMethods
32
42
  def init_will_filter
33
- # only if the filters need to be
34
- return unless WillFilter::Config.user_filters_enabled?
35
-
36
43
  wf_current_user = nil
37
- begin
38
- wf_current_user = eval(WillFilter::Config.current_user_method)
39
- rescue Exception => ex
40
- raise WillFilter::FilterException.new("will_filter cannot be initialized because #{WillFilter::Config.current_user_method} failed with: #{ex.message}")
44
+ wf_current_project = nil
45
+
46
+ # only if the filters need to be
47
+ if WillFilter::Config.user_filters_enabled?
48
+ begin
49
+ wf_current_user = self.send(WillFilter::Config.current_user_method)
50
+ rescue => ex
51
+ wf_current_user = nil
52
+ end
41
53
  end
42
54
 
43
- WillFilter::Config.init(wf_current_user)
55
+ if WillFilter::Config.project_filters_enabled?
56
+ begin
57
+ wf_current_project = self.send(WillFilter::Config.current_project_method)
58
+ rescue => ex
59
+ wf_current_project = nil
60
+ end
61
+ end
62
+
63
+ WillFilter::Config.init(wf_current_user, wf_current_project)
64
+ end
65
+
66
+ def reset_will_filter
67
+ WillFilter::Config.reset!
44
68
  end
45
69
  end
46
70
  end
@@ -1,5 +1,14 @@
1
1
  #--
2
- # Copyright (c) 2010-2013 Michael Berkovich
2
+ # Copyright (c) 2017 Michael Berkovich, theiceberk@gmail.com
3
+ #
4
+ # __ __ ____ _ _ _____ ____ _ ______ ___ ____
5
+ # | |__| || || | | | | || || | | | / _]| \
6
+ # | | | | | | | | | | | __| | | | | | | / [_ | D )
7
+ # | | | | | | | |___ | |___ | |_ | | | |___|_| |_|| _]| /
8
+ # | ` ' | | | | || | | _] | | | | | | | [_ | \
9
+ # \ / | | | || | | | | | | | | | | || . \
10
+ # \_/\_/ |____||_____||_____| |__| |____||_____| |__| |_____||__|\_|
11
+ #
3
12
  #
4
13
  # Permission is hereby granted, free of charge, to any person obtaining
5
14
  # a copy of this software and associated documentation files (the
@@ -26,11 +35,11 @@ module WillFilter
26
35
  extend ActiveSupport::Concern
27
36
 
28
37
  def will_filter_tag(results, opts = {})
29
- render(:partial => "/will_filter/filter/container", :locals => {:wf_filter => results.wf_filter, :opts => opts})
38
+ render(:partial => '/will_filter/filter/container', :locals => {:wf_filter => results.wf_filter, :opts => opts})
30
39
  end
31
40
 
32
41
  def will_filter_scripts_tag(opts = {})
33
- render(:partial => "/will_filter/common/scripts", :locals => {:opts => opts})
42
+ render(:partial => '/will_filter/common/scripts', :locals => {:opts => opts})
34
43
  end
35
44
 
36
45
  def will_filter_table_tag(results, opts = {})
@@ -1,5 +1,14 @@
1
1
  #--
2
- # Copyright (c) 2010-2013 Michael Berkovich
2
+ # Copyright (c) 2017 Michael Berkovich, theiceberk@gmail.com
3
+ #
4
+ # __ __ ____ _ _ _____ ____ _ ______ ___ ____
5
+ # | |__| || || | | | | || || | | | / _]| \
6
+ # | | | | | | | | | | | __| | | | | | | / [_ | D )
7
+ # | | | | | | | |___ | |___ | |_ | | | |___|_| |_|| _]| /
8
+ # | ` ' | | | | || | | _] | | | | | | | [_ | \
9
+ # \ / | | | || | | | | | | | | | | || . \
10
+ # \_/\_/ |____||_____||_____| |__| |____||_____| |__| |_____||__|\_|
11
+ #
3
12
  #
4
13
  # Permission is hereby granted, free of charge, to any person obtaining
5
14
  # a copy of this software and associated documentation files (the
@@ -24,6 +33,7 @@
24
33
  module WillFilter
25
34
  module ActiveRecordExtension
26
35
  extend ActiveSupport::Concern
36
+
27
37
  module ClassMethods
28
38
  def filter(opts = {})
29
39
  if ActiveRecord::Base == self.class
@@ -0,0 +1,51 @@
1
+ #--
2
+ # Copyright (c) 2017 Michael Berkovich, theiceberk@gmail.com
3
+ #
4
+ # __ __ ____ _ _ _____ ____ _ ______ ___ ____
5
+ # | |__| || || | | | | || || | | | / _]| \
6
+ # | | | | | | | | | | | __| | | | | | | / [_ | D )
7
+ # | | | | | | | |___ | |___ | |_ | | | |___|_| |_|| _]| /
8
+ # | ` ' | | | | || | | _] | | | | | | | [_ | \
9
+ # \ / | | | || | | | | | | | | | | || . \
10
+ # \_/\_/ |____||_____||_____| |__| |____||_____| |__| |_____||__|\_|
11
+ #
12
+ #
13
+ # Permission is hereby granted, free of charge, to any person obtaining
14
+ # a copy of this software and associated documentation files (the
15
+ # "Software"), to deal in the Software without restriction, including
16
+ # without limitation the rights to use, copy, modify, merge, publish,
17
+ # distribute, sublicense, and/or sell copies of the Software, and to
18
+ # permit persons to whom the Software is furnished to do so, subject to
19
+ # the following conditions:
20
+ #
21
+ # The above copyright notice and this permission notice shall be
22
+ # included in all copies or substantial portions of the Software.
23
+ #
24
+ # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
25
+ # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
26
+ # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
27
+ # NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
28
+ # LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
29
+ # OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
30
+ # WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
31
+ #++
32
+
33
+ module ActiveRecord
34
+ class Relation
35
+
36
+ def wf_filter=(filter)
37
+ @wf_filter = filter
38
+ end
39
+
40
+ def wf_filter
41
+ @wf_filter
42
+ end
43
+
44
+ def add_filter_condition(condition_key, operator_key, values = [])
45
+ sub_filter = wf_filter.dup
46
+ sub_filter.replace_condition(condition_key, operator_key, values)
47
+ sub_filter
48
+ end
49
+
50
+ end
51
+ end
@@ -1,5 +1,14 @@
1
1
  #--
2
- # Copyright (c) 2010-2013 Michael Berkovich
2
+ # Copyright (c) 2017 Michael Berkovich, theiceberk@gmail.com
3
+ #
4
+ # __ __ ____ _ _ _____ ____ _ ______ ___ ____
5
+ # | |__| || || | | | | || || | | | / _]| \
6
+ # | | | | | | | | | | | __| | | | | | | / [_ | D )
7
+ # | | | | | | | |___ | |___ | |_ | | | |___|_| |_|| _]| /
8
+ # | ` ' | | | | || | | _] | | | | | | | [_ | \
9
+ # \ / | | | || | | | | | | | | | | || . \
10
+ # \_/\_/ |____||_____||_____| |__| |____||_____| |__| |_____||__|\_|
11
+ #
3
12
  #
4
13
  # Permission is hereby granted, free of charge, to any person obtaining
5
14
  # a copy of this software and associated documentation files (the
@@ -1,5 +1,14 @@
1
1
  #--
2
- # Copyright (c) 2010-2013 Michael Berkovich
2
+ # Copyright (c) 2017 Michael Berkovich, theiceberk@gmail.com
3
+ #
4
+ # __ __ ____ _ _ _____ ____ _ ______ ___ ____
5
+ # | |__| || || | | | | || || | | | / _]| \
6
+ # | | | | | | | | | | | __| | | | | | | / [_ | D )
7
+ # | | | | | | | |___ | |___ | |_ | | | |___|_| |_|| _]| /
8
+ # | ` ' | | | | || | | _] | | | | | | | [_ | \
9
+ # \ / | | | || | | | | | | | | | | || . \
10
+ # \_/\_/ |____||_____||_____| |__| |____||_____| |__| |_____||__|\_|
11
+ #
3
12
  #
4
13
  # Permission is hereby granted, free of charge, to any person obtaining
5
14
  # a copy of this software and associated documentation files (the
@@ -44,12 +53,7 @@ module WillFilter
44
53
  end
45
54
 
46
55
  def full_key
47
- if key.to_s.index('.')
48
- parts = key.to_s.split(".")
49
- join_class = parts.first.camelcase.constantize
50
- return "#{join_class.table_name}.#{parts.last}"
51
- end
52
- "#{filter.table_name}.#{key}"
56
+ filter.sql_attribute_for_key(key)
53
57
  end
54
58
 
55
59
  def to_s
@@ -1,5 +1,14 @@
1
1
  #--
2
- # Copyright (c) 2010-2013 Michael Berkovich
2
+ # Copyright (c) 2017 Michael Berkovich, theiceberk@gmail.com
3
+ #
4
+ # __ __ ____ _ _ _____ ____ _ ______ ___ ____
5
+ # | |__| || || | | | | || || | | | / _]| \
6
+ # | | | | | | | | | | | __| | | | | | | / [_ | D )
7
+ # | | | | | | | |___ | |___ | |_ | | | |___|_| |_|| _]| /
8
+ # | ` ' | | | | || | | _] | | | | | | | [_ | \
9
+ # \ / | | | || | | | | | | | | | | || . \
10
+ # \_/\_/ |____||_____||_____| |__| |____||_____| |__| |_____||__|\_|
11
+ #
3
12
  #
4
13
  # Permission is hereby granted, free of charge, to any person obtaining
5
14
  # a copy of this software and associated documentation files (the
@@ -1,5 +1,14 @@
1
1
  #--
2
- # Copyright (c) 2010-2013 Michael Berkovich
2
+ # Copyright (c) 2017 Michael Berkovich, theiceberk@gmail.com
3
+ #
4
+ # __ __ ____ _ _ _____ ____ _ ______ ___ ____
5
+ # | |__| || || | | | | || || | | | / _]| \
6
+ # | | | | | | | | | | | __| | | | | | | / [_ | D )
7
+ # | | | | | | | |___ | |___ | |_ | | | |___|_| |_|| _]| /
8
+ # | ` ' | | | | || | | _] | | | | | | | [_ | \
9
+ # \ / | | | || | | | | | | | | | | || . \
10
+ # \_/\_/ |____||_____||_____| |__| |____||_____| |__| |_____||__|\_|
11
+ #
3
12
  #
4
13
  # Permission is hereby granted, free of charge, to any person obtaining
5
14
  # a copy of this software and associated documentation files (the
@@ -1,5 +1,14 @@
1
1
  #--
2
- # Copyright (c) 2010-2013 Michael Berkovich
2
+ # Copyright (c) 2017 Michael Berkovich, theiceberk@gmail.com
3
+ #
4
+ # __ __ ____ _ _ _____ ____ _ ______ ___ ____
5
+ # | |__| || || | | | | || || | | | / _]| \
6
+ # | | | | | | | | | | | __| | | | | | | / [_ | D )
7
+ # | | | | | | | |___ | |___ | |_ | | | |___|_| |_|| _]| /
8
+ # | ` ' | | | | || | | _] | | | | | | | [_ | \
9
+ # \ / | | | || | | | | | | | | | | || . \
10
+ # \_/\_/ |____||_____||_____| |__| |____||_____| |__| |_____||__|\_|
11
+ #
3
12
  #
4
13
  # Permission is hereby granted, free of charge, to any person obtaining
5
14
  # a copy of this software and associated documentation files (the
@@ -25,8 +34,8 @@ require 'rails'
25
34
  require 'pp'
26
35
 
27
36
  [
28
- ".",
29
- "./containers"
37
+ '.',
38
+ './containers'
30
39
  ].each do |dir|
31
40
  Dir[File.expand_path("#{File.dirname(__FILE__)}/#{dir}/*.rb")].sort.each do |file|
32
41
  require(file)
@@ -36,6 +45,7 @@ end
36
45
  require File.join(File.dirname(__FILE__), 'extensions/array_extension')
37
46
  require File.join(File.dirname(__FILE__), 'extensions/action_view_extension')
38
47
  require File.join(File.dirname(__FILE__), 'extensions/active_record_extension')
48
+ require File.join(File.dirname(__FILE__), 'extensions/active_record_relation_extension')
39
49
  require File.join(File.dirname(__FILE__), 'extensions/action_controller_extension')
40
50
 
41
51
  module WillFilter
@@ -49,7 +59,7 @@ module WillFilter
49
59
  end
50
60
  ActiveSupport.on_load(:action_controller) do
51
61
  include WillFilter::ActionControllerExtension
52
- end
62
+ end
53
63
  end
54
64
  end
55
65
  end
@@ -1,5 +1,14 @@
1
1
  #--
2
- # Copyright (c) 2010-2013 Michael Berkovich
2
+ # Copyright (c) 2017 Michael Berkovich, theiceberk@gmail.com
3
+ #
4
+ # __ __ ____ _ _ _____ ____ _ ______ ___ ____
5
+ # | |__| || || | | | | || || | | | / _]| \
6
+ # | | | | | | | | | | | __| | | | | | | / [_ | D )
7
+ # | | | | | | | |___ | |___ | |_ | | | |___|_| |_|| _]| /
8
+ # | ` ' | | | | || | | _] | | | | | | | [_ | \
9
+ # \ / | | | || | | | | | | | | | | || . \
10
+ # \_/\_/ |____||_____||_____| |__| |____||_____| |__| |_____||__|\_|
11
+ #
3
12
  #
4
13
  # Permission is hereby granted, free of charge, to any person obtaining
5
14
  # a copy of this software and associated documentation files (the
@@ -22,5 +31,5 @@
22
31
  #++
23
32
 
24
33
  module WillFilter
25
- VERSION = "3.1.11"
34
+ VERSION = '5.1.0'
26
35
  end
@@ -4,11 +4,11 @@ describe WillFilter::Config do
4
4
  subject { WillFilter::Config }
5
5
  describe 'operator_order' do
6
6
  context 'by default' do
7
- its(:config) {should_not == nil}
8
- its(:containers) {should_not == nil}
9
- its(:data_types) {should_not == nil}
10
- its(:operators) {should_not == nil}
11
- its(:operator_order) {should_not == nil}
7
+ # its(:config) {should_not == nil}
8
+ # its(:containers) {should_not == nil}
9
+ # its(:data_types) {should_not == nil}
10
+ # its(:operators) {should_not == nil}
11
+ # its(:operator_order) {should_not == nil}
12
12
  end
13
13
  end
14
14
  end