will_filter 3.0.5 → 3.1.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (233) hide show
  1. data/.gitignore +6 -0
  2. data/.rspec +1 -0
  3. data/.rvmrc +1 -0
  4. data/CHANGELOG.rdoc +2 -0
  5. data/Gemfile +4 -0
  6. data/Gemfile.lock +156 -0
  7. data/MIT-LICENSE +20 -0
  8. data/README.rdoc +78 -0
  9. data/Rakefile +68 -0
  10. data/app/.DS_Store +0 -0
  11. data/app/assets/images/.DS_Store +0 -0
  12. data/{public/favicon.ico → app/assets/images/will_filter/.gitkeep} +0 -0
  13. data/{public/will_filter/images → app/assets/images/will_filter}/buttons.png +0 -0
  14. data/{public/will_filter/images → app/assets/images/will_filter}/calendar.png +0 -0
  15. data/{public/will_filter/images → app/assets/images/will_filter}/clock.png +0 -0
  16. data/{public/will_filter/images → app/assets/images/will_filter}/close.gif +0 -0
  17. data/{public/will_filter/images → app/assets/images/will_filter}/sort_arrow_all.gif +0 -0
  18. data/{public/will_filter/images → app/assets/images/will_filter}/sort_bg.gif +0 -0
  19. data/{public/will_filter/images → app/assets/images/will_filter}/spinner.gif +0 -0
  20. data/{public/will_filter/javascripts/will_filter.js → app/assets/javascripts/will_filter/filter.js} +7 -7
  21. data/app/assets/javascripts/will_filter/filter_prototype_effects.js +38 -0
  22. data/app/assets/stylesheets/will_filter/actions.css.scss +27 -0
  23. data/app/assets/stylesheets/will_filter/buttons.css.scss +24 -0
  24. data/app/assets/stylesheets/will_filter/calendar.css.scss +55 -0
  25. data/app/assets/stylesheets/will_filter/exporter.css.scss +43 -0
  26. data/app/assets/stylesheets/will_filter/filter.css.scss +152 -0
  27. data/app/assets/stylesheets/will_filter/results.css.scss +63 -0
  28. data/app/controllers/{application_controller.rb → will_filter/application_controller.rb} +4 -4
  29. data/app/controllers/will_filter/calendar_controller.rb +1 -1
  30. data/app/controllers/will_filter/exporter_controller.rb +1 -1
  31. data/app/controllers/will_filter/filter_controller.rb +1 -7
  32. data/app/models/will_filter/filter.rb +12 -40
  33. data/app/views/.DS_Store +0 -0
  34. data/app/views/layouts/will_filter/application.html.erb +14 -0
  35. data/app/views/will_filter/.DS_Store +0 -0
  36. data/app/views/will_filter/calendar/.tmp__annual.html.erb.10120~ +32 -0
  37. data/app/views/will_filter/calendar/.tmp__annual.html.erb.2839~ +14 -0
  38. data/app/views/will_filter/calendar/.tmp__annual.html.erb.58862~ +14 -0
  39. data/app/views/will_filter/calendar/.tmp__annual.html.erb.64846~ +14 -0
  40. data/app/views/will_filter/calendar/.tmp__annual.html.erb.68789~ +32 -0
  41. data/app/views/will_filter/calendar/.tmp__annual.html.erb.93003~ +14 -0
  42. data/app/views/will_filter/calendar/.tmp__annual.html.erb.93827~ +32 -0
  43. data/app/views/will_filter/calendar/.tmp__month.html.erb.756~ +39 -0
  44. data/app/views/will_filter/calendar/.tmp__quarter.html.erb.69400~ +24 -0
  45. data/app/views/will_filter/calendar/.tmp_index.html.erb.11043~ +52 -0
  46. data/app/views/will_filter/calendar/.tmp_index.html.erb.33725~ +52 -0
  47. data/app/views/will_filter/calendar/.tmp_index.html.erb.56447~ +66 -0
  48. data/app/views/will_filter/calendar/.tmp_index.html.erb.85379~ +70 -0
  49. data/app/views/will_filter/calendar/.tmp_index.html.erb.86425~ +70 -0
  50. data/app/views/will_filter/calendar/.tmp_index.html.erb.95884~ +52 -0
  51. data/app/views/will_filter/calendar/index.html.erb +3 -3
  52. data/app/views/will_filter/common/.tmp__results_table.html.erb.47785~ +87 -0
  53. data/app/views/will_filter/common/.tmp__results_table.html.erb.88043~ +87 -0
  54. data/app/views/will_filter/common/.tmp__scripts.html.erb.51111~ +0 -0
  55. data/app/views/will_filter/common/.tmp__scripts.html.erb.6990~ +2 -0
  56. data/app/views/will_filter/common/.tmp__scripts.html.erb.88469~ +6 -0
  57. data/app/views/will_filter/common/_results_table.html.erb +6 -2
  58. data/app/views/will_filter/common/_scripts.html.erb +8 -2
  59. data/app/views/will_filter/exporter/.tmp_export.html.erb.10837~ +9 -0
  60. data/app/views/will_filter/exporter/.tmp_export.html.erb.1415~ +29 -0
  61. data/app/views/will_filter/exporter/.tmp_export.html.erb.60681~ +29 -0
  62. data/app/views/will_filter/exporter/.tmp_export.html.erb.61343~ +29 -0
  63. data/app/views/will_filter/exporter/.tmp_export_dialog.html.erb.22940~ +38 -0
  64. data/app/views/will_filter/exporter/.tmp_index.html.erb.13538~ +47 -0
  65. data/app/views/will_filter/exporter/.tmp_index.html.erb.23276~ +47 -0
  66. data/app/views/will_filter/exporter/.tmp_index.html.erb.28308~ +44 -0
  67. data/app/views/will_filter/exporter/.tmp_index.html.erb.29049~ +44 -0
  68. data/app/views/will_filter/exporter/index.html.erb +1 -1
  69. data/app/views/will_filter/filter/.tmp__condition.html.erb.24762~ +28 -0
  70. data/app/views/will_filter/filter/.tmp__condition.html.erb.27587~ +28 -0
  71. data/app/views/will_filter/filter/.tmp__condition.html.erb.45362~ +28 -0
  72. data/app/views/will_filter/filter/.tmp__condition.html.erb.49252~ +28 -0
  73. data/app/views/will_filter/filter/.tmp__condition.html.erb.58234~ +30 -0
  74. data/app/views/will_filter/filter/.tmp__condition.html.erb.60688~ +28 -0
  75. data/app/views/will_filter/filter/.tmp__condition.html.erb.66557~ +28 -0
  76. data/app/views/will_filter/filter/.tmp__condition.html.erb.68032~ +30 -0
  77. data/app/views/will_filter/filter/.tmp__condition.html.erb.73740~ +28 -0
  78. data/app/views/will_filter/filter/.tmp__condition.html.erb.81041~ +30 -0
  79. data/app/views/will_filter/filter/.tmp__condition.html.erb.98638~ +28 -0
  80. data/app/views/will_filter/filter/.tmp__conditions.html.erb.23216~ +50 -0
  81. data/app/views/will_filter/filter/.tmp__conditions.html.erb.53568~ +50 -0
  82. data/app/views/will_filter/filter/.tmp__conditions.html.erb.5788~ +56 -0
  83. data/app/views/will_filter/filter/.tmp__conditions.html.erb.79521~ +50 -0
  84. data/app/views/will_filter/filter/.tmp__conditions.html.erb.92102~ +56 -0
  85. data/app/views/will_filter/filter/.tmp__conditions.html.erb.97034~ +52 -0
  86. data/app/views/will_filter/filter/.tmp__container.html.erb.23178~ +30 -0
  87. data/app/views/will_filter/filter/.tmp__container.html.erb.25113~ +31 -0
  88. data/app/views/will_filter/filter/.tmp__container.html.erb.29332~ +36 -0
  89. data/app/views/will_filter/filter/.tmp__container.html.erb.31412~ +32 -0
  90. data/app/views/will_filter/filter/.tmp__container.html.erb.57958~ +32 -0
  91. data/app/views/will_filter/filter/.tmp__container.html.erb.80588~ +30 -0
  92. data/app/views/will_filter/filter/.tmp__container.html.erb.89054~ +30 -0
  93. data/app/views/will_filter/filter/.tmp__container.html.erb.92260~ +32 -0
  94. data/app/views/will_filter/filter/.tmp__container.html.erb.92798~ +36 -0
  95. data/app/views/will_filter/filter/.tmp__filter_conditions.html.erb.70617~ +78 -0
  96. data/app/views/will_filter/filter/.tmp_calendar.html.erb.30839~ +66 -0
  97. data/app/views/will_filter/filter/.tmp_calendar.html.erb.52766~ +66 -0
  98. data/app/views/will_filter/filter/.tmp_calendar.html.erb.83182~ +66 -0
  99. data/app/views/will_filter/filter/.tmp_export_data.html.erb.50322~ +44 -0
  100. data/app/views/will_filter/filter/.tmp_index.html.erb.40957~ +4 -0
  101. data/app/views/will_filter/filter/_condition.html.erb +5 -5
  102. data/app/views/will_filter/filter/_conditions.html.erb +4 -7
  103. data/app/views/will_filter/filter/_container.html.erb +5 -5
  104. data/app/views/will_filter/filter/containers/_boolean.html.erb +2 -2
  105. data/app/views/will_filter/filter/containers/_date.html.erb +3 -5
  106. data/app/views/will_filter/filter/containers/_date_range.html.erb +5 -9
  107. data/app/views/will_filter/filter/containers/_date_time.html.erb +3 -5
  108. data/app/views/will_filter/filter/containers/_date_time_range.html.erb +5 -9
  109. data/app/views/will_filter/filter/containers/_list.html.erb +1 -1
  110. data/app/views/will_filter/filter/containers/_numeric_range.html.erb +3 -3
  111. data/app/views/will_filter/filter/containers/_text.html.erb +2 -2
  112. data/app/views/will_filter/filter/index.html.erb +1 -1
  113. data/config/routes.rb +39 -17
  114. data/db/migrate/20110924023807_create_will_filter_filters.rb +15 -0
  115. data/lib/generators/.DS_Store +0 -0
  116. data/lib/generators/will_filter/templates/config.yml +0 -28
  117. data/lib/generators/will_filter/templates/create_will_filter_filters.rb +15 -0
  118. data/lib/generators/will_filter/will_filter_generator.rb +27 -4
  119. data/lib/tasks/will_filter_tasks.rake +1 -2
  120. data/lib/will_filter.rb +26 -1
  121. data/lib/will_filter/calendar.rb +1 -1
  122. data/lib/will_filter/config.rb +1 -6
  123. data/lib/will_filter/containers/filter_list.rb +2 -2
  124. data/lib/will_filter/engine.rb +23 -17
  125. data/lib/will_filter/{common_methods.rb → extensions/action_controller_extension.rb} +18 -20
  126. data/lib/will_filter/extensions/action_view_extension.rb +50 -0
  127. data/lib/{core_ext/active_record/base.rb → will_filter/extensions/active_record_extension.rb} +22 -17
  128. data/lib/{core_ext/array.rb → will_filter/extensions/array_extension.rb} +1 -1
  129. data/lib/{application_helper.rb → will_filter/railtie.rb} +30 -20
  130. data/{app/helpers/application_helper.rb → lib/will_filter/version.rb} +3 -3
  131. data/script/rails +6 -0
  132. data/spec/spec_helper.rb +27 -0
  133. data/test/.DS_Store +0 -0
  134. data/test/dummy/.DS_Store +0 -0
  135. data/test/dummy/.sass-cache/f9cb1ef521115be73f1c61d3d5d64f66c947af63/actions.css.scssc +0 -0
  136. data/test/dummy/.sass-cache/f9cb1ef521115be73f1c61d3d5d64f66c947af63/buttons.css.scssc +0 -0
  137. data/test/dummy/.sass-cache/f9cb1ef521115be73f1c61d3d5d64f66c947af63/calendar.css.scssc +0 -0
  138. data/test/dummy/.sass-cache/f9cb1ef521115be73f1c61d3d5d64f66c947af63/exporter.css.scssc +0 -0
  139. data/test/dummy/.sass-cache/f9cb1ef521115be73f1c61d3d5d64f66c947af63/filter.css.scssc +0 -0
  140. data/test/dummy/.sass-cache/f9cb1ef521115be73f1c61d3d5d64f66c947af63/results.css.scssc +0 -0
  141. data/test/dummy/Rakefile +7 -0
  142. data/test/dummy/app/.DS_Store +0 -0
  143. data/test/dummy/app/assets/javascripts/application.js +7 -0
  144. data/test/dummy/app/assets/stylesheets/application.css +7 -0
  145. data/test/dummy/app/assets/stylesheets/kaminari.css +10 -0
  146. data/test/dummy/app/controllers/advanced_controller.rb +19 -0
  147. data/test/dummy/app/controllers/application_controller.rb +8 -0
  148. data/test/dummy/app/controllers/simple_controller.rb +15 -0
  149. data/test/dummy/app/helpers/application_helper.rb +3 -0
  150. data/test/dummy/app/mailers/.gitkeep +0 -0
  151. data/test/dummy/app/models/.gitkeep +0 -0
  152. data/test/dummy/app/models/event.rb +15 -0
  153. data/test/dummy/app/models/event_filter.rb +41 -0
  154. data/test/dummy/app/models/event_user.rb +10 -0
  155. data/test/dummy/app/models/event_user_filter.rb +40 -0
  156. data/test/dummy/app/models/user.rb +42 -0
  157. data/test/dummy/app/models/user_filter.rb +57 -0
  158. data/test/dummy/app/views/advanced/event_members.html.erb +2 -0
  159. data/test/dummy/app/views/advanced/events.html.erb +2 -0
  160. data/test/dummy/app/views/advanced/users.html.erb +2 -0
  161. data/test/dummy/app/views/advanced/users_with_actions.html.erb +12 -0
  162. data/test/dummy/app/views/common/_event_members.html.erb +2 -0
  163. data/test/dummy/app/views/common/_events.html.erb +2 -0
  164. data/test/dummy/app/views/common/_menu.html.erb +23 -0
  165. data/test/dummy/app/views/common/_users.html.erb +2 -0
  166. data/test/dummy/app/views/kaminari/_first_page.html.erb +11 -0
  167. data/test/dummy/app/views/kaminari/_gap.html.erb +8 -0
  168. data/test/dummy/app/views/kaminari/_last_page.html.erb +11 -0
  169. data/test/dummy/app/views/kaminari/_next_page.html.erb +11 -0
  170. data/test/dummy/app/views/kaminari/_page.html.erb +12 -0
  171. data/test/dummy/app/views/kaminari/_paginator.html.erb +23 -0
  172. data/test/dummy/app/views/kaminari/_prev_page.html.erb +11 -0
  173. data/test/dummy/app/views/layouts/application.html.erb +17 -0
  174. data/test/dummy/app/views/simple/event_members.html.erb +2 -0
  175. data/test/dummy/app/views/simple/events.html.erb +3 -0
  176. data/test/dummy/app/views/simple/users.html.erb +2 -0
  177. data/test/dummy/config.ru +4 -0
  178. data/{config → test/dummy/config}/application.rb +11 -10
  179. data/test/dummy/config/boot.rb +10 -0
  180. data/test/dummy/config/data/female_names.txt +26 -0
  181. data/test/dummy/config/data/last_names.txt +50 -0
  182. data/test/dummy/config/data/male_names.txt +25 -0
  183. data/{config → test/dummy/config}/database.yml +3 -0
  184. data/test/dummy/config/environment.rb +5 -0
  185. data/{config → test/dummy/config}/environments/development.rb +8 -4
  186. data/{config → test/dummy/config}/environments/production.rb +24 -13
  187. data/{config → test/dummy/config}/environments/test.rb +9 -5
  188. data/test/dummy/config/initializers/backtrace_silencers.rb +7 -0
  189. data/test/dummy/config/initializers/inflections.rb +10 -0
  190. data/test/dummy/config/initializers/mime_types.rb +5 -0
  191. data/test/dummy/config/initializers/secret_token.rb +7 -0
  192. data/test/dummy/config/initializers/session_store.rb +8 -0
  193. data/test/dummy/config/initializers/wrap_parameters.rb +14 -0
  194. data/test/dummy/config/locales/en.yml +5 -0
  195. data/test/dummy/config/routes.rb +13 -0
  196. data/test/dummy/config/will_filter/config.yml +97 -0
  197. data/test/dummy/db/migrate/.DS_Store +0 -0
  198. data/test/dummy/db/migrate/20090416182137_create_users.rb +15 -0
  199. data/test/dummy/db/migrate/20090418042757_create_events.rb +20 -0
  200. data/test/dummy/db/migrate/20090418062225_create_event_users.rb +17 -0
  201. data/test/dummy/db/schema.rb +61 -0
  202. data/test/dummy/lib/assets/.gitkeep +0 -0
  203. data/test/dummy/lib/tasks/dummy.rake +14 -0
  204. data/test/dummy/log/.gitkeep +0 -0
  205. data/{public → test/dummy/public}/404.html +0 -0
  206. data/{public → test/dummy/public}/422.html +0 -0
  207. data/{public → test/dummy/public}/500.html +0 -0
  208. data/test/dummy/public/favicon.ico +0 -0
  209. data/test/dummy/script/rails +6 -0
  210. data/test/dummy/test/functional/welcome_controller_test.rb +9 -0
  211. data/test/dummy/test/unit/helpers/welcome_helper_test.rb +4 -0
  212. data/test/fixtures/will_filter/filters.yml +11 -0
  213. data/test/functional/will_filter/calendar_controller_test.rb +9 -0
  214. data/test/functional/will_filter/exporter_controller_test.rb +9 -0
  215. data/test/functional/will_filter/filter_controller_test.rb +9 -0
  216. data/test/integration/navigation_test.rb +10 -0
  217. data/test/test_helper.rb +10 -0
  218. data/test/unit/helpers/will_filter/calendar_helper_test.rb +6 -0
  219. data/test/unit/helpers/will_filter/exporter_helper_test.rb +6 -0
  220. data/test/unit/helpers/will_filter/filter_helper_test.rb +6 -0
  221. data/test/unit/will_filter/filter_test.rb +9 -0
  222. data/test/will_filter_test.rb +7 -0
  223. data/will_filter.gemspec +38 -0
  224. metadata +446 -45
  225. data/app/views/layouts/application.html.erb +0 -11
  226. data/config/boot.rb +0 -6
  227. data/config/environment.rb +0 -15
  228. data/lib/core_ext/object.rb +0 -34
  229. data/lib/generators/will_filter/templates/create_will_filter_tables.rb +0 -19
  230. data/public/robots.txt +0 -5
  231. data/public/will_filter/images/results_table_th_active.gif +0 -0
  232. data/public/will_filter/javascripts/will_filter_prototype_effects.js +0 -15
  233. data/public/will_filter/stylesheets/will_filter.css +0 -168
