cells 4.0.5 → 4.1.0.rc1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.travis.yml +2 -14
- data/CHANGES.md +34 -7
- data/Gemfile +2 -2
- data/README.md +18 -88
- data/benchmarks/class_builder.rb +37 -0
- data/benchmarks/collection.rb +47 -0
- data/cells.gemspec +5 -7
- data/lib/cell.rb +2 -11
- data/lib/cell/builder.rb +16 -0
- data/lib/cell/collection.rb +54 -0
- data/lib/cell/concept.rb +6 -7
- data/lib/cell/escaped.rb +1 -0
- data/lib/cell/layout.rb +50 -14
- data/lib/cell/testing.rb +6 -5
- data/lib/cell/util.rb +10 -1
- data/lib/cell/version.rb +1 -1
- data/lib/cell/view_model.rb +27 -56
- data/lib/cells.rb +1 -1
- data/test/builder_test.rb +4 -2
- data/test/cell_test.rb +9 -2
- data/test/concept_test.rb +9 -16
- data/test/context_test.rb +33 -0
- data/test/fixtures/cell_test/song/show_with_block.erb +1 -0
- data/test/fixtures/comment/layout/show.erb +1 -0
- data/test/fixtures/comment/show/show.erb +1 -0
- data/test/fixtures/song/with_block.erb +1 -0
- data/test/layout_test.rb +34 -1
- data/test/prefixes_test.rb +3 -3
- data/test/public_test.rb +43 -9
- data/test/render_test.rb +7 -3
- data/test/test_helper.rb +2 -38
- data/test/{test_case_test.rb → testing_test.rb} +2 -2
- metadata +16 -159
- data/gemfiles/rails3.2.gemfile +0 -16
- data/gemfiles/rails4.0.gemfile +0 -12
- data/gemfiles/rails4.1.gemfile +0 -12
- data/gemfiles/rails4.2.gemfile +0 -10
- data/lib/cell/caching/notification.rb +0 -15
- data/lib/cell/rails.rb +0 -98
- data/lib/cell/railtie.rb +0 -69
- data/lib/cell/test_case.rb +0 -12
- data/lib/cell/translation.rb +0 -19
- data/lib/rails/generators/cell/cell_generator.rb +0 -43
- data/lib/rails/generators/cell/templates/cell.rb.erb +0 -8
- data/lib/rails/generators/cell/templates/view.erb +0 -7
- data/lib/rails/generators/cell/templates/view.haml +0 -4
- data/lib/rails/generators/cell/templates/view.slim +0 -2
- data/lib/rails/generators/concept/concept_generator.rb +0 -38
- data/lib/rails/generators/concept/templates/concept.rb.erb +0 -7
- data/lib/rails/generators/concept/templates/view.erb +0 -7
- data/lib/rails/generators/concept/templates/view.haml +0 -4
- data/lib/rails/generators/concept/templates/view.slim +0 -2
- data/lib/rails/generators/test_unit/cell/cell_generator.rb +0 -21
- data/lib/rails/generators/test_unit/cell/templates/unit_test.rb.erb +0 -11
- data/lib/rails/generators/test_unit/concept/concept_generator.rb +0 -21
- data/lib/rails/generators/test_unit/concept/templates/unit_test.rb.erb +0 -11
- data/test/caching_test.rb +0 -305
- data/test/cell_generator_test.rb +0 -90
- data/test/concept_generator_test.rb +0 -40
- data/test/dummy/Rakefile +0 -7
- data/test/dummy/app/assets/javascripts/application.js +0 -2
- data/test/dummy/app/cells/album/assets/album.js +0 -1
- data/test/dummy/app/concepts/song/assets/songs.js +0 -1
- data/test/dummy/app/controllers/application_controller.rb +0 -4
- data/test/dummy/app/views/layouts/application.html.erb +0 -14
- data/test/dummy/app/views/musician/featured.html.erb +0 -1
- data/test/dummy/app/views/musician/featured_with_block.html.erb +0 -4
- data/test/dummy/app/views/musician/hamlet.html.erb +0 -1
- data/test/dummy/app/views/musician/title.erb +0 -1
- data/test/dummy/config.ru +0 -4
- data/test/dummy/config/application.rb +0 -41
- data/test/dummy/config/boot.rb +0 -10
- data/test/dummy/config/database.yml +0 -22
- data/test/dummy/config/environment.rb +0 -5
- data/test/dummy/config/locales/en.yml +0 -5
- data/test/dummy/config/routes.rb +0 -5
- data/test/dummy/script/rails +0 -6
- data/test/rails/translation_test.rb +0 -45
- data/test/rails4.2/.gitignore +0 -13
- data/test/rails4.2/Gemfile +0 -18
- data/test/rails4.2/README.rdoc +0 -3
- data/test/rails4.2/Rakefile +0 -6
- data/test/rails4.2/app/assets/images/.keep +0 -0
- data/test/rails4.2/app/assets/stylesheets/application.css.erb +0 -19
- data/test/rails4.2/app/cells/form_for/show.erb +0 -7
- data/test/rails4.2/app/cells/form_for_cell.rb +0 -7
- data/test/rails4.2/app/cells/form_tag/show.erb +0 -5
- data/test/rails4.2/app/cells/form_tag_cell.rb +0 -5
- data/test/rails4.2/app/cells/formtastic/show.erb +0 -12
- data/test/rails4.2/app/cells/formtastic_cell.rb +0 -9
- data/test/rails4.2/app/cells/simple_form/show.erb +0 -7
- data/test/rails4.2/app/cells/simple_form_cell.rb +0 -11
- data/test/rails4.2/app/cells/song/song.css +0 -1
- data/test/rails4.2/app/cells/song/with_escaped.erb +0 -1
- data/test/rails4.2/app/cells/song_cell.rb +0 -18
- data/test/rails4.2/app/controllers/application_controller.rb +0 -5
- data/test/rails4.2/app/controllers/concerns/.keep +0 -0
- data/test/rails4.2/app/controllers/index_controller.rb +0 -7
- data/test/rails4.2/app/controllers/songs_controller.rb +0 -25
- data/test/rails4.2/app/helpers/application_helper.rb +0 -2
- data/test/rails4.2/app/mailers/.keep +0 -0
- data/test/rails4.2/app/models/.keep +0 -0
- data/test/rails4.2/app/models/artist.rb +0 -25
- data/test/rails4.2/app/models/concerns/.keep +0 -0
- data/test/rails4.2/app/models/song.rb +0 -25
- data/test/rails4.2/app/views/index/index.html.erb +0 -6
- data/test/rails4.2/app/views/layouts/application.html.erb +0 -13
- data/test/rails4.2/app/views/songs/show.html.erb +0 -1
- data/test/rails4.2/app/views/songs/with_escaped.html.erb +0 -1
- data/test/rails4.2/bin/bundle +0 -3
- data/test/rails4.2/bin/rails +0 -4
- data/test/rails4.2/bin/rake +0 -4
- data/test/rails4.2/bin/setup +0 -29
- data/test/rails4.2/config.ru +0 -4
- data/test/rails4.2/config/application.rb +0 -38
- data/test/rails4.2/config/boot.rb +0 -3
- data/test/rails4.2/config/environment.rb +0 -5
- data/test/rails4.2/config/environments/development.rb +0 -25
- data/test/rails4.2/config/environments/production.rb +0 -64
- data/test/rails4.2/config/environments/test.rb +0 -42
- data/test/rails4.2/config/initializers/backtrace_silencers.rb +0 -7
- data/test/rails4.2/config/initializers/cookies_serializer.rb +0 -3
- data/test/rails4.2/config/initializers/filter_parameter_logging.rb +0 -4
- data/test/rails4.2/config/initializers/formtastic.rb +0 -2
- data/test/rails4.2/config/initializers/inflections.rb +0 -16
- data/test/rails4.2/config/initializers/mime_types.rb +0 -4
- data/test/rails4.2/config/initializers/session_store.rb +0 -3
- data/test/rails4.2/config/initializers/wrap_parameters.rb +0 -9
- data/test/rails4.2/config/locales/en.yml +0 -23
- data/test/rails4.2/config/routes.rb +0 -9
- data/test/rails4.2/config/secrets.yml +0 -22
- data/test/rails4.2/db/seeds.rb +0 -7
- data/test/rails4.2/engines/my_engine/.gitignore +0 -3
- data/test/rails4.2/engines/my_engine/Gemfile +0 -15
- data/test/rails4.2/engines/my_engine/MIT-LICENSE +0 -20
- data/test/rails4.2/engines/my_engine/README.rdoc +0 -3
- data/test/rails4.2/engines/my_engine/Rakefile +0 -24
- data/test/rails4.2/engines/my_engine/app/assets/images/my_engine/.keep +0 -0
- data/test/rails4.2/engines/my_engine/app/assets/stylesheets/my_engine/application.css +0 -15
- data/test/rails4.2/engines/my_engine/app/concepts/user/cell.rb +0 -8
- data/test/rails4.2/engines/my_engine/app/concepts/user/views/show.erb +0 -1
- data/test/rails4.2/engines/my_engine/app/concepts/user/views/user.scss +0 -3
- data/test/rails4.2/engines/my_engine/app/controllers/my_engine/application_controller.rb +0 -4
- data/test/rails4.2/engines/my_engine/app/controllers/my_engine/user_controller.rb +0 -7
- data/test/rails4.2/engines/my_engine/app/helpers/my_engine/application_helper.rb +0 -4
- data/test/rails4.2/engines/my_engine/app/models/my_engine/user.rb +0 -4
- data/test/rails4.2/engines/my_engine/app/views/layouts/my_engine/application.html.erb +0 -14
- data/test/rails4.2/engines/my_engine/app/views/my_engine/user/show.html.erb +0 -3
- data/test/rails4.2/engines/my_engine/bin/rails +0 -12
- data/test/rails4.2/engines/my_engine/config/routes.rb +0 -3
- data/test/rails4.2/engines/my_engine/db/migrate/20150530135920_create_my_engine_users.rb +0 -8
- data/test/rails4.2/engines/my_engine/lib/my_engine.rb +0 -6
- data/test/rails4.2/engines/my_engine/lib/my_engine/engine.rb +0 -9
- data/test/rails4.2/engines/my_engine/lib/my_engine/version.rb +0 -3
- data/test/rails4.2/engines/my_engine/lib/tasks/my_engine_tasks.rake +0 -4
- data/test/rails4.2/engines/my_engine/my_engine.gemspec +0 -24
- data/test/rails4.2/engines/my_engine/test/fixtures/my_engine/users.yml +0 -11
- data/test/rails4.2/engines/my_engine/test/models/my_engine/user_test.rb +0 -9
- data/test/rails4.2/lib/assets/.keep +0 -0
- data/test/rails4.2/lib/tasks/.keep +0 -0
- data/test/rails4.2/log/.keep +0 -0
- data/test/rails4.2/test/integration/asset_pipeline_test.rb +0 -17
- data/test/rails4.2/test/integration/controller_test.rb +0 -16
- data/test/rails4.2/test/integration/form_for_test.rb +0 -10
- data/test/rails4.2/test/integration/form_tag_test.rb +0 -11
- data/test/rails4.2/test/integration/formtastic_test.rb +0 -12
- data/test/rails4.2/test/integration/simple_form_test.rb +0 -11
- data/test/rails4.2/test/integration/url_helper_test.rb +0 -47
- data/test/rails4.2/test/test_helper.rb +0 -14
- data/test/rails4.2/vendor/assets/stylesheets/.keep +0 -0
- data/test/rails_extensions_test.rb +0 -51
File without changes
|
@@ -1,25 +0,0 @@
|
|
1
|
-
class Song < OpenStruct
|
2
|
-
require "active_model"
|
3
|
-
include ActiveModel::Conversion
|
4
|
-
extend ActiveModel::Naming
|
5
|
-
|
6
|
-
def persisted?
|
7
|
-
true
|
8
|
-
end
|
9
|
-
|
10
|
-
def parents
|
11
|
-
[]
|
12
|
-
end
|
13
|
-
|
14
|
-
def name
|
15
|
-
"song"
|
16
|
-
end
|
17
|
-
|
18
|
-
def id
|
19
|
-
1
|
20
|
-
end
|
21
|
-
|
22
|
-
def artist
|
23
|
-
Artist.new
|
24
|
-
end
|
25
|
-
end
|
@@ -1 +0,0 @@
|
|
1
|
-
<%= cell(:form_for) %>
|
@@ -1 +0,0 @@
|
|
1
|
-
<h1>Yeah!</h1><%= cell(:song, Song.new(title: "<script>")).(:with_escaped) %>
|
data/test/rails4.2/bin/bundle
DELETED
data/test/rails4.2/bin/rails
DELETED
data/test/rails4.2/bin/rake
DELETED
data/test/rails4.2/bin/setup
DELETED
@@ -1,29 +0,0 @@
|
|
1
|
-
#!/usr/bin/env ruby
|
2
|
-
require 'pathname'
|
3
|
-
|
4
|
-
# path to your application root.
|
5
|
-
APP_ROOT = Pathname.new File.expand_path('../../', __FILE__)
|
6
|
-
|
7
|
-
Dir.chdir APP_ROOT do
|
8
|
-
# This script is a starting point to setup your application.
|
9
|
-
# Add necessary setup steps to this file:
|
10
|
-
|
11
|
-
puts "== Installing dependencies =="
|
12
|
-
system "gem install bundler --conservative"
|
13
|
-
system "bundle check || bundle install"
|
14
|
-
|
15
|
-
# puts "\n== Copying sample files =="
|
16
|
-
# unless File.exist?("config/database.yml")
|
17
|
-
# system "cp config/database.yml.sample config/database.yml"
|
18
|
-
# end
|
19
|
-
|
20
|
-
puts "\n== Preparing database =="
|
21
|
-
system "bin/rake db:setup"
|
22
|
-
|
23
|
-
puts "\n== Removing old logs and tempfiles =="
|
24
|
-
system "rm -f log/*"
|
25
|
-
system "rm -rf tmp/cache"
|
26
|
-
|
27
|
-
puts "\n== Restarting application server =="
|
28
|
-
system "touch tmp/restart.txt"
|
29
|
-
end
|
data/test/rails4.2/config.ru
DELETED
@@ -1,38 +0,0 @@
|
|
1
|
-
require File.expand_path('../boot', __FILE__)
|
2
|
-
|
3
|
-
require "rails"
|
4
|
-
# Pick the frameworks you want:
|
5
|
-
require "active_model/railtie"
|
6
|
-
require "active_job/railtie"
|
7
|
-
# require "active_record/railtie"
|
8
|
-
require "action_controller/railtie"
|
9
|
-
require "action_mailer/railtie"
|
10
|
-
require "action_view/railtie"
|
11
|
-
require "sprockets/railtie"
|
12
|
-
require "rails/test_unit/railtie"
|
13
|
-
|
14
|
-
# Require the gems listed in Gemfile, including any gems
|
15
|
-
# you've limited to :test, :development, or :production.
|
16
|
-
Bundler.require(*Rails.groups)
|
17
|
-
|
18
|
-
module EngineCells
|
19
|
-
class Application < Rails::Application
|
20
|
-
# Settings in config/environments/* take precedence over those specified here.
|
21
|
-
# Application configuration should go into files in config/initializers
|
22
|
-
# -- all .rb files in that directory are automatically loaded.
|
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
|
-
# enable asset pipeline as in development/test.
|
33
|
-
config.assets.enabled = true
|
34
|
-
config.assets.compile = true
|
35
|
-
|
36
|
-
config.cells.with_assets = ["user/cell", "song_cell"]
|
37
|
-
end
|
38
|
-
end
|
@@ -1,25 +0,0 @@
|
|
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 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
|
-
|
23
|
-
# Raises error for missing translations
|
24
|
-
# config.action_view.raise_on_missing_translations = true
|
25
|
-
end
|
@@ -1,64 +0,0 @@
|
|
1
|
-
Rails.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
|
-
# Eager load code on boot. This eager loads most of Rails and
|
8
|
-
# your application in memory, allowing both threaded web servers
|
9
|
-
# and those relying on copy on write to perform better.
|
10
|
-
# Rake tasks automatically ignore this option for performance.
|
11
|
-
config.eager_load = true
|
12
|
-
|
13
|
-
# Full error reports are disabled and caching is turned on.
|
14
|
-
config.consider_all_requests_local = false
|
15
|
-
config.action_controller.perform_caching = true
|
16
|
-
|
17
|
-
# Enable Rack::Cache to put a simple HTTP cache in front of your application
|
18
|
-
# Add `rack-cache` to your Gemfile before enabling this.
|
19
|
-
# For large-scale production use, consider using a caching reverse proxy like
|
20
|
-
# NGINX, varnish or squid.
|
21
|
-
# config.action_dispatch.rack_cache = true
|
22
|
-
|
23
|
-
# Disable serving static files from the `/public` folder by default since
|
24
|
-
# Apache or NGINX already handles this.
|
25
|
-
config.serve_static_files = ENV['RAILS_SERVE_STATIC_FILES'].present?
|
26
|
-
|
27
|
-
|
28
|
-
# Specifies the header that your server uses for sending files.
|
29
|
-
# config.action_dispatch.x_sendfile_header = 'X-Sendfile' # for Apache
|
30
|
-
# config.action_dispatch.x_sendfile_header = 'X-Accel-Redirect' # for NGINX
|
31
|
-
|
32
|
-
# Force all access to the app over SSL, use Strict-Transport-Security, and use secure cookies.
|
33
|
-
# config.force_ssl = true
|
34
|
-
|
35
|
-
# Use the lowest log level to ensure availability of diagnostic information
|
36
|
-
# when problems arise.
|
37
|
-
config.log_level = :debug
|
38
|
-
|
39
|
-
# Prepend all log lines with the following tags.
|
40
|
-
# config.log_tags = [ :subdomain, :uuid ]
|
41
|
-
|
42
|
-
# Use a different logger for distributed setups.
|
43
|
-
# config.logger = ActiveSupport::TaggedLogging.new(SyslogLogger.new)
|
44
|
-
|
45
|
-
# Use a different cache store in production.
|
46
|
-
# config.cache_store = :mem_cache_store
|
47
|
-
|
48
|
-
# Enable serving of images, stylesheets, and JavaScripts from an asset server.
|
49
|
-
# config.action_controller.asset_host = 'http://assets.example.com'
|
50
|
-
|
51
|
-
# Ignore bad email addresses and do not raise email delivery errors.
|
52
|
-
# Set this to true and configure the email server for immediate delivery to raise delivery errors.
|
53
|
-
# config.action_mailer.raise_delivery_errors = false
|
54
|
-
|
55
|
-
# Enable locale fallbacks for I18n (makes lookups for any locale fall back to
|
56
|
-
# the I18n.default_locale when a translation cannot be found).
|
57
|
-
config.i18n.fallbacks = true
|
58
|
-
|
59
|
-
# Send deprecation notices to registered listeners.
|
60
|
-
config.active_support.deprecation = :notify
|
61
|
-
|
62
|
-
# Use default logging formatter so that PID and timestamp are not suppressed.
|
63
|
-
config.log_formatter = ::Logger::Formatter.new
|
64
|
-
end
|
@@ -1,42 +0,0 @@
|
|
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 static file server for tests with Cache-Control for performance.
|
16
|
-
config.serve_static_files = true
|
17
|
-
config.static_cache_control = 'public, max-age=3600'
|
18
|
-
|
19
|
-
# Show full error reports and disable caching.
|
20
|
-
config.consider_all_requests_local = true
|
21
|
-
config.action_controller.perform_caching = false
|
22
|
-
|
23
|
-
# Raise exceptions instead of rendering exception templates.
|
24
|
-
config.action_dispatch.show_exceptions = false
|
25
|
-
|
26
|
-
# Disable request forgery protection in test environment.
|
27
|
-
config.action_controller.allow_forgery_protection = false
|
28
|
-
|
29
|
-
# Tell Action Mailer not to deliver emails to the real world.
|
30
|
-
# The :test delivery method accumulates sent emails in the
|
31
|
-
# ActionMailer::Base.deliveries array.
|
32
|
-
config.action_mailer.delivery_method = :test
|
33
|
-
|
34
|
-
# Randomize the order test cases are executed.
|
35
|
-
config.active_support.test_order = :random
|
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
|
@@ -1,7 +0,0 @@
|
|
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!
|
@@ -1,16 +0,0 @@
|
|
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
|
@@ -1,9 +0,0 @@
|
|
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] if respond_to?(:wrap_parameters)
|
9
|
-
end
|
@@ -1,23 +0,0 @@
|
|
1
|
-
# Files in the config/locales directory are used for internationalization
|
2
|
-
# and are automatically loaded by Rails. If you want to use locales other
|
3
|
-
# than English, add the necessary files in this directory.
|
4
|
-
#
|
5
|
-
# To use the locales, use `I18n.t`:
|
6
|
-
#
|
7
|
-
# I18n.t 'hello'
|
8
|
-
#
|
9
|
-
# In views, this is aliased to just `t`:
|
10
|
-
#
|
11
|
-
# <%= t('hello') %>
|
12
|
-
#
|
13
|
-
# To use a different locale, set it with `I18n.locale`:
|
14
|
-
#
|
15
|
-
# I18n.locale = :es
|
16
|
-
#
|
17
|
-
# This would use the information in config/locales/es.yml.
|
18
|
-
#
|
19
|
-
# To learn more, please read the Rails Internationalization guide
|
20
|
-
# available at http://guides.rubyonrails.org/i18n.html.
|
21
|
-
|
22
|
-
en:
|
23
|
-
hello: "Hello world"
|
@@ -1,22 +0,0 @@
|
|
1
|
-
# Be sure to restart your server when you modify this file.
|
2
|
-
|
3
|
-
# Your secret key is used for verifying the integrity of signed cookies.
|
4
|
-
# If you change this key, all old signed cookies will become invalid!
|
5
|
-
|
6
|
-
# Make sure the secret is at least 30 characters and all random,
|
7
|
-
# no regular words or you'll be exposed to dictionary attacks.
|
8
|
-
# You can use `rake secret` to generate a secure secret key.
|
9
|
-
|
10
|
-
# Make sure the secrets in this file are kept private
|
11
|
-
# if you're sharing your code publicly.
|
12
|
-
|
13
|
-
development:
|
14
|
-
secret_key_base: 0ff2fd9cbf01493f9bc5368f102cfd66e9a69b5fbbdd3c308afccef6de2f7c834cc19618d305f223a1e01a5fbf98d4d41c9017214efe9fa3832282eaca032c7f
|
15
|
-
|
16
|
-
test:
|
17
|
-
secret_key_base: 8c3a9dbc139ed27c32022254d832f53a3d4d3e545003be31cd5bbc3b81b5ff0a8a6d9b9f6aab6ca206aff92a7ccc6f32354d3c9cf77b4708e1c4778a6d5920a4
|
18
|
-
|
19
|
-
# Do not keep production secrets in the repository,
|
20
|
-
# instead read values from the environment.
|
21
|
-
production:
|
22
|
-
secret_key_base: <%= ENV["SECRET_KEY_BASE"] %>
|
data/test/rails4.2/db/seeds.rb
DELETED
@@ -1,7 +0,0 @@
|
|
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)
|
@@ -1,15 +0,0 @@
|
|
1
|
-
source 'https://rubygems.org'
|
2
|
-
|
3
|
-
# Declare your gem's dependencies in my_engine.gemspec.
|
4
|
-
# Bundler will treat runtime dependencies like base dependencies, and
|
5
|
-
# development dependencies will be added by default to the :development group.
|
6
|
-
gemspec
|
7
|
-
|
8
|
-
# Declare any dependencies that are still in development here instead of in
|
9
|
-
# your gemspec. These might include edge Rails or gems from your path or
|
10
|
-
# Git. Remember to move these dependencies to your gemspec before releasing
|
11
|
-
# your gem to rubygems.org.
|
12
|
-
|
13
|
-
# To use a debugger
|
14
|
-
# gem 'byebug', group: [:development, :test]
|
15
|
-
|