appyantra_admin 0.0.1
Sign up to get free protection for your applications and to get access to all the features.
- data/.gitignore +6 -0
- data/Gemfile +24 -0
- data/MIT-LICENSE +20 -0
- data/README.md +101 -0
- data/Rakefile +26 -0
- data/app/assets/images/appyantra_admin/.gitkeep +0 -0
- data/app/assets/images/appyantra_admin/breadcrumb_divider.png +0 -0
- data/app/assets/images/appyantra_admin/btn_submit.png +0 -0
- data/app/assets/images/appyantra_admin/btn_submit_2.png +0 -0
- data/app/assets/images/appyantra_admin/btn_view_site.png +0 -0
- data/app/assets/images/appyantra_admin/header_bg.png +0 -0
- data/app/assets/images/appyantra_admin/header_shadow.png +0 -0
- data/app/assets/images/appyantra_admin/icn_add_user.png +0 -0
- data/app/assets/images/appyantra_admin/icn_alert_error.png +0 -0
- data/app/assets/images/appyantra_admin/icn_alert_info.png +0 -0
- data/app/assets/images/appyantra_admin/icn_alert_success.png +0 -0
- data/app/assets/images/appyantra_admin/icn_alert_warning.png +0 -0
- data/app/assets/images/appyantra_admin/icn_audio.png +0 -0
- data/app/assets/images/appyantra_admin/icn_categories.png +0 -0
- data/app/assets/images/appyantra_admin/icn_edit.png +0 -0
- data/app/assets/images/appyantra_admin/icn_edit_article.png +0 -0
- data/app/assets/images/appyantra_admin/icn_folder.png +0 -0
- data/app/assets/images/appyantra_admin/icn_jump_back.png +0 -0
- data/app/assets/images/appyantra_admin/icn_logout.png +0 -0
- data/app/assets/images/appyantra_admin/icn_new_article.png +0 -0
- data/app/assets/images/appyantra_admin/icn_photo.png +0 -0
- data/app/assets/images/appyantra_admin/icn_profile.png +0 -0
- data/app/assets/images/appyantra_admin/icn_search.png +0 -0
- data/app/assets/images/appyantra_admin/icn_security.png +0 -0
- data/app/assets/images/appyantra_admin/icn_settings.png +0 -0
- data/app/assets/images/appyantra_admin/icn_tags.png +0 -0
- data/app/assets/images/appyantra_admin/icn_trash.png +0 -0
- data/app/assets/images/appyantra_admin/icn_user.png +0 -0
- data/app/assets/images/appyantra_admin/icn_video.png +0 -0
- data/app/assets/images/appyantra_admin/icn_view_users.png +0 -0
- data/app/assets/images/appyantra_admin/module_footer_bg.png +0 -0
- data/app/assets/images/appyantra_admin/post_message.png +0 -0
- data/app/assets/images/appyantra_admin/secondary_bar.png +0 -0
- data/app/assets/images/appyantra_admin/secondary_bar_shadow.png +0 -0
- data/app/assets/images/appyantra_admin/sidebar.png +0 -0
- data/app/assets/images/appyantra_admin/sidebar_divider.png +0 -0
- data/app/assets/images/appyantra_admin/sidebar_shadow.png +0 -0
- data/app/assets/images/appyantra_admin/table_sorter_header.png +0 -0
- data/app/assets/images/appyantra_admin/trash.png +0 -0
- data/app/assets/images/appyantra_admin/view.png +0 -0
- data/app/assets/images/website/600x300.gif +0 -0
- data/app/assets/images/website/alert-overlay.png +0 -0
- data/app/assets/images/website/bg.png +0 -0
- data/app/assets/images/website/link_bg.png +0 -0
- data/app/assets/images/website/link_border.png +0 -0
- data/app/assets/images/website/place_holder_img.png +0 -0
- data/app/assets/images/website/triangle.gif +0 -0
- data/app/assets/javascripts/appyantra_admin/admin_settings.js.coffee +3 -0
- data/app/assets/javascripts/appyantra_admin/admins/profiles.js.coffee +3 -0
- data/app/assets/javascripts/appyantra_admin/application.js +9 -0
- data/app/assets/javascripts/appyantra_admin/hideshow.js +39 -0
- data/app/assets/javascripts/appyantra_admin/home.js.coffee +3 -0
- data/app/assets/javascripts/appyantra_admin/jquery-1.5.2.min.js +16 -0
- data/app/assets/javascripts/appyantra_admin/jquery.equalHeight.js +20 -0
- data/app/assets/javascripts/appyantra_admin/jquery.tablesorter.min.js +4 -0
- data/app/assets/javascripts/appyantra_admin/managed_models.js.coffee +7 -0
- data/app/assets/javascripts/website/application.js +8 -0
- data/app/assets/javascripts/website/ie/DD_belatedPNG_0.0.8a-min.js +13 -0
- data/app/assets/javascripts/website/jquery.easing.1.3.js +205 -0
- data/app/assets/javascripts/website/jquery.roundabout-1.0.min.js +41 -0
- data/app/assets/javascripts/website/jquery.roundabout-shapes-1.1.js +150 -0
- data/app/assets/stylesheets/appyantra_admin/admin_settings.css.scss +3 -0
- data/app/assets/stylesheets/appyantra_admin/admins/profiles.css.scss +3 -0
- data/app/assets/stylesheets/appyantra_admin/application.css +7 -0
- data/app/assets/stylesheets/appyantra_admin/ie/ie.css +43 -0
- data/app/assets/stylesheets/appyantra_admin/main.css +1191 -0
- data/app/assets/stylesheets/appyantra_admin/managed_models.css.scss +3 -0
- data/app/assets/stylesheets/website/application.css +7 -0
- data/app/assets/stylesheets/website/reset.css +53 -0
- data/app/assets/stylesheets/website/styles.css +889 -0
- data/app/controllers/appyantra_admin/admin_settings_controller.rb +101 -0
- data/app/controllers/appyantra_admin/application_controller.rb +30 -0
- data/app/controllers/appyantra_admin/assets_controller.rb +91 -0
- data/app/controllers/appyantra_admin/home_controller.rb +24 -0
- data/app/controllers/appyantra_admin/pages_controller.rb +123 -0
- data/app/controllers/appyantra_admin/passwords_controller.rb +28 -0
- data/app/controllers/appyantra_admin/profiles_controller.rb +94 -0
- data/app/controllers/appyantra_admin/sessions_controller.rb +20 -0
- data/app/controllers/appyantra_admin/users/confirmations_controller.rb +15 -0
- data/app/controllers/appyantra_admin/users/passwords_controller.rb +16 -0
- data/app/controllers/appyantra_admin/users/registrations_controller.rb +16 -0
- data/app/controllers/appyantra_admin/users/sessions_controller.rb +15 -0
- data/app/controllers/appyantra_admin/users/user_paths.rb +33 -0
- data/app/controllers/appyantra_admin/users_controller.rb +92 -0
- data/app/helpers/appyantra_admin/admin_settings_helper.rb +9 -0
- data/app/helpers/appyantra_admin/application_helper.rb +73 -0
- data/app/helpers/appyantra_admin/pages_helper.rb +38 -0
- data/app/models/activity_feed.rb +5 -0
- data/app/models/activity_log_observer.rb +58 -0
- data/app/models/admin.rb +11 -0
- data/app/models/admin_setting.rb +74 -0
- data/app/models/encrypted_text.rb +20 -0
- data/app/models/link.rb +5 -0
- data/app/models/page.rb +24 -0
- data/app/models/page_keyword.rb +4 -0
- data/app/models/person.rb +14 -0
- data/app/models/short_text.rb +23 -0
- data/app/models/text.rb +11 -0
- data/app/models/user.rb +11 -0
- data/app/sweepers/appyantra_admin/pages_sweeper.rb +20 -0
- data/app/views/appyantra_admin/admin_settings/edit.html.haml +7 -0
- data/app/views/appyantra_admin/admin_settings/index.html.haml +56 -0
- data/app/views/appyantra_admin/admin_settings/mail_settings.html.haml +7 -0
- data/app/views/appyantra_admin/admin_settings/new.html.haml +7 -0
- data/app/views/appyantra_admin/assets/display.js.haml +3 -0
- data/app/views/appyantra_admin/assets/edit.html.haml +7 -0
- data/app/views/appyantra_admin/assets/new.html.haml +7 -0
- data/app/views/appyantra_admin/assets/show.html.haml +55 -0
- data/app/views/appyantra_admin/home/index.html.haml +74 -0
- data/app/views/appyantra_admin/mailer/reset_password_instructions.html.haml +6 -0
- data/app/views/appyantra_admin/mailer/unlock_instructions.html.haml +6 -0
- data/app/views/appyantra_admin/pages/_form.html.haml +40 -0
- data/app/views/appyantra_admin/pages/_page.html.haml +43 -0
- data/app/views/appyantra_admin/pages/edit.html.haml +19 -0
- data/app/views/appyantra_admin/pages/index.html.haml +46 -0
- data/app/views/appyantra_admin/pages/new.html.haml +7 -0
- data/app/views/appyantra_admin/pages/show.html.haml +1 -0
- data/app/views/appyantra_admin/passwords/edit.html.haml +15 -0
- data/app/views/appyantra_admin/passwords/new.html.haml +11 -0
- data/app/views/appyantra_admin/profiles/_admin_profile_form.html.haml +12 -0
- data/app/views/appyantra_admin/profiles/_admin_user.html.haml +11 -0
- data/app/views/appyantra_admin/profiles/edit.html.haml +18 -0
- data/app/views/appyantra_admin/profiles/index.html.haml +51 -0
- data/app/views/appyantra_admin/profiles/new.html.haml +6 -0
- data/app/views/appyantra_admin/profiles/show.html.haml +10 -0
- data/app/views/appyantra_admin/profiles/show.js.haml +3 -0
- data/app/views/appyantra_admin/sessions/new.html.haml +17 -0
- data/app/views/appyantra_admin/shared/_asset_item.html.haml +15 -0
- data/app/views/appyantra_admin/shared/_assets_list.html.haml +6 -0
- data/app/views/appyantra_admin/shared/_formtastic_semantic_form.html.haml +3 -0
- data/app/views/appyantra_admin/shared/_hash_form.html.haml +7 -0
- data/app/views/appyantra_admin/shared/_links.haml +6 -0
- data/app/views/appyantra_admin/shared/types/_encrypted_text.html.haml +1 -0
- data/app/views/appyantra_admin/shared/types/_link.html.haml +1 -0
- data/app/views/appyantra_admin/shared/types/_short_text.html.haml +1 -0
- data/app/views/appyantra_admin/shared/types/_text.html.haml +1 -0
- data/app/views/appyantra_admin/unlocks/new.html.haml +10 -0
- data/app/views/appyantra_admin/users/_form.html.haml +12 -0
- data/app/views/appyantra_admin/users/_user.html.haml +11 -0
- data/app/views/appyantra_admin/users/edit.html.haml +18 -0
- data/app/views/appyantra_admin/users/index.html.haml +54 -0
- data/app/views/appyantra_admin/users/new.html.haml +6 -0
- data/app/views/appyantra_admin/users/show.html.haml +10 -0
- data/app/views/appyantra_admin/users/show.js.haml +3 -0
- data/app/views/layouts/application.html.haml +98 -0
- data/app/views/layouts/appyantra_admin/application.html.haml +106 -0
- data/app/views/layouts/appyantra_admin/landing_page.html.haml +30 -0
- data/app/views/layouts/appyantra_admin/website.html.haml +96 -0
- data/app/views/pages/_google_analytics.html.haml +11 -0
- data/app/views/pages/_meta_tags.html.haml +2 -0
- data/app/views/pages/page.html.haml +4 -0
- data/app/views/users/confirmations/new.html.haml +26 -0
- data/app/views/users/mailer/confirmation_instructions.html.haml +4 -0
- data/app/views/users/mailer/reset_password_instructions.html.haml +6 -0
- data/app/views/users/mailer/unlock_instructions.html.haml +5 -0
- data/app/views/users/passwords/edit.html.haml +31 -0
- data/app/views/users/passwords/new.html.haml +22 -0
- data/app/views/users/registrations/edit.html.haml +42 -0
- data/app/views/users/registrations/new.html.haml +35 -0
- data/app/views/users/sessions/new.html.haml +26 -0
- data/app/views/website/index.html.haml +50 -0
- data/appyantra_admin.gemspec +24 -0
- data/config/initializers/devise.rb +209 -0
- data/config/initializers/formtastic.rb +82 -0
- data/config/initializers/mail_settings.rb +11 -0
- data/config/initializers/secret_token.rb +7 -0
- data/config/initializers/session_store.rb +8 -0
- data/config/initializers/wrap_parameters.rb +14 -0
- data/config/routes.rb +71 -0
- data/db/migrate/20120123093508_create_links.rb +15 -0
- data/db/migrate/20120123093916_create_texts.rb +10 -0
- data/db/migrate/20120123094124_create_admin_settings.rb +12 -0
- data/db/migrate/20120124202814_devise_create_admins.rb +25 -0
- data/db/migrate/20120125093505_add_name_to_admins.rb +6 -0
- data/db/migrate/20120217075442_devise_create_users.rb +25 -0
- data/db/migrate/20120217090326_add_name_to_users.rb +6 -0
- data/db/migrate/20120224210009_create_pages.rb +19 -0
- data/db/migrate/20120302084134_add_group_to_admin_settings.rb +5 -0
- data/db/migrate/20120309075847_create_encrypted_texts.rb +10 -0
- data/db/migrate/20120309075904_create_short_texts.rb +10 -0
- data/db/migrate/20120312234850_add_seo_to_pages.rb +5 -0
- data/db/migrate/20120312235235_create_keywords.rb +10 -0
- data/db/migrate/20120314063338_create_activity_feeds.rb +15 -0
- data/lib/appyantra_admin.rb +49 -0
- data/lib/appyantra_admin/crypto.rb +43 -0
- data/lib/appyantra_admin/engine.rb +17 -0
- data/lib/appyantra_admin/utils.rb +27 -0
- data/lib/appyantra_admin/version.rb +3 -0
- data/lib/generators/appyantra_admin/install/USAGE +8 -0
- data/lib/generators/appyantra_admin/install/install_generator.rb +34 -0
- data/lib/generators/appyantra_admin/install/templates/appyantra_admin.rb +28 -0
- data/lib/tasks/appyantra_admin_tasks.rake +47 -0
- data/script/rails +6 -0
- data/test/dummy/.gitignore +36 -0
- data/test/dummy/.rspec +1 -0
- data/test/dummy/Gemfile +43 -0
- data/test/dummy/Guardfile +19 -0
- data/test/dummy/README +261 -0
- data/test/dummy/Rakefile +8 -0
- data/test/dummy/app/assets/javascripts/application.js +9 -0
- data/test/dummy/app/assets/stylesheets/application.css +7 -0
- data/test/dummy/app/controllers/application_controller.rb +3 -0
- data/test/dummy/app/helpers/application_helper.rb +2 -0
- data/test/dummy/app/models/product.rb +2 -0
- data/test/dummy/config.ru +4 -0
- data/test/dummy/config/application.rb +48 -0
- data/test/dummy/config/boot.rb +6 -0
- data/test/dummy/config/environment.rb +5 -0
- data/test/dummy/config/environments/development.rb +30 -0
- data/test/dummy/config/environments/production.rb +60 -0
- data/test/dummy/config/environments/test.rb +39 -0
- data/test/dummy/config/initializers/backtrace_silencers.rb +7 -0
- data/test/dummy/config/initializers/inflections.rb +10 -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 +4 -0
- data/test/dummy/db/migrate/20120213070715_create_products.rb +11 -0
- data/test/dummy/db/seeds.rb +7 -0
- data/test/dummy/doc/README_FOR_APP +2 -0
- data/test/dummy/public/404.html +26 -0
- data/test/dummy/public/422.html +26 -0
- data/test/dummy/public/500.html +26 -0
- data/test/dummy/public/favicon.ico +0 -0
- data/test/dummy/public/robots.txt +5 -0
- data/test/dummy/script/rails +6 -0
- data/test/dummy/spec/controllers/appyantra_admin/admin_settings_controller_spec.rb +56 -0
- data/test/dummy/spec/controllers/appyantra_admin/assets_controller_spec.rb +64 -0
- data/test/dummy/spec/controllers/appyantra_admin/home_controller_spec.rb +28 -0
- data/test/dummy/spec/controllers/appyantra_admin/passwords_controller_spec.rb +40 -0
- data/test/dummy/spec/controllers/appyantra_admin/profiles_controller_spec.rb +88 -0
- data/test/dummy/spec/controllers/appyantra_admin/sessions_controller_spec.rb +32 -0
- data/test/dummy/spec/factories.rb +55 -0
- data/test/dummy/spec/factories/products.rb +9 -0
- data/test/dummy/spec/helpers/appyantra_admin/application_helper_spec.rb +31 -0
- data/test/dummy/spec/models/admin_setting_spec.rb +22 -0
- data/test/dummy/spec/models/admin_spec.rb +10 -0
- data/test/dummy/spec/models/encrypted_text_spec.rb +13 -0
- data/test/dummy/spec/models/link_spec.rb +5 -0
- data/test/dummy/spec/models/text_spec.rb +5 -0
- data/test/dummy/spec/requests/appyantra_admin/admin_user_auth_spec.rb +54 -0
- data/test/dummy/spec/requests/appyantra_admin/dashboard_spec.rb +34 -0
- data/test/dummy/spec/requests/appyantra_admin/mailer_spec.rb +72 -0
- data/test/dummy/spec/requests/appyantra_admin/manage_pages_spec.rb +209 -0
- data/test/dummy/spec/requests/appyantra_admin/manage_website_users_spec.rb +97 -0
- data/test/dummy/spec/requests/appyantra_admin/website_users_spec.rb +25 -0
- data/test/dummy/spec/routing/sessions_routing_spec.rb +11 -0
- data/test/dummy/spec/spec_helper.rb +51 -0
- data/test/dummy/spec/support/capybara.rb +7 -0
- data/test/dummy/spec/support/controller_macros.rb +8 -0
- data/test/dummy/spec/support/integration_macros.rb +40 -0
- data/test/dummy/spec/support/load_routes.rb +5 -0
- data/test/dummy/spec/support/matchers/user_matcher.rb +13 -0
- metadata +428 -0
data/test/dummy/Rakefile
ADDED
@@ -0,0 +1,8 @@
|
|
1
|
+
#!/usr/bin/env rake
|
2
|
+
# Add your own tasks in files placed in lib/tasks ending in .rake,
|
3
|
+
# for example lib/tasks/capistrano.rake, and they will automatically be available to Rake.
|
4
|
+
|
5
|
+
require File.expand_path('../config/application', __FILE__)
|
6
|
+
# required to skip certain initializers
|
7
|
+
AppyantraAdmin.rake_running = true
|
8
|
+
Dummy::Application.load_tasks
|
@@ -0,0 +1,9 @@
|
|
1
|
+
// This is a manifest file that'll be compiled into including all the files listed below.
|
2
|
+
// Add new JavaScript/Coffee code in separate files in this directory and they'll automatically
|
3
|
+
// be included in the compiled file accessible from http://example.com/assets/application.js
|
4
|
+
// It's not advisable to add code directly here, but if you do, it'll appear at the bottom of the
|
5
|
+
// the compiled file.
|
6
|
+
//
|
7
|
+
//= require jquery
|
8
|
+
//= require jquery_ujs
|
9
|
+
//= require_tree .
|
@@ -0,0 +1,7 @@
|
|
1
|
+
/*
|
2
|
+
* This is a manifest file that'll automatically include all the stylesheets available in this directory
|
3
|
+
* and any sub-directories. You're free to add application-wide styles to this file and they'll appear at
|
4
|
+
* the top of the compiled file, but it's generally better to create a new file per style scope.
|
5
|
+
*= require_self
|
6
|
+
*= require_tree .
|
7
|
+
*/
|
@@ -0,0 +1,48 @@
|
|
1
|
+
require File.expand_path('../boot', __FILE__)
|
2
|
+
|
3
|
+
require 'rails/all'
|
4
|
+
|
5
|
+
if defined?(Bundler)
|
6
|
+
# If you precompile assets before deploying to production, use this line
|
7
|
+
Bundler.require(*Rails.groups(:assets => %w(development test)))
|
8
|
+
# If you want your assets lazily compiled in production, use this line
|
9
|
+
# Bundler.require(:default, :assets, Rails.env)
|
10
|
+
end
|
11
|
+
|
12
|
+
module Dummy
|
13
|
+
class Application < Rails::Application
|
14
|
+
# Settings in config/environments/* take precedence over those specified here.
|
15
|
+
# Application configuration should go into files in config/initializers
|
16
|
+
# -- all .rb files in that directory are automatically loaded.
|
17
|
+
|
18
|
+
# Custom directories with classes and modules you want to be autoloadable.
|
19
|
+
# config.autoload_paths += %W(#{config.root}/extras)
|
20
|
+
|
21
|
+
# Only load the plugins named here, in the order given (default is alphabetical).
|
22
|
+
# :all can be used as a placeholder for all plugins not explicitly named.
|
23
|
+
# config.plugins = [ :exception_notification, :ssl_requirement, :all ]
|
24
|
+
|
25
|
+
# Activate observers that should always be running.
|
26
|
+
# config.active_record.observers = :cacher, :garbage_collector, :forum_observer
|
27
|
+
|
28
|
+
# Set Time.zone default to the specified zone and make Active Record auto-convert to this zone.
|
29
|
+
# Run "rake -D time" for a list of tasks for finding time zone names. Default is UTC.
|
30
|
+
config.time_zone = 'Central Time (US & Canada)'
|
31
|
+
|
32
|
+
# The default locale is :en and all translations from config/locales/*.rb,yml are auto loaded.
|
33
|
+
# config.i18n.load_path += Dir[Rails.root.join('my', 'locales', '*.{rb,yml}').to_s]
|
34
|
+
# config.i18n.default_locale = :de
|
35
|
+
|
36
|
+
# Configure the default encoding used in templates for Ruby 1.9.
|
37
|
+
config.encoding = "utf-8"
|
38
|
+
|
39
|
+
# Configure sensitive parameters which will be filtered from the log file.
|
40
|
+
config.filter_parameters += [:password]
|
41
|
+
|
42
|
+
# Enable the asset pipeline
|
43
|
+
config.assets.enabled = true
|
44
|
+
|
45
|
+
# Version of your assets, change this if you want to expire all your assets
|
46
|
+
config.assets.version = '1.0'
|
47
|
+
end
|
48
|
+
end
|
@@ -0,0 +1,30 @@
|
|
1
|
+
Dummy::Application.configure do
|
2
|
+
# Settings specified here will take precedence over those in config/application.rb
|
3
|
+
|
4
|
+
# In the development environment your application's code is reloaded on
|
5
|
+
# every request. This slows down response time but is perfect for development
|
6
|
+
# since you don't have to restart the web server when you make code changes.
|
7
|
+
config.cache_classes = false
|
8
|
+
|
9
|
+
# Log error messages when you accidentally call methods on nil.
|
10
|
+
config.whiny_nils = true
|
11
|
+
|
12
|
+
# Show full error reports and disable caching
|
13
|
+
config.consider_all_requests_local = true
|
14
|
+
config.action_controller.perform_caching = true
|
15
|
+
|
16
|
+
# Don't care if the mailer can't send
|
17
|
+
config.action_mailer.raise_delivery_errors = false
|
18
|
+
|
19
|
+
# Print deprecation notices to the Rails logger
|
20
|
+
config.active_support.deprecation = :log
|
21
|
+
|
22
|
+
# Only use best-standards-support built into browsers
|
23
|
+
config.action_dispatch.best_standards_support = :builtin
|
24
|
+
|
25
|
+
# Do not compress assets
|
26
|
+
config.assets.compress = false
|
27
|
+
|
28
|
+
# Expands the lines which load the assets
|
29
|
+
config.assets.debug = true
|
30
|
+
end
|
@@ -0,0 +1,60 @@
|
|
1
|
+
Dummy::Application.configure do
|
2
|
+
# Settings specified here will take precedence over those in config/application.rb
|
3
|
+
|
4
|
+
# Code is not reloaded between requests
|
5
|
+
config.cache_classes = true
|
6
|
+
|
7
|
+
# Full error reports are disabled and caching is turned on
|
8
|
+
config.consider_all_requests_local = false
|
9
|
+
config.action_controller.perform_caching = true
|
10
|
+
|
11
|
+
# Disable Rails's static asset server (Apache or nginx will already do this)
|
12
|
+
config.serve_static_assets = false
|
13
|
+
|
14
|
+
# Compress JavaScripts and CSS
|
15
|
+
config.assets.compress = true
|
16
|
+
|
17
|
+
# Don't fallback to assets pipeline if a precompiled asset is missed
|
18
|
+
config.assets.compile = false
|
19
|
+
|
20
|
+
# Generate digests for assets URLs
|
21
|
+
config.assets.digest = true
|
22
|
+
|
23
|
+
# Defaults to Rails.root.join("public/assets")
|
24
|
+
# config.assets.manifest = YOUR_PATH
|
25
|
+
|
26
|
+
# Specifies the header that your server uses for sending files
|
27
|
+
# config.action_dispatch.x_sendfile_header = "X-Sendfile" # for apache
|
28
|
+
# config.action_dispatch.x_sendfile_header = 'X-Accel-Redirect' # for nginx
|
29
|
+
|
30
|
+
# Force all access to the app over SSL, use Strict-Transport-Security, and use secure cookies.
|
31
|
+
# config.force_ssl = true
|
32
|
+
|
33
|
+
# See everything in the log (default is :info)
|
34
|
+
# config.log_level = :debug
|
35
|
+
|
36
|
+
# Use a different logger for distributed setups
|
37
|
+
# config.logger = SyslogLogger.new
|
38
|
+
|
39
|
+
# Use a different cache store in production
|
40
|
+
# config.cache_store = :mem_cache_store
|
41
|
+
|
42
|
+
# Enable serving of images, stylesheets, and JavaScripts from an asset server
|
43
|
+
# config.action_controller.asset_host = "http://assets.example.com"
|
44
|
+
|
45
|
+
# Precompile additional assets (application.js, application.css, and all non-JS/CSS are already added)
|
46
|
+
# config.assets.precompile += %w( search.js )
|
47
|
+
|
48
|
+
# Disable delivery errors, bad email addresses will be ignored
|
49
|
+
# config.action_mailer.raise_delivery_errors = false
|
50
|
+
|
51
|
+
# Enable threaded mode
|
52
|
+
# config.threadsafe!
|
53
|
+
|
54
|
+
# Enable locale fallbacks for I18n (makes lookups for any locale fall back to
|
55
|
+
# the I18n.default_locale when a translation can not be found)
|
56
|
+
config.i18n.fallbacks = true
|
57
|
+
|
58
|
+
# Send deprecation notices to registered listeners
|
59
|
+
config.active_support.deprecation = :notify
|
60
|
+
end
|
@@ -0,0 +1,39 @@
|
|
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
|
+
# Use SQL instead of Active Record's schema dumper when creating the test database.
|
33
|
+
# This is necessary if your schema can't be completely dumped by the schema dumper,
|
34
|
+
# like if you have constraints or database-specific column types
|
35
|
+
# config.active_record.schema_format = :sql
|
36
|
+
|
37
|
+
# Print deprecation notices to the stderr
|
38
|
+
config.active_support.deprecation = :stderr
|
39
|
+
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,10 @@
|
|
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
|
@@ -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 = 'f80cafdbd47604ff85a29f8362a25d4d995b35f8fcd0268a01e385ccee3719394b38651b4441373ba29580e661b886f01fb4fdb4f66b51cd7d527c553f706e0c'
|
@@ -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
|
@@ -0,0 +1,7 @@
|
|
1
|
+
# This file should contain all the record creation needed to seed the database with its default values.
|
2
|
+
# The data can then be loaded with the rake db:seed (or created alongside the db with db:setup).
|
3
|
+
#
|
4
|
+
# Examples:
|
5
|
+
#
|
6
|
+
# cities = City.create([{ name: 'Chicago' }, { name: 'Copenhagen' }])
|
7
|
+
# Mayor.create(name: 'Emanuel', city: cities.first)
|
@@ -0,0 +1,26 @@
|
|
1
|
+
<!DOCTYPE html>
|
2
|
+
<html>
|
3
|
+
<head>
|
4
|
+
<title>The page you were looking for doesn't exist (404)</title>
|
5
|
+
<style type="text/css">
|
6
|
+
body { background-color: #fff; color: #666; text-align: center; font-family: arial, sans-serif; }
|
7
|
+
div.dialog {
|
8
|
+
width: 25em;
|
9
|
+
padding: 0 4em;
|
10
|
+
margin: 4em auto 0 auto;
|
11
|
+
border: 1px solid #ccc;
|
12
|
+
border-right-color: #999;
|
13
|
+
border-bottom-color: #999;
|
14
|
+
}
|
15
|
+
h1 { font-size: 100%; color: #f00; line-height: 1.5em; }
|
16
|
+
</style>
|
17
|
+
</head>
|
18
|
+
|
19
|
+
<body>
|
20
|
+
<!-- This file lives in public/404.html -->
|
21
|
+
<div class="dialog">
|
22
|
+
<h1>The page you were looking for doesn't exist.</h1>
|
23
|
+
<p>You may have mistyped the address or the page may have moved.</p>
|
24
|
+
</div>
|
25
|
+
</body>
|
26
|
+
</html>
|
@@ -0,0 +1,26 @@
|
|
1
|
+
<!DOCTYPE html>
|
2
|
+
<html>
|
3
|
+
<head>
|
4
|
+
<title>The change you wanted was rejected (422)</title>
|
5
|
+
<style type="text/css">
|
6
|
+
body { background-color: #fff; color: #666; text-align: center; font-family: arial, sans-serif; }
|
7
|
+
div.dialog {
|
8
|
+
width: 25em;
|
9
|
+
padding: 0 4em;
|
10
|
+
margin: 4em auto 0 auto;
|
11
|
+
border: 1px solid #ccc;
|
12
|
+
border-right-color: #999;
|
13
|
+
border-bottom-color: #999;
|
14
|
+
}
|
15
|
+
h1 { font-size: 100%; color: #f00; line-height: 1.5em; }
|
16
|
+
</style>
|
17
|
+
</head>
|
18
|
+
|
19
|
+
<body>
|
20
|
+
<!-- This file lives in public/422.html -->
|
21
|
+
<div class="dialog">
|
22
|
+
<h1>The change you wanted was rejected.</h1>
|
23
|
+
<p>Maybe you tried to change something you didn't have access to.</p>
|
24
|
+
</div>
|
25
|
+
</body>
|
26
|
+
</html>
|
@@ -0,0 +1,26 @@
|
|
1
|
+
<!DOCTYPE html>
|
2
|
+
<html>
|
3
|
+
<head>
|
4
|
+
<title>We're sorry, but something went wrong (500)</title>
|
5
|
+
<style type="text/css">
|
6
|
+
body { background-color: #fff; color: #666; text-align: center; font-family: arial, sans-serif; }
|
7
|
+
div.dialog {
|
8
|
+
width: 25em;
|
9
|
+
padding: 0 4em;
|
10
|
+
margin: 4em auto 0 auto;
|
11
|
+
border: 1px solid #ccc;
|
12
|
+
border-right-color: #999;
|
13
|
+
border-bottom-color: #999;
|
14
|
+
}
|
15
|
+
h1 { font-size: 100%; color: #f00; line-height: 1.5em; }
|
16
|
+
</style>
|
17
|
+
</head>
|
18
|
+
|
19
|
+
<body>
|
20
|
+
<!-- This file lives in public/500.html -->
|
21
|
+
<div class="dialog">
|
22
|
+
<h1>We're sorry, but something went wrong.</h1>
|
23
|
+
<p>We've been notified about this issue and we'll take a look at it shortly.</p>
|
24
|
+
</div>
|
25
|
+
</body>
|
26
|
+
</html>
|
File without changes
|
@@ -0,0 +1,6 @@
|
|
1
|
+
#!/usr/bin/env ruby
|
2
|
+
# This command will automatically be run when you run "rails" with Rails 3 gems installed from the root of your application.
|
3
|
+
|
4
|
+
APP_PATH = File.expand_path('../../config/application', __FILE__)
|
5
|
+
require File.expand_path('../../config/boot', __FILE__)
|
6
|
+
require 'rails/commands'
|