pagescript 0.2.0 → 0.3.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 (110) hide show
  1. checksums.yaml +4 -4
  2. data/MIT-LICENSE +20 -0
  3. data/README.md +137 -0
  4. data/Rakefile +21 -0
  5. data/app/assets/config/pagescript_manifest.js +1 -0
  6. data/app/assets/javascripts/pagescript.js +125 -0
  7. data/app/assets/stylesheets/pagescript/application.css +15 -0
  8. data/lib/pagescript.rb +6 -0
  9. data/lib/pagescript/engine.rb +9 -0
  10. data/lib/pagescript/helpers/tags_helper.rb +60 -0
  11. data/lib/pagescript/version.rb +3 -0
  12. data/spec/dummy/Rakefile +6 -0
  13. data/spec/dummy/app/assets/config/manifest.js +5 -0
  14. data/spec/dummy/app/assets/javascripts/application.js +33 -0
  15. data/spec/dummy/app/assets/stylesheets/application.css +15 -0
  16. data/spec/dummy/app/controllers/application_controller.rb +4 -0
  17. data/spec/dummy/app/controllers/haikus_controller.rb +14 -0
  18. data/spec/dummy/app/helpers/application_helper.rb +4 -0
  19. data/spec/dummy/app/models/haiku.rb +5 -0
  20. data/spec/dummy/app/views/haikus/index.html.erb +13 -0
  21. data/spec/dummy/app/views/haikus/new.html.erb +3 -0
  22. data/spec/dummy/app/views/haikus/show.html.erb +5 -0
  23. data/spec/dummy/app/views/layouts/application.html.erb +16 -0
  24. data/spec/dummy/app/views/layouts/mailer.html.erb +13 -0
  25. data/spec/dummy/app/views/layouts/mailer.text.erb +1 -0
  26. data/spec/dummy/bin/bundle +3 -0
  27. data/spec/dummy/bin/rails +4 -0
  28. data/spec/dummy/bin/rake +4 -0
  29. data/spec/dummy/bin/setup +34 -0
  30. data/spec/dummy/bin/update +29 -0
  31. data/spec/dummy/config.ru +5 -0
  32. data/spec/dummy/config/application.rb +22 -0
  33. data/spec/dummy/config/boot.rb +5 -0
  34. data/spec/dummy/config/cable.yml +9 -0
  35. data/spec/dummy/config/environment.rb +5 -0
  36. data/spec/dummy/config/environments/development.rb +51 -0
  37. data/spec/dummy/config/environments/test.rb +42 -0
  38. data/spec/dummy/config/initializers/application_controller_renderer.rb +6 -0
  39. data/spec/dummy/config/initializers/assets.rb +11 -0
  40. data/spec/dummy/config/initializers/backtrace_silencers.rb +7 -0
  41. data/spec/dummy/config/initializers/cookies_serializer.rb +5 -0
  42. data/spec/dummy/config/initializers/filter_parameter_logging.rb +4 -0
  43. data/spec/dummy/config/initializers/inflections.rb +16 -0
  44. data/spec/dummy/config/initializers/mime_types.rb +4 -0
  45. data/spec/dummy/config/initializers/new_framework_defaults.rb +21 -0
  46. data/spec/dummy/config/initializers/session_store.rb +3 -0
  47. data/spec/dummy/config/initializers/wrap_parameters.rb +14 -0
  48. data/spec/dummy/config/locales/en.yml +23 -0
  49. data/spec/dummy/config/puma.rb +47 -0
  50. data/spec/dummy/config/routes.rb +3 -0
  51. data/spec/dummy/config/secrets.yml +22 -0
  52. data/spec/dummy/config/spring.rb +6 -0
  53. data/spec/dummy/log/test.log +37 -0
  54. data/spec/dummy/public/404.html +67 -0
  55. data/spec/dummy/public/422.html +67 -0
  56. data/spec/dummy/public/500.html +66 -0
  57. data/spec/dummy/public/apple-touch-icon-precomposed.png +0 -0
  58. data/spec/dummy/public/apple-touch-icon.png +0 -0
  59. data/spec/dummy/public/favicon.ico +0 -0
  60. data/spec/dummy/tmp/cache/assets/sprockets/v3.0/-a/-aX9Yk8ywq6ZNPFEh9x8ZXUaKG9XFVqq8Qe9pE8jYEA.cache +1 -0
  61. data/spec/dummy/tmp/cache/assets/sprockets/v3.0/0Q/0QUwm-186bFoV7AViyynrzoj-7yzGD5By1fEpB2uxVo.cache +2 -0
  62. data/spec/dummy/tmp/cache/assets/sprockets/v3.0/2K/2KOLH54mhXL0432j0sUROyG3QXNSteLvubePSU6JKGk.cache +1 -0
  63. data/spec/dummy/tmp/cache/assets/sprockets/v3.0/2Y/2Yxyfmf6W4pqC3WQ6tpt5Wh8teZlZElaRzJkLfYs17M.cache +0 -0
  64. data/spec/dummy/tmp/cache/assets/sprockets/v3.0/44/44BQmJl1Jgw0aArQu3fgjMySa-iNLYB_GkYZX1p49Do.cache +2 -0
  65. data/spec/dummy/tmp/cache/assets/sprockets/v3.0/9o/9oV17Pqvr4n5vPsYQG3ThkqetgHhyg8NpqutJZ5gAe8.cache +1 -0
  66. data/spec/dummy/tmp/cache/assets/sprockets/v3.0/Bh/Bhc1z03rEiBD6gs8mAXjqNOibA-_pA4qmvPyjSgECuo.cache +1 -0
  67. data/spec/dummy/tmp/cache/assets/sprockets/v3.0/CR/CRAjazM6UdeSHQf3veWIBtbRjNfQQTFhWWJ-IJXwi0c.cache +3 -0
  68. data/spec/dummy/tmp/cache/assets/sprockets/v3.0/Cw/Cwdcaf1mJHhaYA36TsU77OPqZnJuwTWa1DeB5f2lk6E.cache +1 -0
  69. data/spec/dummy/tmp/cache/assets/sprockets/v3.0/EX/EX_WKAJGVlPMg5zwBKnMGl5U9CHYyLk2qxbCxuRPThQ.cache +2 -0
  70. data/spec/dummy/tmp/cache/assets/sprockets/v3.0/Et/Et0SNyP-LInBe4_tGeAtKOzgOTB_ZTrdgvEFCMIibV8.cache +1 -0
  71. data/spec/dummy/tmp/cache/assets/sprockets/v3.0/F7/F7djknrhxZzDPkr_GuNlLI42uZucXTil7rkXu2Y1uC4.cache +0 -0
  72. data/spec/dummy/tmp/cache/assets/sprockets/v3.0/FK/FK7dFJpljHVHEgfFDKbzQxc3bN1cBS6aSJ-DOMlqIKE.cache +1 -0
  73. data/spec/dummy/tmp/cache/assets/sprockets/v3.0/Hp/HpUhFMmSUe4uCbQU6s6bG1PnrDgA1H9_9o0RrJhBgQ0.cache +2 -0
  74. data/spec/dummy/tmp/cache/assets/sprockets/v3.0/Jy/JyE243RJvJzq3yK-XqdyUe7zU9T6yPuY_EgZ3bWlnGA.cache +0 -0
  75. data/spec/dummy/tmp/cache/assets/sprockets/v3.0/La/LaIBsM-mWqVhZAmk7D_BWHCeRDXV8vg6WvlE0B2XRaY.cache +1 -0
  76. data/spec/dummy/tmp/cache/assets/sprockets/v3.0/NR/NR8R5f_QAUHndvPgXstl0cFg2tpLVrAsYaBuTZt_my4.cache +1 -0
  77. data/spec/dummy/tmp/cache/assets/sprockets/v3.0/P5/P5sQBymdtF9XBsdSsgjmCLl_ORDWblQp1mpor46xJJg.cache +0 -0
  78. data/spec/dummy/tmp/cache/assets/sprockets/v3.0/Pw/PwjCIwNybpEUCYlZaKIZAws5YGks7lVzWV9SeHmTqac.cache +1 -0
  79. data/spec/dummy/tmp/cache/assets/sprockets/v3.0/QO/QOvpUM1_uH4V310ujW5C0kMeUlikClz4YXa0XSpwkwA.cache +2 -0
  80. data/spec/dummy/tmp/cache/assets/sprockets/v3.0/Qw/QwzTWa228RodRfDR7WXC0QDEwzOzeVnSUKmxYDPrBxE.cache +2 -0
  81. data/spec/dummy/tmp/cache/assets/sprockets/v3.0/RU/RUFMlDf7ywaGVksh50Vk8_ONxwa4eYivyhfDH6J8CtA.cache +1 -0
  82. data/spec/dummy/tmp/cache/assets/sprockets/v3.0/V9/V9s1wLOdRtuJ74soXvCFMzbg17kLZxHa4w38rQxEpBc.cache +1 -0
  83. data/spec/dummy/tmp/cache/assets/sprockets/v3.0/W_/W_mQqQPd_8QBLVXKKQ10CBW7NAvJvF_-NaduHDHQOoM.cache +1 -0
  84. data/spec/dummy/tmp/cache/assets/sprockets/v3.0/Yw/YwwwIoIi78wfB4J-Zs2BLGOirh1dJ8_FQuyuxZGykq4.cache +1 -0
  85. data/spec/dummy/tmp/cache/assets/sprockets/v3.0/ap/apD-0maW7C6annZSgLs5trt4EtDUGOB116_kayPXKVI.cache +0 -0
  86. data/spec/dummy/tmp/cache/assets/sprockets/v3.0/bI/bIGc1lmBvbXcF9e-rFY05l-olKGgid1fK_LZ5wU7lHE.cache +0 -0
  87. data/spec/dummy/tmp/cache/assets/sprockets/v3.0/cD/cD6lksrcljcRHGndfCqKKDF_w8TQMxTakOGjxB0K3_8.cache +1 -0
  88. data/spec/dummy/tmp/cache/assets/sprockets/v3.0/el/elVa94gSE1wrKZXkRFEHPfP1x7vOc7aLY4ApIopl-DM.cache +1 -0
  89. data/spec/dummy/tmp/cache/assets/sprockets/v3.0/fN/fNM97zlRlEo55oJjbyozttYPHQf1Q0KCnhzcRYjfdNs.cache +1 -0
  90. data/spec/dummy/tmp/cache/assets/sprockets/v3.0/fQ/fQ9HtpTjfAGLh0l6oo-Xrr6GhWKlvgRRB7vPpGyjQ6Q.cache +1 -0
  91. data/spec/dummy/tmp/cache/assets/sprockets/v3.0/gj/gjbuFfGzO6JtMDzQwTjsKLQzM6iNnWoTO75xJexVgW4.cache +2 -0
  92. data/spec/dummy/tmp/cache/assets/sprockets/v3.0/h6/h6AXhPdiVtyEEmqBLOSJKh9xt6V9LQtOVK0X1EKEfCM.cache +1 -0
  93. data/spec/dummy/tmp/cache/assets/sprockets/v3.0/hF/hFAc_e-m9RsUzbJ-j0znwH0gO1GabvsEk6-NIx8SoC4.cache +0 -0
  94. data/spec/dummy/tmp/cache/assets/sprockets/v3.0/i8/i8Pwia6e1VcMTF-76YtlYRvbj6YsIRz94H6XCG2EpcY.cache +1 -0
  95. data/spec/dummy/tmp/cache/assets/sprockets/v3.0/n_/n_xYqQYhwEMQknb3jFQnjlxxBE9TzMNHCdJ-bEyZFIw.cache +0 -0
  96. data/spec/dummy/tmp/cache/assets/sprockets/v3.0/nx/nxTv3sKVUQZADJyM3dPaVmUA78MIsMLD_K279yN_GsI.cache +0 -0
  97. data/spec/dummy/tmp/cache/assets/sprockets/v3.0/qv/qvBZRNrA3BgC-8ZhUkrkQeIm7uObAakyTvcIfn2Yusk.cache +0 -0
  98. data/spec/dummy/tmp/cache/assets/sprockets/v3.0/rN/rNflwRtdyDrdC7dBuqwIKxXkfRUPWL1YjuvazJQtrck.cache +0 -0
  99. data/spec/dummy/tmp/cache/assets/sprockets/v3.0/sz/sz2VK7Ev0ExN5b-fZ51PqWIaUzXqODmWw6fXlNXOKBA.cache +0 -0
  100. data/spec/dummy/tmp/cache/assets/sprockets/v3.0/tN/tN7UU773XH9oEu5z0jnw1uKLKV_4UG5YHTOdsAyPHiM.cache +3 -0
  101. data/spec/dummy/tmp/cache/assets/sprockets/v3.0/u-/u-9psQcvMhMVXGCghlghMq5CxdjWbUfBTDsLPccAe5k.cache +1 -0
  102. data/spec/dummy/tmp/cache/assets/sprockets/v3.0/xA/xAwVWATNEW09m5X31uBt_T3rxHC0nStO8akIoBmmPUg.cache +1 -0
  103. data/spec/dummy/tmp/cache/assets/sprockets/v3.0/xU/xUUA7mtxZIxTVdmDMa6sqgpOkubyGjAvNkeMGEB1peM.cache +0 -0
  104. data/spec/dummy/tmp/cache/assets/sprockets/v3.0/zJ/zJSuXh9W2t5W2MRaoTu4trOegf0HoyuaRWOTPZdavPo.cache +1 -0
  105. data/spec/examples.txt +22 -0
  106. data/spec/features/pagescript_js_spec.rb +35 -0
  107. data/spec/helpers/pagescript/tags_helper_spec.rb +98 -0
  108. data/spec/rails_helper.rb +48 -0
  109. data/spec/spec_helper.rb +96 -0
  110. metadata +226 -12