@@ -0,0 +1,2 @@
1
+ <%= will_filter_tag(@users) %>
2
+ <%= will_filter_table_tag(@users) %>
@@ -0,0 +1,11 @@
1
+ <%# Link to the "First" page
2
+ - available local variables
3
+ url: url to the first page
4
+ current_page: a page object for the currently displayed page
5
+ num_pages: total number of pages
6
+ per_page: number of items to fetch per page
7
+ remote: data-remote
8
+ -%>
9
+ <span class="first">
10
+ <%= link_to_unless current_page.first?, raw(t 'views.pagination.first'), url, :remote => remote %>
11
+ </span>
@@ -0,0 +1,8 @@
1
+ <%# Non-link tag that stands for skipped pages...
2
+ - available local variables
3
+ current_page: a page object for the currently displayed page
4
+ num_pages: total number of pages
5
+ per_page: number of items to fetch per page
6
+ remote: data-remote
7
+ -%>
8
+ <span class="page gap"><%= raw(t 'views.pagination.truncate') %></span>
@@ -0,0 +1,11 @@
1
+ <%# Link to the "Last" page
2
+ - available local variables
3
+ url: url to the last page
4
+ current_page: a page object for the currently displayed page
5
+ num_pages: total number of pages
6
+ per_page: number of items to fetch per page
7
+ remote: data-remote
8
+ -%>
9
+ <span class="last">
10
+ <%= link_to_unless current_page.last?, raw(t 'views.pagination.last'), url, {:remote => remote} %>
11
+ </span>
@@ -0,0 +1,11 @@
1
+ <%# Link to the "Next" page
2
+ - available local variables
3
+ url: url to the next page
4
+ current_page: a page object for the currently displayed page
5
+ num_pages: total number of pages
6
+ per_page: number of items to fetch per page
7
+ remote: data-remote
8
+ -%>
9
+ <span class="next">
10
+ <%= link_to_unless current_page.last?, raw(t 'views.pagination.next'), url, :rel => 'next', :remote => remote %>
11
+ </span>
@@ -0,0 +1,12 @@
1
+ <%# Link showing page number
2
+ - available local variables
3
+ page: a page object for "this" page
4
+ url: url to this page
5
+ current_page: a page object for the currently displayed page
6
+ num_pages: total number of pages
7
+ per_page: number of items to fetch per page
8
+ remote: data-remote
9
+ -%>
10
+ <span class="page<%= ' current' if page.current? %>">
11
+ <%= link_to_unless page.current?, page, url, opts = {:remote => remote, :rel => page.next? ? 'next' : page.prev? ? 'prev' : nil} %>
12
+ </span>
@@ -0,0 +1,23 @@
1
+ <%# The container tag
2
+ - available local variables
3
+ current_page: a page object for the currently displayed page
4
+ num_pages: total number of pages
5
+ per_page: number of items to fetch per page
6
+ remote: data-remote
7
+ paginator: the paginator that renders the pagination tags inside
8
+ -%>
9
+ <%= paginator.render do -%>
10
+ <nav class="pagination">
11
+ <%= first_page_tag %>
12
+ <%= prev_page_tag %>
13
+ <% each_page do |page| -%>
14
+ <% if page.left_outer? || page.right_outer? || page.inside_window? -%>
15
+ <%= page_tag page %>
16
+ <% elsif !page.was_truncated? -%>
17
+ <%= gap_tag %>
18
+ <% end -%>
19
+ <% end -%>
20
+ <%= next_page_tag unless current_page.last? %>
21
+ <%= last_page_tag unless current_page.last? %>
22
+ </nav>
23
+ <% end -%>
@@ -0,0 +1,11 @@
1
+ <%# Link to the "Previous" page
2
+ - available local variables
3
+ url: url to the previous page
4
+ current_page: a page object for the currently displayed page
5
+ num_pages: total number of pages
6
+ per_page: number of items to fetch per page
7
+ remote: data-remote
8
+ -%>
9
+ <span class="prev">
10
+ <%= link_to_unless current_page.first?, raw(t 'views.pagination.previous'), url, :rel => 'prev', :remote => remote %>
11
+ </span>
@@ -0,0 +1,17 @@
1
+ <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
2
+ <html>
3
+ <head>
4
+ <title>will_filter examples</title>
5
+ <%= stylesheet_link_tag "application" %>
6
+ <%= javascript_include_tag "application" %>
7
+ <%= csrf_meta_tags %>
8
+ </head>
9
+ <body style="margin:0px;">
10
+ <%= render(:partial => '/common/menu')%>
11
+ <center>
12
+ <div style="width:900px;text-align:left;">
13
+ <%= yield %>
14
+ </div>
15
+ </center>
16
+ </body>
17
+ </html>
@@ -0,0 +1,2 @@
1
+ <h1>Simple Event Members Filter</h1>
2
+ <%= render :partial=> "/common/event_members" %>
@@ -0,0 +1,3 @@
1
+ <h1>Simple Events Filter</h1>
2
+ <%= render :partial=> "/common/events" %>
3
+
@@ -0,0 +1,2 @@
1
+ <h1>Simple Users Filter</h1>
2
+ <%= render :partial=> "/common/users" %>
@@ -0,0 +1,4 @@
1
+ # This file is used by Rack-based servers to start the application.
2
+
3
+ require ::File.expand_path('../config/environment', __FILE__)
4
+ run Dummy::Application
@@ -1,13 +1,12 @@
1
1
  require File.expand_path('../boot', __FILE__)
