disclaimer 0.0.1
Sign up to get free protection for your applications and to get access to all the features.
- data/MIT-LICENSE +20 -0
- data/README.rdoc +60 -0
- data/Rakefile +40 -0
- data/app/assets/javascripts/disclaimer/application.js +16 -0
- data/app/assets/javascripts/disclaimer/documents.js +2 -0
- data/app/assets/javascripts/disclaimer/segments.js +2 -0
- data/app/assets/stylesheets/disclaimer/application.css +13 -0
- data/app/assets/stylesheets/disclaimer/documents.css +9 -0
- data/app/assets/stylesheets/disclaimer/segments.css +4 -0
- data/app/controllers/disclaimer/application_controller.rb +4 -0
- data/app/controllers/disclaimer/documents_controller.rb +74 -0
- data/app/controllers/disclaimer/segments_controller.rb +45 -0
- data/app/helpers/disclaimer/application_helper.rb +4 -0
- data/app/helpers/disclaimer/documents_helper.rb +4 -0
- data/app/helpers/disclaimer/segments_helper.rb +4 -0
- data/app/models/disclaimer/document.rb +57 -0
- data/app/models/disclaimer/segment.rb +26 -0
- data/app/models/disclaimer/segment_holder.rb +17 -0
- data/app/views/disclaimer/documents/delete.html.erb +8 -0
- data/app/views/disclaimer/documents/index.html.erb +28 -0
- data/app/views/disclaimer/documents/new.html.erb +48 -0
- data/app/views/disclaimer/documents/show.html.erb +19 -0
- data/app/views/disclaimer/segments/_segment.html.erb +8 -0
- data/app/views/disclaimer/segments/delete.html.erb +8 -0
- data/app/views/disclaimer/segments/index.html.erb +26 -0
- data/app/views/disclaimer/segments/new.html.erb +24 -0
- data/app/views/disclaimer/segments/show.html.erb +2 -0
- data/app/views/layouts/disclaimer/application.html.erb +15 -0
- data/config/routes.rb +18 -0
- data/db/migrate/20121023125748_create_disclaimer_documents.rb +12 -0
- data/db/migrate/20121024074240_create_segments.rb +10 -0
- data/db/migrate/20121024080818_create_disclaimer_segment_holders.rb +11 -0
- data/lib/disclaimer/engine.rb +5 -0
- data/lib/disclaimer/version.rb +3 -0
- data/lib/disclaimer.rb +6 -0
- data/lib/rails/actionpack/lib/action_controller/base.rb +28 -0
- data/lib/tasks/disclaimer_tasks.rake +4 -0
- data/test/disclaimer_test.rb +7 -0
- data/test/dummy/README.rdoc +261 -0
- data/test/dummy/Rakefile +7 -0
- data/test/dummy/app/assets/javascripts/application.js +15 -0
- data/test/dummy/app/assets/javascripts/sample.js +2 -0
- data/test/dummy/app/assets/stylesheets/application.css +13 -0
- data/test/dummy/app/assets/stylesheets/sample.css +4 -0
- data/test/dummy/app/controllers/application_controller.rb +3 -0
- data/test/dummy/app/controllers/sample_controller.rb +12 -0
- data/test/dummy/app/helpers/application_helper.rb +2 -0
- data/test/dummy/app/helpers/sample_helper.rb +2 -0
- data/test/dummy/app/views/layouts/application.html.erb +14 -0
- data/test/dummy/app/views/sample/index.html.erb +4 -0
- data/test/dummy/config/application.rb +59 -0
- data/test/dummy/config/boot.rb +10 -0
- data/test/dummy/config/database.yml +25 -0
- data/test/dummy/config/environment.rb +5 -0
- data/test/dummy/config/environments/development.rb +37 -0
- data/test/dummy/config/environments/production.rb +67 -0
- data/test/dummy/config/environments/test.rb +37 -0
- data/test/dummy/config/initializers/backtrace_silencers.rb +7 -0
- data/test/dummy/config/initializers/inflections.rb +15 -0
- data/test/dummy/config/initializers/mime_types.rb +5 -0
- data/test/dummy/config/initializers/secret_token.rb +7 -0
- data/test/dummy/config/initializers/session_store.rb +8 -0
- data/test/dummy/config/initializers/wrap_parameters.rb +14 -0
- data/test/dummy/config/locales/en.yml +5 -0
- data/test/dummy/config/routes.rb +10 -0
- data/test/dummy/config.ru +4 -0
- data/test/dummy/db/development.sqlite3 +0 -0
- data/test/dummy/db/schema.rb +41 -0
- data/test/dummy/db/test.sqlite3 +0 -0
- data/test/dummy/log/development.log +13228 -0
- data/test/dummy/log/test.log +35207 -0
- data/test/dummy/public/404.html +26 -0
- data/test/dummy/public/422.html +26 -0
- data/test/dummy/public/500.html +25 -0
- data/test/dummy/public/favicon.ico +0 -0
- data/test/dummy/script/rails +6 -0
- data/test/dummy/test/functional/sample_controller_test.rb +29 -0
- data/test/dummy/test/unit/helpers/sample_helper_test.rb +4 -0
- data/test/dummy/tmp/cache/assets/B9D/BB0/sprockets%2Fc3340956015865527b738281d0798842 +0 -0
- data/test/dummy/tmp/cache/assets/C5A/090/sprockets%2F163158930fc7f594992ed570eb262440 +0 -0
- data/test/dummy/tmp/cache/assets/C65/6C0/sprockets%2F6411c0191302133114dd7b9452abec58 +0 -0
- data/test/dummy/tmp/cache/assets/C83/2C0/sprockets%2F99d131cd7946c82b8a39070e6b434530 +0 -0
- data/test/dummy/tmp/cache/assets/CD4/F20/sprockets%2F9705276958dc30aad02ae1f4618a60a4 +0 -0
- data/test/dummy/tmp/cache/assets/CD8/370/sprockets%2F357970feca3ac29060c1e3861e2c0953 +0 -0
- data/test/dummy/tmp/cache/assets/CE3/0F0/sprockets%2F1c1d13e6a59e0476d7663354de087ff0 +0 -0
- data/test/dummy/tmp/cache/assets/D05/D80/sprockets%2F0f27d3a1d395bf559a2d725033de721c +0 -0
- data/test/dummy/tmp/cache/assets/D14/8E0/sprockets%2F1d0962a03dd3d782c8eadf712769a972 +0 -0
- data/test/dummy/tmp/cache/assets/D32/A10/sprockets%2F13fe41fee1fe35b49d145bcc06610705 +0 -0
- data/test/dummy/tmp/cache/assets/D4E/1B0/sprockets%2Ff7cbd26ba1d28d48de824f0e94586655 +0 -0
- data/test/dummy/tmp/cache/assets/D51/800/sprockets%2F0b6c1b1792d877f8e8fb3d82d577ca92 +0 -0
- data/test/dummy/tmp/cache/assets/D5A/EA0/sprockets%2Fd771ace226fc8215a3572e0aa35bb0d6 +0 -0
- data/test/dummy/tmp/cache/assets/D69/ED0/sprockets%2F5e34b8807c9168eb298bc1eb4d01bc1b +0 -0
- data/test/dummy/tmp/cache/assets/D6A/080/sprockets%2Fb083da81ad739ec14c03d78b63c22d9f +0 -0
- data/test/dummy/tmp/cache/assets/D73/200/sprockets%2Ff550d44b0e67ff62964de563da84c2ab +0 -0
- data/test/dummy/tmp/cache/assets/D9D/D20/sprockets%2F17bfe7df9a25cca0b3e5604f442be847 +0 -0
- data/test/dummy/tmp/cache/assets/DA6/F40/sprockets%2F55aedaf8fe75d461c2c82239e7e1d0b9 +0 -0
- data/test/dummy/tmp/cache/assets/DB4/B10/sprockets%2F1419cefd434468f9dfea571aa7ee59f7 +0 -0
- data/test/dummy/tmp/cache/assets/DC6/910/sprockets%2Faad8dad748c771644d1bbbcf02409fe2 +0 -0
- data/test/dummy/tmp/cache/assets/DCD/6D0/sprockets%2Fe8e47b38d458acad468a0b2bdcd12e76 +0 -0
- data/test/dummy/tmp/cache/assets/DD1/600/sprockets%2Fd61c971a175fe64d20ceefe3e7f4e2b3 +0 -0
- data/test/dummy/tmp/cache/assets/DDC/400/sprockets%2Fcffd775d018f68ce5dba1ee0d951a994 +0 -0
- data/test/dummy/tmp/cache/assets/DDD/C60/sprockets%2F59ec92d2bcdf9ece368f07a4ca6509c7 +0 -0
- data/test/dummy/tmp/cache/assets/DE1/2B0/sprockets%2Fdca152daab7ddab59235356c1d2b21db +0 -0
- data/test/dummy/tmp/cache/assets/DFB/DF0/sprockets%2Fa1fb1cc09fd766dcc9e2b9d4a9421db4 +0 -0
- data/test/dummy/tmp/cache/assets/E04/890/sprockets%2F2f5173deea6c795b8fdde723bb4b63af +0 -0
- data/test/dummy/tmp/cache/assets/E22/0C0/sprockets%2F72c5c1adba8375dda425a7bfb5ba7c4f +0 -0
- data/test/dummy/tmp/cache/assets/E27/370/sprockets%2Ff374d3bfba2ca636ce768ab8eecb31b3 +0 -0
- data/test/dummy/tmp/cache/assets/E2C/8D0/sprockets%2F234ff42c359a2beddfb9d10ee75aef3d +0 -0
- data/test/dummy/tmp/pids/server.pid +1 -0
- data/test/fixtures/disclaimer/documents.yml +9 -0
- data/test/fixtures/disclaimer/segment_holders.yml +9 -0
- data/test/fixtures/disclaimer/segments.yml +13 -0
- data/test/functional/disclaimer/documents_controller_test.rb +129 -0
- data/test/functional/disclaimer/segments_controller_test.rb +77 -0
- data/test/integration/navigation_test.rb +10 -0
- data/test/test_helper.rb +35 -0
- data/test/unit/disclaimer/document_test.rb +36 -0
- data/test/unit/disclaimer/segment_holder_test.rb +9 -0
- data/test/unit/disclaimer/segment_test.rb +59 -0
- data/test/unit/helpers/disclaimer/documents_helper_test.rb +6 -0
- data/test/unit/helpers/disclaimer/segments_helper_test.rb +6 -0
- metadata +330 -0
@@ -0,0 +1,37 @@
|
|
1
|
+
Dummy::Application.configure do
|
2
|
+
# Settings specified here will take precedence over those in config/application.rb
|
3
|
+
|
4
|
+
# The test environment is used exclusively to run your application's
|
5
|
+
# test suite. You never need to work with it otherwise. Remember that
|
6
|
+
# your test database is "scratch space" for the test suite and is wiped
|
7
|
+
# and recreated between test runs. Don't rely on the data there!
|
8
|
+
config.cache_classes = true
|
9
|
+
|
10
|
+
# Configure static asset server for tests with Cache-Control for performance
|
11
|
+
config.serve_static_assets = true
|
12
|
+
config.static_cache_control = "public, max-age=3600"
|
13
|
+
|
14
|
+
# Log error messages when you accidentally call methods on nil
|
15
|
+
config.whiny_nils = true
|
16
|
+
|
17
|
+
# Show full error reports and disable caching
|
18
|
+
config.consider_all_requests_local = true
|
19
|
+
config.action_controller.perform_caching = false
|
20
|
+
|
21
|
+
# Raise exceptions instead of rendering exception templates
|
22
|
+
config.action_dispatch.show_exceptions = false
|
23
|
+
|
24
|
+
# Disable request forgery protection in test environment
|
25
|
+
config.action_controller.allow_forgery_protection = false
|
26
|
+
|
27
|
+
# Tell Action Mailer not to deliver emails to the real world.
|
28
|
+
# The :test delivery method accumulates sent emails in the
|
29
|
+
# ActionMailer::Base.deliveries array.
|
30
|
+
config.action_mailer.delivery_method = :test
|
31
|
+
|
32
|
+
# Raise exception on mass assignment protection for Active Record models
|
33
|
+
config.active_record.mass_assignment_sanitizer = :strict
|
34
|
+
|
35
|
+
# Print deprecation notices to the stderr
|
36
|
+
config.active_support.deprecation = :stderr
|
37
|
+
end
|
@@ -0,0 +1,7 @@
|
|
1
|
+
# Be sure to restart your server when you modify this file.
|
2
|
+
|
3
|
+
# You can add backtrace silencers for libraries that you're using but don't wish to see in your backtraces.
|
4
|
+
# Rails.backtrace_cleaner.add_silencer { |line| line =~ /my_noisy_library/ }
|
5
|
+
|
6
|
+
# You can also remove all the silencers if you're trying to debug a problem that might stem from framework code.
|
7
|
+
# Rails.backtrace_cleaner.remove_silencers!
|
@@ -0,0 +1,15 @@
|
|
1
|
+
# Be sure to restart your server when you modify this file.
|
2
|
+
|
3
|
+
# Add new inflection rules using the following format
|
4
|
+
# (all these examples are active by default):
|
5
|
+
# ActiveSupport::Inflector.inflections do |inflect|
|
6
|
+
# inflect.plural /^(ox)$/i, '\1en'
|
7
|
+
# inflect.singular /^(ox)en/i, '\1'
|
8
|
+
# inflect.irregular 'person', 'people'
|
9
|
+
# inflect.uncountable %w( fish sheep )
|
10
|
+
# end
|
11
|
+
#
|
12
|
+
# These inflection rules are supported but not enabled by default:
|
13
|
+
# ActiveSupport::Inflector.inflections do |inflect|
|
14
|
+
# inflect.acronym 'RESTful'
|
15
|
+
# end
|
@@ -0,0 +1,7 @@
|
|
1
|
+
# Be sure to restart your server when you modify this file.
|
2
|
+
|
3
|
+
# Your secret key for verifying the integrity of signed cookies.
|
4
|
+
# If you change this key, all old signed cookies will become invalid!
|
5
|
+
# Make sure the secret is at least 30 characters and all random,
|
6
|
+
# no regular words or you'll be exposed to dictionary attacks.
|
7
|
+
Dummy::Application.config.secret_token = 'a01704ebd208fa23170a946112a87412d55af166580aba5600f760c2bc5a13d0acc89d345923c885a584610984a94df2926401c9ec071812606ed21252e0287d'
|
@@ -0,0 +1,8 @@
|
|
1
|
+
# Be sure to restart your server when you modify this file.
|
2
|
+
|
3
|
+
Dummy::Application.config.session_store :cookie_store, key: '_dummy_session'
|
4
|
+
|
5
|
+
# Use the database for sessions instead of the cookie-based default,
|
6
|
+
# which shouldn't be used to store highly confidential information
|
7
|
+
# (create the session table with "rails generate session_migration")
|
8
|
+
# Dummy::Application.config.session_store :active_record_store
|
@@ -0,0 +1,14 @@
|
|
1
|
+
# Be sure to restart your server when you modify this file.
|
2
|
+
#
|
3
|
+
# This file contains settings for ActionController::ParamsWrapper which
|
4
|
+
# is enabled by default.
|
5
|
+
|
6
|
+
# Enable parameter wrapping for JSON. You can disable this by setting :format to an empty array.
|
7
|
+
ActiveSupport.on_load(:action_controller) do
|
8
|
+
wrap_parameters format: [:json]
|
9
|
+
end
|
10
|
+
|
11
|
+
# Disable root element in JSON by default.
|
12
|
+
ActiveSupport.on_load(:active_record) do
|
13
|
+
self.include_root_in_json = false
|
14
|
+
end
|
Binary file
|
@@ -0,0 +1,41 @@
|
|
1
|
+
# encoding: UTF-8
|
2
|
+
# This file is auto-generated from the current state of the database. Instead
|
3
|
+
# of editing this file, please use the migrations feature of Active Record to
|
4
|
+
# incrementally modify your database, and then regenerate this schema definition.
|
5
|
+
#
|
6
|
+
# Note that this schema.rb definition is the authoritative source for your
|
7
|
+
# database schema. If you need to create the application database on another
|
8
|
+
# system, you should be using db:schema:load, not running all the migrations
|
9
|
+
# from scratch. The latter is a flawed and unsustainable approach (the more migrations
|
10
|
+
# you'll amass, the slower it'll run and the greater likelihood for issues).
|
11
|
+
#
|
12
|
+
# It's strongly recommended to check this file into your version control system.
|
13
|
+
|
14
|
+
ActiveRecord::Schema.define(:version => 20121024080818) do
|
15
|
+
|
16
|
+
create_table "disclaimer_documents", :force => true do |t|
|
17
|
+
t.string "title"
|
18
|
+
t.string "name"
|
19
|
+
t.text "header"
|
20
|
+
t.text "footer"
|
21
|
+
t.datetime "created_at", :null => false
|
22
|
+
t.datetime "updated_at", :null => false
|
23
|
+
end
|
24
|
+
|
25
|
+
create_table "disclaimer_segment_holders", :force => true do |t|
|
26
|
+
t.integer "document_id"
|
27
|
+
t.integer "segment_id"
|
28
|
+
t.integer "position"
|
29
|
+
t.datetime "created_at", :null => false
|
30
|
+
t.datetime "updated_at", :null => false
|
31
|
+
end
|
32
|
+
|
33
|
+
create_table "disclaimer_segments", :force => true do |t|
|
34
|
+
t.string "name"
|
35
|
+
t.string "title"
|
36
|
+
t.text "body"
|
37
|
+
t.datetime "created_at", :null => false
|
38
|
+
t.datetime "updated_at", :null => false
|
39
|
+
end
|
40
|
+
|
41
|
+
end
|
Binary file
|