@@ -0,0 +1,15 @@
1
+ /*
2
+ * This is a manifest file that'll be compiled into application.css, which will include all the files
3
+ * listed below.
4
+ *
5
+ * Any CSS and SCSS file within this directory, lib/assets/stylesheets, vendor/assets/stylesheets,
6
+ * or any plugin's vendor/assets/stylesheets directory can be referenced here using a relative path.
7
+ *
8
+ * You're free to add application-wide styles to this file and they'll appear at the bottom of the
9
+ * compiled file so the styles you add here take precedence over styles defined in any other CSS/SCSS
10
+ * files in this directory. Styles in this file should be added after the last require_* statement.
11
+ * It is generally better to create a new file per style scope.
12
+ *
13
+ *= require_tree .
14
+ *= require_self
15
+ */
@@ -0,0 +1,4 @@
1
+ class ApplicationController < ActionController::Base
2
+ # protect_from_forgery with: :exception
3
+
4
+ end
@@ -0,0 +1,14 @@
1
+ class HaikusController < ApplicationController
2
+ def new
3
+ end
4
+
5
+ def create
6
+ render :new
7
+ end
8
+
9
+ def index
10
+ end
11
+
12
+ def show
13
+ end
14
+ end
@@ -0,0 +1,4 @@
1
+ module ApplicationHelper
2
+ # @todo this should be automatic
3
+ # include Pagescript::TagsHelper
4
+ end
@@ -0,0 +1,5 @@
1
+ class Haiku
2
+ include ActiveModel::Model
3
+ attr_accessor :title
4
+ attr_accessor :body
5
+ end
@@ -0,0 +1,13 @@
1
+ <div class="haikus">
2
+ <article>
3
+ <p>Summer night -</br>
4
+ even the stars</br>
5
+ are whispering to each other.</p>
6
+ </article>
7
+
8
+ <article>
9
+ <p>From time to time</br>
10
+ The clouds give rest</br>
11
+ To the moon-beholders.</p>
12
+ </article>
13
+ </div>
@@ -0,0 +1,3 @@
1
+ <%= form_tag(url: '/haikus', method: :post) do %>
2
+ <% submit_tag %>
3
+ <% end %>
@@ -0,0 +1,5 @@
1
+ <article>
2
+ <p>Summer night -</br>
3
+ even the stars</br>
4
+ are whispering to each other.</p>
5
+ </article>
@@ -0,0 +1,16 @@
1
+ <!DOCTYPE html>
2
+ <html>
3
+ <head>
4
+ <title>Dummy</title>
5
+ <%= csrf_meta_tags %>
6
+
7
+ <%= stylesheet_link_tag 'application', media: 'all', 'data-turbolinks-track': 'reload' %>
8
+ <%= javascript_include_tag 'application', 'data-turbolinks-track': 'reload' %>
9
+ </head>
10
+
11
+ <%= body_tag(params_as_metadata: true) do %>
12
+ <%= yield %>
13
+ <ul id="logger"></ul>
14
+ <div id="test"></div>
15
+ <% end %>
16
+ </html>
@@ -0,0 +1,13 @@
1
+ <!DOCTYPE html>
2
+ <html>
3
+ <head>
4
+ <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
5
+ <style>
6
+ /* Email styles need to be inline */
7
+ </style>
8
+ </head>
9
+
10
+ <body>
11
+ <%= yield %>
12
+ </body>
13
+ </html>
@@ -0,0 +1 @@
1
+ <%= yield %>
@@ -0,0 +1,3 @@
1
+ #!/usr/bin/env ruby
2
+ ENV['BUNDLE_GEMFILE'] ||= File.expand_path('../../Gemfile', __FILE__)
3
+ load Gem.bin_path('bundler', 'bundle')
@@ -0,0 +1,4 @@
1
+ #!/usr/bin/env ruby
2
+ APP_PATH = File.expand_path('../config/application', __dir__)
3
+ require_relative '../config/boot'
4
+ require 'rails/commands'
@@ -0,0 +1,4 @@
1
+ #!/usr/bin/env ruby
2
+ require_relative '../config/boot'
3
+ require 'rake'
4
+ Rake.application.run
@@ -0,0 +1,34 @@
1
+ #!/usr/bin/env ruby
2
+ require 'pathname'
3
+ require 'fileutils'
4
+ include FileUtils
5
+
6
+ # path to your application root.
7
+ APP_ROOT = Pathname.new File.expand_path('../../', __FILE__)
8
+
9
+ def system!(*args)
10
+ system(*args) || abort("\n== Command #{args} failed ==")
11
+ end
12
+
13
+ chdir APP_ROOT do
14
+ # This script is a starting point to setup your application.
15
+ # Add necessary setup steps to this file.
16
+
17
+ puts '== Installing dependencies =='
18
+ system! 'gem install bundler --conservative'
19
+ system('bundle check') || system!('bundle install')
20
+
21
+ # puts "\n== Copying sample files =="
22
+ # unless File.exist?('config/database.yml')
23
+ # cp 'config/database.yml.sample', 'config/database.yml'
24
+ # end
25
+
26
+ puts "\n== Preparing database =="
27
+ system! 'bin/rails db:setup'
28
+
29
+ puts "\n== Removing old logs and tempfiles =="
30
+ system! 'bin/rails log:clear tmp:clear'
31
+
32
+ puts "\n== Restarting application server =="
33
+ system! 'bin/rails restart'
34
+ end
@@ -0,0 +1,29 @@
1
+ #!/usr/bin/env ruby
2
+ require 'pathname'
3
+ require 'fileutils'
4
+ include FileUtils
5
+
6
+ # path to your application root.
7
+ APP_ROOT = Pathname.new File.expand_path('../../', __FILE__)
8
+
9
+ def system!(*args)
10
+ system(*args) || abort("\n== Command #{args} failed ==")
11
+ end
12
+
13
+ chdir APP_ROOT do
14
+ # This script is a way to update your development environment automatically.
15
+ # Add necessary update steps to this file.
16
+
17
+ puts '== Installing dependencies =='
18
+ system! 'gem install bundler --conservative'
19
+ system('bundle check') || system!('bundle install')
20
+
21
+ puts "\n== Updating database =="
22
+ system! 'bin/rails db:migrate'
23
+
24
+ puts "\n== Removing old logs and tempfiles =="
25
+ system! 'bin/rails log:clear tmp:clear'
26
+
27
+ puts "\n== Restarting application server =="
28
+ system! 'bin/rails restart'
29
+ end
@@ -0,0 +1,5 @@
1
+ # This file is used by Rack-based servers to start the application.
2
+
3
+ require_relative 'config/environment'
4
+
5
+ run Rails.application
@@ -0,0 +1,22 @@
1
+ require_relative 'boot'
2
+
3
+ # Pick the frameworks you want:
4
+ #require "active_record/railtie"
5
+ require "action_controller/railtie"
6
+ require "action_view/railtie"
7
+ # require "action_mailer/railtie"
8
+ # require "active_job/railtie"
9
+ # require "action_cable/engine"
10
+ # require "rails/test_unit/railtie"
11
+ require "sprockets/railtie"
12
+
13
+ Bundler.require(*Rails.groups)
14
+ require "pagescript"
15
+
16
+ module Dummy
17
+ class Application < Rails::Application
18
+ # Settings in config/environments/* take precedence over those specified here.
19
+ # Application configuration should go into files in config/initializers
20
+ # -- all .rb files in that directory are automatically loaded.
21
+ end
22
+ end
@@ -0,0 +1,5 @@
1
+ # Set up gems listed in the Gemfile.
2
+ ENV['BUNDLE_GEMFILE'] ||= File.expand_path('../../../Gemfile', __dir__)
3
+
4
+ require 'bundler/setup' if File.exist?(ENV['BUNDLE_GEMFILE'])
5
+ $LOAD_PATH.unshift File.expand_path('../../../lib', __dir__)
@@ -0,0 +1,9 @@
1
+ development:
2
+ adapter: async
3
+
4
+ test:
5
+ adapter: async
6
+
7
+ production:
8
+ adapter: redis
9
+ url: redis://localhost:6379/1
@@ -0,0 +1,5 @@
1
+ # Load the Rails application.
2
+ require_relative 'application'
3
+
4
+ # Initialize the Rails application.
5
+ Rails.application.initialize!
@@ -0,0 +1,51 @@
1
+ Rails.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
+ # Do not eager load code on boot.
10
+ config.eager_load = false
11
+
12
+ # Show full error reports.
13
+ config.consider_all_requests_local = true
14
+
15
+ # Enable/disable caching. By default caching is disabled.
16
+ if Rails.root.join('tmp/caching-dev.txt').exist?
17
+ config.action_controller.perform_caching = true
18
+
19
+ config.cache_store = :memory_store
20
+ config.public_file_server.headers = {
21
+ 'Cache-Control' => 'public, max-age=172800'
22
+ }
23
+ else
24
+ config.action_controller.perform_caching = false
25
+
26
+ config.cache_store = :null_store
27
+ end
28
+
29
+ # Don't care if the mailer can't send.
30
+ # config.action_mailer.raise_delivery_errors = false
31
+
32
+ # config.action_mailer.perform_caching = false
33
+
34
+ # Print deprecation notices to the Rails logger.
35
+ config.active_support.deprecation = :log
36
+
37
+ # Debug mode disables concatenation and preprocessing of assets.
38
+ # This option may cause significant delays in view rendering with a large
39
+ # number of complex assets.
40
+ config.assets.debug = true
41
+
42
+ # Suppress logger output for asset requests.
43
+ config.assets.quiet = true
44
+
45
+ # Raises error for missing translations
46
+ # config.action_view.raise_on_missing_translations = true
47
+
48
+ # Use an evented file watcher to asynchronously detect changes in source code,
49
+ # routes, locales, etc. This feature depends on the listen gem.
50
+ # config.file_watcher = ActiveSupport::EventedFileUpdateChecker
51
+ end
@@ -0,0 +1,42 @@
1
+ Rails.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
+ # Do not eager load code on boot. This avoids loading your whole application
11
+ # just for the purpose of running a single test. If you are using a tool that
12
+ # preloads Rails for running tests, you may have to set it to true.
13
+ config.eager_load = false
14
+
15
+ # Configure public file server for tests with Cache-Control for performance.
16
+ config.public_file_server.enabled = true
17
+ config.public_file_server.headers = {
18
+ 'Cache-Control' => 'public, max-age=3600'
19
+ }
20
+
21
+ # Show full error reports and disable caching.
22
+ config.consider_all_requests_local = true
23
+ config.action_controller.perform_caching = false
24
+
25
+ # Raise exceptions instead of rendering exception templates.
26
+ config.action_dispatch.show_exceptions = false
27
+
28
+ # Disable request forgery protection in test environment.
29
+ config.action_controller.allow_forgery_protection = false
30
+ # config.action_mailer.perform_caching = false
31
+
32
+ # Tell Action Mailer not to deliver emails to the real world.
33
+ # The :test delivery method accumulates sent emails in the
34
+ # ActionMailer::Base.deliveries array.
35
+ # config.action_mailer.delivery_method = :test
36
+
37
+ # Print deprecation notices to the stderr.
38
+ config.active_support.deprecation = :stderr
39
+
40
+ # Raises error for missing translations
41
+ # config.action_view.raise_on_missing_translations = true
42
+ end
@@ -0,0 +1,6 @@
1
+ # Be sure to restart your server when you modify this file.
2
+
3
+ # ApplicationController.renderer.defaults.merge!(
4
+ # http_host: 'example.org',
5
+ # https: false
6
+ # )
@@ -0,0 +1,11 @@
1
+ # Be sure to restart your server when you modify this file.
2
+
3
+ # Version of your assets, change this if you want to expire all your assets.
4
+ Rails.application.config.assets.version = '1.0'
5
+
6
+ # Add additional assets to the asset load path
7
+ # Rails.application.config.assets.paths << Emoji.images_path
8
+
9
+ # Precompile additional assets.
10
+ # application.js, application.css, and all non-JS/CSS in app/assets folder are already added.
11
+ # Rails.application.config.assets.precompile += %w( search.js )
@@ -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,5 @@
1
+ # Be sure to restart your server when you modify this file.
2
+
3
+ # Specify a serializer for the signed and encrypted cookie jars.
4
+ # Valid options are :json, :marshal, and :hybrid.
5
+ Rails.application.config.action_dispatch.cookies_serializer = :json
@@ -0,0 +1,4 @@
1
+ # Be sure to restart your server when you modify this file.
2
+
3
+ # Configure sensitive parameters which will be filtered from the log file.
4
+ Rails.application.config.filter_parameters += [:password]
@@ -0,0 +1,16 @@
1
+ # Be sure to restart your server when you modify this file.
2
+
3
+ # Add new inflection rules using the following format. Inflections
4
+ # are locale specific, and you may define rules for as many different
5
+ # locales as you wish. All of these examples are active by default:
6
+ # ActiveSupport::Inflector.inflections(:en) do |inflect|
7
+ # inflect.plural /^(ox)$/i, '\1en'
8
+ # inflect.singular /^(ox)en/i, '\1'
9
+ # inflect.irregular 'person', 'people'
10
+ # inflect.uncountable %w( fish sheep )
11
+ # end
12
+
13
+ # These inflection rules are supported but not enabled by default:
14
+ # ActiveSupport::Inflector.inflections(:en) do |inflect|
15
+ # inflect.acronym 'RESTful'
16
+ # end
@@ -0,0 +1,4 @@
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
@@ -0,0 +1,21 @@
1
+ # Be sure to restart your server when you modify this file.
2
+ #
3
+ # This file contains migration options to ease your Rails 5.0 upgrade.
4
+ #
5
+ # Read the Rails 5.0 release notes for more info on each option.
6
+
7
+ # Enable per-form CSRF tokens. Previous versions had false.
8
+ Rails.application.config.action_controller.per_form_csrf_tokens = true
9
+
10
+ # Enable origin-checking CSRF mitigation. Previous versions had false.
11
+ Rails.application.config.action_controller.forgery_protection_origin_check = true
12
+
13
+ # Make Ruby 2.4 preserve the timezone of the receiver when calling `to_time`.
14
+ # Previous versions had false.
15
+ ActiveSupport.to_time_preserves_timezone = true
16
+
17
+ # Do not halt callback chains when a callback returns false. Previous versions had true.
18
+ # ActiveSupport.halt_callback_chains_on_return_false = false
19
+
20
+ # Configure SSL options to enable HSTS with subdomains. Previous versions had false.
21
+ Rails.application.config.ssl_options = { hsts: { subdomains: true } }
@@ -0,0 +1,3 @@
1
+ # Be sure to restart your server when you modify this file.
2
+
3
+ Rails.application.config.session_store :cookie_store, key: '_dummy_session'
@@ -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
+ # To enable root element in JSON for ActiveRecord objects.
12
+ # ActiveSupport.on_load(:active_record) do
13
+ # self.include_root_in_json = true
14
+ # end