2
2
 
3
3
  require 'rails/all'
4
- require 'pp'
5
4
 
6
- # If you have a Gemfile, require the gems listed there, including any gems
7
- # you've limited to :test, :development, or :production.
8
- Bundler.require(:default, Rails.env) if defined?(Bundler)
5
+ Bundler.require
6
+ require "will_filter"
7
+ require "kaminari"
9
8
 
10
- module WillFilter
9
+ module Dummy
11
10
  class Application < Rails::Application
12
11
  # Settings in config/environments/* take precedence over those specified here.
13
12
  # Application configuration should go into files in config/initializers
@@ -31,15 +30,17 @@ module WillFilter
31
30
  # config.i18n.load_path += Dir[Rails.root.join('my', 'locales', '*.{rb,yml}').to_s]
32
31
  # config.i18n.default_locale = :de
33
32
 
34
- # JavaScript files you want as :defaults (application.js is always included).
35
- # config.action_view.javascript_expansions[:defaults] = %w(jquery rails)
36
-
37
33
  # Configure the default encoding used in templates for Ruby 1.9.
38
34
  config.encoding = "utf-8"
39
35
 
40
36
  # Configure sensitive parameters which will be filtered from the log file.
41
37
  config.filter_parameters += [:password]
42
- config.session_store :active_record_store
43
- config.secret_token = 'ba8e7d52f10084c758887c56815e894f32aef79496ecb2ed9ab9458a0bd37b33d6d2bace4a2c1cd828e4aaf347a5b23fe1c9c14ef11c7c9ad950207022902003'
38
+
39
+ # Enable the asset pipeline
40
+ config.assets.enabled = true
41
+
42
+ # Version of your assets, change this if you want to expire all your assets
43
+ config.assets.version = '1.0'
44
44
  end
