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.
- checksums.yaml +5 -5
- data/MIT-LICENSE +1 -1
- data/README.md +11 -197
- data/app/controllers/admin/menus_controller.rb +4 -4
- data/app/controllers/admin/pages_controller.rb +3 -3
- data/app/controllers/effective/pages_controller.rb +5 -2
- data/app/datatables/effective_pages_datatable.rb +8 -1
- data/app/helpers/effective_menus_helper.rb +1 -1
- data/app/models/effective/access_denied.rb +17 -0
- data/app/models/effective/menu.rb +0 -2
- data/app/models/effective/menu_item.rb +1 -2
- data/app/models/effective/page.rb +8 -5
- data/app/views/admin/menus/_actions.html.haml +2 -6
- data/app/views/admin/menus/_form.html.haml +3 -5
- data/app/views/admin/pages/_actions.html.haml +6 -12
- data/app/views/admin/pages/_form.html.haml +13 -23
- data/app/views/admin/pages/index.html.haml +1 -1
- data/config/effective_pages.rb +21 -20
- data/config/routes.rb +5 -8
- data/lib/effective_pages/engine.rb +4 -0
- data/lib/effective_pages/version.rb +1 -1
- data/lib/effective_pages.rb +47 -17
- metadata +21 -135
- data/Rakefile +0 -24
- data/app/assets/config/effective_pages_manifest.js +0 -2
- data/app/assets/javascripts/effective_pages.js +0 -0
- data/app/assets/stylesheets/effective_pages/dropdown-submenu.scss +0 -7
- data/app/assets/stylesheets/effective_pages.scss +0 -1
- data/app/views/admin/pages/_asset_box_fields.html.haml +0 -2
- data/spec/controllers/effective/pages_controller_spec.rb +0 -66
- data/spec/dummy/README.rdoc +0 -261
- data/spec/dummy/Rakefile +0 -7
- data/spec/dummy/app/assets/javascripts/application.js +0 -15
- data/spec/dummy/app/assets/stylesheets/application.css +0 -13
- data/spec/dummy/app/controllers/application_controller.rb +0 -3
- data/spec/dummy/app/helpers/application_helper.rb +0 -2
- data/spec/dummy/app/views/effective/pages/example.html.haml +0 -2
- data/spec/dummy/app/views/layouts/application.html.erb +0 -14
- data/spec/dummy/config/application.rb +0 -66
- data/spec/dummy/config/boot.rb +0 -10
- data/spec/dummy/config/database.yml +0 -25
- data/spec/dummy/config/environment.rb +0 -5
- data/spec/dummy/config/environments/development.rb +0 -37
- data/spec/dummy/config/environments/production.rb +0 -67
- data/spec/dummy/config/environments/test.rb +0 -37
- data/spec/dummy/config/initializers/backtrace_silencers.rb +0 -7
- data/spec/dummy/config/initializers/inflections.rb +0 -15
- data/spec/dummy/config/initializers/mime_types.rb +0 -5
- data/spec/dummy/config/initializers/secret_token.rb +0 -7
- data/spec/dummy/config/initializers/session_store.rb +0 -8
- data/spec/dummy/config/initializers/wrap_parameters.rb +0 -14
- data/spec/dummy/config/locales/en.yml +0 -5
- data/spec/dummy/config/routes.rb +0 -60
- data/spec/dummy/config.ru +0 -4
- data/spec/dummy/db/migrate/01_create_effective_pages.rb +0 -51
- data/spec/dummy/db/schema.rb +0 -52
- data/spec/dummy/db/test.sqlite3 +0 -0
- data/spec/dummy/public/404.html +0 -26
- data/spec/dummy/public/422.html +0 -26
- data/spec/dummy/public/500.html +0 -25
- data/spec/dummy/public/favicon.ico +0 -0
- data/spec/dummy/script/rails +0 -6
- data/spec/dummy/spec +0 -1
- data/spec/dummy/spec_link +0 -3
- data/spec/effective_pages_spec.rb +0 -7
- data/spec/helpers/effective_menus_helper_spec.rb +0 -281
- data/spec/models/effective/menu_spec.rb +0 -133
- data/spec/spec_helper.rb +0 -43
- 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
|
data/spec/support/factories.rb
DELETED
@@ -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
|
-
|