rails_admin 0.6.0 → 0.6.1

Sign up to get free protection for your applications and to get access to all the features.

Potentially problematic release.


This version of rails_admin might be problematic. Click here for more details.

Files changed (528) hide show
  1. checksums.yaml +7 -0
  2. checksums.yaml.gz.sig +0 -0
  3. data.tar.gz.sig +0 -0
  4. data/Gemfile +22 -10
  5. data/README.md +32 -92
  6. data/Rakefile +13 -2
  7. data/app/assets/stylesheets/rails_admin/aristo/jquery-ui-1.8.7.custom.scss +3 -3
  8. data/app/assets/stylesheets/rails_admin/base/font-awesome-4-compability.scss +153 -58
  9. data/app/controllers/rails_admin/application_controller.rb +12 -12
  10. data/app/controllers/rails_admin/main_controller.rb +30 -35
  11. data/app/helpers/rails_admin/application_helper.rb +37 -40
  12. data/app/helpers/rails_admin/form_builder.rb +26 -25
  13. data/app/helpers/rails_admin/main_helper.rb +10 -9
  14. data/app/views/rails_admin/main/_dashboard_history.html.haml +5 -4
  15. data/app/views/rails_admin/main/index.html.haml +7 -0
  16. data/config/initializers/active_record_extensions.rb +3 -3
  17. data/config/initializers/haml.rb +1 -1
  18. data/config/routes.rb +7 -7
  19. data/lib/generators/rails_admin/install_generator.rb +5 -84
  20. data/lib/generators/rails_admin/templates/initializer.erb +29 -95
  21. data/lib/generators/rails_admin/utils.rb +3 -14
  22. data/lib/rails_admin.rb +1 -1
  23. data/lib/rails_admin/abstract_model.rb +30 -28
  24. data/lib/rails_admin/adapters/active_record.rb +36 -36
  25. data/lib/rails_admin/adapters/active_record/abstract_object.rb +2 -2
  26. data/lib/rails_admin/adapters/mongoid.rb +102 -108
  27. data/lib/rails_admin/adapters/mongoid/abstract_object.rb +1 -1
  28. data/lib/rails_admin/adapters/mongoid/extension.rb +5 -5
  29. data/lib/rails_admin/bootstrap-sass.rb +7 -8
  30. data/lib/rails_admin/bootstrap-sass/compass_functions.rb +2 -1
  31. data/lib/rails_admin/config.rb +24 -29
  32. data/lib/rails_admin/config/actions.rb +12 -15
  33. data/lib/rails_admin/config/actions/base.rb +8 -8
  34. data/lib/rails_admin/config/actions/bulk_delete.rb +3 -3
  35. data/lib/rails_admin/config/actions/dashboard.rb +5 -5
  36. data/lib/rails_admin/config/actions/delete.rb +4 -4
  37. data/lib/rails_admin/config/actions/edit.rb +3 -3
  38. data/lib/rails_admin/config/actions/export.rb +1 -1
  39. data/lib/rails_admin/config/actions/history_index.rb +1 -1
  40. data/lib/rails_admin/config/actions/history_show.rb +1 -1
  41. data/lib/rails_admin/config/actions/index.rb +20 -11
  42. data/lib/rails_admin/config/actions/new.rb +3 -3
  43. data/lib/rails_admin/config/actions/show.rb +2 -2
  44. data/lib/rails_admin/config/actions/show_in_app.rb +1 -1
  45. data/lib/rails_admin/config/configurable.rb +27 -27
  46. data/lib/rails_admin/config/fields.rb +7 -7
  47. data/lib/rails_admin/config/fields/association.rb +6 -7
  48. data/lib/rails_admin/config/fields/base.rb +32 -30
  49. data/lib/rails_admin/config/fields/factories/association.rb +9 -10
  50. data/lib/rails_admin/config/fields/factories/carrierwave.rb +3 -9
  51. data/lib/rails_admin/config/fields/factories/devise.rb +2 -4
  52. data/lib/rails_admin/config/fields/factories/dragonfly.rb +3 -5
  53. data/lib/rails_admin/config/fields/factories/enum.rb +1 -1
  54. data/lib/rails_admin/config/fields/factories/paperclip.rb +3 -3
  55. data/lib/rails_admin/config/fields/group.rb +6 -8
  56. data/lib/rails_admin/config/fields/types.rb +2 -2
  57. data/lib/rails_admin/config/fields/types/belongs_to_association.rb +4 -4
  58. data/lib/rails_admin/config/fields/types/boolean.rb +2 -2
  59. data/lib/rails_admin/config/fields/types/bson_object_id.rb +7 -12
  60. data/lib/rails_admin/config/fields/types/carrierwave.rb +1 -1
  61. data/lib/rails_admin/config/fields/types/ck_editor.rb +3 -3
  62. data/lib/rails_admin/config/fields/types/code_mirror.rb +9 -9
  63. data/lib/rails_admin/config/fields/types/color.rb +2 -2
  64. data/lib/rails_admin/config/fields/types/date.rb +2 -2
  65. data/lib/rails_admin/config/fields/types/datetime.rb +52 -54
  66. data/lib/rails_admin/config/fields/types/decimal.rb +1 -1
  67. data/lib/rails_admin/config/fields/types/dragonfly.rb +2 -2
  68. data/lib/rails_admin/config/fields/types/enum.rb +3 -3
  69. data/lib/rails_admin/config/fields/types/file_upload.rb +5 -5
  70. data/lib/rails_admin/config/fields/types/float.rb +1 -1
  71. data/lib/rails_admin/config/fields/types/has_and_belongs_to_many_association.rb +1 -1
  72. data/lib/rails_admin/config/fields/types/has_many_association.rb +1 -1
  73. data/lib/rails_admin/config/fields/types/has_one_association.rb +3 -4
  74. data/lib/rails_admin/config/fields/types/hidden.rb +1 -1
  75. data/lib/rails_admin/config/fields/types/integer.rb +1 -1
  76. data/lib/rails_admin/config/fields/types/paperclip.rb +2 -2
  77. data/lib/rails_admin/config/fields/types/password.rb +4 -4
  78. data/lib/rails_admin/config/fields/types/polymorphic_association.rb +8 -11
  79. data/lib/rails_admin/config/fields/types/serialized.rb +1 -1
  80. data/lib/rails_admin/config/fields/types/string.rb +5 -6
  81. data/lib/rails_admin/config/fields/types/text.rb +6 -6
  82. data/lib/rails_admin/config/fields/types/time.rb +4 -4
  83. data/lib/rails_admin/config/fields/types/timestamp.rb +1 -1
  84. data/lib/rails_admin/config/fields/types/wysihtml5.rb +1 -2
  85. data/lib/rails_admin/config/has_fields.rb +24 -24
  86. data/lib/rails_admin/config/has_groups.rb +5 -3
  87. data/lib/rails_admin/config/hideable.rb +2 -2
  88. data/lib/rails_admin/config/lazy_model.rb +1 -1
  89. data/lib/rails_admin/config/model.rb +6 -7
  90. data/lib/rails_admin/config/proxyable/proxy.rb +4 -6
  91. data/lib/rails_admin/config/sections.rb +1 -3
  92. data/lib/rails_admin/config/sections/base.rb +1 -1
  93. data/lib/rails_admin/config/sections/list.rb +4 -0
  94. data/lib/rails_admin/engine.rb +3 -3
  95. data/lib/rails_admin/extension.rb +3 -3
  96. data/lib/rails_admin/extensions/cancan.rb +3 -3
  97. data/lib/rails_admin/extensions/cancan/authorization_adapter.rb +1 -1
  98. data/lib/rails_admin/extensions/history.rb +3 -3
  99. data/lib/rails_admin/extensions/history/auditing_adapter.rb +1 -1
  100. data/lib/rails_admin/extensions/history/history.rb +12 -11
  101. data/lib/rails_admin/extensions/paper_trail.rb +3 -3
  102. data/lib/rails_admin/extensions/paper_trail/auditing_adapter.rb +30 -19
  103. data/lib/rails_admin/i18n_support.rb +11 -15
  104. data/lib/rails_admin/support/core_extensions.rb +4 -5
  105. data/lib/rails_admin/support/csv_converter.rb +21 -23
  106. data/lib/rails_admin/version.rb +4 -7
  107. data/lib/rails_admin/version.rbc +582 -0
  108. data/lib/tasks/rails_admin.rake +0 -12
  109. data/spec/controllers/rails_admin/application_controller_spec.rb +12 -12
  110. data/spec/controllers/rails_admin/main_controller_spec.rb +127 -131
  111. data/spec/dummy_app/Gemfile +12 -6
  112. data/spec/dummy_app/Gemfile.lock +276 -47
  113. data/spec/dummy_app/app/active_record/abstract.rb +0 -2
  114. data/spec/dummy_app/app/active_record/another_field_test.rb +1 -1
  115. data/spec/dummy_app/app/active_record/ball.rb +2 -2
  116. data/spec/dummy_app/app/active_record/carrierwave_uploader.rb +1 -3
  117. data/spec/dummy_app/app/active_record/category.rb +1 -1
  118. data/spec/dummy_app/app/active_record/cms/basic_page.rb +1 -1
  119. data/spec/dummy_app/app/active_record/comment.rb +1 -1
  120. data/spec/dummy_app/app/active_record/comment/confirmed.rb +1 -1
  121. data/spec/dummy_app/app/active_record/division.rb +2 -2
  122. data/spec/dummy_app/app/active_record/draft.rb +5 -5
  123. data/spec/dummy_app/app/active_record/field_test.rb +6 -6
  124. data/spec/dummy_app/app/active_record/image.rb +1 -1
  125. data/spec/dummy_app/app/active_record/league.rb +3 -3
  126. data/spec/dummy_app/app/active_record/nested_field_test.rb +4 -4
  127. data/spec/dummy_app/app/active_record/player.rb +7 -7
  128. data/spec/dummy_app/app/active_record/team.rb +12 -9
  129. data/spec/dummy_app/app/active_record/user.rb +2 -2
  130. data/spec/dummy_app/app/mongoid/another_field_test.rb +1 -1
  131. data/spec/dummy_app/app/mongoid/ball.rb +3 -3
  132. data/spec/dummy_app/app/mongoid/carrierwave_uploader.rb +1 -3
  133. data/spec/dummy_app/app/mongoid/category.rb +1 -1
  134. data/spec/dummy_app/app/mongoid/cms/basic_page.rb +3 -3
  135. data/spec/dummy_app/app/mongoid/comment.rb +2 -2
  136. data/spec/dummy_app/app/mongoid/comment/confirmed.rb +1 -1
  137. data/spec/dummy_app/app/mongoid/division.rb +2 -2
  138. data/spec/dummy_app/app/mongoid/draft.rb +11 -11
  139. data/spec/dummy_app/app/mongoid/embed.rb +1 -1
  140. data/spec/dummy_app/app/mongoid/fan.rb +1 -1
  141. data/spec/dummy_app/app/mongoid/field_test.rb +35 -35
  142. data/spec/dummy_app/app/mongoid/image.rb +1 -1
  143. data/spec/dummy_app/app/mongoid/league.rb +3 -3
  144. data/spec/dummy_app/app/mongoid/nested_field_test.rb +5 -5
  145. data/spec/dummy_app/app/mongoid/player.rb +17 -17
  146. data/spec/dummy_app/app/mongoid/team.rb +28 -24
  147. data/spec/dummy_app/app/mongoid/user.rb +13 -13
  148. data/spec/dummy_app/config/application.rb +5 -5
  149. data/spec/dummy_app/config/boot.rb +1 -3
  150. data/spec/dummy_app/config/environments/test.rb +1 -1
  151. data/spec/dummy_app/config/initializers/devise.rb +2 -2
  152. data/spec/dummy_app/config/initializers/session_patch.rb +1 -2
  153. data/spec/dummy_app/config/initializers/session_store.rb +1 -1
  154. data/spec/dummy_app/config/initializers/wrap_parameters.rb +1 -1
  155. data/spec/dummy_app/config/routes.rb +2 -2
  156. data/spec/dummy_app/db/development.sqlite3 +0 -0
  157. data/spec/dummy_app/db/migrate/00000000000001_create_divisions_migration.rb +1 -1
  158. data/spec/dummy_app/db/migrate/00000000000002_create_drafts_migration.rb +1 -1
  159. data/spec/dummy_app/db/migrate/00000000000003_create_leagues_migration.rb +1 -1
  160. data/spec/dummy_app/db/migrate/00000000000004_create_players_migration.rb +5 -5
  161. data/spec/dummy_app/db/migrate/00000000000005_create_teams_migration.rb +5 -5
  162. data/spec/dummy_app/db/migrate/00000000000006_devise_create_users.rb +5 -5
  163. data/spec/dummy_app/db/migrate/00000000000007_create_histories_table.rb +7 -7
  164. data/spec/dummy_app/db/migrate/00000000000008_create_fans_migration.rb +1 -1
  165. data/spec/dummy_app/db/migrate/00000000000009_create_fans_teams_migration.rb +1 -1
  166. data/spec/dummy_app/db/migrate/00000000000010_add_revenue_to_team_migration.rb +1 -1
  167. data/spec/dummy_app/db/migrate/00000000000011_add_suspended_to_player_migration.rb +1 -1
  168. data/spec/dummy_app/db/migrate/00000000000012_add_avatar_columns_to_user.rb +0 -1
  169. data/spec/dummy_app/db/migrate/20101223222233_create_rel_tests.rb +1 -1
  170. data/spec/dummy_app/db/migrate/20110714095433_create_balls.rb +1 -1
  171. data/spec/dummy_app/db/migrate/20110901131551_change_division_primary_key.rb +3 -3
  172. data/spec/dummy_app/db/migrate/20110901150912_set_primary_key_not_null_for_divisions.rb +4 -5
  173. data/spec/dummy_app/db/migrate/20120319041705_drop_rel_tests.rb +1 -1
  174. data/spec/dummy_app/db/schema.rb +197 -0
  175. data/spec/dummy_app/db/seeds.rb +9 -9
  176. data/spec/dummy_app/db/test.sqlite3 +0 -0
  177. data/spec/dummy_app/tmp/cache/assets/test/sass/{46504e29e25493e203f6e081863c6f722ba34fce → 0e28199903adc18ba5ed7000a3cfbe6be324f02c}/mixins.scssc +0 -0
  178. data/spec/dummy_app/tmp/cache/assets/test/sass/{46504e29e25493e203f6e081863c6f722ba34fce → 0e28199903adc18ba5ed7000a3cfbe6be324f02c}/theming.scssc +0 -0
  179. data/spec/dummy_app/tmp/cache/assets/test/sass/{46504e29e25493e203f6e081863c6f722ba34fce → 0e28199903adc18ba5ed7000a3cfbe6be324f02c}/variables.scssc +0 -0
  180. data/spec/dummy_app/tmp/cache/assets/test/sass/66bb15d356a3ae9531c123a31be7776c5874ac21/font-awesome.css.erbc +0 -0
  181. data/spec/dummy_app/tmp/cache/assets/test/sass/7a85589b70ac6319b07ac05552a98bba4b834a39/font-awesome-4-compability.scssc +0 -0
  182. data/spec/dummy_app/tmp/cache/assets/test/sass/{245c4be20f01db9121b0992275b77e082f23d7df → 7a85589b70ac6319b07ac05552a98bba4b834a39}/mixins.scssc +0 -0
  183. data/spec/dummy_app/tmp/cache/assets/test/sass/{245c4be20f01db9121b0992275b77e082f23d7df → 7a85589b70ac6319b07ac05552a98bba4b834a39}/theming.scssc +0 -0
  184. data/spec/dummy_app/tmp/cache/assets/test/sass/{245c4be20f01db9121b0992275b77e082f23d7df → 7a85589b70ac6319b07ac05552a98bba4b834a39}/variables.scssc +0 -0
  185. data/spec/dummy_app/tmp/cache/assets/test/sass/{ebde8a6cd2923d8c583ca746dd952b4fe080c2a1 → 92899d6fb50bc282d329302d61a5c00fa959d762}/jquery-ui-1.8.7.custom.scssc +0 -0
  186. data/spec/dummy_app/tmp/cache/assets/test/sass/{c7aba53479ebd90acc5f6ba8fb7463fa43b1ae1c → 977fdcd1d57ae400c0a80cee764210478c5780f6}/jquery.colorpicker.scssc +0 -0
  187. data/spec/dummy_app/tmp/cache/assets/test/sass/{c7aba53479ebd90acc5f6ba8fb7463fa43b1ae1c → 977fdcd1d57ae400c0a80cee764210478c5780f6}/jquery.ui.timepicker.scssc +0 -0
  188. data/spec/dummy_app/tmp/cache/assets/test/sass/{c7aba53479ebd90acc5f6ba8fb7463fa43b1ae1c → 977fdcd1d57ae400c0a80cee764210478c5780f6}/ra.calendar-additions.scssc +0 -0
  189. data/spec/dummy_app/tmp/cache/assets/test/sass/{c7aba53479ebd90acc5f6ba8fb7463fa43b1ae1c → 977fdcd1d57ae400c0a80cee764210478c5780f6}/ra.filtering-multiselect.scssc +0 -0
  190. data/spec/dummy_app/tmp/cache/assets/test/sass/{c7aba53479ebd90acc5f6ba8fb7463fa43b1ae1c → 977fdcd1d57ae400c0a80cee764210478c5780f6}/ra.widgets.scssc +0 -0
  191. data/spec/dummy_app/tmp/cache/assets/test/sass/{c7aba53479ebd90acc5f6ba8fb7463fa43b1ae1c → 977fdcd1d57ae400c0a80cee764210478c5780f6}/rails_admin.scss.erbc +0 -0
  192. data/spec/dummy_app/tmp/cache/assets/test/sass/{a65ba3e01aefad1ad59b6317cbb14d0560ca012b → 9a24497045e3375a0450bb40eb1ffe1eb56bc709}/mixins.scssc +0 -0
  193. data/spec/dummy_app/tmp/cache/assets/test/sass/{a65ba3e01aefad1ad59b6317cbb14d0560ca012b → 9a24497045e3375a0450bb40eb1ffe1eb56bc709}/theming.scssc +0 -0
  194. data/spec/dummy_app/tmp/cache/assets/test/sass/{a65ba3e01aefad1ad59b6317cbb14d0560ca012b → 9a24497045e3375a0450bb40eb1ffe1eb56bc709}/variables.scssc +0 -0
  195. data/spec/dummy_app/tmp/cache/assets/test/sass/{c996a898a33b80a44fab822802e73b6e409755d2 → a011cf534fa35e4fa0708adf6019078657586c2c}/_accordion.scssc +0 -0
  196. data/spec/dummy_app/tmp/cache/assets/test/sass/{c996a898a33b80a44fab822802e73b6e409755d2 → a011cf534fa35e4fa0708adf6019078657586c2c}/_alerts.scssc +0 -0
  197. data/spec/dummy_app/tmp/cache/assets/test/sass/{c996a898a33b80a44fab822802e73b6e409755d2 → a011cf534fa35e4fa0708adf6019078657586c2c}/_breadcrumbs.scssc +0 -0
  198. data/spec/dummy_app/tmp/cache/assets/test/sass/{c996a898a33b80a44fab822802e73b6e409755d2 → a011cf534fa35e4fa0708adf6019078657586c2c}/_button-groups.scssc +0 -0
  199. data/spec/dummy_app/tmp/cache/assets/test/sass/{c996a898a33b80a44fab822802e73b6e409755d2 → a011cf534fa35e4fa0708adf6019078657586c2c}/_buttons.scssc +0 -0
  200. data/spec/dummy_app/tmp/cache/assets/test/sass/{c996a898a33b80a44fab822802e73b6e409755d2 → a011cf534fa35e4fa0708adf6019078657586c2c}/_carousel.scssc +0 -0
  201. data/spec/dummy_app/tmp/cache/assets/test/sass/{c996a898a33b80a44fab822802e73b6e409755d2 → a011cf534fa35e4fa0708adf6019078657586c2c}/_close.scssc +0 -0
  202. data/spec/dummy_app/tmp/cache/assets/test/sass/{c996a898a33b80a44fab822802e73b6e409755d2 → a011cf534fa35e4fa0708adf6019078657586c2c}/_component-animations.scssc +0 -0
  203. data/spec/dummy_app/tmp/cache/assets/test/sass/{c996a898a33b80a44fab822802e73b6e409755d2 → a011cf534fa35e4fa0708adf6019078657586c2c}/_dropdowns.scssc +0 -0
  204. data/spec/dummy_app/tmp/cache/assets/test/sass/{c996a898a33b80a44fab822802e73b6e409755d2 → a011cf534fa35e4fa0708adf6019078657586c2c}/_forms.scssc +0 -0
  205. data/spec/dummy_app/tmp/cache/assets/test/sass/{c996a898a33b80a44fab822802e73b6e409755d2 → a011cf534fa35e4fa0708adf6019078657586c2c}/_grid.scssc +0 -0
  206. data/spec/dummy_app/tmp/cache/assets/test/sass/{c996a898a33b80a44fab822802e73b6e409755d2 → a011cf534fa35e4fa0708adf6019078657586c2c}/_hero-unit.scssc +0 -0
  207. data/spec/dummy_app/tmp/cache/assets/test/sass/{c996a898a33b80a44fab822802e73b6e409755d2 → a011cf534fa35e4fa0708adf6019078657586c2c}/_labels-badges.scssc +0 -0
  208. data/spec/dummy_app/tmp/cache/assets/test/sass/{c996a898a33b80a44fab822802e73b6e409755d2 → a011cf534fa35e4fa0708adf6019078657586c2c}/_layouts.scssc +0 -0
  209. data/spec/dummy_app/tmp/cache/assets/test/sass/{c996a898a33b80a44fab822802e73b6e409755d2 → a011cf534fa35e4fa0708adf6019078657586c2c}/_mixins.scssc +0 -0
  210. data/spec/dummy_app/tmp/cache/assets/test/sass/{c996a898a33b80a44fab822802e73b6e409755d2 → a011cf534fa35e4fa0708adf6019078657586c2c}/_modals.scssc +0 -0
  211. data/spec/dummy_app/tmp/cache/assets/test/sass/{c996a898a33b80a44fab822802e73b6e409755d2 → a011cf534fa35e4fa0708adf6019078657586c2c}/_navbar.scssc +0 -0
  212. data/spec/dummy_app/tmp/cache/assets/test/sass/{c996a898a33b80a44fab822802e73b6e409755d2 → a011cf534fa35e4fa0708adf6019078657586c2c}/_navs.scssc +0 -0
  213. data/spec/dummy_app/tmp/cache/assets/test/sass/{c996a898a33b80a44fab822802e73b6e409755d2 → a011cf534fa35e4fa0708adf6019078657586c2c}/_pager.scssc +0 -0
  214. data/spec/dummy_app/tmp/cache/assets/test/sass/{c996a898a33b80a44fab822802e73b6e409755d2 → a011cf534fa35e4fa0708adf6019078657586c2c}/_pagination.scssc +0 -0
  215. data/spec/dummy_app/tmp/cache/assets/test/sass/{c996a898a33b80a44fab822802e73b6e409755d2 → a011cf534fa35e4fa0708adf6019078657586c2c}/_popovers.scssc +0 -0
  216. data/spec/dummy_app/tmp/cache/assets/test/sass/{c996a898a33b80a44fab822802e73b6e409755d2 → a011cf534fa35e4fa0708adf6019078657586c2c}/_progress-bars.scssc +0 -0
  217. data/spec/dummy_app/tmp/cache/assets/test/sass/{c996a898a33b80a44fab822802e73b6e409755d2 → a011cf534fa35e4fa0708adf6019078657586c2c}/_reset.scssc +0 -0
  218. data/spec/dummy_app/tmp/cache/assets/test/sass/{c996a898a33b80a44fab822802e73b6e409755d2 → a011cf534fa35e4fa0708adf6019078657586c2c}/_scaffolding.scssc +0 -0
  219. data/spec/dummy_app/tmp/cache/assets/test/sass/{c996a898a33b80a44fab822802e73b6e409755d2 → a011cf534fa35e4fa0708adf6019078657586c2c}/_tables.scssc +0 -0
  220. data/spec/dummy_app/tmp/cache/assets/test/sass/{c996a898a33b80a44fab822802e73b6e409755d2 → a011cf534fa35e4fa0708adf6019078657586c2c}/_thumbnails.scssc +0 -0
  221. data/spec/dummy_app/tmp/cache/assets/test/sass/{c996a898a33b80a44fab822802e73b6e409755d2 → a011cf534fa35e4fa0708adf6019078657586c2c}/_tooltip.scssc +0 -0
  222. data/spec/dummy_app/tmp/cache/assets/test/sass/{c996a898a33b80a44fab822802e73b6e409755d2 → a011cf534fa35e4fa0708adf6019078657586c2c}/_type.scssc +0 -0
  223. data/spec/dummy_app/tmp/cache/assets/test/sass/{c996a898a33b80a44fab822802e73b6e409755d2 → a011cf534fa35e4fa0708adf6019078657586c2c}/_utilities.scssc +0 -0
  224. data/spec/dummy_app/tmp/cache/assets/test/sass/{c996a898a33b80a44fab822802e73b6e409755d2 → a011cf534fa35e4fa0708adf6019078657586c2c}/_variables.scssc +0 -0
  225. data/spec/dummy_app/tmp/cache/assets/test/sass/{c996a898a33b80a44fab822802e73b6e409755d2 → a011cf534fa35e4fa0708adf6019078657586c2c}/_wells.scssc +0 -0
  226. data/spec/dummy_app/tmp/cache/assets/test/sprockets/{d1c2c3a2df8517e019edf30db44566b4 → 021e87bfe65a024a849db3c621f39607} +0 -0
  227. data/spec/dummy_app/tmp/cache/assets/test/sprockets/02da6cc33425a1387089c6030cf514db +0 -0
  228. data/spec/dummy_app/tmp/cache/assets/test/sprockets/{4863c57f6c9bbf8cf392ba250f7e8e99 → 04880af615c5763f7808495d1676565b} +0 -0
  229. data/spec/dummy_app/tmp/cache/assets/test/sprockets/0599094d22f449fecdbc1ae48e3d901e +0 -0
  230. data/spec/dummy_app/tmp/cache/assets/test/sprockets/{5c75555dac51f16619f3630fc4ce7811 → 06065efe9216af455ca5ae63b780842a} +0 -0
  231. data/spec/dummy_app/tmp/cache/assets/test/sprockets/{fb0757f81f5726edb2a3fecb73c190ac → 07f7c76677c34256252f23976ce6c2a1} +0 -0
  232. data/spec/dummy_app/tmp/cache/assets/test/sprockets/0843377cd450cc8688003ba317723fae +0 -0
  233. data/spec/dummy_app/tmp/cache/assets/test/sprockets/0a4355e8cc379590a5aaf8542419d306 +0 -0
  234. data/spec/dummy_app/tmp/cache/assets/test/sprockets/0b35ad462ccf12ca91cff9c51164c5a0 +0 -0
  235. data/spec/dummy_app/tmp/cache/assets/test/sprockets/0f04a8cf5d989e555542213f5b5db676 +0 -0
  236. data/spec/dummy_app/tmp/cache/assets/test/sprockets/{129530d9cbfe95daa40fefb31b541d13 → 1252be603446e6064e85dae1533eaa59} +0 -0
  237. data/spec/dummy_app/tmp/cache/assets/test/sprockets/12b2ef118f691f66646eac032f7535d3 +0 -0
  238. data/spec/dummy_app/tmp/cache/assets/test/sprockets/136f479ebd2eedeb83550b4a882538e5 +0 -0
  239. data/spec/dummy_app/tmp/cache/assets/test/sprockets/1381657fbbc4cc175ae0406c8cbdd852 +0 -0
  240. data/spec/dummy_app/tmp/cache/assets/test/sprockets/161f8f439887fb5926b02a917b2fab29 +0 -0
  241. data/spec/dummy_app/tmp/cache/assets/test/sprockets/1b26b92ae53bdc1e9f8a5afa7b72b381 +0 -0
  242. data/spec/dummy_app/tmp/cache/assets/test/sprockets/1befe9a4bb03dc468cd7f5e7148a6a52 +0 -0
  243. data/spec/dummy_app/tmp/cache/assets/test/sprockets/1d12409a91dcc8c8a4965c52a7f6b099 +0 -0
  244. data/spec/dummy_app/tmp/cache/assets/test/sprockets/1db0d2a002e581a113a91a6e93e5d4e7 +0 -0
  245. data/spec/dummy_app/tmp/cache/assets/test/sprockets/{10c9ca24ee38f89898883cf73e22a947 → 1dd74057b76db8f42e06cbb888f14956} +0 -0
  246. data/spec/dummy_app/tmp/cache/assets/test/sprockets/{996f66db546cbb0e74c8e1b206934a8b → 1e7b3532f20949a13b8b69d2dddc559a} +0 -0
  247. data/spec/dummy_app/tmp/cache/assets/test/sprockets/2051323c87c06ef9fb769ff13afe1d46 +0 -0
  248. data/spec/dummy_app/tmp/cache/assets/test/sprockets/{714f390b93b33846a6c8358e3fb0555e → 2197e41c9dda6c82b109eaa0d5adaf2f} +0 -0
  249. data/spec/dummy_app/tmp/cache/assets/test/sprockets/{cde5d358d89af1813033adcf5abdc012 → 22003805d8abcf11f0649bff9cef6c35} +0 -0
  250. data/spec/dummy_app/tmp/cache/assets/test/sprockets/258dbc982e14f78732a377754ed23a4b +0 -0
  251. data/spec/dummy_app/tmp/cache/assets/test/sprockets/26489e402a71f43f962d6055e30787d0 +0 -0
  252. data/spec/dummy_app/tmp/cache/assets/test/sprockets/{969c58767a7de67e78f9ea69195183d9 → 276e2819a676347a7de259b70679adb8} +0 -0
  253. data/spec/dummy_app/tmp/cache/assets/test/sprockets/2894746ab7d895286c1b09e42fc94281 +0 -0
  254. data/spec/dummy_app/tmp/cache/assets/test/sprockets/{2ab4ad958f77a3629fb62246f5604bce → 28c0c99cd6d41ead252f979cef74c6c5} +0 -0
  255. data/spec/dummy_app/tmp/cache/assets/test/sprockets/{095e7d24e036c328ff8a353b062c075e → 2943f3fe07d2ae0184c2282647d5c50e} +0 -0
  256. data/spec/dummy_app/tmp/cache/assets/test/sprockets/{a03d8b8153d1a1abc2abf53568d4dad0 → 2a421ff8fbf280e0d7323f26d2656144} +0 -0
  257. data/spec/dummy_app/tmp/cache/assets/test/sprockets/{d35f06fe57bd03bea2483b5398b2c6f8 → 2f23e3869b68c4c9492f9497b288f6bb} +0 -0
  258. data/spec/dummy_app/tmp/cache/assets/test/sprockets/{9011102569db38052e6353455fac950e → 30539f6bae0581cb548f51ee6d9d5b9b} +0 -0
  259. data/spec/dummy_app/tmp/cache/assets/test/sprockets/{2656c3bece9f7e34887e2fceded0784e → 318296efd3e38c26a302d99d1638e4ad} +0 -0
  260. data/spec/dummy_app/tmp/cache/assets/test/sprockets/31bfcc7896d47062b682cb7305aa9052 +0 -0
  261. data/spec/dummy_app/tmp/cache/assets/test/sprockets/346057a4a317d5399f0faa78baf2be98 +0 -0
  262. data/spec/dummy_app/tmp/cache/assets/test/sprockets/{0ed0d802514844bf10f8361f431c8cc8 → 374aecf6aa1d05dd23ce4881c1bdd71b} +0 -0
  263. data/spec/dummy_app/tmp/cache/assets/test/sprockets/{76c588a87498d0a7b9c4b93f78c47965 → 382ebccfe8b6bce742f4a2bc0c109d0f} +0 -0
  264. data/spec/dummy_app/tmp/cache/assets/test/sprockets/{9ba5c2b7b2f656550a0deffc19472e39 → 39792f57ea45373a09c7ac823905cb29} +0 -0
  265. data/spec/dummy_app/tmp/cache/assets/test/sprockets/{e647f039e5c667d1ca130f914fb70624 → 3a3728ebf0994eb3f68ac9acf74c5904} +0 -0
  266. data/spec/dummy_app/tmp/cache/assets/test/sprockets/{5395b275597f09db5cc276d8a35b1c9b → 3aaf980536f44c31d1d0145ba8f1721d} +0 -0
  267. data/spec/dummy_app/tmp/cache/assets/test/sprockets/{460d342022e00bbd6edff25125a60ab1 → 3ba808481868b8a56fdf9f106eeda367} +0 -0
  268. data/spec/dummy_app/tmp/cache/assets/test/sprockets/44e79847ae7bb5c853dbfefa452355f0 +0 -0
  269. data/spec/dummy_app/tmp/cache/assets/test/sprockets/459777cb1d30f6467da8dd53d9841bee +0 -0
  270. data/spec/dummy_app/tmp/cache/assets/test/sprockets/46842ce793ce3da43a6c21ef0c0e745e +0 -0
  271. data/spec/dummy_app/tmp/cache/assets/test/sprockets/4764b71e86b2ebfa988853e0ce3bb441 +0 -0
  272. data/spec/dummy_app/tmp/cache/assets/test/sprockets/4821eb4277ad6a0983c16630cd5806ae +0 -0
  273. data/spec/dummy_app/tmp/cache/assets/test/sprockets/{375cc143f1184d76e6b3ff0dfb60187c → 485a6b0358511c73965a851ba5569014} +0 -0
  274. data/spec/dummy_app/tmp/cache/assets/test/sprockets/{ba4f88faafacc90d28bc5a92032f2608 → 49ccc514fe103c24a38f100cecb21be9} +0 -0
  275. data/spec/dummy_app/tmp/cache/assets/test/sprockets/{b8e717c8deb6edc80a7a690369d13d35 → 49de4f401551329c23b46284313de8d1} +0 -0
  276. data/spec/dummy_app/tmp/cache/assets/test/sprockets/{c61f7caef6bb75b1c15bde82e7cbbee2 → 4f3e6b4e40b631d3d949509f32ea9bc3} +0 -0
  277. data/spec/dummy_app/tmp/cache/assets/test/sprockets/{5de4f3048b6d83b2236bfbc041ad8f11 → 4fb06529e2126644ddf41924f5be2880} +0 -0
  278. data/spec/dummy_app/tmp/cache/assets/test/sprockets/4fbd3f63d231f5b25d1b8eb02ecdd150 +0 -0
  279. data/spec/dummy_app/tmp/cache/assets/test/sprockets/4ffa898a34dcdcfb92898d913da3f720 +0 -0
  280. data/spec/dummy_app/tmp/cache/assets/test/sprockets/5159e29eea352859ecad8605385bc97e +0 -0
  281. data/spec/dummy_app/tmp/cache/assets/test/sprockets/{498ee0d8892d5d9be8a37030e3253e14 → 529d621e1fb6b730d9d035b143e93f69} +0 -0
  282. data/spec/dummy_app/tmp/cache/assets/test/sprockets/54c3d5d9311b5d421c51b5d473de5b05 +0 -0
  283. data/spec/dummy_app/tmp/cache/assets/test/sprockets/582efaa561d6a724a7cd82b2023e8e29 +0 -0
  284. data/spec/dummy_app/tmp/cache/assets/test/sprockets/{b7ffc32371aea730fc8e27be3be8e633 → 59c191aebff69f4e76cb50860ff17df5} +0 -0
  285. data/spec/dummy_app/tmp/cache/assets/test/sprockets/5a0024fd5a8ae8322b07acc733c6caed +0 -0
  286. data/spec/dummy_app/tmp/cache/assets/test/sprockets/5a8fc55cb58b423142d530fc066dd3a4 +0 -0
  287. data/spec/dummy_app/tmp/cache/assets/test/sprockets/5b1732a4f9d541544d84a04dda73e752 +0 -0
  288. data/spec/dummy_app/tmp/cache/assets/test/sprockets/5c8e7da8dcddc72d152039cec5b173c9 +0 -0
  289. data/spec/dummy_app/tmp/cache/assets/test/sprockets/5e2e774a2e56e0db0d18d782bbcb9639 +0 -0
  290. data/spec/dummy_app/tmp/cache/assets/test/sprockets/{6eff33b3b8fa010e960659ed61b250e6 → 5e9526449d8415fba07fb15676ccea95} +0 -0
  291. data/spec/dummy_app/tmp/cache/assets/test/sprockets/{63ff3018e663064066c3dae6658c36fc → 5eed513a4451dedcc36ec16c45745bd4} +0 -0
  292. data/spec/dummy_app/tmp/cache/assets/test/sprockets/5fab61053117e1d102e0a355e4b870d3 +0 -0
  293. data/spec/dummy_app/tmp/cache/assets/test/sprockets/{8cfd86644ffefe11ed4880518435c8a5 → 62313843f7d1e2195eca82386ddbafc4} +0 -0
  294. data/spec/dummy_app/tmp/cache/assets/test/sprockets/{6e2e2c829c91d3d0c079771ed77e6654 → 638b254892f40165bda0c1ee6f62a6d6} +0 -0
  295. data/spec/dummy_app/tmp/cache/assets/test/sprockets/{540da504e121104c4de8155ec685b4ea → 660d820d7f5e69fe59c0a7f01aaef8c6} +0 -0
  296. data/spec/dummy_app/tmp/cache/assets/test/sprockets/69f59cfc7f92e5d7ebf02df73928083b +0 -0
  297. data/spec/dummy_app/tmp/cache/assets/test/sprockets/6a09089b5590cbb5dbccba9199b1aa0e +0 -0
  298. data/spec/dummy_app/tmp/cache/assets/test/sprockets/6ab99dcd31d6d0380c0df7baa42a2b18 +0 -0
  299. data/spec/dummy_app/tmp/cache/assets/test/sprockets/6b3e9ff481b3a040acb4e1ea61e4c8fc +0 -0
  300. data/spec/dummy_app/tmp/cache/assets/test/sprockets/6ce0b5fdde88a0e3ff318a0c2726d46f +0 -0
  301. data/spec/dummy_app/tmp/cache/assets/test/sprockets/6d278334e72b135765a41e991bec0500 +0 -0
  302. data/spec/dummy_app/tmp/cache/assets/test/sprockets/{e13a9d14cda66ff1562d59bae5bb0009 → 6f70cf17d6c5ba22b8afddd7d39c4d70} +0 -0
  303. data/spec/dummy_app/tmp/cache/assets/test/sprockets/{743e275172178779f8b1f7fbe08dd5ea → 729b76b484c9c4df3af759a93635b21d} +0 -0
  304. data/spec/dummy_app/tmp/cache/assets/test/sprockets/72d8ec2796504cc9604b01118b806cd8 +0 -0
  305. data/spec/dummy_app/tmp/cache/assets/test/sprockets/74b195601a5c6c8bf93e5e7e9e6da12b +0 -0
  306. data/spec/dummy_app/tmp/cache/assets/test/sprockets/{2d1df5e32a061a951d5a2d4d9f6c3d24 → 75c3e223b3986acf0bc6c669d16054b8} +0 -0
  307. data/spec/dummy_app/tmp/cache/assets/test/sprockets/{d4a49843caf12d9a6dc764014f42b895 → 75ed3fc3c431fc2154cdd1f760f3210e} +0 -0
  308. data/spec/dummy_app/tmp/cache/assets/test/sprockets/7795054eed96c541e38536fa029a42ad +0 -0
  309. data/spec/dummy_app/tmp/cache/assets/test/sprockets/{2e8383214772b291c87934ed8a84b955 → 77a4a5a208b8121488fd9ef247d67813} +0 -0
  310. data/spec/dummy_app/tmp/cache/assets/test/sprockets/7ec629ff58b2d1e0dfe7f8c56f2fc5d7 +0 -0
  311. data/spec/dummy_app/tmp/cache/assets/test/sprockets/{b82696d97bda7df1d71f90b91abbbb80 → 840324d228205039aaaafc391c208430} +0 -0
  312. data/spec/dummy_app/tmp/cache/assets/test/sprockets/{7be36e83efedfb86b40e05e2c2e9cacf → 842328de502c909f498ccca706cd47dc} +0 -0
  313. data/spec/dummy_app/tmp/cache/assets/test/sprockets/{5cb7d2cb1418d5831b0b61ca68d18a07 → 8644f94b9a1a902153cd97473ce23266} +0 -0
  314. data/spec/dummy_app/tmp/cache/assets/test/sprockets/{bdf867751d648676e25e36a9435e6b26 → 88f2fbf474d52591035c94b07b696ff9} +0 -0
  315. data/spec/dummy_app/tmp/cache/assets/test/sprockets/{e1bba75ba340cdef270c20efd6f983ac → 89fe3f3e75d5eb4ecb1b836fd792990d} +0 -0
  316. data/spec/dummy_app/tmp/cache/assets/test/sprockets/{a03fc26531eea1055e58e91bd64792b3 → 917c85b2a002bf08c90f4509aba5b538} +0 -0
  317. data/spec/dummy_app/tmp/cache/assets/test/sprockets/{7f5f2d823155f3f1da616e146d540dc1 → 920f17a87bb2678c28568f5e686a4cf1} +0 -0
  318. data/spec/dummy_app/tmp/cache/assets/test/sprockets/925c3596709eb590d786f15a3cf817bb +0 -0
  319. data/spec/dummy_app/tmp/cache/assets/test/sprockets/984e0e653074756d5c241ac3597b68d8 +0 -0
  320. data/spec/dummy_app/tmp/cache/assets/test/sprockets/{7ed06e4bd001b429d263963fbe783f11 → 98a0e68016b3c8f8000d991b1d5bc044} +0 -0
  321. data/spec/dummy_app/tmp/cache/assets/test/sprockets/9b9810623fa8a8a92e55d065f93340ee +0 -0
  322. data/spec/dummy_app/tmp/cache/assets/test/sprockets/9c834e292807614b87fc885949cb12d5 +0 -0
  323. data/spec/dummy_app/tmp/cache/assets/test/sprockets/{aa87eff56d455dae33b13bb129cd4d3f → 9dab4fa8ba5260be660ee06b90e3e847} +0 -0
  324. data/spec/dummy_app/tmp/cache/assets/test/sprockets/9f60a2e19502e0f9ad7ccffa2da50342 +0 -0
  325. data/spec/dummy_app/tmp/cache/assets/test/sprockets/{d5cb053b401e51026a9c743fc9442a45 → 9f6c080a6bd27db284fbb211f3f44a6c} +0 -0
  326. data/spec/dummy_app/tmp/cache/assets/test/sprockets/9fb546f0f37deda2fdcfd48930de0f69 +0 -0
  327. data/spec/dummy_app/tmp/cache/assets/test/sprockets/{bb2bc7acd86cbf95e1ca5d978aa3b407 → a0bdc79935fc14ace4c5366e1ba7d527} +0 -0
  328. data/spec/dummy_app/tmp/cache/assets/test/sprockets/a1f2411c0e3e9a52183b5f0c96fa84c8 +0 -0
  329. data/spec/dummy_app/tmp/cache/assets/test/sprockets/{24dcc2914999ebf715353482d3b22e51 → a41cd406b752008bf3aaeb365d9d5e8b} +0 -0
  330. data/spec/dummy_app/tmp/cache/assets/test/sprockets/{bedffc652989e272a8e2774aab019da5 → a50199939a6040343c5487c1dde55260} +0 -0
  331. data/spec/dummy_app/tmp/cache/assets/test/sprockets/a80f3bf6075735abb8874bf40ca7a4cd +0 -0
  332. data/spec/dummy_app/tmp/{dragonfly/cache/body/20/4b9c4f1d960805e206c28eac62367b6970f63b → cache/assets/test/sprockets/ad452a261b3fc90b3aca85ffc630817d} +0 -0
  333. data/spec/dummy_app/tmp/cache/assets/test/sprockets/{38fd3d9139702eff7281ee67b638d92e → b0b910efc00aa49d187637e761ea0654} +0 -0
  334. data/spec/dummy_app/tmp/cache/assets/test/sprockets/{0c78a1295e80206cd724fb0661c58ee4 → b12de6d4d7f222f76b111c25f5dab178} +0 -0
  335. data/spec/dummy_app/tmp/cache/assets/test/sprockets/b1d340312b1b800c7c5e652e1db6c9cc +0 -0
  336. data/spec/dummy_app/tmp/cache/assets/test/sprockets/b31203d66a43ee74d976dc763f42f38a +0 -0
  337. data/spec/dummy_app/tmp/cache/assets/test/sprockets/{20967f4e0f44fccf2c2de06aad218647 → b944bc4b0799f7954005e8b1a5336687} +0 -0
  338. data/spec/dummy_app/tmp/cache/assets/test/sprockets/{f8d79539ba48d44d737f7ca1295354f7 → baf1f20ee8ed55082855f5ecfbb9db4e} +0 -0
  339. data/spec/dummy_app/tmp/cache/assets/test/sprockets/bf1fd5d742a16de894278017732d1b2c +0 -0
  340. data/spec/dummy_app/tmp/cache/assets/test/sprockets/bffa7d2c518d584c3f1ba8b9e11cf745 +0 -0
  341. data/spec/dummy_app/tmp/cache/assets/test/sprockets/{0f72b417ab87169150cd61260cc18f4e → c2f1cee7fb8eb8492c4084ce00dc53b6} +0 -0
  342. data/spec/dummy_app/tmp/cache/assets/test/sprockets/c53a5fc1810ee9b6c3c933fd5590228e +0 -0
  343. data/spec/dummy_app/tmp/cache/assets/test/sprockets/c801ebd7cabbdbe237c427692b2f6017 +0 -0
  344. data/spec/dummy_app/tmp/cache/assets/test/sprockets/{98c978063ce9eca4f00d35e8ee8ccccb → c87758b6b5f54876dccc4562ebd59a43} +0 -0
  345. data/spec/dummy_app/tmp/cache/assets/test/sprockets/cb1a9d6c11a7eb5430d3c79838a53eb1 +0 -0
  346. data/spec/dummy_app/tmp/cache/assets/test/sprockets/cb1d6fcc9bad898327636cf414f73b57 +0 -0
  347. data/spec/dummy_app/tmp/cache/assets/test/sprockets/cd8be896a3bf8f11cc61e0fb6b90eb80 +0 -0
  348. data/spec/dummy_app/tmp/cache/assets/test/sprockets/{550d461012567dbfec3138e404c434e3 → ce027086e6de68f182037504b6227485} +0 -0
  349. data/spec/dummy_app/tmp/cache/assets/test/sprockets/ce9ba680277b6a7f2f6c65c077e83384 +0 -0
  350. data/spec/dummy_app/tmp/cache/assets/test/sprockets/{d4d934ea7bb7519042bc79deb3028314 → cf435b3d4a48bc16f5cc1db8f7049596} +0 -0
  351. data/spec/dummy_app/tmp/cache/assets/test/sprockets/{672892e6983bdb28969d20d688b445c3 → d024b2e0207c1a894ac2fc0c0e002033} +0 -0
  352. data/spec/dummy_app/tmp/cache/assets/test/sprockets/{6983eaa0179424c5a469abec763c7433 → d1b6047944a0a6e232951727bba44560} +0 -0
  353. data/spec/dummy_app/tmp/cache/assets/test/sprockets/{306d8bf77dac0876fb62a6d7d7279f8b → d2acbd849a5e6d1809ac9e9639dbc893} +0 -0
  354. data/spec/dummy_app/tmp/cache/assets/test/sprockets/d3e77ae2b265a7b6a4e6619ae888c02f +0 -0
  355. data/spec/dummy_app/tmp/cache/assets/test/sprockets/{55b24a753c1452383f987ea056096fc8 → d43f3b9f17586aa28c6097e3be02822f} +0 -0
  356. data/spec/dummy_app/tmp/cache/assets/test/sprockets/d533eddb21cd722c5216bc0bb88f1c6d +0 -0
  357. data/spec/dummy_app/tmp/cache/assets/test/sprockets/d6205326f914ac8b2f61b0fefad24ef1 +0 -0
  358. data/spec/dummy_app/tmp/cache/assets/test/sprockets/{1ef09ffd0e1376aabbac9def4652b166 → d79f4cb89c0bf1ea5e42bfda6e6b27c5} +0 -0
  359. data/spec/dummy_app/tmp/cache/assets/test/sprockets/{b68666c0d1bd7d3d06bacd7767043149 → d917eb39b30dcf6725854039c98a5012} +0 -0
  360. data/spec/dummy_app/tmp/cache/assets/test/sprockets/{3a6a4e5299d2063b2dd6e980fa0551d5 → de1a47afa53c502369479e8dbbfebd9b} +0 -0
  361. data/spec/dummy_app/tmp/cache/assets/test/sprockets/{e7da37b727b2c61d4f654f88ebda783d → dee3a9569b9ee7368f88a014ba475c3a} +0 -0
  362. data/spec/dummy_app/tmp/cache/assets/test/sprockets/e1309c718c63004add03fd7c472ec5c1 +0 -0
  363. data/spec/dummy_app/tmp/cache/assets/test/sprockets/{d4de3cd17da73d9e0d3c4ff1142385c3 → e3e93c085f3fc84da01f92b8d61981ae} +0 -0
  364. data/spec/dummy_app/tmp/cache/assets/test/sprockets/e5ce6cd41375d04320a8a3150db827a3 +0 -0
  365. data/spec/dummy_app/tmp/cache/assets/test/sprockets/{8864a718fb2c0b6c297e9efbd210e1f5 → e613b18c9e1811582dc0aeaf095e56ae} +0 -0
  366. data/spec/dummy_app/tmp/cache/assets/test/sprockets/{c242b461c1c4aa60e2dfa5486dc9a1a8 → e69a4b84ef07dbc0ac277803d272a6fa} +0 -0
  367. data/spec/dummy_app/tmp/cache/assets/test/sprockets/{d104a4ce0d9dc0398049425d45fd6e47 → e72ab273009021b9a7b5770457a9d13b} +0 -0
  368. data/spec/dummy_app/tmp/cache/assets/test/sprockets/{2998aba256780a65cc4058fdd00f3b8f → ebf2567e766b39401f690380a2d00e66} +0 -0
  369. data/spec/dummy_app/tmp/cache/assets/test/sprockets/ec99299f858e97986ac4ba883d94826c +0 -0
  370. data/spec/dummy_app/tmp/cache/assets/test/sprockets/ecddf8ef16cc19c9634433c4f5dcc256 +0 -0
  371. data/spec/dummy_app/tmp/cache/assets/test/sprockets/{2e96c0383b32e1ec0746b08f3bea0c7b → eefb724057cd7d3f1e6fee605910718d} +0 -0
  372. data/spec/dummy_app/tmp/cache/assets/test/sprockets/{51173669b5ab5031ba6c9eff069b6ae7 → f1f9a7b96317af0df54445979f298b68} +0 -0
  373. data/spec/dummy_app/tmp/cache/assets/test/sprockets/f342ebdd61bbcd9b91b4d09aac84b7e6 +0 -0
  374. data/spec/dummy_app/tmp/cache/assets/test/sprockets/{d778ac3298efe5fc7d13405e66041015 → f37153d14eee1485b7d6bb7bd5196af6} +0 -0
  375. data/spec/dummy_app/tmp/cache/assets/test/sprockets/f3ad8cf21b94a7a5f382482e0529fe3c +0 -0
  376. data/spec/dummy_app/tmp/cache/assets/test/sprockets/{1c166333b9ae232ca3c43174ff7ed396 → f4f596c9ba337be0d71e4ef01d05e45c} +0 -0
  377. data/spec/dummy_app/tmp/cache/assets/test/sprockets/{b1f49e09b0df0a360d041969f76da859 → fe334a948fd2e5baccfa25d2c4abffc4} +0 -0
  378. data/spec/dummy_app/tmp/dragonfly/cache/body/3e/2e27ad204d468500de8d9902b63d1e88657389 +4 -0
  379. data/spec/dummy_app/tmp/{cache/assets/test/sprockets/b1b5c83a14fd8b2081cbb32dd26021c4 → dragonfly/cache/body/6f/58795de38055147320844c9fa5ff32e0aa123e} +0 -0
  380. data/spec/dummy_app/tmp/dragonfly/cache/meta/1c/caf9bcaeb88256d4e9505faaa85621e4b53a8d +0 -0
  381. data/spec/dummy_app/tmp/dragonfly/cache/meta/25/1c81c04032b247ef575f4c929301f7f1963a39 +0 -0
  382. data/spec/dummy_app/tmp/dragonfly/cache/meta/2b/b5469f96538f0f47bb9c2828b5f970fae89a8d +0 -0
  383. data/spec/dummy_app/tmp/dragonfly/cache/meta/2e/276270b8e924ea3de50db2ad7a265c3bc4f0a1 +0 -0
  384. data/spec/dummy_app/tmp/dragonfly/cache/meta/62/36dfc092f525f643ded34bb316308d788f8f41 +0 -0
  385. data/spec/dummy_app/tmp/dragonfly/cache/meta/70/d58ddc461366882590f97c0d9ea3af5545b5a1 +0 -0
  386. data/spec/dummy_app/tmp/dragonfly/cache/meta/bd/bb171fbf5c5c34eff7efc8fa78817acc7dea9d +0 -0
  387. data/spec/dummy_app/tmp/dragonfly/cache/meta/d1/6c9c5ef0b7ae606b4a12cb7daf2fa7dc21acd5 +0 -0
  388. data/spec/factories.rb +2 -3
  389. data/spec/helpers/rails_admin/application_helper_spec.rb +86 -86
  390. data/spec/helpers/rails_admin/form_builder_spec.rb +6 -6
  391. data/spec/integration/authorization/cancan_spec.rb +168 -173
  392. data/spec/integration/basic/bulk_action/rails_admin_basic_bulk_action_spec.rb +11 -11
  393. data/spec/integration/basic/bulk_destroy/rails_admin_basic_bulk_destroy_spec.rb +16 -16
  394. data/spec/integration/basic/create/rails_admin_basic_create_spec.rb +69 -69
  395. data/spec/integration/basic/create/rails_admin_namespaced_model_create_spec.rb +8 -8
  396. data/spec/integration/basic/delete/rails_admin_basic_delete_spec.rb +21 -21
  397. data/spec/integration/basic/destroy/rails_admin_basic_destroy_spec.rb +32 -32
  398. data/spec/integration/basic/edit/rails_admin_basic_edit_spec.rb +39 -39
  399. data/spec/integration/basic/export/rails_admin_basic_export_spec.rb +36 -36
  400. data/spec/integration/basic/list/rails_admin_basic_list_spec.rb +194 -102
  401. data/spec/integration/basic/new/rails_admin_basic_new_spec.rb +30 -30
  402. data/spec/integration/basic/new/rails_admin_namespaced_model_new_spec.rb +12 -12
  403. data/spec/integration/basic/show/rails_admin_basic_show_spec.rb +34 -34
  404. data/spec/integration/basic/update/rails_admin_basic_update_spec.rb +90 -90
  405. data/spec/integration/config/edit/rails_admin_config_edit_spec.rb +351 -352
  406. data/spec/integration/config/list/rails_admin_config_list_spec.rb +132 -133
  407. data/spec/integration/config/show/rails_admin_config_show_spec.rb +82 -83
  408. data/spec/integration/history/rails_admin_history_spec.rb +15 -15
  409. data/spec/integration/rails_admin_spec.rb +48 -49
  410. data/spec/integration/relation_spec.rb +12 -12
  411. data/spec/orm/active_record.rb +7 -4
  412. data/spec/orm/mongoid.rb +1 -7
  413. data/spec/rails_admin/abstract_model_spec.rb +28 -28
  414. data/spec/rails_admin/active_record_extension_spec.rb +3 -3
  415. data/spec/rails_admin/adapters/active_record/abstract_object_spec.rb +29 -29
  416. data/spec/rails_admin/adapters/active_record_spec.rb +210 -215
  417. data/spec/rails_admin/adapters/mongoid/abstract_object_spec.rb +19 -19
  418. data/spec/rails_admin/adapters/mongoid_spec.rb +429 -435
  419. data/spec/rails_admin/config/actions/base_spec.rb +9 -9
  420. data/spec/rails_admin/config/actions_spec.rb +42 -42
  421. data/spec/rails_admin/config/fields/base_spec.rb +135 -136
  422. data/spec/rails_admin/config/fields/date_spec.rb +17 -17
  423. data/spec/rails_admin/config/fields/datetime_spec.rb +12 -13
  424. data/spec/rails_admin/config/fields/file_upload_spec.rb +4 -5
  425. data/spec/rails_admin/config/fields/time_spec.rb +12 -13
  426. data/spec/rails_admin/config/fields/timestamp_spec.rb +5 -5
  427. data/spec/rails_admin/config/fields/types/ck_editor_spec.rb +1 -1
  428. data/spec/rails_admin/config/fields/types/datetime_spec.rb +2 -2
  429. data/spec/rails_admin/config/fields_spec.rb +4 -4
  430. data/spec/rails_admin/config/has_fields_spec.rb +4 -4
  431. data/spec/rails_admin/config/lazy_model_spec.rb +5 -5
  432. data/spec/rails_admin/config/model_spec.rb +50 -50
  433. data/spec/rails_admin/config/proxyable/proxy_spec.rb +7 -10
  434. data/spec/rails_admin/config/sections_spec.rb +22 -22
  435. data/spec/rails_admin/config_spec.rb +81 -80
  436. data/spec/rails_admin/support/csv_converter_spec.rb +3 -3
  437. data/spec/spec_helper.rb +11 -14
  438. metadata +509 -548
  439. metadata.gz.sig +0 -0
  440. data/lib/generators/rails_admin/templates/drop.rb +0 -18
  441. data/lib/generators/rails_admin/templates/migration.rb +0 -18
  442. data/lib/generators/rails_admin/uninstall_generator.rb +0 -22
  443. data/spec/dummy_app/tmp/cache/assets/test/sass/245c4be20f01db9121b0992275b77e082f23d7df/font-awesome-4-compability.scssc +0 -0
  444. data/spec/dummy_app/tmp/cache/assets/test/sass/ec09962bad77c2bf0bbd3ac3d62b1dd18394a9fe/font-awesome.css.erbc +0 -0
  445. data/spec/dummy_app/tmp/cache/assets/test/sprockets/0166686128d421b993db59eb5e22c92c +0 -0
  446. data/spec/dummy_app/tmp/cache/assets/test/sprockets/03c695c9019f09cbb02f63a7ae21d79f +0 -0
  447. data/spec/dummy_app/tmp/cache/assets/test/sprockets/09f8aac43754fe92352c1a0dac795897 +0 -0
  448. data/spec/dummy_app/tmp/cache/assets/test/sprockets/0ae5c9a0fc0ac395440fd4a9475ad717 +0 -0
  449. data/spec/dummy_app/tmp/cache/assets/test/sprockets/11f4d136083919b98336de97c5a27364 +0 -0
  450. data/spec/dummy_app/tmp/cache/assets/test/sprockets/128dcffe5acb878aaf10cb69ede11e54 +0 -0
  451. data/spec/dummy_app/tmp/cache/assets/test/sprockets/143fa89e22fd0f160912728242c12d20 +0 -0
  452. data/spec/dummy_app/tmp/cache/assets/test/sprockets/174a5ce6774da56e0d025f915d2a5656 +0 -0
  453. data/spec/dummy_app/tmp/cache/assets/test/sprockets/1e909aba91e1216beb4533895a4a6ffa +0 -0
  454. data/spec/dummy_app/tmp/cache/assets/test/sprockets/21af0c9472c74ff4307411a74eb52a08 +0 -0
  455. data/spec/dummy_app/tmp/cache/assets/test/sprockets/232be00ca912eb52d6fc11676eee2f52 +0 -0
  456. data/spec/dummy_app/tmp/cache/assets/test/sprockets/245b58f60816ff2e286784b47a8124a6 +0 -0
  457. data/spec/dummy_app/tmp/cache/assets/test/sprockets/24df57fbd4ef4a5d613ab3360a611f9d +0 -0
  458. data/spec/dummy_app/tmp/cache/assets/test/sprockets/26495c65c6a62b71419149d7dd3b601b +0 -0
  459. data/spec/dummy_app/tmp/cache/assets/test/sprockets/2d69e41d82df0b55096aed4faa6f16c6 +0 -0
  460. data/spec/dummy_app/tmp/cache/assets/test/sprockets/2f60f107ce85662c1588f521bb9e2c8b +0 -0
  461. data/spec/dummy_app/tmp/cache/assets/test/sprockets/30061ffe89ebc51d869d6b363b18a7cf +0 -0
  462. data/spec/dummy_app/tmp/cache/assets/test/sprockets/34ac1a6bcf81e3f9139511c7be3dfed9 +0 -0
  463. data/spec/dummy_app/tmp/cache/assets/test/sprockets/3c44e3b6e6c89b71c859ee6552fd8abb +0 -0
  464. data/spec/dummy_app/tmp/cache/assets/test/sprockets/412440cb48736db6d625f0ecb113344d +0 -0
  465. data/spec/dummy_app/tmp/cache/assets/test/sprockets/4557193886d8770d362ce8103d320b9f +0 -0
  466. data/spec/dummy_app/tmp/cache/assets/test/sprockets/498f25956085afc83e15c44ffb1170e6 +0 -0
  467. data/spec/dummy_app/tmp/cache/assets/test/sprockets/57dc08580327982fc6a9e8c0a7f168ad +0 -0
  468. data/spec/dummy_app/tmp/cache/assets/test/sprockets/5a6cbfd514173d817be78f9d005c5680 +0 -0
  469. data/spec/dummy_app/tmp/cache/assets/test/sprockets/5e2c9668e1a6c05d64b5c7cd79ddd647 +0 -0
  470. data/spec/dummy_app/tmp/cache/assets/test/sprockets/64277385d99fc22b7ff9fa9cacc0dc93 +0 -0
  471. data/spec/dummy_app/tmp/cache/assets/test/sprockets/66c9b69b948666df4d011498e6631eed +0 -0
  472. data/spec/dummy_app/tmp/cache/assets/test/sprockets/696be962f98b08b9fee127ddd7e99903 +0 -0
  473. data/spec/dummy_app/tmp/cache/assets/test/sprockets/69d2c687f9659c7d6fb668bddb032834 +0 -0
  474. data/spec/dummy_app/tmp/cache/assets/test/sprockets/6bd55d53bef2f0dd81671f0f02f7d3ed +0 -0
  475. data/spec/dummy_app/tmp/cache/assets/test/sprockets/70b145271cbc457a0b6fd0c63af2983f +0 -0
  476. data/spec/dummy_app/tmp/cache/assets/test/sprockets/73f41636108e88974107e84d4d50801d +0 -0
  477. data/spec/dummy_app/tmp/cache/assets/test/sprockets/75f716413cdabd240c8b85adc42ddad9 +0 -0
  478. data/spec/dummy_app/tmp/cache/assets/test/sprockets/7741691076a9f393f20d291004464ac0 +0 -0
  479. data/spec/dummy_app/tmp/cache/assets/test/sprockets/785ad3ea421e6a5227ad573a68eb210e +0 -0
  480. data/spec/dummy_app/tmp/cache/assets/test/sprockets/7a9b30ad67a8c153e95d638e962bf463 +0 -0
  481. data/spec/dummy_app/tmp/cache/assets/test/sprockets/7aa93b56c89c66301f9154d27ea9014f +0 -0
  482. data/spec/dummy_app/tmp/cache/assets/test/sprockets/7c081ddde599ff1c2e0006defac49285 +0 -0
  483. data/spec/dummy_app/tmp/cache/assets/test/sprockets/7ef92f534d8e2b3abde760d1813145d9 +0 -0
  484. data/spec/dummy_app/tmp/cache/assets/test/sprockets/82d50803717341c893f612a86d9a1400 +0 -0
  485. data/spec/dummy_app/tmp/cache/assets/test/sprockets/8626144fc98fb2a6c7ede9bf55f84cac +0 -0
  486. data/spec/dummy_app/tmp/cache/assets/test/sprockets/898f5214bcdb21409c81c8aade73b535 +0 -0
  487. data/spec/dummy_app/tmp/cache/assets/test/sprockets/8f5d6d8fba731caff3f9e84487876612 +0 -0
  488. data/spec/dummy_app/tmp/cache/assets/test/sprockets/91c2a4d8729e7c56e56029d18edb1176 +0 -0
  489. data/spec/dummy_app/tmp/cache/assets/test/sprockets/99e5beb37b7130f59a12936b6b763447 +0 -0
  490. data/spec/dummy_app/tmp/cache/assets/test/sprockets/9ad9a36052fd8184d3634f8edbf52a68 +0 -0
  491. data/spec/dummy_app/tmp/cache/assets/test/sprockets/a70e63d06a6899f97de5cf676b2c395c +0 -0
  492. data/spec/dummy_app/tmp/cache/assets/test/sprockets/b1b02c2fe88268d3d00709aeca4c2eb5 +0 -0
  493. data/spec/dummy_app/tmp/cache/assets/test/sprockets/b95121cacfdf3b3cd1197526fbc6c098 +0 -0
  494. data/spec/dummy_app/tmp/cache/assets/test/sprockets/bab598b96111d2c4545459320f65853b +0 -0
  495. data/spec/dummy_app/tmp/cache/assets/test/sprockets/bbc9f2cbbd599b8b17e585cd2ebfc9a2 +0 -0
  496. data/spec/dummy_app/tmp/cache/assets/test/sprockets/c1bbc7c7493a2006f9116a79be4aad50 +0 -0
  497. data/spec/dummy_app/tmp/cache/assets/test/sprockets/c3381e393b50c9df2f8b97e4634b1349 +0 -0
  498. data/spec/dummy_app/tmp/cache/assets/test/sprockets/c402e3bddd9e25c23e52df17c8bb42a3 +0 -0
  499. data/spec/dummy_app/tmp/cache/assets/test/sprockets/c7222887ab4570345607228eed54b7c4 +0 -0
  500. data/spec/dummy_app/tmp/cache/assets/test/sprockets/d4e4ebef5c7337c61bee8cc343e473d4 +0 -0
  501. data/spec/dummy_app/tmp/cache/assets/test/sprockets/d5150138d2eedf2573c71dbd75180e2a +0 -0
  502. data/spec/dummy_app/tmp/cache/assets/test/sprockets/dbeda8fff4e9b5084fd1bc79a0f220d0 +0 -0
  503. data/spec/dummy_app/tmp/cache/assets/test/sprockets/e43b6fc5e743fc33b6ec77b00fc1c916 +0 -0
  504. data/spec/dummy_app/tmp/cache/assets/test/sprockets/ec6a90e298605bce56e3e47e1c4a6d5c +0 -0
  505. data/spec/dummy_app/tmp/cache/assets/test/sprockets/ef41f276ef9b69b0d57e4566493cc15d +0 -0
  506. data/spec/dummy_app/tmp/cache/assets/test/sprockets/efba5ca5522c353d79d1b624f22179c1 +0 -0
  507. data/spec/dummy_app/tmp/cache/assets/test/sprockets/f304c66c0c0e65597b8a53e4b9883357 +0 -0
  508. data/spec/dummy_app/tmp/cache/assets/test/sprockets/f386bc0d31bc15498eaff65440bf1ead +0 -0
  509. data/spec/dummy_app/tmp/cache/assets/test/sprockets/f9c9bd4d84f1951260e50180fa8ae0d2 +0 -0
  510. data/spec/dummy_app/tmp/cache/assets/test/sprockets/fa6cff1eeaad0d65a825b3ebd3045070 +0 -0
  511. data/spec/dummy_app/tmp/cache/assets/test/sprockets/fead2dec6a8d5e520cd797810ef316bd +0 -0
  512. data/spec/dummy_app/tmp/dragonfly/cache/body/d9/6abc70a2bba359cc1bebcf56d7d4e522eacbad +0 -4
  513. data/spec/dummy_app/tmp/dragonfly/cache/meta/01/52bba6767d462a8815bfef629b8413079a9d31 +0 -0
  514. data/spec/dummy_app/tmp/dragonfly/cache/meta/38/703cefed91dd44c4a8fea5cbb4b17e1ebfc99d +0 -0
  515. data/spec/dummy_app/tmp/dragonfly/cache/meta/40/1d77fa6d5446212f87dac823fbdcb241ec9325 +0 -0
  516. data/spec/dummy_app/tmp/dragonfly/cache/meta/40/95eda2cf7223fc56a96360973c859a9f24d468 +0 -0
  517. data/spec/dummy_app/tmp/dragonfly/cache/meta/5b/7f94b5e3c284cefaa1531e7b5c7f20354a6735 +0 -0
  518. data/spec/dummy_app/tmp/dragonfly/cache/meta/5e/ef47362a4fd7fd0542ff5e873eb5b76d7d5002 +0 -0
  519. data/spec/dummy_app/tmp/dragonfly/cache/meta/64/5a7c779a6e798b4f85e897f1d39ef331e1678c +0 -0
  520. data/spec/dummy_app/tmp/dragonfly/cache/meta/67/d60c85f99af4a911cf86702114da2d9fff52ac +0 -0
  521. data/spec/dummy_app/tmp/dragonfly/cache/meta/82/f18afea133bee8e0c723324497383d7bb510f9 +0 -0
  522. data/spec/dummy_app/tmp/dragonfly/cache/meta/84/9965055e94a3d5727a725d174bbbed8f8ecce3 +0 -0
  523. data/spec/dummy_app/tmp/dragonfly/cache/meta/90/acadf04574dc9417c2f7c238ee48e901b92474 +0 -0
  524. data/spec/dummy_app/tmp/dragonfly/cache/meta/a8/8839a9c373f06becc049eeb4f4cdb194c1ceda +0 -0
  525. data/spec/dummy_app/tmp/dragonfly/cache/meta/b7/b845f13b154ef49a71b1be96931905695a62fc +0 -0
  526. data/spec/dummy_app/tmp/dragonfly/cache/meta/ca/9693eea0638512131858fa1fc6c43a76687529 +0 -0
  527. data/spec/dummy_app/tmp/dragonfly/cache/meta/e7/c486ba5ec259581c09ba1f4ee381c719719397 +0 -0
  528. data/spec/dummy_app/tmp/dragonfly/cache/meta/f2/220f8edf3a69687421c04f7fc325efd46ca120 +0 -0