45
45
  end
46
+
@@ -0,0 +1,10 @@
1
+ require 'rubygems'
2
+ gemfile = File.expand_path('../../../../Gemfile', __FILE__)
3
+
4
+ if File.exist?(gemfile)
5
+ ENV['BUNDLE_GEMFILE'] = gemfile
6
+ require 'bundler'
7
+ Bundler.setup
8
+ end
9
+
10
+ $:.unshift File.expand_path('../../../../lib', __FILE__)
@@ -0,0 +1,26 @@
1
+ Amy
2
+ Barbara
3
+ Betty
4
+ Carol
5
+ Deborah
6
+ Donna
7
+ Dorothy
8
+ Elizabeth
9
+ Helen
10
+ Jennifer
11
+ Karen
12
+ Kimberly
13
+ Laura
14
+ Linda
15
+ Lisa
16
+ Margaret
17
+ Maria
18
+ Mary
19
+ Michelle
20
+ Nancy
21
+ Patricia
22
+ Ruth
23
+ Sandra
24
+ Sarah
25
+ Sharon
26
+ Susan
@@ -0,0 +1,50 @@
1
+ Adams
2
+ Allen
3
+ Anderson
4
+ Baker
5
+ Brown
6
+ Campbell
7
+ Carter
8
+ Clark
9
+ Collins
10
+ Davis
11
+ Edwards
12
+ Evans
13
+ Garcia
14
+ Gonzalez
15
+ Green
16
+ Hall
17
+ Harris
18
+ Hernandez
19
+ Hill
20
+ Jackson
21
+ Johnson
22
+ Jones
23
+ King
24
+ Lee
25
+ Lewis
26
+ Lopez
27
+ Martin
28
+ Martinez
29
+ Miller
30
+ Mitchell
31
+ Moore
32
+ Nelson
33
+ Parker
34
+ Perez
35
+ Phillips
36
+ Roberts
37
+ Robinson
38
+ Rodriguez
39
+ Scott
40
+ Smith
41
+ Taylor
42
+ Thomas
43
+ Thompson
44
+ Turner
45
+ Walker
46
+ White
47
+ Williams
48
+ Wilson
49
+ Wright
50
+ Young
@@ -0,0 +1,25 @@
1
+ Anthony
2
+ Brian
3
+ Charles
4
+ Christopher
5
+ Daniel
6
+ David
7
+ Donald
8
+ Edward
9
+ George
10
+ James
11
+ Jason
12
+ Jeff
13
+ John
14
+ Joseph
15
+ Kenneth
16
+ Kevin
17
+ Mark
18
+ Michael
19
+ Paul
20
+ Richard
21
+ Robert
22
+ Ronald
23
+ Steven
24
+ Thomas
25
+ William
@@ -1,5 +1,8 @@
1
1
  # SQLite version 3.x
