aslon_settings 0.0.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (154) hide show
  1. data/MIT-LICENSE +20 -0
  2. data/README.rdoc +3 -0
  3. data/Rakefile +40 -0
  4. data/app/controllers/admin/item_params_controller.rb +5 -0
  5. data/app/controllers/admin/params_controller.rb +20 -0
  6. data/app/helpers/application_helper.rb +2 -0
  7. data/app/helpers/cheese/widgets_helper.rb +9 -0
  8. data/app/models/admin/item_param.rb +7 -0
  9. data/app/models/admin/param.rb +51 -0
  10. data/app/views/admin/params/index.html.haml +42 -0
  11. data/app/views/layouts/cheese.html.erb +12 -0
  12. data/config/routes.rb +17 -0
  13. data/lib/application_helper.rb +7 -0
  14. data/lib/aslon_settings.rb +5 -0
  15. data/lib/aslon_settings/engine.rb +4 -0
  16. data/lib/aslon_settings/version.rb +3 -0
  17. data/lib/engine.rb +30 -0
  18. data/lib/rails/generators/aslon_settings/aslon_settings_generator.rb +80 -0
  19. data/lib/rails/generators/aslon_settings/templates/initializer.rb +8 -0
  20. data/lib/rails/generators/aslon_settings/templates/migration_item_params.rb +14 -0
  21. data/lib/rails/generators/aslon_settings/templates/migration_params.rb +13 -0
  22. data/lib/rails/generators/aslon_settings/templates/schema.rb +11 -0
  23. data/lib/rails/generators/cheese/cheese_generator.rb +76 -0
  24. data/lib/rails/generators/cheese/templates/initializer.rb +8 -0
  25. data/lib/rails/generators/cheese/templates/migration.rb +9 -0
  26. data/lib/rails/generators/cheese/templates/schema.rb +11 -0
  27. data/lib/rails/railties/tasks.rake +8 -0
  28. data/lib/tasks/aslon_settings_tasks.rake +4 -0
  29. data/test/dummy/README.rdoc +261 -0
  30. data/test/dummy/Rakefile +7 -0
  31. data/test/dummy/app/assets/javascripts/application.js +15 -0
  32. data/test/dummy/app/assets/stylesheets/application.css +13 -0
  33. data/test/dummy/app/controllers/application_controller.rb +3 -0
  34. data/test/dummy/app/helpers/application_helper.rb +2 -0
  35. data/test/dummy/app/views/layouts/application.html.erb +14 -0
  36. data/test/dummy/config.ru +4 -0
  37. data/test/dummy/config/application.rb +56 -0
  38. data/test/dummy/config/boot.rb +10 -0
  39. data/test/dummy/config/database.yml +25 -0
  40. data/test/dummy/config/environment.rb +5 -0
  41. data/test/dummy/config/environments/development.rb +37 -0
  42. data/test/dummy/config/environments/production.rb +67 -0
  43. data/test/dummy/config/environments/test.rb +37 -0
  44. data/test/dummy/config/initializers/backtrace_silencers.rb +7 -0
  45. data/test/dummy/config/initializers/inflections.rb +15 -0
  46. data/test/dummy/config/initializers/mime_types.rb +5 -0
  47. data/test/dummy/config/initializers/secret_token.rb +7 -0
  48. data/test/dummy/config/initializers/session_store.rb +8 -0
  49. data/test/dummy/config/initializers/wrap_parameters.rb +14 -0
  50. data/test/dummy/config/locales/en.yml +5 -0
  51. data/test/dummy/config/routes.rb +58 -0
  52. data/test/dummy/db/development.sqlite3 +0 -0
  53. data/test/dummy/db/migrate/20120128163432_create_admin_params.rb +13 -0
  54. data/test/dummy/db/migrate/20120128163433_create_admin_item_params.rb +14 -0
  55. data/test/dummy/db/schema.rb +32 -0
  56. data/test/dummy/db/test.sqlite3 +0 -0
  57. data/test/dummy/log/development.log +3299 -0
  58. data/test/dummy/log/test.log +2850 -0
  59. data/test/dummy/public/404.html +26 -0
  60. data/test/dummy/public/422.html +26 -0
  61. data/test/dummy/public/500.html +25 -0
  62. data/test/dummy/public/favicon.ico +0 -0
  63. data/test/dummy/script/rails +6 -0
  64. data/test/dummy/tmp/cache/assets/BCC/5B0/sprockets%2F5733f8e767312480746703524a418a79 +0 -0
  65. data/test/dummy/tmp/cache/assets/C53/630/sprockets%2F6a49c58413f067103663396cfc14733e +0 -0
  66. data/test/dummy/tmp/cache/assets/C59/3B0/sprockets%2Fa0246c6545e9e2991b6442d44d449626 +0 -0
  67. data/test/dummy/tmp/cache/assets/C59/DF0/sprockets%2F342cb85814c1e5d19119d51977379b53 +0 -0
  68. data/test/dummy/tmp/cache/assets/C5E/F10/sprockets%2F814724e31d051857764098acd739e6d5 +0 -0
  69. data/test/dummy/tmp/cache/assets/C61/700/sprockets%2F6015973875742d7f9e90171c57c2ae28 +0 -0
  70. data/test/dummy/tmp/cache/assets/C74/BB0/sprockets%2Fb6447d142b38d02c26f71500535d6d91 +0 -0
  71. data/test/dummy/tmp/cache/assets/C79/090/sprockets%2F24581eb40f651726790979541a1a2abb +0 -0
  72. data/test/dummy/tmp/cache/assets/C79/600/sprockets%2F2a1471848208108cd93b0a0738b587bf +0 -0
  73. data/test/dummy/tmp/cache/assets/C94/CB0/sprockets%2F9f5ac35951919094728289ae14b73b9c +0 -0
  74. data/test/dummy/tmp/cache/assets/C97/A90/sprockets%2Fa1245c33577047a7ca2a00f72c1402f9 +0 -0
  75. data/test/dummy/tmp/cache/assets/CA3/800/sprockets%2F057b5edb0602187ade51967da2071408 +0 -0
  76. data/test/dummy/tmp/cache/assets/CBA/6E0/sprockets%2F595448091f8f54fca0d7ae49583c5310 +0 -0
  77. data/test/dummy/tmp/cache/assets/CBC/9B0/sprockets%2F631fe91cf4327942178ac36d639c8e51 +0 -0
  78. data/test/dummy/tmp/cache/assets/CC0/4D0/sprockets%2Fcb0998c3697403b7ead2803674f95b74 +0 -0
  79. data/test/dummy/tmp/cache/assets/CC6/AE0/sprockets%2Ff89f761707147589b5f47f022ca719fb +0 -0
  80. data/test/dummy/tmp/cache/assets/CC9/DA0/sprockets%2Fe441ca6004a01e2596a43ad83011fd88 +0 -0
  81. data/test/dummy/tmp/cache/assets/CD0/DF0/sprockets%2Fc65f18995be46964904cefc5661c7288 +0 -0
  82. data/test/dummy/tmp/cache/assets/CD8/290/sprockets%2F408d7e3616ddd0cb440661e1e280693c +0 -0
  83. data/test/dummy/tmp/cache/assets/CD8/370/sprockets%2F357970feca3ac29060c1e3861e2c0953 +0 -0
  84. data/test/dummy/tmp/cache/assets/CDD/BD0/sprockets%2F1f47d7fc1332433150329165eece89cb +0 -0
  85. data/test/dummy/tmp/cache/assets/CE0/D00/sprockets%2Fbf6837369cd8cc10b0c7094b5604833d +0 -0
  86. data/test/dummy/tmp/cache/assets/CE6/620/sprockets%2Fa2981ce627d772ce0667751e453cba56 +0 -0
  87. data/test/dummy/tmp/cache/assets/CE6/FA0/sprockets%2F9b230a89231cfc0d276e598a48a969b0 +0 -0
  88. data/test/dummy/tmp/cache/assets/CF1/BC0/sprockets%2F479625960d61fdd20258eaff88c8632c +0 -0
  89. data/test/dummy/tmp/cache/assets/CFF/E60/sprockets%2Fa58238c280f20ab01f8b3514efc0e942 +0 -0
  90. data/test/dummy/tmp/cache/assets/D07/0B0/sprockets%2F8846cf8fbc635e7685179de8ed307577 +0 -0
  91. data/test/dummy/tmp/cache/assets/D08/670/sprockets%2F0875ba65d176c4c921e8b41a29bba508 +0 -0
  92. data/test/dummy/tmp/cache/assets/D0D/B80/sprockets%2Ff383023599ae3d35e361bd1d601f9fd2 +0 -0
  93. data/test/dummy/tmp/cache/assets/D10/580/sprockets%2F3a7f29575b8c1ea452f12859e4a7e11a +0 -0
  94. data/test/dummy/tmp/cache/assets/D1A/8D0/sprockets%2F734d455592e882d777f6af3ad3db5c11 +0 -0
  95. data/test/dummy/tmp/cache/assets/D1C/280/sprockets%2F2a9d99e40082e8e521e1e206e8afd598 +0 -0
  96. data/test/dummy/tmp/cache/assets/D1C/410/sprockets%2F890b33359c9617a577e5d9b40dcb77ac +0 -0
  97. data/test/dummy/tmp/cache/assets/D1F/1C0/sprockets%2F5649c4e4276905e7b29ed45aef514f5b +0 -0
  98. data/test/dummy/tmp/cache/assets/D27/7B0/sprockets%2F630e81aa5cbe5b2ea53a17743026ca54 +0 -0
  99. data/test/dummy/tmp/cache/assets/D32/A10/sprockets%2F13fe41fee1fe35b49d145bcc06610705 +0 -0
  100. data/test/dummy/tmp/cache/assets/D32/D40/sprockets%2Fd111de3c2f7e42b071bff7a24d339931 +0 -0
  101. data/test/dummy/tmp/cache/assets/D36/970/sprockets%2Fb07457f5ec830e520174fad32e0af2d9 +0 -0
  102. data/test/dummy/tmp/cache/assets/D41/0D0/sprockets%2Fa3c38dacc196f180cba954870e44628e +0 -0
  103. data/test/dummy/tmp/cache/assets/D41/F90/sprockets%2F12881439ec81bc064ce5a88fa8cf2f21 +0 -0
  104. data/test/dummy/tmp/cache/assets/D4D/170/sprockets%2F9e0a7b35a8f612883e67094da63fd9db +0 -0
  105. data/test/dummy/tmp/cache/assets/D4D/770/sprockets%2F7ca933ff93149917e6d5dbdd67a3156a +0 -0
  106. data/test/dummy/tmp/cache/assets/D4E/1B0/sprockets%2Ff7cbd26ba1d28d48de824f0e94586655 +0 -0
  107. data/test/dummy/tmp/cache/assets/D4F/010/sprockets%2Febb866a0ac284099087ca72688f7dcb9 +0 -0
  108. data/test/dummy/tmp/cache/assets/D58/920/sprockets%2F1604af936fd303cb22bfeba011f6067d +0 -0
  109. data/test/dummy/tmp/cache/assets/D5A/EA0/sprockets%2Fd771ace226fc8215a3572e0aa35bb0d6 +0 -0
  110. data/test/dummy/tmp/cache/assets/D5D/2D0/sprockets%2Fbc905eabf18385a476a20b6b630aa8a4 +0 -0
  111. data/test/dummy/tmp/cache/assets/D67/FB0/sprockets%2Fe3f94f2aca977fb0b583c6aa06232b08 +0 -0
  112. data/test/dummy/tmp/cache/assets/D6A/950/sprockets%2F3d4057d5bf3b4cd89542b1b2d3cff382 +0 -0
  113. data/test/dummy/tmp/cache/assets/D6E/3B0/sprockets%2F30777d43ead4cbe66ef0c40722c36e7f +0 -0
  114. data/test/dummy/tmp/cache/assets/D70/2D0/sprockets%2Ff5e345ffe14efbf923ba212a82565d91 +0 -0
  115. data/test/dummy/tmp/cache/assets/D70/590/sprockets%2F702ab96efc4eb4372857ea6d70a0c8d5 +0 -0
  116. data/test/dummy/tmp/cache/assets/D71/660/sprockets%2Fafe829133de1f4bb9799d613b1dba265 +0 -0
  117. data/test/dummy/tmp/cache/assets/D77/620/sprockets%2F170c6779fd2bd851eca6f1f7ed70870a +0 -0
  118. data/test/dummy/tmp/cache/assets/D7E/890/sprockets%2F1658f11cee60c9ee6e56b5dd0a9b3889 +0 -0
  119. data/test/dummy/tmp/cache/assets/D84/A90/sprockets%2Fd55887590d383f99d31cdfe6ae4d6da2 +0 -0
  120. data/test/dummy/tmp/cache/assets/D8B/BB0/sprockets%2Fe4548c2bded4c9f0655f49e45884d9fc +0 -0
  121. data/test/dummy/tmp/cache/assets/D91/E50/sprockets%2Fc9ec4aa8b2e302ca0612df7f0e8741e3 +0 -0
  122. data/test/dummy/tmp/cache/assets/D9A/730/sprockets%2Fbd03a9e4fb00b66a8ec6c39a360c96d6 +0 -0
  123. data/test/dummy/tmp/cache/assets/D9B/980/sprockets%2Fd04af0b6c9e95da413ad3229a989db5a +0 -0
  124. data/test/dummy/tmp/cache/assets/D9E/E60/sprockets%2Fbae9ec3bb9d6de1ec055fe8017209904 +0 -0
  125. data/test/dummy/tmp/cache/assets/DA8/C70/sprockets%2Fcd5d26f674c131dca89c92ac8a2f89b6 +0 -0
  126. data/test/dummy/tmp/cache/assets/DB6/FD0/sprockets%2F0683a6080b0eeaacf913f0ca4f0d5bc4 +0 -0
  127. data/test/dummy/tmp/cache/assets/DB7/E70/sprockets%2Fc59a9f5f8e74cf3ae75558bd08b7e45b +0 -0
  128. data/test/dummy/tmp/cache/assets/DCC/0C0/sprockets%2Fd32e3d754d680e0cd46badceb6d1f908 +0 -0
  129. data/test/dummy/tmp/cache/assets/DCD/5A0/sprockets%2F721f3fe33f410ca6febea71747af4af9 +0 -0
  130. data/test/dummy/tmp/cache/assets/DCD/F30/sprockets%2Fb6119edfb9d35da21df95076cd7fca21 +0 -0
  131. data/test/dummy/tmp/cache/assets/DCF/000/sprockets%2Fe0d33c959d2bee12d9dea3b2c39f509d +0 -0
  132. data/test/dummy/tmp/cache/assets/DD5/820/sprockets%2F43f5f16e45c0998ad71dc4bba79a8eac +0 -0
  133. data/test/dummy/tmp/cache/assets/DDC/400/sprockets%2Fcffd775d018f68ce5dba1ee0d951a994 +0 -0
  134. data/test/dummy/tmp/cache/assets/DDD/9D0/sprockets%2Fc6e9db72ebedd8fdbd460016885fe608 +0 -0
  135. data/test/dummy/tmp/cache/assets/DE1/EE0/sprockets%2Fbde37f745f02f174dc98683cde69abcf +0 -0
  136. data/test/dummy/tmp/cache/assets/DE6/A90/sprockets%2Fbd9bd6a80dc4dc0930005072bebfaaf3 +0 -0
  137. data/test/dummy/tmp/cache/assets/DED/D10/sprockets%2Fb6043519fdd267af2933f1bcecb0abbc +0 -0
  138. data/test/dummy/tmp/cache/assets/DEF/A30/sprockets%2F821b3fabf05f7b057f6cbc1ba4c706ec +0 -0
  139. data/test/dummy/tmp/cache/assets/DF6/690/sprockets%2F66e59dbb54d1fb6d520cbddb815ba83a +0 -0
  140. data/test/dummy/tmp/cache/assets/DFA/230/sprockets%2F71b015bf3bdc9eaf63991a4a5e2d3dff +0 -0
  141. data/test/dummy/tmp/cache/assets/DFD/3D0/sprockets%2Fee2052df475f6b5e0addf8ff6404a3eb +0 -0
  142. data/test/dummy/tmp/cache/assets/DFD/900/sprockets%2F4c4a9a9c79c13ebc75d9eafdcc3311a6 +0 -0
  143. data/test/dummy/tmp/cache/assets/E04/890/sprockets%2F2f5173deea6c795b8fdde723bb4b63af +0 -0
  144. data/test/dummy/tmp/cache/assets/E23/5E0/sprockets%2F21cf86c525a97f28ac24abfebaa80fba +0 -0
  145. data/test/dummy/tmp/cache/assets/E51/FD0/sprockets%2F2e6f5b182b37f318d0d0a3cadeaebfef +0 -0
  146. data/test/dummy/tmp/cache/assets/E61/D10/sprockets%2Feaae3ade8634a2a0e7f8e07c9b35ffef +0 -0
  147. data/test/dummy/tmp/cache/assets/E92/410/sprockets%2Ff71cd6fd3f9aa76a65ee4abcdf38ad2d +0 -0
  148. data/test/generator/aslon_settings_generator_test.rb +16 -0
  149. data/test/integration/navigation_test.rb +21 -0
  150. data/test/test_helper.rb +13 -0
  151. data/test/tmp/db/migrate/20120202193559_create_admin_params.rb +13 -0
  152. data/test/tmp/db/migrate/20120202193560_create_admin_item_params.rb +14 -0
  153. data/test/unit/aslon_settings_test.rb +21 -0
  154. metadata +373 -0
