activeadmin 0.3.4 → 0.4.0

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

Potentially problematic release.


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

Files changed (244) hide show
  1. data/.gitignore +1 -0
  2. data/.travis.yml +3 -0
  3. data/CHANGELOG.md +164 -5
  4. data/CONTRIBUTING.md +113 -0
  5. data/Gemfile +7 -9
  6. data/LICENSE +1 -1
  7. data/README.rdoc +19 -20
  8. data/activeadmin.gemspec +4 -2
  9. data/app/assets/javascripts/active_admin/application.js +9 -0
  10. data/app/assets/javascripts/active_admin/base.js +4 -12
  11. data/app/assets/stylesheets/active_admin/_base.css.scss +17 -341
  12. data/app/assets/stylesheets/active_admin/_forms.css.scss +13 -7
  13. data/app/assets/stylesheets/active_admin/_header.css.scss +23 -4
  14. data/app/assets/stylesheets/active_admin/components/_blank_slates.scss +31 -0
  15. data/app/assets/stylesheets/active_admin/components/_breadcrumbs.scss +20 -0
  16. data/app/assets/stylesheets/active_admin/components/_buttons.scss +12 -0
  17. data/app/assets/stylesheets/active_admin/components/_flash_messages.css.scss +2 -0
  18. data/app/assets/stylesheets/active_admin/components/_grid.scss +9 -0
  19. data/app/assets/stylesheets/active_admin/components/_links.scss +5 -0
  20. data/app/assets/stylesheets/active_admin/components/_pagination.scss +34 -0
  21. data/app/assets/stylesheets/active_admin/components/_panels.scss +6 -0
  22. data/app/assets/stylesheets/active_admin/components/_scopes.scss +10 -0
  23. data/app/assets/stylesheets/active_admin/components/_status_tags.scss +12 -0
  24. data/app/assets/stylesheets/active_admin/components/_table_tools.css.scss +101 -0
  25. data/app/assets/stylesheets/active_admin/components/_tables.css.scss +43 -2
  26. data/app/assets/stylesheets/active_admin/mixins/_all.css.scss +2 -1
  27. data/app/assets/stylesheets/active_admin/mixins/_buttons.css.scss +50 -13
  28. data/app/assets/stylesheets/active_admin/mixins/_gradients.css.scss +9 -1
  29. data/app/assets/stylesheets/active_admin/mixins/_sections.css.scss +7 -5
  30. data/app/assets/stylesheets/active_admin/mixins/_shadows.css.scss +1 -0
  31. data/app/assets/stylesheets/active_admin/mixins/_typography.scss +3 -0
  32. data/app/assets/stylesheets/active_admin/mixins/_utilities.scss +9 -0
  33. data/app/assets/stylesheets/active_admin/mixins/_variables.css.scss +1 -0
  34. data/app/assets/stylesheets/active_admin/pages/_dashboard.scss +5 -0
  35. data/app/assets/stylesheets/active_admin/pages/_logged_out.scss +44 -0
  36. data/app/assets/stylesheets/active_admin/structure/_footer.scss +14 -0
  37. data/app/assets/stylesheets/active_admin/structure/_main_structure.scss +26 -0
  38. data/app/assets/stylesheets/active_admin/structure/_title_bar.scss +44 -0
  39. data/app/views/active_admin/devise/passwords/edit.html.erb +1 -1
  40. data/app/views/active_admin/devise/passwords/new.html.erb +1 -1
  41. data/app/views/active_admin/devise/sessions/new.html.erb +1 -1
  42. data/app/views/active_admin/devise/shared/_links.erb +1 -1
  43. data/app/views/active_admin/devise/unlocks/new.html.erb +1 -1
  44. data/app/views/active_admin/page/index.html.arb +1 -0
  45. data/app/views/layouts/active_admin_logged_out.html.erb +2 -2
  46. data/cucumber.yml +3 -2
  47. data/docs/1-general-configuration.md +46 -10
  48. data/docs/6-show-screens.md +7 -0
  49. data/docs/8-custom-actions.md +12 -2
  50. data/docs/9-custom-pages.md +84 -0
  51. data/features/belongs_to.feature +27 -0
  52. data/features/comments/commenting.feature +3 -2
  53. data/features/dashboard.feature +18 -0
  54. data/features/development_reloading.feature +43 -0
  55. data/features/index/filter_with_check_boxes.feature +25 -0
  56. data/features/index/index_as_table.feature +14 -0
  57. data/features/index/index_scopes.feature +59 -0
  58. data/features/index/pagination.feature +19 -1
  59. data/features/menu.feature +22 -2
  60. data/features/registering_assets.feature +2 -2
  61. data/features/registering_pages.feature +66 -0
  62. data/features/specifying_actions.feature +5 -0
  63. data/features/step_definitions/action_item_steps.rb +2 -6
  64. data/features/step_definitions/action_link_steps.rb +7 -0
  65. data/features/step_definitions/additional_web_steps.rb +11 -3
  66. data/features/step_definitions/asset_steps.rb +5 -1
  67. data/features/step_definitions/breadcrumb_steps.rb +5 -0
  68. data/features/step_definitions/comment_steps.rb +3 -3
  69. data/features/step_definitions/configuration_steps.rb +69 -13
  70. data/features/step_definitions/dashboard_steps.rb +7 -3
  71. data/features/step_definitions/factory_steps.rb +9 -2
  72. data/features/step_definitions/flash_steps.rb +9 -1
  73. data/features/step_definitions/format_steps.rb +9 -1
  74. data/features/step_definitions/index_scope_steps.rb +18 -6
  75. data/features/step_definitions/member_link_steps.rb +7 -0
  76. data/features/step_definitions/pagination_steps.rb +2 -2
  77. data/features/step_definitions/site_title_steps.rb +15 -0
  78. data/features/step_definitions/tab_steps.rb +1 -1
  79. data/features/step_definitions/user_steps.rb +1 -1
  80. data/features/step_definitions/web_steps.rb +4 -4
  81. data/features/support/paths.rb +6 -0
  82. data/features/users/logging_out.feature +11 -0
  83. data/lib/active_admin.rb +26 -10
  84. data/lib/active_admin/application.rb +64 -22
  85. data/lib/active_admin/arbre.rb +0 -1
  86. data/lib/active_admin/arbre/builder.rb +8 -5
  87. data/lib/active_admin/arbre/context.rb +1 -1
  88. data/lib/active_admin/arbre/html/attributes.rb +1 -1
  89. data/lib/active_admin/arbre/html/class_list.rb +0 -4
  90. data/lib/active_admin/arbre/html/collection.rb +2 -2
  91. data/lib/active_admin/arbre/html/document.rb +1 -1
  92. data/lib/active_admin/arbre/html/element.rb +19 -9
  93. data/lib/active_admin/arbre/html/tag.rb +3 -3
  94. data/lib/active_admin/arbre/html/text_node.rb +2 -2
  95. data/lib/active_admin/asset_registration.rb +15 -2
  96. data/lib/active_admin/base_controller.rb +61 -0
  97. data/lib/active_admin/{resource_controller → base_controller}/menu.rb +1 -1
  98. data/lib/active_admin/callbacks.rb +16 -18
  99. data/lib/active_admin/comments.rb +48 -54
  100. data/lib/active_admin/comments/comment.rb +13 -2
  101. data/lib/active_admin/comments/namespace_helper.rb +1 -1
  102. data/lib/active_admin/comments/views/active_admin_comments.rb +7 -3
  103. data/lib/active_admin/dashboards.rb +4 -0
  104. data/lib/active_admin/dashboards/dashboard_controller.rb +21 -5
  105. data/lib/active_admin/dsl.rb +6 -159
  106. data/lib/active_admin/event.rb +5 -3
  107. data/lib/active_admin/filter_form_builder.rb +53 -0
  108. data/lib/active_admin/form_builder.rb +25 -19
  109. data/lib/active_admin/helpers/settings.rb +6 -10
  110. data/lib/active_admin/inputs.rb +14 -0
  111. data/lib/active_admin/inputs/datepicker_input.rb +11 -0
  112. data/lib/active_admin/inputs/filter_base.rb +46 -0
  113. data/lib/active_admin/inputs/filter_check_boxes_input.rb +40 -0
  114. data/lib/active_admin/inputs/filter_date_range_input.rb +34 -0
  115. data/lib/active_admin/inputs/filter_numeric_input.rb +55 -0
  116. data/lib/active_admin/inputs/filter_select_input.rb +23 -0
  117. data/lib/active_admin/inputs/filter_string_input.rb +22 -0
  118. data/lib/active_admin/locales/ca.yml +44 -0
  119. data/lib/active_admin/locales/cs.yml +14 -10
  120. data/lib/active_admin/locales/de.yml +44 -0
  121. data/lib/active_admin/locales/en.yml +5 -0
  122. data/lib/active_admin/locales/hr.yml +40 -0
  123. data/lib/active_admin/locales/hu.yml +45 -0
  124. data/lib/active_admin/locales/it.yml +11 -6
  125. data/lib/active_admin/locales/ko.yml +40 -0
  126. data/lib/active_admin/locales/lv.yml +43 -0
  127. data/lib/active_admin/locales/nl.yml +40 -0
  128. data/lib/active_admin/locales/no-NB.yml +40 -0
  129. data/lib/active_admin/locales/pl.yml +7 -1
  130. data/lib/active_admin/locales/pt-BR.yml +6 -2
  131. data/lib/active_admin/menu_item.rb +25 -17
  132. data/lib/active_admin/namespace.rb +48 -33
  133. data/lib/active_admin/page.rb +65 -0
  134. data/lib/active_admin/page_controller.rb +15 -0
  135. data/lib/active_admin/page_dsl.rb +21 -0
  136. data/lib/active_admin/page_presenter.rb +30 -0
  137. data/lib/active_admin/reloader.rb +109 -42
  138. data/lib/active_admin/resource.rb +38 -44
  139. data/lib/active_admin/resource/action_items.rb +5 -0
  140. data/lib/active_admin/resource/belongs_to.rb +4 -2
  141. data/lib/active_admin/resource/controllers.rb +35 -0
  142. data/lib/active_admin/resource/menu.rb +1 -2
  143. data/lib/active_admin/resource/naming.rb +53 -31
  144. data/lib/active_admin/resource/page_presenters.rb +28 -0
  145. data/lib/active_admin/resource/scopes.rb +16 -3
  146. data/lib/active_admin/resource/sidebars.rb +4 -0
  147. data/lib/active_admin/resource_collection.rb +88 -0
  148. data/lib/active_admin/resource_controller.rb +18 -54
  149. data/lib/active_admin/resource_controller/action_builder.rb +1 -1
  150. data/lib/active_admin/resource_controller/actions.rb +8 -8
  151. data/lib/active_admin/resource_controller/callbacks.rb +1 -1
  152. data/lib/active_admin/resource_controller/collection.rb +8 -4
  153. data/lib/active_admin/resource_controller/filters.rb +1 -1
  154. data/lib/active_admin/resource_controller/resource_class_methods.rb +24 -0
  155. data/lib/active_admin/resource_controller/scoping.rb +1 -1
  156. data/lib/active_admin/resource_controller/sidebars.rb +1 -1
  157. data/lib/active_admin/resource_dsl.rb +157 -0
  158. data/lib/active_admin/router.rb +21 -14
  159. data/lib/active_admin/scope.rb +15 -3
  160. data/lib/active_admin/version.rb +1 -1
  161. data/lib/active_admin/view_factory.rb +4 -3
  162. data/lib/active_admin/view_helpers/auto_link_helper.rb +1 -10
  163. data/lib/active_admin/view_helpers/breadcrumb_helper.rb +25 -21
  164. data/lib/active_admin/view_helpers/filter_form_helper.rb +0 -150
  165. data/lib/active_admin/views/components/attributes_table.rb +1 -1
  166. data/lib/active_admin/views/components/columns.rb +4 -4
  167. data/lib/active_admin/views/components/paginated_collection.rb +42 -13
  168. data/lib/active_admin/views/components/panel.rb +8 -0
  169. data/lib/active_admin/views/components/scopes.rb +24 -18
  170. data/lib/active_admin/views/components/status_tag.rb +6 -5
  171. data/lib/active_admin/views/components/table_for.rb +6 -2
  172. data/lib/active_admin/views/header_renderer.rb +31 -12
  173. data/lib/active_admin/views/index_as_block.rb +2 -2
  174. data/lib/active_admin/views/index_as_blog.rb +3 -3
  175. data/lib/active_admin/views/index_as_grid.rb +4 -4
  176. data/lib/active_admin/views/index_as_table.rb +13 -6
  177. data/lib/active_admin/views/pages/base.rb +4 -4
  178. data/lib/active_admin/views/pages/form.rb +49 -0
  179. data/lib/active_admin/views/pages/index.rb +18 -6
  180. data/lib/active_admin/views/pages/page.rb +24 -0
  181. data/lib/active_admin/views/pages/show.rb +1 -1
  182. data/lib/generators/active_admin/assets/assets_generator.rb +19 -1
  183. data/lib/generators/active_admin/install/templates/active_admin.rb.erb +38 -12
  184. data/lib/generators/active_admin/install/templates/dashboards.rb +6 -0
  185. data/script/use_rails +14 -7
  186. data/spec/spec_helper.rb +9 -14
  187. data/spec/spec_helper_without_rails.rb +10 -0
  188. data/spec/support/detect_rails_version.rb +22 -3
  189. data/spec/support/integration_example_group.rb +5 -7
  190. data/spec/support/rails_template.rb +11 -0
  191. data/spec/support/rails_template_with_data.rb +25 -0
  192. data/spec/support/templates/cucumber_with_reloading.rb +5 -0
  193. data/spec/unit/active_admin_spec.rb +8 -0
  194. data/spec/unit/application_spec.rb +48 -2
  195. data/spec/unit/arbre/context_spec.rb +1 -1
  196. data/spec/unit/arbre/html/element_finder_methods_spec.rb +58 -2
  197. data/spec/unit/arbre/html/element_spec.rb +18 -5
  198. data/spec/unit/arbre/html/tag_attributes_spec.rb +3 -3
  199. data/spec/unit/arbre/html/tag_spec.rb +1 -1
  200. data/spec/unit/arbre/html_spec.rb +32 -22
  201. data/spec/unit/asset_registration_spec.rb +9 -3
  202. data/spec/unit/auto_link_spec.rb +2 -2
  203. data/spec/unit/base_controller_shared_examples.rb +28 -0
  204. data/spec/unit/base_controller_spec.rb +8 -0
  205. data/spec/unit/belongs_to_spec.rb +30 -33
  206. data/spec/unit/comments_spec.rb +45 -15
  207. data/spec/unit/config_shared_examples.rb +119 -0
  208. data/spec/unit/dashboard_controller_spec.rb +44 -0
  209. data/spec/unit/event_spec.rb +6 -0
  210. data/spec/unit/filter_form_builder_spec.rb +9 -0
  211. data/spec/unit/form_builder_spec.rb +8 -14
  212. data/spec/unit/menu_item_spec.rb +25 -20
  213. data/spec/unit/namespace/register_page_spec.rb +102 -0
  214. data/spec/unit/namespace/register_resource_spec.rb +188 -0
  215. data/spec/unit/namespace_spec.rb +11 -183
  216. data/spec/unit/page_controller_spec.rb +8 -0
  217. data/spec/unit/page_spec.rb +60 -0
  218. data/spec/unit/reloader_spec.rb +82 -38
  219. data/spec/unit/resource/menu_spec.rb +1 -51
  220. data/spec/unit/resource/naming_spec.rb +25 -20
  221. data/spec/unit/resource/page_presenters_spec.rb +32 -0
  222. data/spec/unit/resource/scopes_spec.rb +13 -0
  223. data/spec/unit/resource_collection_spec.rb +101 -0
  224. data/spec/unit/resource_controller_spec.rb +40 -32
  225. data/spec/unit/{registration_spec.rb → resource_registration_spec.rb} +0 -0
  226. data/spec/unit/resource_spec.rb +8 -24
  227. data/spec/unit/routing_spec.rb +50 -1
  228. data/spec/unit/scope_spec.rb +18 -4
  229. data/spec/unit/views/components/paginated_collection_spec.rb +163 -0
  230. data/spec/unit/views/components/panel_spec.rb +9 -0
  231. data/spec/unit/views/components/status_tag_spec.rb +9 -0
  232. data/spec/unit/views/tabbed_navigation_spec.rb +2 -1
  233. data/tasks/test.rake +44 -26
  234. metadata +176 -69
  235. data/app/assets/javascripts/active_admin/vendor.js +0 -382
  236. data/lib/active_admin/arbre/core_extensions.rb +0 -5
  237. data/lib/active_admin/comments/configuration.rb +0 -18
  238. data/lib/active_admin/page_config.rb +0 -15
  239. data/lib/active_admin/resource_controller/form.rb +0 -42
  240. data/lib/active_admin/resource_controller/page_configurations.rb +0 -53
  241. data/lib/active_admin/views/pages/edit.rb +0 -28
  242. data/lib/active_admin/views/pages/new.rb +0 -28
  243. data/lib/generators/active_admin/assets/templates/3.0/active_admin.js +0 -427
  244. data/spec/integration/belongs_to_spec.rb +0 -42