2
2
  # gem install sqlite3
3
+ #
4
+ # Ensure the SQLite 3 gem is defined in your Gemfile
5
+ # gem 'sqlite3'
3
6
  development:
4
7
  adapter: sqlite3
5
8
  database: db/development.sqlite3
@@ -0,0 +1,5 @@
1
+ # Load the rails application
2
+ require File.expand_path('../application', __FILE__)
3
+
4
+ # Initialize the rails application
5
+ Dummy::Application.initialize!
@@ -1,9 +1,9 @@
1
- WillFilter::Application.configure do
1
+ Dummy::Application.configure do
2
2
  # Settings specified here will take precedence over those in config/application.rb
3
3
 
4
4
  # In the development environment your application's code is reloaded on
5
5
  # every request. This slows down response time but is perfect for development
6
- # since you don't have to restart the webserver when you make code changes.
6
+ # since you don't have to restart the web server when you make code changes.
7
7
  config.cache_classes = false
8
8
 
9
9
  # Log error messages when you accidentally call methods on nil.
@@ -11,7 +11,6 @@ WillFilter::Application.configure do
11
11
 
12
12
  # Show full error reports and disable caching
13
13
  config.consider_all_requests_local = true
14
- config.action_view.debug_rjs = true
15
14
  config.action_controller.perform_caching = false