@@ -1,64 +1,64 @@
1
1
  require 'spec_helper'
2
2
 
3
- describe "RailsAdmin Basic Edit" do
3
+ describe 'RailsAdmin Basic Edit' do
4
4
 
5
5
  subject { page }
6
6
 
7
- describe "edit" do
8
- before(:each) do
7
+ describe 'edit' do
8
+ before do
9
9
  @player = FactoryGirl.create :player
10
- visit edit_path(:model_name => "player", :id => @player.id)
10
+ visit edit_path(model_name: 'player', id: @player.id)
11
11
  end
12
12
 
13
13
  it "shows \"Edit model\"" do
14
- should have_content("Edit Player")
14
+ should have_content('Edit Player')
15
15
  end
16
16
 
17
17
  it "shows required fields as \"Required\"" do
18
- should have_selector("div", :text => /Name\s*Required/)
19
- should have_selector("div", :text => /Number\s*Required/)
18
+ should have_selector('div', text: /Name\s*Required/)
19
+ should have_selector('div', text: /Number\s*Required/)
20
20
  end
21
21
 
22
22
  it "shows non-required fields as \"Optional\"" do
23
- expect(find("#player_position_field .help-block")).to have_content("Optional")
24
- expect(find("#player_born_on_field .help-block")).to have_content("Optional")
25
- expect(find("#player_notes_field .help-block")).to have_content("Optional")
23
+ expect(find('#player_position_field .help-block')).to have_content('Optional')
24
+ expect(find('#player_born_on_field .help-block')).to have_content('Optional')
25
+ expect(find('#player_notes_field .help-block')).to have_content('Optional')
26
26
  end
