effective_pages 1.3.2 → 2.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (69) hide show
  1. checksums.yaml +5 -5
  2. data/MIT-LICENSE +1 -1
  3. data/README.md +11 -197
  4. data/app/controllers/admin/menus_controller.rb +4 -4
  5. data/app/controllers/admin/pages_controller.rb +3 -3
  6. data/app/controllers/effective/pages_controller.rb +5 -2
  7. data/app/datatables/effective_pages_datatable.rb +8 -1
  8. data/app/helpers/effective_menus_helper.rb +1 -1
  9. data/app/models/effective/access_denied.rb +17 -0
  10. data/app/models/effective/menu.rb +0 -2
  11. data/app/models/effective/menu_item.rb +1 -2
  12. data/app/models/effective/page.rb +8 -5
  13. data/app/views/admin/menus/_actions.html.haml +2 -6
  14. data/app/views/admin/menus/_form.html.haml +3 -5
  15. data/app/views/admin/pages/_actions.html.haml +6 -12
  16. data/app/views/admin/pages/_form.html.haml +13 -23
  17. data/app/views/admin/pages/index.html.haml +1 -1
  18. data/config/effective_pages.rb +21 -20
  19. data/config/routes.rb +5 -8
  20. data/lib/effective_pages/engine.rb +4 -0
  21. data/lib/effective_pages/version.rb +1 -1
  22. data/lib/effective_pages.rb +47 -17
  23. metadata +21 -135
  24. data/Rakefile +0 -24
  25. data/app/assets/config/effective_pages_manifest.js +0 -2
  26. data/app/assets/javascripts/effective_pages.js +0 -0
  27. data/app/assets/stylesheets/effective_pages/dropdown-submenu.scss +0 -7
  28. data/app/assets/stylesheets/effective_pages.scss +0 -1
  29. data/app/views/admin/pages/_asset_box_fields.html.haml +0 -2
  30. data/spec/controllers/effective/pages_controller_spec.rb +0 -66
  31. data/spec/dummy/README.rdoc +0 -261
  32. data/spec/dummy/Rakefile +0 -7
  33. data/spec/dummy/app/assets/javascripts/application.js +0 -15
  34. data/spec/dummy/app/assets/stylesheets/application.css +0 -13
  35. data/spec/dummy/app/controllers/application_controller.rb +0 -3
  36. data/spec/dummy/app/helpers/application_helper.rb +0 -2
  37. data/spec/dummy/app/views/effective/pages/example.html.haml +0 -2
  38. data/spec/dummy/app/views/layouts/application.html.erb +0 -14
  39. data/spec/dummy/config/application.rb +0 -66
  40. data/spec/dummy/config/boot.rb +0 -10
  41. data/spec/dummy/config/database.yml +0 -25
  42. data/spec/dummy/config/environment.rb +0 -5
  43. data/spec/dummy/config/environments/development.rb +0 -37
  44. data/spec/dummy/config/environments/production.rb +0 -67
  45. data/spec/dummy/config/environments/test.rb +0 -37
  46. data/spec/dummy/config/initializers/backtrace_silencers.rb +0 -7
  47. data/spec/dummy/config/initializers/inflections.rb +0 -15
  48. data/spec/dummy/config/initializers/mime_types.rb +0 -5
  49. data/spec/dummy/config/initializers/secret_token.rb +0 -7
  50. data/spec/dummy/config/initializers/session_store.rb +0 -8
  51. data/spec/dummy/config/initializers/wrap_parameters.rb +0 -14
  52. data/spec/dummy/config/locales/en.yml +0 -5
  53. data/spec/dummy/config/routes.rb +0 -60
  54. data/spec/dummy/config.ru +0 -4
  55. data/spec/dummy/db/migrate/01_create_effective_pages.rb +0 -51
  56. data/spec/dummy/db/schema.rb +0 -52
  57. data/spec/dummy/db/test.sqlite3 +0 -0
  58. data/spec/dummy/public/404.html +0 -26
  59. data/spec/dummy/public/422.html +0 -26
  60. data/spec/dummy/public/500.html +0 -25
  61. data/spec/dummy/public/favicon.ico +0 -0
  62. data/spec/dummy/script/rails +0 -6
  63. data/spec/dummy/spec +0 -1
  64. data/spec/dummy/spec_link +0 -3
  65. data/spec/effective_pages_spec.rb +0 -7
  66. data/spec/helpers/effective_menus_helper_spec.rb +0 -281
  67. data/spec/models/effective/menu_spec.rb +0 -133
  68. data/spec/spec_helper.rb +0 -43
  69. data/spec/support/factories.rb +0 -15
data/spec/spec_helper.rb DELETED
@@ -1,43 +0,0 @@
1
- ENV["RAILS_ENV"] ||= 'test'
2
-
3
- require File.expand_path("../dummy/config/environment", __FILE__)
4
-
5
- require 'rspec/rails'
6
- require 'rspec/autorun'
7
- require 'capybara/rspec'
8
- require 'capybara/poltergeist'
9
- require 'factory_girl_rails'
10
- require 'haml'
11
-
12
- # Requires supporting ruby files with custom matchers and macros, etc,
13
- # in spec/support/ and its subdirectories.
14
- Dir[Rails.root.join("spec/support/**/*.rb")].each {|f| require f }
15
-
16
- RSpec.configure do |config|
17
- config.fixture_path = "#{::Rails.root}/spec/fixtures"
18
-
19
- config.include Capybara::DSL
20
-
21
- Capybara.current_driver = :poltergeist
22
- Capybara.javascript_driver = :poltergeist
23
- Capybara.default_wait_time = 5
24
-
25
- Rails.logger.level = 4 # Output only minimal stuff to test.log
26
-
27
- config.use_transactional_fixtures = true # Make this false to once again use DatabaseCleaner
28
- config.infer_base_class_for_anonymous_controllers = false
29
- config.order = 'random'
30
- end
31
-
32
- class ActiveRecord::Base
33
- mattr_accessor :shared_connection
34
- @@shared_connection = nil
35
-
36
- def self.connection
37
- @@shared_connection || retrieve_connection
38
- end
39
- end
40
-
41
- # Forces all threads to share the same connection. This works on
42
- # Capybara because it starts the web server in a thread.
43
- ActiveRecord::Base.shared_connection = ActiveRecord::Base.connection
@@ -1,15 +0,0 @@
1
- require 'factory_girl'
2
-
3
- FactoryGirl.define do
4
- factory :page, :class => Effective::Page do
5
- sequence(:title) { |n| "Title #{n}" }
6
- sequence(:slug) { |n| "title-#{n}" }
7
-
8
- meta_description 'meta description'
9
- draft false
10
-
11
- template 'example'
12
- layout 'application'
13
- end
14
- end
15
-