16
15
 
17
16
  # Don't care if the mailer can't send
@@ -22,5 +21,10 @@ WillFilter::Application.configure do
22
21
 
23
22
  # Only use best-standards-support built into browsers
24
23
  config.action_dispatch.best_standards_support = :builtin
25
- end
26
24
 
25
+ # Do not compress assets
26
+ config.assets.compress = false
27
+
28
+ # Expands the lines which load the assets
29
+ config.assets.debug = true
30
+ end
@@ -1,7 +1,6 @@
1
- WillFilter::Application.configure do
1
+ Dummy::Application.configure do
2
2
  # Settings specified here will take precedence over those in config/application.rb
3
3
 
4
- # The production environment is meant for finished, "live" apps.
5
4
  # Code is not reloaded between requests
6
5
  config.cache_classes = true
7
6
 
@@ -9,14 +8,27 @@ WillFilter::Application.configure do
9
8
  config.consider_all_requests_local = false
10
9
  config.action_controller.perform_caching = true
11
10
 
12
- # Specifies the header that your server uses for sending files
13
- config.action_dispatch.x_sendfile_header = "X-Sendfile"
11
+ # Disable Rails's static asset server (Apache or nginx will already do this)
12
+ config.serve_static_assets = false
13
+
14
+ # Compress JavaScripts and CSS
15
+ config.assets.compress = true
16
+
17
+ # Don't fallback to assets pipeline if a precompiled asset is missed
18
+ config.assets.compile = false
19
+
20
+ # Generate digests for assets URLs
21
+ config.assets.digest = true
14
22
 