27
27
  end
28
28
 
29
- describe "association with inverse_of option" do
30
- it "adds a related id to the belongs_to create team link" do
29
+ describe 'association with inverse_of option' do
30
+ it 'adds a related id to the belongs_to create team link' do
31
31
  @player = FactoryGirl.create :player
32
- visit edit_path(:model_name => "player", :id => @player.id)
32
+ visit edit_path(model_name: 'player', id: @player.id)
33
33
  should have_selector("a[data-link='/admin/team/new?associations%5Bplayers%5D=#{@player.id.to_s}&modal=true']")
34
34
  end
35
35
 
36
- it "adds a related id to the has_many create team link" do
36
+ it 'adds a related id to the has_many create team link' do
37
37
  @team = FactoryGirl.create :team
38
- visit edit_path(:model_name => "team", :id => @team.id)
38
+ visit edit_path(model_name: 'team', id: @team.id)
39
39
  should have_selector("a[data-link='/admin/player/new?associations%5Bteam%5D=#{@team.id.to_s}&modal=true']")
40
40
  end
41
41
  end
42
42
 
43
- describe "readonly associations" do
43
+ describe 'readonly associations' do
44
44
 
45
- it "is not editable" do
45
+ it 'is not editable' do
46
46
  @league = FactoryGirl.create :league