data/.gitignore CHANGED
@@ -33,3 +33,4 @@ test-rails*
33
33
  public
34
34
  .rvmrc
35
35
  .rspec
36
+ .rails-version
@@ -2,3 +2,6 @@ script: bundle exec rake
2
2
  rvm:
3
3
  - ree
4
4
  - 1.9.2
5
+ before_install:
6
+ - gem update --system
7
+ - gem --version
@@ -1,6 +1,120 @@
1
- ## Master
1
+ ## 0.4.0
2
+
3
+ ### Upgrade Notes
4
+
5
+ If you're running on Rails 3.0.x, make sure to run `rails generate active_admin:assets`
6
+ since we've changed both the CSS and JS files.
7
+
8
+ ### Deprecations
9
+
10
+ * In the initializer `config.allow_comments_in = []` is now
11
+ `config.allow_comments = true`. Use the new namespace specific configurations
12
+ to allow or disallow configuration within a specific namespace.
13
+ * Removed `Object#to_html` in favour of `to_s`. Any Arbre components
14
+ implementing a `to_html` method need to be updated to use `to_s` instead.
15
+
16
+ ### New Features
17
+
18
+ * Namespace specific configurations in the initializer ([@gregbell][])
19
+ * [#624][]: Set an image as the site title using `config.site_title_image` in the
20
+ Active Admin initializer. ([@mattvague][])
21
+ * [#758][]: Create a standalone page in Active Admin using
22
+ `ActiveAdmin.register_page` ([@pcreux][])
23
+ * [#723][]: Register stylesheets with a media type ([@macfanatic][])
24
+
25
+ ### Enhancements
26
+
27
+ * [#428][]: Paginated Collection now supports `:param_name` and `:download_links`.
28
+ These two additions allow you to use the `paginated_collection` component multiple
29
+ times on show screens. ([@samvincent][])
30
+ * [#527][]: Refactored all form helpers to use Formtastic 2([@ebeigarts][])
31
+ * [#551][]: Dashboards can now be conditionally displayed using `:if` ([@samvincent][])
32
+ * [#555][]: scopes now accept `:if`. They only get displayed if the proc returns true ([@macfanatic][])
33
+ * [#601][]: Breadcrumbs are internationalized ([@vairix-ssierra][])
34
+ * [#605][]: Validations on ActiveAdmin::Comment should work with
35
+ `accepts_nested_attributes_for` ([@DMajrekar ][])
36
+ * [#623][]: Index table can sort on any table using `:sort => 'table.column'` ([@ZequeZ][])
37
+ * [#638][]: Add `:label` option to `status_tag` component ([@fbuenemann][])
38
+ * [#644][]: Added proper I18n support to pagination ([@fbuenemann][])
39
+ * [#689][]: Scopes preserve title when provided as a string ([@macfanatic][])
40
+ * [#711][]: Styles update. Now sexier and more refined design. Redesigned Scopes. Split
41
+ css into smaller files. ([@mattvague][])
42
+ * [#741][]: Default media type of css is now "all" instead of "screen" ([@sftsang][])
43
+ * [#751][]: Pagination numbers work with a custom `[@per_page][]` ([@DMajrekar][])
44
+ * `default_actions` in an index table only display implemented actions ([@watson][])
45
+
46
+ ### Bug Fixes
47
+
48
+ * [#590][]: Comments now work in the default namespace ([@jbarket][])
49
+ * [#780][]: Fix stack level too deep exception when logout path is setup to use
50
+ `:logout_path` named route. ([@george][])
51
+ * [#637][]: Fix scope all I18n ([@fbuenemann][])
52
+ * [#496][]: Remove global `Object#to_html` [@ebeigarts][]
53
+ * [#470][], [#154][]: Arbre properly supports blocks that return Numeric values
54
+ ([@bobbytables][], [@utkarshkukreti][], [@gregbell][])
55
+ * [#897][]: Fix count display for collections with GROUP BY [@comboy][]
56
+
57
+ ### Dependencies
58
+
59
+ * [#468][]: Removed vendored jQuery. Now depends on the jquery-rails gem. If you're
60
+ running Rails 3.0.x (no asset pipeline), make sure to run
61
+ `rails generate active_admin:assets` to generate the correct files. ([@gregbell][])
62
+ * [#527][]: Active Admin now requires Formtastic 2.0 or greater ([@ebeigarts][])
63
+ * [#711][]: Active admin now depends on Bourbon > 1.0.0. If you're using Rails
64
+ 3.0.x, make sure to run `rails generate active_admin:assets` to ensure you
65
+ have the correct css files ([@mattvague][])
66
+ * [#869][]: Upgraded Kaminari to >= 0.13.0 and added support for
67
+ `Kaminari.config.page_method_name`. Active Admin should now be happy if
68
+ `will_paginate` is installed with it. ([@j][]-manu)
69
+ * #931: Support for Rails 3.2 added (@mperham)
70
+
71
+ ### Contributors
72
+
73
+ 274 commits by 42 authors
74
+
75
+ * Greg Bell
76
+ * Philippe Creux
77
+ * Matt Vague
78
+ * Felix Bünemann
79
+ * Matthew Brewer
80
+ * Edgars Beigarts
81
+ * Mike Perham
82
+ * Sam Vincent
83
+ * Kieran Klaassen
84
+ * Jonathan Barket
85
+ * Ankur Sethi
86
+ * Dinesh Majrekar
87
+ * comboy
88
+ * Juan E. Pemberthy
89
+ * Leandro Moreira
90
+ * Manu
91
+ * Marc Riera
92
+ * Radan Skorić
93
+ * Rhys Powell
94
+ * Sebastian Sierra
95
+ * Sherman Tsang
96
+ * Szymon Przybył
97
+ * Thomas Watson Steen
98
+ * Tim Habermaas
99
+ * Yara Mayer
100
+ * Zequez
101
+ * asancio
102
+ * emmek
103
+ * Alexey Noskov
104
+ * igmizo
105
+ * Alli
106
+ * Bendik Lynghaug
107
+ * Douwe Homans
108
+ * Eric Koslow
109
+ * Eunsub Kim
110
+ * Garami Gábor
111
+ * George Anderson
112
+ * Henrik Hodne
113
+ * Ivan Storck
114
+ * Jeff Dickey
115
+ * John Ferlito
116
+ * Josef Šimánek
2
117
 
3
- Nothing yet
4
118
 
5
119
  ## 0.3.4
6
120
 
@@ -11,7 +125,7 @@ Nothing yet
11
125
  * Fix reloading issues across operating systems.
12
126
  * Fix issue where SASS was recompiling on every request. This can seriously
13
127
  decrease the load time of applications when running in development mode.
14
- Thanks @dhiemstra for tracking this one down!
128
+ Thanks [@dhiemstra][] for tracking this one down!
15
129
 
16
130
  ### Contributors
17
131
 
@@ -50,8 +164,8 @@ Nothing yet
50
164
  * Active Admin no longer assumes sass-rails is installed
51
165
  * Arbre::Context passes methods to the underlying html which fixes
52
166
  issues on different types of servers (and on Heroku)
53
- * #45: Fix for multibyte characters (@tricknotes)
54
- * #505: Fix titlebar height when no breadcrumb (@mattvague)
167
+ * [#45][]: Fix for multibyte characters ([@tricknotes][])
168
+ * [#505][]: Fix titlebar height when no breadcrumb ([@mattvague][])
55
169
  * Fixed vertical align in dashboard
56
170
  * Fixed i18n path's for multi-word model names
57
171
 
@@ -263,6 +377,7 @@ of the highlights. 250 commits. Enough said.
263
377
  [#32]: https://github.com/gregbell/active_admin/issues/32
264
378
  [#38]: https://github.com/gregbell/active_admin/issues/38
265
379
  [#42]: https://github.com/gregbell/active_admin/issues/42
380
+ [#45]: https://github.com/gregbell/active_admin/issues/45
266
381
  [#48]: https://github.com/gregbell/active_admin/issues/48
267
382
  [#52]: https://github.com/gregbell/active_admin/issues/52
268
383
  [#55]: https://github.com/gregbell/active_admin/issues/55
@@ -277,6 +392,7 @@ of the highlights. 250 commits. Enough said.
277
392
  [#122]: https://github.com/gregbell/active_admin/issues/122
278
393
  [#131]: https://github.com/gregbell/active_admin/issues/131
279
394
  [#135]: https://github.com/gregbell/active_admin/issues/135
395
+ [#154]: https://github.com/gregbell/active_admin/issues/154
280
396
  [#171]: https://github.com/gregbell/active_admin/issues/171
281
397
  [#186]: https://github.com/gregbell/active_admin/issues/186
282
398
  [#197]: https://github.com/gregbell/active_admin/issues/197
@@ -287,15 +403,58 @@ of the highlights. 250 commits. Enough said.
287
403
  [#332]: https://github.com/gregbell/active_admin/issues/332
288
404
  [#369]: https://github.com/gregbell/active_admin/issues/369
289
405
  [#381]: https://github.com/gregbell/active_admin/issues/381
406
+ [#428]: https://github.com/gregbell/active_admin/issues/428
407
+ [#468]: https://github.com/gregbell/active_admin/issues/468
408
+ [#470]: https://github.com/gregbell/active_admin/issues/470
409
+ [#496]: https://github.com/gregbell/active_admin/issues/496
410
+ [#505]: https://github.com/gregbell/active_admin/issues/505
411
+ [#527]: https://github.com/gregbell/active_admin/issues/527
412
+ [#551]: https://github.com/gregbell/active_admin/issues/551
413
+ [#555]: https://github.com/gregbell/active_admin/issues/555
414
+ [#590]: https://github.com/gregbell/active_admin/issues/590
415
+ [#601]: https://github.com/gregbell/active_admin/issues/601
416
+ [#605]: https://github.com/gregbell/active_admin/issues/605
417
+ [#623]: https://github.com/gregbell/active_admin/issues/623
418
+ [#624]: https://github.com/gregbell/active_admin/issues/624
419
+ [#637]: https://github.com/gregbell/active_admin/issues/637
420
+ [#638]: https://github.com/gregbell/active_admin/issues/638
421
+ [#644]: https://github.com/gregbell/active_admin/issues/644
422
+ [#689]: https://github.com/gregbell/active_admin/issues/689
423
+ [#711]: https://github.com/gregbell/active_admin/issues/711
424
+ [#723]: https://github.com/gregbell/active_admin/issues/723
425
+ [#741]: https://github.com/gregbell/active_admin/issues/741
426
+ [#751]: https://github.com/gregbell/active_admin/issues/751
427
+ [#758]: https://github.com/gregbell/active_admin/issues/758
428
+ [#780]: https://github.com/gregbell/active_admin/issues/780
429
+ [#869]: https://github.com/gregbell/active_admin/issues/869
430
+ [#897]: https://github.com/gregbell/active_admin/issues/897
431
+ [@DMajrekar]: https://github.com/DMajrekar
432
+ [@ZequeZ]: https://github.com/ZequeZ
433
+ [@bobbytables]: https://github.com/bobbytables
434
+ [@comboy]: https://github.com/comboy
435
+ [@dhiemstra]: https://github.com/dhiemstra
290
436
  [@doug316]: https://github.com/doug316
437
+ [@ebeigarts]: https://github.com/ebeigarts
291
438
  [@emzeq]: https://github.com/emzeq
292
439
  [@fabiokr]: https://github.com/fabiokr
440
+ [@fbuenemann]: https://github.com/fbuenemann
441
+ [@george]: https://github.com/george
293
442
  [@gregbell]: https://github.com/gregbell
443
+ [@j]: https://github.com/j
444
+ [@jbarket]: https://github.com/jbarket
294
445
  [@knoopx]: https://github.com/knoopx
295
446
  [@krug]: https://github.com/krug
447
+ [@macfanatic]: https://github.com/macfanatic
296
448
  [@mattvague]: https://github.com/mattvague
297
449
  [@mwindwer]: https://github.com/mwindwer
298
450
  [@page_title]: https://github.com/page_title
299
451
  [@pcreux]: https://github.com/pcreux
452
+ [@per_page]: https://github.com/per_page
300
453
  [@rolfb]: https://github.com/rolfb
454
+ [@samvincent]: https://github.com/samvincent
455
+ [@sftsang]: https://github.com/sftsang
301
456
  [@shayfrendt]: https://github.com/shayfrendt
457
+ [@tricknotes]: https://github.com/tricknotes
458
+ [@utkarshkukreti]: https://github.com/utkarshkukreti
459
+ [@vairix]: https://github.com/vairix
460
+ [@watson]: https://github.com/watson
@@ -0,0 +1,113 @@
1
+ ## Contributing
2
+
3
+ This is a guide to contributing to Active Admin. It should walk you through the
4
+ major steps to contributing code to the project.
5
+
6
+ ### 1. Create an Issue on Github
7
+
8
+ The first step to contributing to Active Admin is creating a ticket in our
9
+ [ticketing system on Github](https://github.com/gregbell/active_admin/issues).
10
+ The community has been hard at work already, so please take a second to search
11
+ for the issue or feature before creating a new one.
12
+
13
+ All features or bug fixes should have a ticket. This makes it easy for everyone
14
+ to discuss the code and know if a fix is already in progress for an issue. If
15
+ it's a feature, the team can prioritize what it should work on based on these
16
+ tickets.
17
+
18
+
19
+ ### 2. Fork & Create a Feature Branch
20
+
21
+ The next step is to fork Active Admin (if you haven't already done so) and
22
+ create a new git branch based on the feature or issue you're working on. Please
23
+ use a descriptive name for your branch.
24
+
25
+ For example a great branch name would be (where issue #325 is the ticket you're
26
+ working on):
27
+
28
+ $> git checkout -b 325-add-japanese-translations
29
+
30
+
31
+ ### 3. Get the test suite running
32
+
33
+ Active Admin is a gem that many people and businesses rely on for managing data
34
+ in their production applications. Bugs are not cool. Although we're not perfect,
35
+ we pride ourselves on writing well tested code. I hope you do too :)
36
+
37
+ Active Admin uses rspec and cucumber for it's test suite.
38
+
39
+ Make sure you have a recent version of bundler:
40
+
41
+ $> gem install bundler
42
+
43
+ Then install the development the development dependencies:
44
+
45
+ $> bundle install
46
+
47
+ Now you should be able to run the entire suite using:
48
+
49
+ $> rake test
50
+
51
+ `rake test` runs the unit specs, integration specs and cucumber scenarios. The
52
+ test suite will generate a rails application in `spec/rails` to run the tests
53
+ against.
54
+
55
+
56
+ ### 4. Implement your fix or feature
57
+
58
+ At this point, you should be ready to implement your feature!
59
+
60
+
61
+ ### 5. View your changes in a Rails application
62
+
63
+ Active Admin is meant to be used by humans, not cucumbers. So make sure to take
64
+ a look at your changes in a browser (preferably a few browsers if you made view
65
+ changes).
66
+
67
+ To boot up a test rails application, use the provided script:
68
+
69
+ $> ./script/local server
70
+
71
+ This will generate a rails application at ./test-rails-app with some sane
72
+ defaults and use your local version of Active Admin.
73
+
74
+ If you have any Bundler issues, call the provided `use_rails` script then prepend
75
+ the version of rails you would like to use in an environment variable:
76
+
77
+ $> ./script/use_rails 3.1.0
78
+ $> RAILS=3.1.0 ./script/local server
79
+
80
+ You should be able to open `http://localhost:3000/admin` and view a test
81
+ environment.
82
+
83
+ If you need to perform any other commands on the test application, use the
84
+ `local` script. For example to boot the rails console:
85
+
86
+ $> ./script/local console
87
+
88
+ Or to migrate the database:
89
+
90
+ $> ./script/local rake db:migrate
91
+
92
+
93
+ ### 6. Run tests against major supported rails versions
94
+
95
+ Once you've implemented your code, got the tests passing, previewed it in a
96
+ browser, you're ready to test it against multiple versions of Rails.
97
+
98
+ $> rake test:major_supported_rails
99
+
100
+ This command runs the cukes and specs against a couple of major versions of
101
+ Rails. We will run this command when we review your pull request, if this
102
+ rake task isn't passing, the pull request will not be merged in.
103
+
104
+
105
+ ### 7. Make a pull request
106
+
107
+ At this point, you should switch back to your master branch and make sure it's
108
+ up to date with Active Admin's master branch. If there were any changes, you
109
+ should rebase your feature branch and make sure that it will merge correctly. If
110
+ there are any merge conflicts, your pull request will not be merged in.
111
+
112
+ Now push your changes up to your feature branch on github and make a pull request!
113
+ We will pull your changes, run the test suite, review the code and merge it in.
data/Gemfile CHANGED
@@ -4,13 +4,13 @@ gemspec
4
4
 
5
5
  require File.expand_path('../spec/support/detect_rails_version', __FILE__)
6
6
 
7
- rails_version = ENV['RAILS'] || detect_rails_version || "3.1.0"
7
+ rails_version = detect_rails_version
8
8
  gem 'rails', rails_version
9
9
 
10
10
  case rails_version
11
11
  when /^3\.0/
12
12
  # Do nothing, bundler should figure it out
13
- when /^3\.1/
13
+ when /^3\.(1|2)/
14
14
  # These are the gems you have to have for Rails 3.1 to be happy
15
15
  gem 'sass-rails'
16
16
  gem 'uglifier'
@@ -20,20 +20,18 @@ end
20
20
 
21
21
  group :development, :test do
22
22
  gem 'sqlite3-ruby', :require => 'sqlite3'
23
- gem 'rake', '0.8.7', :require => false
23
+ gem 'rake', '~> 0.9.2.2', :require => false
24
24
  gem 'haml', '~> 3.1.1', :require => false
25
25
  gem 'yard'
26
26
  gem 'rdiscount' # For yard
27
27
  end
28
28
 
29
29
  group :test do
30
- gem 'rspec', '~> 2.6.0'
31
- gem 'rspec-rails', '~> 2.6.0'
32
- gem 'capybara', '1.0.0'
33
- gem 'cucumber', '0.10.6'
34
- gem 'cucumber-rails', '0.5.2'
30
+ gem 'rspec-rails', '~> 2.8.1'
31
+ gem 'cucumber-rails', '1.2.1'
32
+ gem 'capybara', '1.1.2'
35
33
  gem 'database_cleaner'
36
- gem 'shoulda', '2.11.2', :require => nil
34
+ gem 'shoulda-matchers', '1.0.0'
37
35
  gem 'launchy'
38
36
  gem 'jslint_on_rails', '~> 1.0.6'
39
37
  gem 'guard-rspec'
data/LICENSE CHANGED
@@ -1,4 +1,4 @@
1
- Copyright (c) 2010 Greg Bell, VersaPay Corporation
1
+ Copyright (c) 2011 Greg Bell, VersaPay Corporation
2
2
 
3
3
  Permission is hereby granted, free of charge, to any person obtaining
4
4
  a copy of this software and associated documentation files (the
@@ -6,15 +6,18 @@ to implement beautiful and elegant interfaces with very little effort.
6
6
 
7
7
  {<img src="http://travis-ci.org/gregbell/active_admin.png" />}[http://travis-ci.org/gregbell/active_admin]
8
8
 
9
- == Help / Support / Demo
9
+ == Documentation & Support
10
10
 
11
11
  * Documentation & Guides: http://activeadmin.info/documentation.html
12
- * Mailing list: http://groups.google.com/group/activeadmin
13
- * Bug reports: https://github.com/gregbell/active_admin/issues
14
12
  * RDoc: http://rubydoc.info/github/gregbell/active_admin/master/frames
15
13
  * Live demo: http://demo.activeadmin.info/admin
16
14
  * Website: http://www.activeadmin.info
15
+ * <b>Need Support?</b> Ask the Mailing list: http://groups.google.com/group/activeadmin
17
16
 
17
+ == Bugs & Feature Requests
18
+
19
+ * Bug Reports & Feature Requests: https://github.com/gregbell/active_admin/issues
20
+ * Want to Contribute? Read the Guide: https://github.com/gregbell/active_admin/blob/master/CONTRIBUTING.md
18
21
 
19
22
  == Goals
20
23
 
@@ -33,11 +36,18 @@ on Rails 3 application. To install, simply add the following to your Gemfile:
33
36
  # Gemfile in Rails < 3.1
34
37
  gem 'activeadmin'
35
38
 
36
- If you are using Rails >= 3.1, you must also have sass-rails in your Gemfile:
39
+ If you are using Rails >= 3.1, you must also have sass-rails and meta_search in your Gemfile (if sass-rails is already present in assets group, move it out):
37
40
 
38
41
  # Gemfile in Rails >= 3.1
39
42
  gem 'activeadmin'
40
43
  gem 'sass-rails'
44
+ gem 'meta_search', '>= 1.1.0.pre'
45
+
46
+ and add activeadmin assets into precompiling by adding the following line into your config/environments/production.rb:
47
+
48
+ config.assets.precompile += %w[active_admin.css active_admin.js]
49
+
50
+ There is also some issue with precompiling activeadmin images in Rails 3.1.0, it is fixed in Rails 3.1.1.
41
51
 
42
52
  After updating your bundle, run the installer
43
53
 
@@ -65,6 +75,10 @@ To register your first model, run:
65
75
  This creates a file at <tt>app/admin/my_model_names.rb</tt> for configuring the resource.
66
76
  Refresh your web browser to see the interface.
67
77
 
78
+ == Upgrading
79
+
80
+ When upgrading to a new version of ActiveAdmin you may need to run
81
+ $> rails generate active_admin:assets
68
82
 
69
83
  == Next Steps
70
84
 
@@ -93,21 +107,6 @@ Iconic Icons::
93
107
  Excellent SVG icon set designed by P.J. Onori: http://somerandomdude.com/projects/iconic
94
108
 
95
109
 
96
- == Roadmap & Issue Tracking
97
-
98
- We are using the awesome Github issues! Please submit bugs or features to
99
- https://github.com/gregbell/active_admin/issues
100
-
101
-
102
- == Note on Patches/Pull Requests
103
-
104
- * Fork the project.
105
- * Make a NEW TOPIC BRANCH, then make your feature addition or bug fix
106
- * Add specs and cukes for it. This is important so I don't break it in a
107
- future version unintentionally.
108
- * Commit, do not mess with rakefile, version, or history.
109
- * Send a pull request.
110
-
111
110
  == Copyright
112
111
 
113
- Copyright (c) 2010 Greg Bell, VersaPay Corporation. See LICENSE for details.
112
+ Copyright (c) 2011 Greg Bell, VersaPay Corporation. See LICENSE for details.