15
- # For nginx:
16
- # config.action_dispatch.x_sendfile_header = 'X-Accel-Redirect'
23
+ # Defaults to Rails.root.join("public/assets")
24
+ # config.assets.manifest = YOUR_PATH
17
25
 
18
- # If you have no front-end server that supports something like X-Sendfile,
19
- # just comment this out and Rails will serve the files
26
+ # Specifies the header that your server uses for sending files
27
+ # config.action_dispatch.x_sendfile_header = "X-Sendfile" # for apache
28
+ # config.action_dispatch.x_sendfile_header = 'X-Accel-Redirect' # for nginx
29
+
30
+ # Force all access to the app over SSL, use Strict-Transport-Security, and use secure cookies.
31
+ # config.force_ssl = true
20
32
 
21
33
  # See everything in the log (default is :info)
22
34
  # config.log_level = :debug
@@ -27,13 +39,12 @@ WillFilter::Application.configure do
27
39
  # Use a different cache store in production
28
40
  # config.cache_store = :mem_cache_store
29
41
 
30
- # Disable Rails's static asset server
31
- # In production, Apache or nginx will already do this
32
- config.serve_static_assets = false
33
-
34
- # Enable serving of images, stylesheets, and javascripts from an asset server
42
+ # Enable serving of images, stylesheets, and JavaScripts from an asset server
35
43
  # config.action_controller.asset_host = "http://assets.example.com"