47
- visit edit_path(:model_name => "league", :id => @league.id)
47
+ visit edit_path(model_name: 'league', id: @league.id)
48
48
  should_not have_selector('select#league_team_ids')
49
49
  should have_selector('select#league_division_ids') # decoy, fails if naming scheme changes
50
50
  end
51
51
  end
52
52
 
53
- describe "edit with has-and-belongs-to-many association" do
54
- before(:each) do
55
- @teams = 3.times.map { FactoryGirl.create :team }
56
- @fan = FactoryGirl.create :fan, :teams => [@teams[0]]
57
- visit edit_path(:model_name => "fan", :id => @fan.id)
53
+ describe 'edit with has-and-belongs-to-many association' do
54
+ before do
55
+ @teams = 3.times.collect { FactoryGirl.create :team }
56
+ @fan = FactoryGirl.create :fan, teams: [@teams[0]]
57
+ visit edit_path(model_name: 'fan', id: @fan.id)
58
58
  end
59
59
 
60
- it "shows associated objects" do
61
- should have_selector "#fan_team_ids" do |select|
60
+ it 'shows associated objects' do
61
+ should have_selector '#fan_team_ids' do |select|
62
62
  expect(select[0]).to have_selector 'option[selected="selected"]'
63
63
  expect(select[1]).not_to have_selector 'option[selected="selected"]'
