godmin 0.12.0 → 0.12.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (83) hide show
  1. checksums.yaml +4 -4
  2. data/.gitignore +1 -0
  3. data/.travis.yml +6 -0
  4. data/CHANGELOG.md +11 -0
  5. data/Gemfile +5 -0
  6. data/README.md +5 -11
  7. data/app/views/godmin/application/welcome.html.erb +4 -52
  8. data/app/views/godmin/resource/_filters.html.erb +1 -1
  9. data/app/views/godmin/resource/_table.html.erb +2 -2
  10. data/app/views/layouts/godmin/_layout.html.erb +2 -2
  11. data/app/views/layouts/godmin/application.html.erb +2 -2
  12. data/godmin.gemspec +4 -1
  13. data/lib/generators/godmin/install/install_generator.rb +0 -10
  14. data/lib/godmin.rb +3 -6
  15. data/lib/godmin/application_controller.rb +8 -4
  16. data/lib/godmin/authorization.rb +1 -1
  17. data/lib/godmin/authorization/policy_finder.rb +4 -3
  18. data/lib/godmin/engine_wrapper.rb +49 -0
  19. data/lib/godmin/helpers/tables.rb +6 -6
  20. data/lib/godmin/resolver.rb +32 -36
  21. data/lib/godmin/version.rb +1 -1
  22. data/test/dummy/admin/Rakefile +24 -0
  23. data/test/dummy/admin/admin.gemspec +15 -0
  24. data/test/dummy/admin/app/assets/javascripts/admin/application.js +14 -0
  25. data/test/dummy/admin/app/assets/stylesheets/admin/application.css +16 -0
  26. data/test/dummy/admin/app/controllers/admin/application_controller.rb +5 -0
  27. data/test/dummy/admin/app/controllers/admin/articles_controller.rb +7 -0
  28. data/test/dummy/admin/app/helpers/admin/application_helper.rb +4 -0
  29. data/test/dummy/admin/app/services/admin/article_service.rb +11 -0
  30. data/test/dummy/{app/assets/images → admin/app/views/admin/articles}/.keep +0 -0
  31. data/test/dummy/{app/mailers → admin/app/views/admin/articles/columns}/.keep +0 -0
  32. data/test/dummy/admin/app/views/admin/articles/filters/.keep +0 -0
  33. data/test/dummy/admin/app/views/admin/resource/.keep +0 -0
  34. data/test/dummy/admin/app/views/admin/resource/columns/.keep +0 -0
  35. data/test/dummy/admin/app/views/admin/resource/filters/.keep +0 -0
  36. data/test/dummy/admin/app/views/admin/shared/_navigation.html.erb +1 -0
  37. data/test/dummy/admin/bin/rails +12 -0
  38. data/test/dummy/admin/config/routes.rb +4 -0
  39. data/test/dummy/admin/lib/admin.rb +4 -0
  40. data/test/dummy/admin/lib/admin/engine.rb +5 -0
  41. data/test/dummy/admin/lib/admin/version.rb +3 -0
  42. data/test/dummy/app/assets/javascripts/application.js +1 -0
  43. data/test/dummy/app/assets/stylesheets/application.css +2 -1
  44. data/test/dummy/app/controllers/application_controller.rb +2 -0
  45. data/test/dummy/app/controllers/articles_controller.rb +3 -0
  46. data/test/dummy/app/models/article.rb +2 -0
  47. data/test/dummy/app/services/article_service.rb +9 -0
  48. data/test/dummy/app/views/articles/.keep +0 -0
  49. data/test/dummy/app/views/articles/columns/.keep +0 -0
  50. data/test/dummy/app/views/articles/filters/.keep +0 -0
  51. data/test/dummy/app/views/resource/.keep +0 -0
  52. data/test/dummy/app/views/resource/columns/.keep +0 -0
  53. data/test/dummy/app/views/resource/filters/.keep +0 -0
  54. data/test/dummy/app/views/shared/_navigation.html.erb +1 -0
  55. data/test/dummy/config/database.yml +0 -6
  56. data/test/dummy/config/environments/test.rb +4 -0
  57. data/test/dummy/config/routes.rb +3 -2
  58. data/test/dummy/db/migrate/20150717121532_create_articles.rb +11 -0
  59. data/test/dummy/db/schema.rb +9 -1
  60. data/test/fakes/article.rb +4 -0
  61. data/test/fakes/article_service.rb +68 -0
  62. data/test/integration/column_ordering_test.rb +23 -0
  63. data/test/integration/column_overriding_test.rb +59 -0
  64. data/test/integration/filter_overriding_test.rb +51 -0
  65. data/test/integration/partial_overriding_test.rb +51 -0
  66. data/test/integration/template_overriding_test.rb +51 -0
  67. data/test/integration/welcome_test.rb +8 -0
  68. data/test/lib/godmin/engine_wrapper_test.rb +55 -0
  69. data/test/lib/godmin/policy_finder_test.rb +30 -34
  70. data/test/lib/godmin/resolver_test.rb +26 -36
  71. data/test/lib/godmin/resources/resource_service/batch_actions_test.rb +1 -1
  72. data/test/lib/godmin/resources/resource_service/filters_test.rb +1 -1
  73. data/test/lib/godmin/resources/resource_service/pagination_test.rb +1 -1
  74. data/test/lib/godmin/resources/resource_service/scopes_test.rb +7 -7
  75. data/test/lib/godmin/resources/resource_service_test.rb +2 -2
  76. data/test/test_helper.rb +23 -66
  77. metadata +127 -20
  78. data/test/dummy/README.rdoc +0 -28
  79. data/test/dummy/app/views/layouts/application.html.erb +0 -14
  80. data/test/dummy/config/environments/production.rb +0 -80
  81. data/test/dummy/config/locales/en.yml +0 -23
  82. data/test/godmin_test.rb +0 -7
  83. data/test/integration/navigation_test.rb +0 -10
@@ -1,23 +0,0 @@
1
- # Files in the config/locales directory are used for internationalization
2
- # and are automatically loaded by Rails. If you want to use locales other
3
- # than English, add the necessary files in this directory.
4
- #
5
- # To use the locales, use `I18n.t`:
6
- #
7
- # I18n.t 'hello'
8
- #
9
- # In views, this is aliased to just `t`:
10
- #
11
- # <%= t('hello') %>
12
- #
13
- # To use a different locale, set it with `I18n.locale`:
14
- #
15
- # I18n.locale = :es
16
- #
17
- # This would use the information in config/locales/es.yml.
18
- #
19
- # To learn more, please read the Rails Internationalization guide
20
- # available at http://guides.rubyonrails.org/i18n.html.
21
-
22
- en:
23
- hello: "Hello world"
@@ -1,7 +0,0 @@
1
- require 'test_helper'
2
-
3
- class GodminTest < ActiveSupport::TestCase
4
- test "truth" do
5
- assert_kind_of Module, Godmin
6
- end
7
- end
@@ -1,10 +0,0 @@
1
- require 'test_helper'
2
-
3
- class NavigationTest < ActionDispatch::IntegrationTest
4
- fixtures :all
5
-
6
- # test "the truth" do
7
- # assert true
8
- # end
9
- end
10
-