@@ -0,0 +1,4 @@
1
+ # This file is used by Rack-based servers to start the application.
2
+
3
+ require ::File.expand_path('../config/environment', __FILE__)
4
+ run Dummy::Application
@@ -0,0 +1,56 @@
1
+ require File.expand_path('../boot', __FILE__)
2
+
3
+ require 'rails/all'
4
+
5
+ Bundler.require
6
+ require "aslon_settings"
7
+
8
+ module Dummy
9
+ class Application < Rails::Application
10
+ # Settings in config/environments/* take precedence over those specified here.
11
+ # Application configuration should go into files in config/initializers
12
+ # -- all .rb files in that directory are automatically loaded.
13
+
14
+ # Custom directories with classes and modules you want to be autoloadable.
15
+ # config.autoload_paths += %W(#{config.root}/extras)
16
+
17
+ # Only load the plugins named here, in the order given (default is alphabetical).
18
+ # :all can be used as a placeholder for all plugins not explicitly named.
19
+ # config.plugins = [ :exception_notification, :ssl_requirement, :all ]
20
+
21
+ # Activate observers that should always be running.
22
+ # config.active_record.observers = :cacher, :garbage_collector, :forum_observer
23
+
24
+ # Set Time.zone default to the specified zone and make Active Record auto-convert to this zone.
25
+ # Run "rake -D time" for a list of tasks for finding time zone names. Default is UTC.
26
+ # config.time_zone = 'Central Time (US & Canada)'
27
+
28
+ # The default locale is :en and all translations from config/locales/*.rb,yml are auto loaded.
29
+ # config.i18n.load_path += Dir[Rails.root.join('my', 'locales', '*.{rb,yml}').to_s]
30
+ # config.i18n.default_locale = :de
31
+
32
+ # Configure the default encoding used in templates for Ruby 1.9.
33
+ config.encoding = "utf-8"
34
+
35
+ # Configure sensitive parameters which will be filtered from the log file.
36
+ config.filter_parameters += [:password]
37
+
38
+ # Use SQL instead of Active Record's schema dumper when creating the database.
39
+ # This is necessary if your schema can't be completely dumped by the schema dumper,
40
+ # like if you have constraints or database-specific column types
41
+ # config.active_record.schema_format = :sql
42
+
43
+ # Enforce whitelist mode for mass assignment.
44
+ # This will create an empty whitelist of attributes available for mass-assignment for all models
45
+ # in your app. As such, your models will need to explicitly whitelist or blacklist accessible
46
+ # parameters by using an attr_accessible or attr_protected declaration.
47
+ # config.active_record.whitelist_attributes = true
48
+
49
+ # Enable the asset pipeline
50
+ config.assets.enabled = true
51
+
52
+ # Version of your assets, change this if you want to expire all your assets
53
+ config.assets.version = '1.0'
54
+ end
55
+ end
56
+
@@ -0,0 +1,10 @@
1
+ require 'rubygems'
2
+ gemfile = File.expand_path('../../../../Gemfile', __FILE__)
3
+
4
+ if File.exist?(gemfile)
5
+ ENV['BUNDLE_GEMFILE'] = gemfile
6
+ require 'bundler'
7
+ Bundler.setup
8
+ end
9
+
10
+ $:.unshift File.expand_path('../../../../lib', __FILE__)
@@ -0,0 +1,25 @@
1
+ # SQLite version 3.x
2
+ # gem install sqlite3
3
+ #
4
+ # Ensure the SQLite 3 gem is defined in your Gemfile
5
+ # gem 'sqlite3'
6
+ development:
7
+ adapter: sqlite3
8
+ database: db/development.sqlite3
9
+ pool: 5
10
+ timeout: 5000
11
+
12
+ # Warning: The database defined as "test" will be erased and
13
+ # re-generated from your development database when you run "rake".
14
+ # Do not set this db to the same as development or production.
15
+ test:
16
+ adapter: sqlite3
17
+ database: db/test.sqlite3
18
+ pool: 5
19
+ timeout: 5000
20
+
21
+ production:
22
+ adapter: sqlite3
23
+ database: db/production.sqlite3
24
+ pool: 5
25
+ timeout: 5000
@@ -0,0 +1,5 @@
1
+ # Load the rails application
2
+ require File.expand_path('../application', __FILE__)
3
+
4
+ # Initialize the rails application
5
+ Dummy::Application.initialize!
@@ -0,0 +1,37 @@
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 = false
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
+ # Raise exception on mass assignment protection for Active Record models
26
+ config.active_record.mass_assignment_sanitizer = :strict
27
+
28
+ # Log the query plan for queries taking more than this (works
29
+ # with SQLite, MySQL, and PostgreSQL)
30
+ config.active_record.auto_explain_threshold_in_seconds = 0.5
31
+
32
+ # Do not compress assets
33
+ config.assets.compress = false
34
+
35
+ # Expands the lines which load the assets
36
+ config.assets.debug = true
37
+ end
@@ -0,0 +1,67 @@
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
+ # Prepend all log lines with the following tags
37
+ # config.log_tags = [ :subdomain, :uuid ]
38
+
39
+ # Use a different logger for distributed setups
40
+ # config.logger = ActiveSupport::TaggedLogging.new(SyslogLogger.new)
41
+
42
+ # Use a different cache store in production
43
+ # config.cache_store = :mem_cache_store
44
+
45
+ # Enable serving of images, stylesheets, and JavaScripts from an asset server
46
+ # config.action_controller.asset_host = "http://assets.example.com"
47
+
48
+ # Precompile additional assets (application.js, application.css, and all non-JS/CSS are already added)
49
+ # config.assets.precompile += %w( search.js )
50
+
51
+ # Disable delivery errors, bad email addresses will be ignored
52
+ # config.action_mailer.raise_delivery_errors = false
53
+
54
+ # Enable threaded mode
55
+ # config.threadsafe!
56
+
57
+ # Enable locale fallbacks for I18n (makes lookups for any locale fall back to
58
+ # the I18n.default_locale when a translation can not be found)
59
+ config.i18n.fallbacks = true
60
+
61
+ # Send deprecation notices to registered listeners
62
+ config.active_support.deprecation = :notify
63
+
64
+ # Log the query plan for queries taking more than this (works
65
+ # with SQLite, MySQL, and PostgreSQL)
66
+ # config.active_record.auto_explain_threshold_in_seconds = 0.5
67
+ end
@@ -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,5 @@
1
+ # Be sure to restart your server when you modify this file.
2
+
3
+ # Add new mime types for use in respond_to blocks:
4
+ # Mime::Type.register "text/richtext", :rtf
5
+ # Mime::Type.register_alias "text/html", :iphone
@@ -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 = '97b49a25b14430ea8c3855ad473ba6415abf2717565caa1757ffd02ec53f1a03c7310148bf746181a05de34bdc06425039496b3d5182552e9343d3719c516622'
@@ -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,5 @@
1
+ # Sample localization file for English. Add more files in this directory for other locales.
2
+ # See https://github.com/svenfuchs/rails-i18n/tree/master/rails%2Flocale for starting points.
3
+
4
+ en:
5
+ hello: "Hello world"
@@ -0,0 +1,58 @@
1
+ Dummy::Application.routes.draw do
2
+ # The priority is based upon order of creation:
3
+ # first created -> highest priority.
4
+
5
+ # Sample of regular route:
6
+ # match 'products/:id' => 'catalog#view'
7
+ # Keep in mind you can assign values other than :controller and :action
8
+
9
+ # Sample of named route:
10
+ # match 'products/:id/purchase' => 'catalog#purchase', :as => :purchase
11
+ # This route can be invoked with purchase_url(:id => product.id)
12
+
13
+ # Sample resource route (maps HTTP verbs to controller actions automatically):
14
+ # resources :products
15
+
16
+ # Sample resource route with options:
17
+ # resources :products do
18
+ # member do
19
+ # get 'short'
20
+ # post 'toggle'
21
+ # end
22
+ #
23
+ # collection do
24
+ # get 'sold'
25
+ # end
26
+ # end
27
+
28
+ # Sample resource route with sub-resources:
29
+ # resources :products do
30
+ # resources :comments, :sales
31
+ # resource :seller
32
+ # end
33
+
34
+ # Sample resource route with more complex sub-resources
35
+ # resources :products do
36
+ # resources :comments
37
+ # resources :sales do
38
+ # get 'recent', :on => :collection
39
+ # end
40
+ # end
41
+
42
+ # Sample resource route within a namespace:
43
+ # namespace :admin do
44
+ # # Directs /admin/products/* to Admin::ProductsController
45
+ # # (app/controllers/admin/products_controller.rb)
46
+ # resources :products
47
+ # end
48
+
49
+ # You can have the root of your site routed with "root"
50
+ # just remember to delete public/index.html.
51
+ # root :to => 'welcome#index'
52
+
53
+ # See how all your routes lay out with "rake routes"
54
+
55
+ # This is a legacy wild controller route that's not recommended for RESTful applications.
56
+ # Note: This route will make all actions in every controller accessible via GET requests.
57
+ # match ':controller(/:action(/:id))(.:format)'
58
+ end
Binary file
@@ -0,0 +1,13 @@
1
+ class CreateAdminParams < ActiveRecord::Migration
2
+ def self.up
3
+ create_table :admin_params do |t|
4
+ t.string :name
5
+ t.integer :pos
6
+ t.timestamps
7
+ end
8
+ end
9
+
10
+ def self.down
11
+ drop_table :admin_params
12
+ end
13
+ end
@@ -0,0 +1,14 @@
1
+ class CreateAdminItemParams < ActiveRecord::Migration
2
+ def self.up
3
+ create_table :admin_item_params do |t|
4
+ t.string :name
5
+ t.string :value
6
+ t.integer :pos
7
+ t.integer :param_id
8
+ t.timestamps
9
+ end
10
+ end
11
+ def self.down
12
+ drop_table :admin_item_params
13
+ end
14
+ end
@@ -0,0 +1,32 @@
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 => 20120128163433) do
15
+
16
+ create_table "admin_item_params", :force => true do |t|
17
+ t.string "name"
18
+ t.string "value"
19
+ t.integer "pos"
20
+ t.integer "param_id"
21
+ t.datetime "created_at", :null => false
22
+ t.datetime "updated_at", :null => false
23
+ end
24
+
25
+ create_table "admin_params", :force => true do |t|
26
+ t.string "name"
27
+ t.integer "pos"
28
+ t.datetime "created_at", :null => false
29
+ t.datetime "updated_at", :null => false
30
+ end
31
+
32
+ end