64
64
  expect(select[2]).not_to have_selector 'option[selected="selected"]'
@@ -66,39 +66,39 @@ describe "RailsAdmin Basic Edit" do
66
66
  end
67
67
  end
68
68
 
69
- describe "edit with missing object" do
70
- before(:each) do
71
- visit edit_path(:model_name => "player", :id => 1)
69
+ describe 'edit with missing object' do
70
+ before do
71
+ visit edit_path(model_name: 'player', id: 1)
72
72
  end
73
73
 
74
- it "raises NotFound" do
74
+ it 'raises NotFound' do
75
75
  expect(page.driver.status_code).to eq(404)
76
76
  end
77
77
  end
78
78
 
79
- describe "edit with missing label", :given => ["a player exists", "three teams with no name exist"] do
80
- before(:each) do
79
+ describe 'edit with missing label', given: ['a player exists', 'three teams with no name exist'] do
80
+ before do
81
81
  @player = FactoryGirl.create :player
82
- @teams = 3.times.map { FactoryGirl.create :team, :name => "" }
83
- visit edit_path(:model_name => "player", :id => @player.id)
82
+ @teams = 3.times.collect { FactoryGirl.create :team, name: '' }
83
+ visit edit_path(model_name: 'player', id: @player.id)
84
84
  end