36
44
 
45
+ # Precompile additional assets (application.js, application.css, and all non-JS/CSS are already added)
46
+ # config.assets.precompile += %w( search.js )
47
+
37
48
  # Disable delivery errors, bad email addresses will be ignored
38
49
  # config.action_mailer.raise_delivery_errors = false
39
50
 
@@ -1,4 +1,4 @@
1
- WillFilter::Application.configure do
1
+ Dummy::Application.configure do
2
2
  # Settings specified here will take precedence over those in config/application.rb
3
3
 
4
4
  # The test environment is used exclusively to run your application's
@@ -7,7 +7,11 @@ WillFilter::Application.configure do
7
7
  # and recreated between test runs. Don't rely on the data there!
8
8
  config.cache_classes = true
9
9
 
10
- # Log error messages when you accidentally call methods on nil.
10
+ # Configure static asset server for tests with Cache-Control for performance
11
+ config.serve_static_assets = true
12
+ config.static_cache_control = "public, max-age=3600"
13
+
14
+ # Log error messages when you accidentally call methods on nil
11
15
  config.whiny_nils = true
12
16
 
13
17
  # Show full error reports and disable caching
@@ -32,7 +36,7 @@ WillFilter::Application.configure do
32
36
 
33
37
  # Print deprecation notices to the stderr
34
38
  config.active_support.deprecation = :stderr
35
-
36
-
37
-
39
+
40
+ # Allow pass debug_assets=true as a query parameter to load pages with unpackaged assets
41
+ config.assets.allow_debugging = true
38
42
  end
@@ -0,0 +1,7 @@
1
+ # Be sure to restart your server when you modify this file.
2
+
3
+ # You can add backtrace silencers for libraries that you're using but don't wish to see in your backtraces.
4
+ # Rails.backtrace_cleaner.add_silencer { |line| line =~ /my_noisy_library/ }
5
+
6
+ # You can also remove all the silencers if you're trying to debug a problem that might stem from framework code.
7
+ # Rails.backtrace_cleaner.remove_silencers!