85
85
  end
86
86
 
87
- describe "edit object with overridden to_param" do
88
- before(:each) do
87
+ describe 'edit object with overridden to_param' do
88
+ before do
89
89
  @ball = FactoryGirl.create :ball
90
- visit edit_path(:model_name => "ball", :id => @ball.id)
90
+ visit edit_path(model_name: 'ball', id: @ball.id)
91
91
  end
92
92
 
93
- it "displays a link to the delete page" do
93
+ it 'displays a link to the delete page' do
94
94
  should have_selector "a[href='/admin/ball/#{@ball.id}/delete']"
95
95
  end
96
96
 
97
97
  end
98
98
 
99
- describe "clicking cancel when editing an object" do
99
+ describe 'clicking cancel when editing an object' do
100
100
 
101
- it "sends back to previous URL" do
101
+ it 'sends back to previous URL' do
102
102
  @ball = FactoryGirl.create :ball
103
103
  visit '/admin/ball?sort=color'
104
104
  click_link 'Edit'
@@ -1,36 +1,36 @@
1
1
  require 'spec_helper'
2
2
  require 'csv'
3
3
 
4
- describe "RailsAdmin Export" do
4
+ describe 'RailsAdmin Export' do
5
5
 
6
6
  subject { page }
7
7
 
8
- before(:each) do
9
- Comment.all.map &:destroy # rspec bug => doesn't get destroyed with transaction
8
+ before do
9
+ Comment.all.collect(&:destroy) # rspec bug => doesn't get destroyed with transaction
10
10
 
11
- @players = 4.times.map { FactoryGirl.create :player }
11
+ @players = 4.times.collect { FactoryGirl.create :player }
12
12
  @player = @players.first
13
13
  @player.team = FactoryGirl.create :team
14
14
  @player.draft = FactoryGirl.create :draft
15
- @player.comments = (@comments = 2.times.map { FactoryGirl.create(:comment) })
15
+ @player.comments = (@comments = 2.times.collect { FactoryGirl.create(:comment) })
16
16
  @player.save
17
17
 
18
18
  @abstract_model = RailsAdmin::AbstractModel.new(Player)
19
19
 
20
20
  # removed schema=>only=>created_at
21
21
  @non_default_schema = {
22
- "only"=>[PK_COLUMN.to_s, "updated_at", "deleted_at", "name", "position", "number", "retired", "injured", "born_on", "notes", "suspended"],
23
- "include"=>{
24
- "team"=>{"only"=>[PK_COLUMN.to_s, "created_at", "updated_at", "name", "logo_url", "manager", "ballpark", "mascot", "founded", "wins", "losses", "win_percentage", "revenue", "color"]},
25
- "draft"=>{"only"=>[PK_COLUMN.to_s, "created_at", "updated_at", "date", "round", "pick", "overall", "college", "notes"]},
26
- "comments"=>{"only"=>[PK_COLUMN.to_s, "content", "created_at", "updated_at"]}
22
+ 'only' => [PK_COLUMN.to_s, 'updated_at', 'deleted_at', 'name', 'position', 'number', 'retired', 'injured', 'born_on', 'notes', 'suspended'],
23
+ 'include' => {
24
+ 'team' => {'only' => [PK_COLUMN.to_s, 'created_at', 'updated_at', 'name', 'logo_url', 'manager', 'ballpark', 'mascot', 'founded', 'wins', 'losses', 'win_percentage', 'revenue', 'color']},
25
+ 'draft' => {'only' => [PK_COLUMN.to_s, 'created_at', 'updated_at', 'date', 'round', 'pick', 'overall', 'college', 'notes']},
26
+ 'comments' => {'only' => [PK_COLUMN.to_s, 'content', 'created_at', 'updated_at']}
27
27
  }
28
28
  }
29
29
  end
30
30
 
31
- describe "POST /admin/players/export (prompt)" do
31
+ describe 'POST /admin/players/export (prompt)' do
32
32
 
33
- it "allows to export to CSV with associations and default schema, containing properly translated header and follow configuration" do
33
+ it 'allows to export to CSV with associations and default schema, containing properly translated header and follow configuration' do
34
34
  RailsAdmin.config do |c|
35
35
  c.model Player do
36
36
  include_all_fields
@@ -42,20 +42,20 @@ describe "RailsAdmin Export" do
42
42
  end
43
43
  end
44
44
 
45
- visit export_path(:model_name => 'player')
45
+ visit export_path(model_name: 'player')
46
46
  should have_content 'Select fields to export'
47
- select "<comma> ','", :from => "csv_options_generator_col_sep"
47
+ select "<comma> ','", from: 'csv_options_generator_col_sep'
48
48
  click_button 'Export to csv'
49
- csv = CSV.parse page.driver.response.body.force_encoding("utf-8") # comes through as us-ascii on some platforms
50
- expect(csv[0]).to match_array ["Id", "Created at", "Updated at", "Deleted at", "Name", "Position",
51
- "Number", "Retired", "Injured", "Born on", "Notes", "Suspended", "Id [Team]", "Created at [Team]",
52
- "Updated at [Team]", "Name [Team]", "Logo url [Team]", "Team Manager [Team]", "Ballpark [Team]",
53
- "Mascot [Team]", "Founded [Team]", "Wins [Team]", "Losses [Team]", "Win percentage [Team]",
54
- "Revenue [Team]", "Color [Team]", "Custom field [Team]", "Id [Draft]", "Created at [Draft]",
55
- "Updated at [Draft]", "Date [Draft]", "Round [Draft]", "Pick [Draft]", "Overall [Draft]",
56
- "College [Draft]", "Notes [Draft]", "Id [Comments]", "Content [Comments]", "Created at [Comments]",
57
- "Updated at [Comments]"]
58
- expect(csv.flatten).to include(@player.name + " exported")
49
+ csv = CSV.parse page.driver.response.body.force_encoding('utf-8') # comes through as us-ascii on some platforms
50
+ expect(csv[0]).to match_array ['Id', 'Created at', 'Updated at', 'Deleted at', 'Name', 'Position',
51
+ 'Number', 'Retired', 'Injured', 'Born on', 'Notes', 'Suspended', 'Id [Team]', 'Created at [Team]',
52
+ 'Updated at [Team]', 'Name [Team]', 'Logo url [Team]', 'Team Manager [Team]', 'Ballpark [Team]',
53
+ 'Mascot [Team]', 'Founded [Team]', 'Wins [Team]', 'Losses [Team]', 'Win percentage [Team]',
54
+ 'Revenue [Team]', 'Color [Team]', 'Custom field [Team]', 'Id [Draft]', 'Created at [Draft]',
55
+ 'Updated at [Draft]', 'Date [Draft]', 'Round [Draft]', 'Pick [Draft]', 'Overall [Draft]',
56
+ 'College [Draft]', 'Notes [Draft]', 'Id [Comments]', 'Content [Comments]', 'Created at [Comments]',
57
+ 'Updated at [Comments]']
58
+ expect(csv.flatten).to include(@player.name + ' exported')
59
59
  expect(csv.flatten).to include(@player.team.name)
60
60
  expect(csv.flatten).to include(@player.draft.college)
61
61
 
@@ -63,14 +63,14 @@ describe "RailsAdmin Export" do
63
63
  expect(csv.flatten.join(' ')).to include(@player.comments.second.content.split("\n").first.strip)
64
64
  end
65
65
 
66
- it "allows to export to JSON" do
67
- visit export_path(:model_name => 'player')
66
+ it 'allows to export to JSON' do
67
+ visit export_path(model_name: 'player')
68
68
  click_button 'Export to json'
69
69
  should have_content @player.team.name
70
70
  end
71
71
 
72
- it "allows to export to XML" do
73
- visit export_path(:model_name => 'player')
72
+ it 'allows to export to XML' do
73
+ visit export_path(model_name: 'player')
74
74
  click_button 'Export to xml'
75
75
 
76
76
  # spec fails on non 1.9 mri rubies because of this https://github.com/rails/rails/pull/2076
@@ -78,17 +78,17 @@ describe "RailsAdmin Export" do
78
78
  # and Mongoid with ActiveModel 3.1 does not support to_xml's :include options
79
79
  # (due change of implementation in ActiveModel::Serializers between 3.1 and 3.2)
80
80
  if RUBY_VERSION =~ /1\.9/ &&
81
- (CI_ORM != :mongoid || (CI_ORM == :mongoid && ActiveModel::VERSION::STRING >= "3.2"))
81
+ (CI_ORM != :mongoid || (CI_ORM == :mongoid && ActiveModel::VERSION::STRING >= '3.2'))
82
82
  should have_content @player.team.name
83
83
  end
84
84
  end
85
85
 
86
- it "exports polymorphic fields the easy way for now" do
87
- visit export_path(:model_name => 'comment')
88
- select "<comma> ','", :from => "csv_options_generator_col_sep"
86
+ it 'exports polymorphic fields the easy way for now' do
87
+ visit export_path(model_name: 'comment')
88
+ select "<comma> ','", from: 'csv_options_generator_col_sep'
89
89
  click_button 'Export to csv'
90
90
  csv = CSV.parse page.driver.response.body
91
- expect(csv[0]).to match_array ["Id", "Commentable", "Commentable type", "Content", "Created at", "Updated at"]
91
+ expect(csv[0]).to match_array ['Id', 'Commentable', 'Commentable type', 'Content', 'Created at', 'Updated at']
92
92
  csv[1..-1].each do |line|
93
93
  expect(line[csv[0].index('Commentable')]).to eq(@player.id.to_s)
94
94
  expect(line[csv[0].index('Commentable type')]).to eq(@player.class.to_s)
@@ -96,9 +96,9 @@ describe "RailsAdmin Export" do
96
96
  end
97
97
  end
98
98
 
99
- describe "POST /admin/players/export :format => :csv" do
100
- it "exports with modified schema" do
101
- page.driver.post(export_path(:model_name => 'player', :schema => @non_default_schema, :csv => true, :all => true, :csv_options => { :generator => { :col_sep => "," } }))
99
+ describe 'POST /admin/players/export :format => :csv' do
100
+ it 'exports with modified schema' do
101
+ page.driver.post(export_path(model_name: 'player', schema: @non_default_schema, csv: true, all: true, csv_options: {generator: {col_sep: ','}}))
102
102
  csv = CSV.parse page.driver.response.body
103
103
  expect(csv[0]).not_to include('Created at')
104
104
  end
@@ -2,17 +2,17 @@
2
2
 
3
3
  require 'spec_helper'
4
4
 
5
- describe "RailsAdmin Basic List" do
5
+ describe 'RailsAdmin Basic List' do
6
6
 
7
7
  subject { page }
8
8
 
9
- describe "GET /admin" do
10
- it "responds successfully" do
9
+ describe 'GET /admin' do
10
+ it 'responds successfully' do
11
11
  visit dashboard_path
12
12
  end
13
13
  end
14
14
 
15
- describe "GET /admin/typo" do
15
+ describe 'GET /admin/typo' do
16
16
  it "redirects to dashboard and inform the user the model wasn't found" do
17
17
  visit '/admin/whatever'
18
18
  expect(page.driver.status_code).to eq(404)
@@ -20,7 +20,7 @@ describe "RailsAdmin Basic List" do
20
20
  end
21
21
  end
22
22
 
23
- describe "GET /admin/balls/545-typo" do
23
+ describe 'GET /admin/balls/545-typo' do
24
24
  it "redirects to balls index and inform the user the id wasn't found" do
25
25
  visit '/admin/ball/545-typo'
26
26
  expect(page.driver.status_code).to eq(404)
@@ -28,14 +28,14 @@ describe "RailsAdmin Basic List" do
28
28
  end
29
29
  end
30
30
 
31
- describe "GET /admin/player as list" do
31
+ describe 'GET /admin/player as list' do
32
32
  it "shows \"List of Models\", should show filters and should show column headers" do
33
33
  RailsAdmin.config.default_items_per_page = 1
34
34
  2.times { FactoryGirl.create :player } # two pages of players
35
- visit index_path(:model_name => "player")
36
- should have_content("List of Players")
37
- should have_content("Created at")
38
- should have_content("Updated at")
35
+ visit index_path(model_name: 'player')
36
+ should have_content('List of Players')
37
+ should have_content('Created at')
38
+ should have_content('Updated at')
39
39
 
40
40
  # it "shows the show, edit and delete links" do
41
41
  should have_selector("li[title='Show'] a")
@@ -54,20 +54,20 @@ describe "RailsAdmin Basic List" do
54
54
  end
55
55
  end
56
56
 
57
- describe "GET /admin/player" do
57
+ describe 'GET /admin/player' do
58
58
  before do
59
- @teams = 2.times.map do
59
+ @teams = 2.times.collect do
60
60
  FactoryGirl.create(:team)
61
61
  end
62
62
  @players = [
63
- FactoryGirl.create(:player, :retired => true, :injured => true, :team => @teams[0]),
64
- FactoryGirl.create(:player, :retired => true, :injured => false, :team => @teams[0]),
65
- FactoryGirl.create(:player, :retired => false, :injured => true, :team => @teams[1]),
66
- FactoryGirl.create(:player, :retired => false, :injured => false, :team => @teams[1]),
63
+ FactoryGirl.create(:player, retired: true, injured: true, team: @teams[0]),
64
+ FactoryGirl.create(:player, retired: true, injured: false, team: @teams[0]),
65
+ FactoryGirl.create(:player, retired: false, injured: true, team: @teams[1]),
66
+ FactoryGirl.create(:player, retired: false, injured: false, team: @teams[1]),
67
67
  ]
68
68
  end
69
69
 
70
- it "allows to query on any attribute" do
70
+ it 'allows to query on any attribute' do
71
71
  RailsAdmin.config Player do
72
72
  list do
73
73
  field :name
@@ -77,14 +77,14 @@ describe "RailsAdmin Basic List" do
77
77
  end
78
78
  end
79
79
 
80
- visit index_path(:model_name => "player", :query => @players[0].name)
80
+ visit index_path(model_name: 'player', query: @players[0].name)
81
81
  should have_content(@players[0].name)
82
82
  (1..3).each do |i|
83
83
  should have_no_content(@players[i].name)
84
84
  end
85
85
  end
86
86
 
87
- it "allows to filter on one attribute" do
87
+ it 'allows to filter on one attribute' do
88
88
  RailsAdmin.config Player do
89
89
  list do
90
90
  field :name
@@ -94,14 +94,14 @@ describe "RailsAdmin Basic List" do
94
94
  end
95
95
  end
96
96
 
97
- visit index_path(:model_name => "player", :f => {:injured => {"1" => {:v => "true"}}})
97
+ visit index_path(model_name: 'player', f: {injured: {'1' => {v: 'true'}}})
98
98
  should have_content(@players[0].name)
99
99
  should have_no_content(@players[1].name)
100
100
  should have_content(@players[2].name)
101
101
  should have_no_content(@players[3].name)
102
102
  end
103
103
 
104
- it "allows to combine filters on two different attributes" do
104
+ it 'allows to combine filters on two different attributes' do
105
105
  RailsAdmin.config Player do
106
106
  list do
107
107
  field :name
@@ -111,14 +111,14 @@ describe "RailsAdmin Basic List" do
111
111
  end
112
112
  end
113
113
 
114
- visit index_path(:model_name => "player", :f => {:retired => {"1" => {:v => "true"}}, :injured => {"1" => {:v => "true"}}})
114
+ visit index_path(model_name: 'player', f: {retired: {'1' => {v: 'true'}}, injured: {'1' => {v: 'true'}}})
115
115
  should have_content(@players[0].name)
116
116
  (1..3).each do |i|
117
117
  should have_no_content(@players[i].name)
118
118
  end
119
119
  end
120
120
 
121
- it "allows to filter on belongs_to relationships" do
121
+ it 'allows to filter on belongs_to relationships' do
122
122
  RailsAdmin.config Player do
123
123
  list do
124
124
  field :name
@@ -128,14 +128,14 @@ describe "RailsAdmin Basic List" do
128
128
  end
129
129
  end
130
130
 
131
- visit index_path(:model_name => "player", :f => {:team => {"1" => { :v => @teams[0].name }}})
131
+ visit index_path(model_name: 'player', f: {team: {'1' => {v: @teams[0].name}}})
132
132
  should have_content(@players[0].name)
133
133
  should have_content(@players[1].name)
134
134
  should have_no_content(@players[2].name)
135
135
  should have_no_content(@players[3].name)
136
136
  end
137
137
 
138
- it "allows to disable search on attributes" do
138
+ it 'allows to disable search on attributes' do
139
139
  RailsAdmin.config Player do
140
140
  list do
141
141
  field :position
@@ -144,11 +144,11 @@ describe "RailsAdmin Basic List" do
144
144
  end
145
145
  end
146
146
  end
147
- visit index_path(:model_name => "player", :query => @players[0].name)
147
+ visit index_path(model_name: 'player', query: @players[0].name)
148
148
  should have_no_content(@players[0].name)
149
149
  end
150
150
 
151
- it "allows to search a belongs_to attribute over the base table" do
151
+ it 'allows to search a belongs_to attribute over the base table' do
152
152
  RailsAdmin.config Player do
153
153
  list do
154
154
  field PK_COLUMN
@@ -158,15 +158,14 @@ describe "RailsAdmin Basic List" do
158
158
  end
159
159
  end
160
160
  end
161
- visit index_path(:model_name => "player", :f => {:team => {"1" => {:v => @teams.first.id}}})
161
+ visit index_path(model_name: 'player', f: {team: {'1' => {v: @teams.first.id}}})
162
162
  should have_content(@players[0].name)
163
163
  should have_content(@players[1].name)
164
164
  should have_no_content(@players[2].name)
165
165
  should have_no_content(@players[3].name)
166
166
  end
167
167
 
168
-
169
- it "allows to search a belongs_to attribute over the target table" do
168
+ it 'allows to search a belongs_to attribute over the target table' do
170
169
  RailsAdmin.config Player do
171
170
  list do
172
171
  field PK_COLUMN
@@ -176,31 +175,31 @@ describe "RailsAdmin Basic List" do
176
175
  end
177
176
  end
178
177
  end
179
- visit index_path(:model_name => "player", :f => {:team => {"1" => {:v => @teams.first.name}}})
178
+ visit index_path(model_name: 'player', f: {team: {'1' => {v: @teams.first.name}}})
180
179
  should have_content(@players[0].name)
181
180
  should have_content(@players[1].name)
182
181
  should have_no_content(@players[2].name)
183
182
  should have_no_content(@players[3].name)
184
183
  end
185
184
 
186
- it "allows to search a belongs_to attribute over the target table with a table name specified as a hash" do
185
+ it 'allows to search a belongs_to attribute over the target table with a table name specified as a hash' do
187
186
  RailsAdmin.config Player do
188
187
  list do
189
188
  field PK_COLUMN
190
189
  field :name
191
190
  field :team do
192
- searchable :teams => :name
191
+ searchable teams: :name
193
192
  end
194
193
  end
195
194
  end
196
- visit index_path(:model_name => "player", :f => {:team => {"1" => {:v => @teams.first.name}}})
195
+ visit index_path(model_name: 'player', f: {team: {'1' => {v: @teams.first.name}}})
197
196
  should have_content(@players[0].name)
198
197
  should have_content(@players[1].name)
199
198
  should have_no_content(@players[2].name)
200
199
  should have_no_content(@players[3].name)
201
200
  end
202
201
 
203
- it "allows to search a belongs_to attribute over the target table with a table name specified as a string" do
202
+ it 'allows to search a belongs_to attribute over the target table with a table name specified as a string' do
204
203
  RailsAdmin.config Player do
205
204
  list do
206
205
  field PK_COLUMN
@@ -210,14 +209,14 @@ describe "RailsAdmin Basic List" do
210
209
  end
211
210
  end
212
211
  end
213
- visit index_path(:model_name => "player", :f => {:team => {"1" => {:v => @teams.first.name}}})
212
+ visit index_path(model_name: 'player', f: {team: {'1' => {v: @teams.first.name}}})
214
213
  should have_content(@players[0].name)
215
214
  should have_content(@players[1].name)
216
215
  should have_no_content(@players[2].name)
217
216
  should have_no_content(@players[3].name)
218
217
  end
219
218
 
220
- it "allows to search a belongs_to attribute over the label method by default" do
219
+ it 'allows to search a belongs_to attribute over the label method by default' do
221
220
  RailsAdmin.config Player do
222
221
  list do
223
222
  field PK_COLUMN
@@ -225,14 +224,14 @@ describe "RailsAdmin Basic List" do
225
224
  field :team
226
225
  end
227
226
  end
228
- visit index_path(:model_name => "player", :f => {:team => {"1" => {:v => @teams.first.name}}})
227
+ visit index_path(model_name: 'player', f: {team: {'1' => {v: @teams.first.name}}})
229
228
  should have_content(@players[0].name)
230
229
  should have_content(@players[1].name)
231
230
  should have_no_content(@players[2].name)
232
231
  should have_no_content(@players[3].name)
233
232
  end
234
233
 
235
- it "allows to search a belongs_to attribute over the target table when an attribute is specified" do
234
+ it 'allows to search a belongs_to attribute over the target table when an attribute is specified' do
236
235
  RailsAdmin.config Player do
237
236
  list do
238
237
  field PK_COLUMN
@@ -242,14 +241,14 @@ describe "RailsAdmin Basic List" do
242
241
  end
243
242
  end
244
243
  end
245
- visit index_path(:model_name => "player", :f => {:team => {"1" => {:v => @teams.first.name}}})
244
+ visit index_path(model_name: 'player', f: {team: {'1' => {v: @teams.first.name}}})
246
245
  should have_content(@players[0].name)
247
246
  should have_content(@players[1].name)
248
247
  should have_no_content(@players[2].name)
249
248
  should have_no_content(@players[3].name)
250
249
  end
251
250
 
252
- it "allows to search over more than one attribute" do
251
+ it 'allows to search over more than one attribute' do
253
252
  RailsAdmin.config Player do
254
253
  list do
255
254
  field PK_COLUMN
@@ -259,149 +258,149 @@ describe "RailsAdmin Basic List" do
259
258
  end
260
259
  end
261
260
  end
262
- visit index_path(:model_name => "player", :f => {:team => {"1" => {:v => @teams.first.name}, "2" => {:v => @teams.first.id, :o => 'is'}}})
261
+ visit index_path(model_name: 'player', f: {team: {'1' => {v: @teams.first.name}, '2' => {v: @teams.first.id, o: 'is'}}})
263
262
  should have_content(@players[0].name)
264
263
  should have_content(@players[1].name)
265
264
  should have_no_content(@players[2].name)
266
265
  should have_no_content(@players[3].name)
267
266
  # same with a different id
268
- visit index_path(:model_name => "player", :f => {:team => {"1" => {:v => @teams.first.name}, "2" => {:v => @teams.last.id, :o => 'is'}}})
267
+ visit index_path(model_name: 'player', f: {team: {'1' => {v: @teams.first.name}, '2' => {v: @teams.last.id, o: 'is'}}})
269
268
  should have_no_content(@players[0].name)
270
269
  should have_no_content(@players[1].name)
271
270
  should have_no_content(@players[2].name)
272
271
  should have_no_content(@players[3].name)
273
272
  end
274
273
 
275
- it "displays base filters when no filters are present in the params" do
274
+ it 'displays base filters when no filters are present in the params' do
276
275
  RailsAdmin.config Player do
277
276
  list do
278
277
  filters [:name, :team]
279
278
  end
280
279
  end
281
280
 
282
- get index_path(:model_name => "player")
281
+ get index_path(model_name: 'player')
283
282
  expect(response.body).to include(%{$.filters.append("Name", "name", "string", "", null, "", 1);})
284
283
  expect(response.body).to include(%{$.filters.append("Team", "team", "belongs_to_association", "", null, "", 2);})
285
284
  end
286
285
  end
287
286
 
288
- describe "GET /admin/player with 2 objects" do
289
- before(:each) do
290
- @players = 2.times.map { FactoryGirl.create :player }
291
- visit index_path(:model_name => "player")
287
+ describe 'GET /admin/player with 2 objects' do
288
+ before do
289
+ @players = 2.times.collect { FactoryGirl.create :player }
290
+ visit index_path(model_name: 'player')
292
291
  end
293
292
 
294
293
  it "shows \"2 results\"" do
295
- should have_content("2 players")
294
+ should have_content('2 players')
296
295
  end
297
296
  end
298
297
 
299
- describe "GET /admin/player with 2 objects" do
300
- before(:each) do
301
- @players = 2.times.map { FactoryGirl.create :player }
302
- visit index_path(:model_name => "player")
298
+ describe 'GET /admin/player with 2 objects' do
299
+ before do
300
+ @players = 2.times.collect { FactoryGirl.create :player }
301
+ visit index_path(model_name: 'player')
303
302
  end
304
303
 
305
304
  it "shows \"2 results\"" do
306
- should have_content("2 players")
305
+ should have_content('2 players')
307
306
  end
308
307
  end
309
308
 
310
- describe "GET /admin/player with 3 pages, page 2" do
309
+ describe 'GET /admin/player with 3 pages, page 2' do
311
310
  before do
312
311
  RailsAdmin.config.default_items_per_page = 1
313
312
  items_per_page = RailsAdmin.config.default_items_per_page
314
313
  (items_per_page * 3).times { FactoryGirl.create(:player) }
315
- visit index_path(:model_name => "player", :page => 2)
314
+ visit index_path(model_name: 'player', page: 2)
316
315
  end
317
316
 
318
- it "paginates correctly" do
319
- expect(find('.pagination ul li:first')).to have_content("« Prev")
320
- expect(find('.pagination ul li:last')).to have_content("Next »")
321
- expect(find('.pagination ul li.active')).to have_content("2")
317
+ it 'paginates correctly' do
318
+ expect(find('.pagination ul li:first')).to have_content('« Prev')
319
+ expect(find('.pagination ul li:last')).to have_content('Next »')
320
+ expect(find('.pagination ul li.active')).to have_content('2')
322
321
  end
323
322
  end
324
323
 
325
- describe "list with 3 pages, page 3" do
326
- before(:each) do
324
+ describe 'list with 3 pages, page 3' do
325
+ before do
327
326
  items_per_page = RailsAdmin.config.default_items_per_page
328
- @players = (items_per_page * 3).times.map { FactoryGirl.create(:player) }
329
- visit index_path(:model_name => "player", :page => 3)
327
+ @players = (items_per_page * 3).times.collect { FactoryGirl.create(:player) }
328
+ visit index_path(model_name: 'player', page: 3)
330
329
  end
331
330
 
332
- it "paginates correctly and contain the right item" do
333
- expect(find('.pagination ul li:first')).to have_content("« Prev")
334
- expect(find('.pagination ul li:last')).to have_content("Next »")
335
- expect(find('.pagination ul li.active')).to have_content("3")
331
+ it 'paginates correctly and contain the right item' do
332
+ expect(find('.pagination ul li:first')).to have_content('« Prev')
333
+ expect(find('.pagination ul li:last')).to have_content('Next »')
334
+ expect(find('.pagination ul li.active')).to have_content('3')
336
335
  end
337
336
  end
338
337
 
339
- describe "GET /admin/player show all" do
340
- it "responds successfully with a single model" do
338
+ describe 'GET /admin/player show all' do
339
+ it 'responds successfully with a single model' do
341
340
  FactoryGirl.create :player
342
- visit index_path(:model_name => "player", :all => true)
343
- expect(find('div.total-count')).to have_content("1 player")
344
- expect(find('div.total-count')).not_to have_content("1 players")
341
+ visit index_path(model_name: 'player', all: true)
342
+ expect(find('div.total-count')).to have_content('1 player')
343
+ expect(find('div.total-count')).not_to have_content('1 players')
345
344
  end
346
345
 
347
- it "responds successfully with multiple models" do
348
- 2.times.map { FactoryGirl.create :player }
349
- visit index_path(:model_name => "player", :all => true)
350
- expect(find('div.total-count')).to have_content("2 players")
346
+ it 'responds successfully with multiple models' do
347
+ 2.times.collect { FactoryGirl.create :player }
348
+ visit index_path(model_name: 'player', all: true)
349
+ expect(find('div.total-count')).to have_content('2 players')
351
350
  end
352
351
  end
353
352
 
354
- describe "GET /admin/player show with pagination disabled by :associated_collection" do
355
- it "responds successfully" do
353
+ describe 'GET /admin/player show with pagination disabled by :associated_collection' do
354
+ it 'responds successfully' do
356
355
  @team = FactoryGirl.create :team
357
- 2.times.map { FactoryGirl.create :player, :team => @team }
358
- visit index_path(:model_name => "player", :associated_collection => "players", :compact => true, :current_action => 'update', :source_abstract_model => 'team', :source_object_id => @team.id)
359
- expect(find('div.total-count')).to have_content("2 players")
356
+ 2.times.collect { FactoryGirl.create :player, team: @team }
357
+ visit index_path(model_name: 'player', associated_collection: 'players', compact: true, current_action: 'update', source_abstract_model: 'team', source_object_id: @team.id)
358
+ expect(find('div.total-count')).to have_content('2 players')
360
359
  end
361
360
  end
362
361
 
363
- describe "list as compact json" do
364
- it "has_content an array with 2 elements and contain an array of elements with keys id and label" do
365
- 2.times.map { FactoryGirl.create :player }
366
- get index_path(:model_name => "player", :compact => true, :format => :json)
362
+ describe 'list as compact json' do
363
+ it 'has_content an array with 2 elements and contain an array of elements with keys id and label' do
364
+ 2.times.collect { FactoryGirl.create :player }
365
+ get index_path(model_name: 'player', compact: true, format: :json)
367
366
  expect(ActiveSupport::JSON.decode(response.body).length).to eq(2)
368
367
  ActiveSupport::JSON.decode(response.body).each do |object|
369
- expect(object).to have_key("id")
370
- expect(object).to have_key("label")
368
+ expect(object).to have_key('id')
369
+ expect(object).to have_key('label')
371
370
  end
372
371
  end
373
372
  end
374
373
 
375
- describe "search operator" do
374
+ describe 'search operator' do
376
375
  let(:player) { FactoryGirl.create :player }
377
376
 
378
377
  before do
379
378
  expect(Player.count).to eq(0)
380
379
  end
381
380
 
382
- it "finds the player if the query matches the default search opeartor" do
381
+ it 'finds the player if the query matches the default search opeartor' do
383
382
  RailsAdmin.config do |config|
384
383
  config.default_search_operator = 'ends_with'
385
384
  config.model Player do
386
385
  list { field :name }
387
386
  end
388
387
  end
389
- visit index_path(:model_name => "player", :query => player.name[2, -1])
388
+ visit index_path(model_name: 'player', query: player.name[2, -1])
390
389
  should have_content(player.name)
391
390
  end
392
391
 
393
- it "does not find the player if the query does not match the default search opeartor" do
392
+ it 'does not find the player if the query does not match the default search opeartor' do
394
393
  RailsAdmin.config do |config|
395
394
  config.default_search_operator = 'ends_with'
396
395
  config.model Player do
397
396
  list { field :name }
398
397
  end
399
398
  end
400
- visit index_path(:model_name => "player", :query => player.name[0, 2])
399
+ visit index_path(model_name: 'player', query: player.name[0, 2])
401
400
  should have_no_content(player.name)
402
401
  end
403
402
 
404
- it "finds the player if the query matches the specified search operator" do
403
+ it 'finds the player if the query matches the specified search operator' do
405
404
  RailsAdmin.config Player do
406
405
  list do
407
406
  field :name do
@@ -409,11 +408,11 @@ describe "RailsAdmin Basic List" do
409
408
  end
410
409
  end
411
410
  end
412
- visit index_path(:model_name => "player", :query => player.name[0, 2])
411
+ visit index_path(model_name: 'player', query: player.name[0, 2])
413
412
  should have_content(player.name)
414
413
  end
415
414
 
416
- it "does not find the player if the query does not match the specified search operator" do
415
+ it 'does not find the player if the query does not match the specified search operator' do
417
416
  RailsAdmin.config Player do
418
417
  list do
419
418
  field :name do
@@ -421,19 +420,19 @@ describe "RailsAdmin Basic List" do
421
420
  end
422
421
  end
423
422
  end
424
- visit index_path(:model_name => "player", :query => player.name[1..-1])
423
+ visit index_path(model_name: 'player', query: player.name[1..-1])
425
424
  should have_no_content(player.name)
426
425
  end
427
426
  end
428
427
 
429
- describe "list for objects with overridden to_param" do
430
- before(:each) do
428
+ describe 'list for objects with overridden to_param' do
429
+ before do
431
430
  @ball = FactoryGirl.create :ball
432
431
 
433
- visit index_path(:model_name => "ball")
432
+ visit index_path(model_name: 'ball')
434
433
  end
435
434
 
436
- it "shows the show, edit and delete links with valid url" do
435
+ it 'shows the show, edit and delete links with valid url' do
437
436
  should have_selector("td a[href='/admin/ball/#{@ball.id}']")
438
437
  should have_selector("td a[href='/admin/ball/#{@ball.id}/edit']")
439
438
  should have_selector("td a[href='/admin/ball/#{@ball.id}/delete']")
@@ -441,4 +440,97 @@ describe "RailsAdmin Basic List" do
441
440
 
442
441
  end
443
442
 
443
+ describe 'Scopes' do
444
+ before do
445
+ RailsAdmin.config do |config|
446
+ config.model Team do
447
+ list do
448
+ scopes [nil, :red, :white]
449
+ end
450
+ end
451
+ end
452
+ @teams = [
453
+ FactoryGirl.create(:team, color: 'red'),
454
+ FactoryGirl.create(:team, color: 'red'),
455
+ FactoryGirl.create(:team, color: 'white'),
456
+ FactoryGirl.create(:team, color: 'black')
457
+ ]
458
+ end
459
+
460
+ it 'displays configured scopes' do
461
+ visit index_path(model_name: 'team')
462
+ expect(find('#scope_selector li:first')).to have_content('All')
463
+ expect(find('#scope_selector li:nth-child(2)')).to have_content('Red')
464
+ expect(find('#scope_selector li:nth-child(3)')).to have_content('White')
465
+ expect(find('#scope_selector li:last')).to have_content('White')
466
+ expect(find('#scope_selector li.active')).to have_content('All')
467
+ end
468
+
469
+ it 'shows only scoped records' do
470
+ visit index_path(model_name: 'team')
471
+ should have_content(@teams[0].name)
472
+ should have_content(@teams[1].name)
473
+ should have_content(@teams[2].name)
474
+ should have_content(@teams[3].name)
475
+
476
+ visit index_path(model_name: 'team', scope: 'red')
477
+ expect(find('#scope_selector li.active')).to have_content('Red')
478
+ should have_content(@teams[0].name)
479
+ should have_content(@teams[1].name)
480
+ should have_no_content(@teams[2].name)
481
+ should have_no_content(@teams[3].name)
482
+
483
+ visit index_path(model_name: 'team', scope: 'white')
484
+ expect(find('#scope_selector li.active')).to have_content('White')
485
+ should have_no_content(@teams[0].name)
486
+ should have_no_content(@teams[1].name)
487
+ should have_content(@teams[2].name)
488
+ should have_no_content(@teams[3].name)
489
+ end
490
+ it 'shows all records instead when scope not in list' do
491
+ visit index_path(model_name: 'team', scope: 'green')
492
+ should have_content(@teams[0].name)
493
+ should have_content(@teams[1].name)
494
+ should have_content(@teams[2].name)
495
+ should have_content(@teams[3].name)
496
+ end
497
+ describe 'i18n' do
498
+ before :each do
499
+ en = {admin: {scopes: {
500
+ _all: 'every',
501
+ red: 'krasnyj'
502
+ }}}
503
+ I18n.backend.store_translations(:en, en)
504
+ end
505
+ after { I18n.reload! }
506
+ context 'global' do
507
+ it 'displays configured scopes' do
508
+ visit index_path(model_name: 'team')
509
+ expect(find('#scope_selector li:first')).to have_content('every')
510
+ expect(find('#scope_selector li:nth-child(2)')).to have_content('krasnyj')
511
+ expect(find('#scope_selector li:nth-child(3)')).to have_content('White')
512
+ expect(find('#scope_selector li:last')).to have_content('White')
513
+ expect(find('#scope_selector li.active')).to have_content('every')
514
+ end
515
+ end
516
+ context 'per model' do
517
+ before :each do
518
+ en = {admin: {scopes: {team: {
519
+ _all: 'any',
520
+ red: 'kr'
521
+ }}}}
522
+ I18n.backend.store_translations(:en, en)
523
+ end
524
+ after { I18n.reload! }
525
+ it 'displays configured scopes' do
526
+ visit index_path(model_name: 'team')
527
+ expect(find('#scope_selector li:first')).to have_content('any')
528
+ expect(find('#scope_selector li:nth-child(2)')).to have_content('kr')
529
+ expect(find('#scope_selector li:nth-child(3)')).to have_content('White')
530
+ expect(find('#scope_selector li:last')).to have_content('White')
531
+ expect(find('#scope_selector li.active')).to have_content('any')
532
+ end
533
+ end
534
+ end
535
+ end
444
536
  end