- <%= link_to destroy_user_session_path, :method => :delete do %>
- Se déconnecter
- <% end %>
-
-<% end %>
\ No newline at end of file
diff --git a/app/views/home/index.html.erb b/app/views/home/index.html.erb
deleted file mode 100644
index fbaec91..0000000
--- a/app/views/home/index.html.erb
+++ /dev/null
@@ -1,5 +0,0 @@
-
Currently waiting confirmation for: <%= resource.unconfirmed_email %>
- <% end %>
-
- <%= f.input :password, autocomplete: "off", hint: "leave it blank if you don't want to change it", required: false %>
- <%= f.input :password_confirmation, required: false %>
- <%= f.input :current_password, hint: "we need your current password to confirm your changes", required: true %>
-
-
-
- <%= f.button :submit, "Update" %>
-
-<% end %>
-
-
Cancel my account
-
-
Unhappy? <%= link_to "Cancel my account", registration_path(resource_name), data: { confirm: "Are you sure?" }, method: :delete %>
-<% end %>
-
-<%= render "users/shared/links" %>
diff --git a/bin/rails b/bin/rails
index 0138d79..5badb2f 100755
--- a/bin/rails
+++ b/bin/rails
@@ -4,6 +4,6 @@ begin
rescue LoadError => e
raise unless e.message.include?('spring')
end
-APP_PATH = File.expand_path('../../config/application', __FILE__)
+APP_PATH = File.expand_path('../config/application', __dir__)
require_relative '../config/boot'
require 'rails/commands'
diff --git a/bin/setup b/bin/setup
index acdb2c1..e620b4d 100755
--- a/bin/setup
+++ b/bin/setup
@@ -1,29 +1,34 @@
#!/usr/bin/env ruby
require 'pathname'
+require 'fileutils'
+include FileUtils
# path to your application root.
-APP_ROOT = Pathname.new File.expand_path('../../', __FILE__)
+APP_ROOT = Pathname.new File.expand_path('../../', __FILE__)
-Dir.chdir APP_ROOT do
+def system!(*args)
+ system(*args) || abort("\n== Command #{args} failed ==")
+end
+
+chdir APP_ROOT do
# This script is a starting point to setup your application.
- # Add necessary setup steps to this file:
+ # Add necessary setup steps to this file.
- puts "== Installing dependencies =="
- system "gem install bundler --conservative"
- system "bundle check || bundle install"
+ puts '== Installing dependencies =='
+ system! 'gem install bundler --conservative'
+ system('bundle check') || system!('bundle install')
# puts "\n== Copying sample files =="
- # unless File.exist?("config/database.yml")
- # system "cp config/database.yml.sample config/database.yml"
+ # unless File.exist?('config/database.yml')
+ # cp 'config/database.yml.sample', 'config/database.yml'
# end
puts "\n== Preparing database =="
- system "bin/rake db:setup"
+ system! 'bin/rails db:setup'
puts "\n== Removing old logs and tempfiles =="
- system "rm -f log/*"
- system "rm -rf tmp/cache"
+ system! 'bin/rails log:clear tmp:clear'
puts "\n== Restarting application server =="
- system "touch tmp/restart.txt"
+ system! 'bin/rails restart'
end
diff --git a/bin/spring b/bin/spring
index 7fe232c..9bc076b 100755
--- a/bin/spring
+++ b/bin/spring
@@ -7,9 +7,10 @@ unless defined?(Spring)
require 'rubygems'
require 'bundler'
- if (match = Bundler.default_lockfile.read.match(/^GEM$.*?^ (?: )*spring \((.*?)\)$.*?^$/m))
- Gem.paths = { 'GEM_PATH' => [Bundler.bundle_path.to_s, *Gem.path].uniq.join(Gem.path_separator) }
- gem 'spring', match[1]
+ lockfile = Bundler::LockfileParser.new(Bundler.default_lockfile.read)
+ if spring = lockfile.specs.detect { |spec| spec.name == "spring" }
+ Gem.use_paths Gem.dir, Bundler.bundle_path.to_s, *Gem.path
+ gem 'spring', spring.version
require 'spring/binstub'
end
end
diff --git a/bin/update b/bin/update
new file mode 100755
index 0000000..a8e4462
--- /dev/null
+++ b/bin/update
@@ -0,0 +1,29 @@
+#!/usr/bin/env ruby
+require 'pathname'
+require 'fileutils'
+include FileUtils
+
+# path to your application root.
+APP_ROOT = Pathname.new File.expand_path('../../', __FILE__)
+
+def system!(*args)
+ system(*args) || abort("\n== Command #{args} failed ==")
+end
+
+chdir APP_ROOT do
+ # This script is a way to update your development environment automatically.
+ # Add necessary update steps to this file.
+
+ puts '== Installing dependencies =='
+ system! 'gem install bundler --conservative'
+ system('bundle check') || system!('bundle install')
+
+ puts "\n== Updating database =="
+ system! 'bin/rails db:migrate'
+
+ puts "\n== Removing old logs and tempfiles =="
+ system! 'bin/rails log:clear tmp:clear'
+
+ puts "\n== Restarting application server =="
+ system! 'bin/rails restart'
+end
diff --git a/config.ru b/config.ru
index 253d04d..f7ba0b5 100644
--- a/config.ru
+++ b/config.ru
@@ -1,2 +1,5 @@
-require ::File.expand_path('../config/environment', __FILE__)
+# This file is used by Rack-based servers to start the application.
+
+require_relative 'config/environment'
+
run Rails.application
diff --git a/config/application.rb b/config/application.rb
index 59cefb2..6b7e8e1 100644
--- a/config/application.rb
+++ b/config/application.rb
@@ -1,16 +1,6 @@
-require File.expand_path('../boot', __FILE__)
+require_relative 'boot'
-require "rails"
-# Pick the frameworks you want:
-require "active_model/railtie"
-require "active_job/railtie"
-require "active_record/railtie"
-require "action_controller/railtie"
-require "action_mailer/railtie"
-require "action_view/railtie"
-require "sprockets/railtie"
-
-# require "rails/test_unit/railtie"
+require 'rails/all'
# Require the gems listed in Gemfile, including any gems
# you've limited to :test, :development, or :production.
@@ -23,22 +13,12 @@ class Application < Rails::Application
# Settings in config/environments/* take precedence over those specified here.
# Application configuration should go into files in config/initializers
# -- all .rb files in that directory are automatically loaded.
+ config.i18n.default_locale = :en
- # Set Time.zone default to the specified zone and make Active Record auto-convert to this zone.
- # Run "rake -D time" for a list of tasks for finding time zone names. Default is UTC.
- # config.time_zone = 'Central Time (US & Canada)'
-
- # The default locale is :en and all translations from config/locales/*.rb,yml are auto loaded.
- # config.i18n.load_path += Dir[Rails.root.join('my', 'locales', '*.{rb,yml}').to_s]
- config.i18n.default_locale = :fr
-
- # Do not swallow errors in after_commit/after_rollback callbacks.
- config.active_record.raise_in_transactional_callbacks = true
-
config.assets.paths << Rails.root.join('vendor', 'assets', 'images')
config.to_prepare do
- Devise::SessionsController.layout "devise"
+ Devise::SessionsController.layout 'devise'
end
end
end
diff --git a/config/boot.rb b/config/boot.rb
index 6b750f0..30f5120 100644
--- a/config/boot.rb
+++ b/config/boot.rb
@@ -1,3 +1,3 @@
-ENV['BUNDLE_GEMFILE'] ||= File.expand_path('../../Gemfile', __FILE__)
+ENV['BUNDLE_GEMFILE'] ||= File.expand_path('../Gemfile', __dir__)
require 'bundler/setup' # Set up gems listed in the Gemfile.
diff --git a/config/cable.yml b/config/cable.yml
new file mode 100644
index 0000000..0bbde6f
--- /dev/null
+++ b/config/cable.yml
@@ -0,0 +1,9 @@
+development:
+ adapter: async
+
+test:
+ adapter: async
+
+production:
+ adapter: redis
+ url: redis://localhost:6379/1
diff --git a/config/database.yml b/config/database.yml
index 2d80564..1c1a37c 100644
--- a/config/database.yml
+++ b/config/database.yml
@@ -22,10 +22,4 @@ test:
production:
<<: *default
- adapter: postgresql
- encoding: unicode
- host: <%= ENV["DATABASE_HOST"] %>
- database: <%= ENV["DATABASE_NAME"] %>
- pool: 5
- username: <%= ENV["DATABASE_USERNAME"] %>
- password: <%= ENV["DATABASE_PASSWORD"] %>
+ database: db/production.sqlite3
diff --git a/config/deploy.rb b/config/deploy.rb
new file mode 100644
index 0000000..ccbf53f
--- /dev/null
+++ b/config/deploy.rb
@@ -0,0 +1,43 @@
+# config valid only for current version of Capistrano
+lock '3.6.1'
+
+set :application, 'my_app_name'
+set :repo_url, 'git@example.com:me/my_repo.git'
+set :deploy_to, '/home/project/www'
+
+append :linked_files, 'config/database.yml', 'config/secrets.yml'
+set :linked_dirs, %w(bin log tmp/pids tmp/cache tmp/sockets vendor/bundle public/system public/uploads)
+
+set :keep_releases, 1
+after 'deploy:publishing', 'passenger:restart'
+
+# Default branch is :master
+# ask :branch, `git rev-parse --abbrev-ref HEAD`.chomp
+
+# Default deploy_to directory is /var/www/my_app_name
+# set :deploy_to, '/var/www/my_app_name'
+
+# Default value for :scm is :git
+# set :scm, :git
+
+# Default value for :format is :airbrussh.
+# set :format, :airbrussh
+
+# You can configure the Airbrussh format using :format_options.
+# These are the defaults.
+# set :format_options, command_output: true, log_file: 'log/capistrano.log', color: :auto, truncate: :auto
+
+# Default value for :pty is false
+# set :pty, true
+
+# Default value for :linked_files is []
+# append :linked_files, 'config/database.yml', 'config/secrets.yml'
+
+# Default value for linked_dirs is []
+# append :linked_dirs, 'log', 'tmp/pids', 'tmp/cache', 'tmp/sockets', 'public/system'
+
+# Default value for default_env is {}
+# set :default_env, { path: "/opt/ruby/bin:$PATH" }
+
+# Default value for keep_releases is 5
+# set :keep_releases, 5
diff --git a/config/deploy/production.rb b/config/deploy/production.rb
new file mode 100644
index 0000000..4fc06fa
--- /dev/null
+++ b/config/deploy/production.rb
@@ -0,0 +1,61 @@
+# server-based syntax
+# ======================
+# Defines a single server with a list of roles and multiple properties.
+# You can define all roles on a single server, or split them:
+
+# server 'example.com', user: 'deploy', roles: %w{app db web}, my_property: :my_value
+# server 'example.com', user: 'deploy', roles: %w{app web}, other_property: :other_value
+# server 'db.example.com', user: 'deploy', roles: %w{db}
+
+
+
+# role-based syntax
+# ==================
+
+# Defines a role with one or multiple servers. The primary server in each
+# group is considered to be the first unless any hosts have the primary
+# property set. Specify the username and a domain or IP for the server.
+# Don't use `:all`, it's a meta role.
+
+# role :app, %w{deploy@example.com}, my_property: :my_value
+# role :web, %w{user1@primary.com user2@additional.com}, other_property: :other_value
+# role :db, %w{deploy@example.com}
+
+
+
+# Configuration
+# =============
+# You can set any configuration variable like in config/deploy.rb
+# These variables are then only loaded and set in this stage.
+# For available Capistrano configuration variables see the documentation page.
+# http://capistranorb.com/documentation/getting-started/configuration/
+# Feel free to add new variables to customise your setup.
+
+
+
+# Custom SSH Options
+# ==================
+# You may pass any option but keep in mind that net/ssh understands a
+# limited set of options, consult the Net::SSH documentation.
+# http://net-ssh.github.io/net-ssh/classes/Net/SSH.html#method-c-start
+#
+# Global options
+# --------------
+# set :ssh_options, {
+# keys: %w(/home/rlisowski/.ssh/id_rsa),
+# forward_agent: false,
+# auth_methods: %w(password)
+# }
+#
+# The server-based syntax can be used to override options:
+# ------------------------------------
+# server 'example.com',
+# user: 'user_name',
+# roles: %w{web app},
+# ssh_options: {
+# user: 'user_name', # overrides user setting above
+# keys: %w(/home/user_name/.ssh/id_rsa),
+# forward_agent: false,
+# auth_methods: %w(publickey password)
+# # password: 'please use keys'
+# }
diff --git a/config/deploy/staging.rb b/config/deploy/staging.rb
new file mode 100644
index 0000000..4fc06fa
--- /dev/null
+++ b/config/deploy/staging.rb
@@ -0,0 +1,61 @@
+# server-based syntax
+# ======================
+# Defines a single server with a list of roles and multiple properties.
+# You can define all roles on a single server, or split them:
+
+# server 'example.com', user: 'deploy', roles: %w{app db web}, my_property: :my_value
+# server 'example.com', user: 'deploy', roles: %w{app web}, other_property: :other_value
+# server 'db.example.com', user: 'deploy', roles: %w{db}
+
+
+
+# role-based syntax
+# ==================
+
+# Defines a role with one or multiple servers. The primary server in each
+# group is considered to be the first unless any hosts have the primary
+# property set. Specify the username and a domain or IP for the server.
+# Don't use `:all`, it's a meta role.
+
+# role :app, %w{deploy@example.com}, my_property: :my_value
+# role :web, %w{user1@primary.com user2@additional.com}, other_property: :other_value
+# role :db, %w{deploy@example.com}
+
+
+
+# Configuration
+# =============
+# You can set any configuration variable like in config/deploy.rb
+# These variables are then only loaded and set in this stage.
+# For available Capistrano configuration variables see the documentation page.
+# http://capistranorb.com/documentation/getting-started/configuration/
+# Feel free to add new variables to customise your setup.
+
+
+
+# Custom SSH Options
+# ==================
+# You may pass any option but keep in mind that net/ssh understands a
+# limited set of options, consult the Net::SSH documentation.
+# http://net-ssh.github.io/net-ssh/classes/Net/SSH.html#method-c-start
+#
+# Global options
+# --------------
+# set :ssh_options, {
+# keys: %w(/home/rlisowski/.ssh/id_rsa),
+# forward_agent: false,
+# auth_methods: %w(password)
+# }
+#
+# The server-based syntax can be used to override options:
+# ------------------------------------
+# server 'example.com',
+# user: 'user_name',
+# roles: %w{web app},
+# ssh_options: {
+# user: 'user_name', # overrides user setting above
+# keys: %w(/home/user_name/.ssh/id_rsa),
+# forward_agent: false,
+# auth_methods: %w(publickey password)
+# # password: 'please use keys'
+# }
diff --git a/config/environment.rb b/config/environment.rb
index 9c98239..426333b 100644
--- a/config/environment.rb
+++ b/config/environment.rb
@@ -1,7 +1,5 @@
# Load the Rails application.
-require File.expand_path('../application', __FILE__)
+require_relative 'application'
# Initialize the Rails application.
Rails.application.initialize!
-
-require 'carrierwave/orm/activerecord'
diff --git a/config/environments/development.rb b/config/environments/development.rb
index 8c1d8f1..e7a87b8 100644
--- a/config/environments/development.rb
+++ b/config/environments/development.rb
@@ -9,13 +9,28 @@
# Do not eager load code on boot.
config.eager_load = false
- # Show full error reports and disable caching.
- config.consider_all_requests_local = true
- config.action_controller.perform_caching = false
+ # Show full error reports.
+ config.consider_all_requests_local = true
+
+ # Enable/disable caching. By default caching is disabled.
+ if Rails.root.join('tmp/caching-dev.txt').exist?
+ config.action_controller.perform_caching = true
+
+ config.cache_store = :memory_store
+ config.public_file_server.headers = {
+ 'Cache-Control' => 'public, max-age=172800'
+ }
+ else
+ config.action_controller.perform_caching = false
+
+ config.cache_store = :null_store
+ end
# Don't care if the mailer can't send.
config.action_mailer.raise_delivery_errors = false
+ config.action_mailer.perform_caching = false
+
# Print deprecation notices to the Rails logger.
config.active_support.deprecation = :log
@@ -27,22 +42,20 @@
# number of complex assets.
config.assets.debug = true
- # Asset digests allow you to set far-future HTTP expiration dates on all assets,
- # yet still be able to expire them through the digest params.
- config.assets.digest = true
-
- # Adds additional error checking when serving assets at runtime.
- # Checks for improperly declared sprockets dependencies.
- # Raises helpful error messages.
- config.assets.raise_runtime_errors = true
+ # Suppress logger output for asset requests.
+ config.assets.quiet = true
# Raises error for missing translations
# config.action_view.raise_on_missing_translations = true
+ # Use an evented file watcher to asynchronously detect changes in source code,
+ # routes, locales, etc. This feature depends on the listen gem.
+ config.file_watcher = ActiveSupport::EventedFileUpdateChecker
+
# Devise
- config.action_mailer.default_url_options = { host: 'localhost', port: 3000 }
-
+ config.action_mailer.default_url_options = {host: 'localhost', port: 3000}
+
# Mailcatcher
config.action_mailer.delivery_method = :smtp
- config.action_mailer.smtp_settings = { :address => "localhost", :port => 1025 }
+ config.action_mailer.smtp_settings = {address: 'localhost', port: 1025}
end
diff --git a/config/environments/production.rb b/config/environments/production.rb
index b17f780..309d626 100644
--- a/config/environments/production.rb
+++ b/config/environments/production.rb
@@ -14,15 +14,9 @@
config.consider_all_requests_local = false
config.action_controller.perform_caching = true
- # Enable Rack::Cache to put a simple HTTP cache in front of your application
- # Add `rack-cache` to your Gemfile before enabling this.
- # For large-scale production use, consider using a caching reverse proxy like
- # NGINX, varnish or squid.
- # config.action_dispatch.rack_cache = true
-
# Disable serving static files from the `/public` folder by default since
# Apache or NGINX already handles this.
- config.serve_static_files = ENV['RAILS_SERVE_STATIC_FILES'].present?
+ config.public_file_server.enabled = ENV['RAILS_SERVE_STATIC_FILES'].present?
# Compress JavaScripts and CSS.
config.assets.js_compressor = :uglifier
@@ -31,16 +25,20 @@
# Do not fallback to assets pipeline if a precompiled asset is missed.
config.assets.compile = false
- # Asset digests allow you to set far-future HTTP expiration dates on all assets,
- # yet still be able to expire them through the digest params.
- config.assets.digest = true
-
# `config.assets.precompile` and `config.assets.version` have moved to config/initializers/assets.rb
+ # Enable serving of images, stylesheets, and JavaScripts from an asset server.
+ # config.action_controller.asset_host = 'http://assets.example.com'
+
# Specifies the header that your server uses for sending files.
# config.action_dispatch.x_sendfile_header = 'X-Sendfile' # for Apache
# config.action_dispatch.x_sendfile_header = 'X-Accel-Redirect' # for NGINX
+ # Mount Action Cable outside main process or domain
+ # config.action_cable.mount_path = nil
+ # config.action_cable.url = 'wss://example.com/cable'
+ # config.action_cable.allowed_request_origins = [ 'http://example.com', /http:\/\/example.*/ ]
+
# Force all access to the app over SSL, use Strict-Transport-Security, and use secure cookies.
# config.force_ssl = true
@@ -49,16 +47,15 @@
config.log_level = :debug
# Prepend all log lines with the following tags.
- # config.log_tags = [ :subdomain, :uuid ]
-
- # Use a different logger for distributed setups.
- # config.logger = ActiveSupport::TaggedLogging.new(SyslogLogger.new)
+ config.log_tags = [ :request_id ]
# Use a different cache store in production.
# config.cache_store = :mem_cache_store
- # Enable serving of images, stylesheets, and JavaScripts from an asset server.
- # config.action_controller.asset_host = 'http://assets.example.com'
+ # Use a real queuing backend for Active Job (and separate queues per environment)
+ # config.active_job.queue_adapter = :resque
+ # config.active_job.queue_name_prefix = "rollinbox_#{Rails.env}"
+ config.action_mailer.perform_caching = false
# Ignore bad email addresses and do not raise email delivery errors.
# Set this to true and configure the email server for immediate delivery to raise delivery errors.
@@ -74,8 +71,16 @@
# Use default logging formatter so that PID and timestamp are not suppressed.
config.log_formatter = ::Logger::Formatter.new
+ # Use a different logger for distributed setups.
+ # require 'syslog/logger'
+ # config.logger = ActiveSupport::TaggedLogging.new(Syslog::Logger.new 'app-name')
+
+ if ENV["RAILS_LOG_TO_STDOUT"].present?
+ logger = ActiveSupport::Logger.new(STDOUT)
+ logger.formatter = config.log_formatter
+ config.logger = ActiveSupport::TaggedLogging.new(logger)
+ end
+
# Do not dump schema after migrations.
config.active_record.dump_schema_after_migration = false
-
- config.action_mailer.delivery_method = :sendmail
end
diff --git a/config/environments/test.rb b/config/environments/test.rb
index 1c19f08..30587ef 100644
--- a/config/environments/test.rb
+++ b/config/environments/test.rb
@@ -12,9 +12,11 @@
# preloads Rails for running tests, you may have to set it to true.
config.eager_load = false
- # Configure static file server for tests with Cache-Control for performance.
- config.serve_static_files = true
- config.static_cache_control = 'public, max-age=3600'
+ # Configure public file server for tests with Cache-Control for performance.
+ config.public_file_server.enabled = true
+ config.public_file_server.headers = {
+ 'Cache-Control' => 'public, max-age=3600'
+ }
# Show full error reports and disable caching.
config.consider_all_requests_local = true
@@ -25,15 +27,13 @@
# Disable request forgery protection in test environment.
config.action_controller.allow_forgery_protection = false
+ config.action_mailer.perform_caching = false
# Tell Action Mailer not to deliver emails to the real world.
# The :test delivery method accumulates sent emails in the
# ActionMailer::Base.deliveries array.
config.action_mailer.delivery_method = :test
- # Randomize the order test cases are executed.
- config.active_support.test_order = :random
-
# Print deprecation notices to the stderr.
config.active_support.deprecation = :stderr
diff --git a/config/initializers/application_controller_renderer.rb b/config/initializers/application_controller_renderer.rb
new file mode 100644
index 0000000..51639b6
--- /dev/null
+++ b/config/initializers/application_controller_renderer.rb
@@ -0,0 +1,6 @@
+# Be sure to restart your server when you modify this file.
+
+# ApplicationController.renderer.defaults.merge!(
+# http_host: 'example.org',
+# https: false
+# )
diff --git a/config/initializers/assets.rb b/config/initializers/assets.rb
index bc7abf6..3d74144 100644
--- a/config/initializers/assets.rb
+++ b/config/initializers/assets.rb
@@ -9,4 +9,5 @@
# Precompile additional assets.
# application.js, application.css, and all non-JS/CSS in app/assets folder are already added.
# Rails.application.config.assets.precompile += %w( search.js )
-Rails.application.config.assets.precompile += %w( ie.js )
+
+Rails.application.config.assets.precompile += %w(ie.js)
diff --git a/config/initializers/cookies_serializer.rb b/config/initializers/cookies_serializer.rb
index 7f70458..5a6a32d 100644
--- a/config/initializers/cookies_serializer.rb
+++ b/config/initializers/cookies_serializer.rb
@@ -1,3 +1,5 @@
# Be sure to restart your server when you modify this file.
+# Specify a serializer for the signed and encrypted cookie jars.
+# Valid options are :json, :marshal, and :hybrid.
Rails.application.config.action_dispatch.cookies_serializer = :json
diff --git a/config/initializers/devise.rb b/config/initializers/devise.rb
index 8de4202..3cf406e 100644
--- a/config/initializers/devise.rb
+++ b/config/initializers/devise.rb
@@ -4,9 +4,9 @@
# The secret key used by Devise. Devise uses this key to generate
# random tokens. Changing this key will render invalid all existing
# confirmation, reset password and unlock tokens in the database.
- # Devise will use the `secret_key_base` on Rails 4+ applications as its `secret_key`
+ # Devise will use the `secret_key_base` as its `secret_key`
# by default. You can change it below and use your own secret key.
- config.secret_key = '<%= ENV["SECRET_KEY_BASE"] %>'
+ # config.secret_key = '0503a48e545de2e433b8d3b77da0cc888cec5025a871bac08754e2b3789b7a1e267b3e7a6b63f101974c1cec726c104808b9b8db77e380a210524932675394f0'
# ==> Mailer Configuration
# Configure the e-mail address which will be shown in Devise::Mailer,
@@ -17,6 +17,9 @@
# Configure the class responsible to send e-mails.
# config.mailer = 'Devise::Mailer'
+ # Configure the parent class responsible to send e-mails.
+ # config.parent_mailer = 'ActionMailer::Base'
+
# ==> ORM configuration
# Load and configure the ORM. Supports :active_record (default) and
# :mongoid (bson_ext recommended) by default. Other ORMs may be
@@ -87,19 +90,25 @@
# from the server. You can disable this option at your own risk.
# config.clean_up_csrf_token_on_authentication = true
+ # When false, Devise will not attempt to reload routes on eager load.
+ # This can reduce the time taken to boot the app but if your application
+ # requires the Devise mappings to be loaded during boot time the application
+ # won't boot properly.
+ # config.reload_routes = true
+
# ==> Configuration for :database_authenticatable
- # For bcrypt, this is the cost for hashing the password and defaults to 10. If
- # using other encryptors, it sets how many times you want the password re-encrypted.
+ # For bcrypt, this is the cost for hashing the password and defaults to 11. If
+ # using other algorithms, it sets how many times you want the password to be hashed.
#
# Limiting the stretches to just one in testing will increase the performance of
# your test suite dramatically. However, it is STRONGLY RECOMMENDED to not use
# a value less than 10 in other environments. Note that, for bcrypt (the default
- # encryptor), the cost increases exponentially with the number of stretches (e.g.
+ # algorithm), the cost increases exponentially with the number of stretches (e.g.
# a value of 20 is already extremely slow: approx. 60 seconds for 1 calculation).
- config.stretches = Rails.env.test? ? 1 : 10
+ config.stretches = Rails.env.test? ? 1 : 11
- # Setup a pepper to generate the encrypted password.
- # config.pepper = '7d21df87b56ac2fb6dc3efbca0fa14204f97f0e3951878dc3b5d5f7c3ec49acae06d2849881b109f696ea782fcb6f87f12de6fc5527582cde7bebe314e926ed9'
+ # Set up a pepper to generate the hashed password.
+ # config.pepper = 'e4d24decca0c0472c1868617325aeed136df6a5b4e4e9918c264ae83aea200c826441f071d61582e3f4cf17b64693621c4ea263f3d74aca0147bb5a12af40efc'
# Send a notification email when the user's password is changed
# config.send_password_change_notification = false
@@ -145,12 +154,12 @@
# ==> Configuration for :validatable
# Range for password length.
- config.password_length = 8..72
+ config.password_length = 6..128
# Email regex used to validate email formats. It simply asserts that
# one (and only one) @ exists in the given string. This is mainly
# to give user feedback and not to assert the e-mail validity.
- # config.email_regexp = /\A[^@]+@[^@]+\z/
+ config.email_regexp = /\A[^@\s]+@[^@\s]+\z/
# ==> Configuration for :timeoutable
# The time you want to timeout the user session without activity. After this
@@ -198,11 +207,11 @@
# config.sign_in_after_reset_password = true
# ==> Configuration for :encryptable
- # Allow you to use another encryption algorithm besides bcrypt (default). You can use
- # :sha1, :sha512 or encryptors from others authentication tools as :clearance_sha1,
- # :authlogic_sha512 (then you should set stretches above to 20 for default behavior)
- # and :restful_authentication_sha1 (then you should set stretches to 10, and copy
- # REST_AUTH_SITE_KEY to pepper).
+ # Allow you to use another hashing or encryption algorithm besides bcrypt (default).
+ # You can use :sha1, :sha512 or algorithms from others authentication tools as
+ # :clearance_sha1, :authlogic_sha512 (then you should set stretches above to 20
+ # for default behavior) and :restful_authentication_sha1 (then you should set
+ # stretches to 10, and copy REST_AUTH_SITE_KEY to pepper).
#
# Require the `devise-encryptable` gem when using anything other than bcrypt
# config.encryptor = :sha512
diff --git a/config/initializers/kaminari_config.rb b/config/initializers/kaminari_config.rb
deleted file mode 100644
index b1d87b0..0000000
--- a/config/initializers/kaminari_config.rb
+++ /dev/null
@@ -1,10 +0,0 @@
-Kaminari.configure do |config|
- # config.default_per_page = 25
- # config.max_per_page = nil
- # config.window = 4
- # config.outer_window = 0
- # config.left = 0
- # config.right = 0
- # config.page_method_name = :page
- # config.param_name = :page
-end
diff --git a/config/initializers/new_framework_defaults.rb b/config/initializers/new_framework_defaults.rb
new file mode 100644
index 0000000..0706caf
--- /dev/null
+++ b/config/initializers/new_framework_defaults.rb
@@ -0,0 +1,24 @@
+# Be sure to restart your server when you modify this file.
+#
+# This file contains migration options to ease your Rails 5.0 upgrade.
+#
+# Read the Rails 5.0 release notes for more info on each option.
+
+# Enable per-form CSRF tokens. Previous versions had false.
+Rails.application.config.action_controller.per_form_csrf_tokens = true
+
+# Enable origin-checking CSRF mitigation. Previous versions had false.
+Rails.application.config.action_controller.forgery_protection_origin_check = true
+
+# Make Ruby 2.4 preserve the timezone of the receiver when calling `to_time`.
+# Previous versions had false.
+ActiveSupport.to_time_preserves_timezone = true
+
+# Require `belongs_to` associations by default. Previous versions had false.
+Rails.application.config.active_record.belongs_to_required_by_default = true
+
+# Do not halt callback chains when a callback returns false. Previous versions had true.
+ActiveSupport.halt_callback_chains_on_return_false = false
+
+# Configure SSL options to enable HSTS with subdomains. Previous versions had false.
+Rails.application.config.ssl_options = { hsts: { subdomains: true } }
diff --git a/config/initializers/rails_admin.rb b/config/initializers/rails_admin.rb
index 73ce6ad..27e5e30 100644
--- a/config/initializers/rails_admin.rb
+++ b/config/initializers/rails_admin.rb
@@ -30,11 +30,11 @@
delete
## With an audit adapter, you can add:
- #history_index
- #history_show
+ # history_index
+ # history_show
nestable
end
- config.main_app_name = ['APP-TITLE', '']
+ config.main_app_name = ['Rollinbox', '']
end
diff --git a/config/initializers/session_store.rb b/config/initializers/session_store.rb
index ca9e97c..e465e50 100644
--- a/config/initializers/session_store.rb
+++ b/config/initializers/session_store.rb
@@ -1,3 +1,3 @@
# Be sure to restart your server when you modify this file.
-Rails.application.config.session_store :cookie_store, key: '_rollincodesandbox_session'
+Rails.application.config.session_store :cookie_store, key: '_rollinbox_session'
diff --git a/config/initializers/simple_form.rb b/config/initializers/simple_form.rb
index de558c6..934487a 100644
--- a/config/initializers/simple_form.rb
+++ b/config/initializers/simple_form.rb
@@ -97,7 +97,7 @@
# config.item_wrapper_class = nil
# How the label text should be generated altogether with the required text.
- config.label_text = lambda { |label, required, explicit_label| "#{label} #{required}" }
+ # config.label_text = lambda { |label, required, explicit_label| "#{required} #{label}" }
# You can define the class to use on all labels. Default is nil.
# config.label_class = nil
@@ -117,7 +117,7 @@
# in this configuration, which is recommended due to some quirks from different browsers.
# To stop SimpleForm from generating the novalidate option, enabling the HTML5 validations,
# change this configuration to true.
- config.browser_validations = true
+ config.browser_validations = false
# Collection of methods to detect if a file type was given.
# config.file_methods = [ :mounted_as, :file?, :public_filename ]
@@ -125,7 +125,7 @@
# Custom mappings for input types. This should be a hash containing a regexp
# to match as key, and the input type that will be used when the field name
# matches the regexp as value.
- config.input_mappings = { /country/ => :string }
+ # config.input_mappings = { /count/ => :integer }
# Custom wrappers for input types. This should be a hash containing an input
# type as key and the wrapper that will be used for all inputs with specified type.
diff --git a/config/initializers/simple_form_bootstrap.rb b/config/initializers/simple_form_bootstrap.rb
deleted file mode 100644
index 6ca0ccb..0000000
--- a/config/initializers/simple_form_bootstrap.rb
+++ /dev/null
@@ -1,172 +0,0 @@
-# Use this setup block to configure all options available in SimpleForm.
-SimpleForm.setup do |config|
- config.error_notification_class = 'alert alert-danger'
- config.button_class = 'btn btn-default'
- config.boolean_label_class = nil
-
- config.wrappers :vertical_form, tag: 'div', class: 'form-group', error_class: 'has-error' do |b|
- b.use :html5
- b.use :placeholder
- b.optional :maxlength
- b.optional :pattern
- b.optional :min_max
- b.optional :readonly
- b.use :label, class: 'control-label'
-
- b.use :input, class: 'form-control'
- b.use :error, wrap_with: { tag: 'span', class: 'help-block' }
- b.use :hint, wrap_with: { tag: 'p', class: 'help-block' }
- end
-
- config.wrappers :vertical_file_input, tag: 'div', class: 'form-group', error_class: 'has-error' do |b|
- b.use :html5
- b.use :placeholder
- b.optional :maxlength
- b.optional :readonly
- b.use :label, class: 'control-label'
-
- b.use :input
- b.use :error, wrap_with: { tag: 'span', class: 'help-block' }
- b.use :hint, wrap_with: { tag: 'p', class: 'help-block' }
- end
-
- config.wrappers :vertical_boolean, tag: 'div', class: 'form-group', error_class: 'has-error' do |b|
- b.use :html5
- b.optional :readonly
-
- b.wrapper tag: 'div', class: 'checkbox' do |ba|
- ba.use :label_input
- end
-
- b.use :error, wrap_with: { tag: 'span', class: 'help-block' }
- b.use :hint, wrap_with: { tag: 'p', class: 'help-block' }
- end
-
- config.wrappers :vertical_radio_and_checkboxes, tag: 'div', class: 'form-group', error_class: 'has-error' do |b|
- b.use :html5
- b.optional :readonly
- b.use :label, class: 'control-label'
- b.use :input
- b.use :error, wrap_with: { tag: 'span', class: 'help-block' }
- b.use :hint, wrap_with: { tag: 'p', class: 'help-block' }
- end
-
- config.wrappers :horizontal_form, tag: 'div', class: 'form-group', error_class: 'has-error' do |b|
- b.use :html5
- b.use :placeholder
- b.optional :maxlength
- b.optional :pattern
- b.optional :min_max
- b.optional :readonly
- b.use :label, class: 'col-sm-3 control-label'
-
- b.wrapper tag: 'div', class: 'col-sm-9' do |ba|
- ba.use :input, class: 'form-control'
- ba.use :error, wrap_with: { tag: 'span', class: 'help-block' }
- ba.use :hint, wrap_with: { tag: 'p', class: 'help-block' }
- end
- end
-
- config.wrappers :horizontal_file_input, tag: 'div', class: 'form-group', error_class: 'has-error' do |b|
- b.use :html5
- b.use :placeholder
- b.optional :maxlength
- b.optional :readonly
- b.use :label, class: 'col-sm-3 control-label'
-
- b.wrapper tag: 'div', class: 'col-sm-9' do |ba|
- ba.use :input
- ba.use :error, wrap_with: { tag: 'span', class: 'help-block' }
- ba.use :hint, wrap_with: { tag: 'p', class: 'help-block' }
- end
- end
-
- config.wrappers :horizontal_boolean, tag: 'div', class: 'form-group', error_class: 'has-error' do |b|
- b.use :html5
- b.optional :readonly
-
- b.wrapper tag: 'div', class: 'col-sm-offset-3 col-sm-9' do |wr|
- wr.wrapper tag: 'div', class: 'checkbox' do |ba|
- ba.use :label_input
- end
-
- wr.use :error, wrap_with: { tag: 'span', class: 'help-block' }
- wr.use :hint, wrap_with: { tag: 'p', class: 'help-block' }
- end
- end
-
- config.wrappers :horizontal_radio_and_checkboxes, tag: 'div', class: 'form-group', error_class: 'has-error' do |b|
- b.use :html5
- b.optional :readonly
-
- b.use :label, class: 'col-sm-3 control-label'
-
- b.wrapper tag: 'div', class: 'col-sm-9' do |ba|
- ba.use :input
- ba.use :error, wrap_with: { tag: 'span', class: 'help-block' }
- ba.use :hint, wrap_with: { tag: 'p', class: 'help-block' }
- end
- end
-
- config.wrappers :inline_form, tag: 'div', class: 'form-group', error_class: 'has-error' do |b|
- b.use :html5
- b.use :placeholder
- b.optional :maxlength
- b.optional :pattern
- b.optional :min_max
- b.optional :readonly
- b.use :label, class: 'sr-only'
-
- b.use :input, class: 'form-control'
- b.use :error, wrap_with: { tag: 'span', class: 'help-block' }
- b.use :hint, wrap_with: { tag: 'p', class: 'help-block' }
- end
-
- config.wrappers :multi_select, tag: 'div', class: 'form-group', error_class: 'has-error' do |b|
- b.use :html5
- b.optional :readonly
- b.use :label, class: 'control-label'
- b.wrapper tag: 'div', class: 'form-inline' do |ba|
- ba.use :input, class: 'form-control'
- ba.use :error, wrap_with: { tag: 'span', class: 'help-block' }
- ba.use :hint, wrap_with: { tag: 'p', class: 'help-block' }
- end
- end
- # Wrappers for forms and inputs using the Bootstrap toolkit.
- # Check the Bootstrap docs (http://getbootstrap.com)
- # to learn about the different styles for forms and inputs,
- # buttons and other elements.
- config.default_wrapper = :vertical_form
- config.wrapper_mappings = {
- check_boxes: :vertical_radio_and_checkboxes,
- radio_buttons: :vertical_radio_and_checkboxes,
- file: :vertical_file_input,
- boolean: :vertical_boolean,
- datetime: :multi_select,
- date: :multi_select,
- time: :multi_select
- }
-
- 1.upto(12) do |col|
- config.wrappers "inline_field#{col}".to_sym, tag: 'div', class: "col-sm-#{col}", error_class: 'has-error' do |ic|
- ic.use :html5
- ic.use :placeholder
- ic.use :label, class: 'sr-only'
- ic.use :input, class: 'form-control'
- ic.use :error, wrap_with: { tag: 'span', class: 'help-block' }
- ic.use :hint, wrap_with: { tag: 'p', class: 'help-block' }
- end
-
- config.wrappers "inline_bool#{col}".to_sym, tag: 'div', class: "col-sm-#{col}", error_class: 'has-error' do |ib|
- ib.use :html5
- ib.optional :readonly
-
- ib.wrapper tag: 'div', class: 'checkbox' do |ba|
- ba.use :input
- ba.use :label
- end
- ib.use :error, wrap_with: { tag: 'span', class: 'help-block' }
- ib.use :hint, wrap_with: { tag: 'p', class: 'help-block' }
- end
- end
-end
diff --git a/config/initializers/wrap_parameters.rb b/config/initializers/wrap_parameters.rb
index 33725e9..bbfc396 100644
--- a/config/initializers/wrap_parameters.rb
+++ b/config/initializers/wrap_parameters.rb
@@ -5,10 +5,10 @@
# Enable parameter wrapping for JSON. You can disable this by setting :format to an empty array.
ActiveSupport.on_load(:action_controller) do
- wrap_parameters format: [:json] if respond_to?(:wrap_parameters)
+ wrap_parameters format: [:json]
end
# To enable root element in JSON for ActiveRecord objects.
# ActiveSupport.on_load(:active_record) do
-# self.include_root_in_json = true
+# self.include_root_in_json = true
# end
diff --git a/config/locales/devise.en.yml b/config/locales/devise.en.yml
index 9e54fb7..bd4c3eb 100644
--- a/config/locales/devise.en.yml
+++ b/config/locales/devise.en.yml
@@ -1,3 +1,5 @@
+# Additional translations at https://github.com/plataformatec/devise/wiki/I18n
+
en:
devise:
confirmations:
diff --git a/config/locales/en.yml b/config/locales/en.yml
index d002480..0653957 100644
--- a/config/locales/en.yml
+++ b/config/locales/en.yml
@@ -1 +1,23 @@
-en:
\ No newline at end of file
+# Files in the config/locales directory are used for internationalization
+# and are automatically loaded by Rails. If you want to use locales other
+# than English, add the necessary files in this directory.
+#
+# To use the locales, use `I18n.t`:
+#
+# I18n.t 'hello'
+#
+# In views, this is aliased to just `t`:
+#
+# <%= t('hello') %>
+#
+# To use a different locale, set it with `I18n.locale`:
+#
+# I18n.locale = :es
+#
+# This would use the information in config/locales/es.yml.
+#
+# To learn more, please read the Rails Internationalization guide
+# available at http://guides.rubyonrails.org/i18n.html.
+
+en:
+ hello: "Hello world"
diff --git a/config/locales/fr.yml b/config/locales/fr.yml
index 0a4d0bc..b987f40 100644
--- a/config/locales/fr.yml
+++ b/config/locales/fr.yml
@@ -23,6 +23,9 @@ fr:
parameter:
one: Paramètre
other: Paramètres
+ content:
+ one: Contenu
+ other: Contenu
attributes:
parameter:
value: Valeur
@@ -246,4 +249,4 @@ fr:
last: Dernier »
next: Suivant ›
previous: "‹ Précédent"
- truncate: "…"
+ truncate: "…"
diff --git a/config/locales/rails_admin.fr.yml b/config/locales/rails_admin.fr.yml
deleted file mode 100644
index b08ea54..0000000
--- a/config/locales/rails_admin.fr.yml
+++ /dev/null
@@ -1,148 +0,0 @@
-fr:
- admin:
- js:
- true: Vrai
- false: Faux
- is_present: Est présent
- is_blank: Est vide
- date: Date ...
- between_and_: Entre le ... et le ...
- today: "Aujourd'hui"
- yesterday: Hier
- this_week: Cette semaine
- last_week: Semaine précédente
- number: Nombre ...
- contains: Contient
- is_exactly: Est exactement
- starts_with: Commence par
- ends_with: Termine par
- loading: "Chargement..."
- home:
- name: Accueil
- pagination:
- previous: "« Préc."
- next: "Suiv. »"
- truncate: "…"
- misc:
- filter_date_format: "dd/mm/yy" # a combination of 'dd', 'mm' and 'yy' with any delimiter. No other interpolation will be done!
- search: "Rechercher"
- filter: "Filtrer"
- refresh: "Rafraîchir"
- show_all: "Voir tout"
- add_filter: "Ajouter un filtre..."
- bulk_menu_title: "Objets sélectionnés..."
- remove: "Enlever"
- add_new: "Ajouter nouveau"
- chosen: "%{name} choisis"
- chose_all: "Prendre tout"
- clear_all: "Tout enlever"
- up: "Monter"
- down: "Descendre"
- navigation: "Navigation"
- navigation_static_label: "Liens"
- log_out: "Log out"
- ago: ""
- flash:
- successful: "%{name} a été %{action} avec succès"
- error: "%{name} n'a pas pu être %{action}"
- noaction: "Aucune action !"
- model_not_found: "Le model '%{model}' n'a pas été trouvé"
- object_not_found: "%{model} avec id '%{id}' n'a pas été trouvé"
- table_headers:
- model_name: "Nom du modèle"
- last_used: "Utilisé"
- records: "Enregistrements"
- username: "Utilisateur"
- changes: "Changements"
- created_at: "Date/Heure"
- item: "Objet"
- message: "Message"
- actions:
- dashboard:
- title: "Administration"
- menu: "Administration"
- breadcrumb: "Administration"
- index:
- title: "Listing des %{model_label_plural}"
- menu: "Liste"
- breadcrumb: "%{model_label_plural}"
- show:
- title: "Détails pour %{model_label} '%{object_label}'"
- menu: "Voir"
- breadcrumb: "%{object_label}"
- show_in_app:
- menu: "Voir dans l'application"
- new:
- title: "Création d'un(e) %{model_label}"
- menu: "Nouveau"
- breadcrumb: "Nouveau"
- link: "Ajouter un(e) %{model_label}"
- done: "créé(e)"
- edit:
- title: "Édition %{model_label} '%{object_label}'"
- menu: "Édition"
- breadcrumb: "Édition"
- link: "Éditer ce(tte) %{model_label}"
- done: "modifié(e)"
- delete:
- title: "Suppression %{model_label} '%{object_label}'"
- menu: "Supprimer"
- breadcrumb: "Suppression"
- link: "Supprimer '%{object_label}'"
- done: "supprimé(e)"
- bulk_delete:
- title: "Suppression de %{model_label_plural}"
- menu: "Délétion multiple"
- breadcrumb: "Délétion multiple"
- bulk_link: "Supprimer les %{model_label_plural} sélectionné(e)s"
- export:
- title: "Export de %{model_label_plural}"
- menu: "Export"
- breadcrumb: "Export"
- link: "Export des %{model_label_plural} trouvé(e)s"
- bulk_link: "Exporter les %{model_label_plural} sélectionné(e)s"
- done: "exporté(e)s"
- history_index:
- title: "Historique des %{model_label_plural}"
- menu: "Historique"
- breadcrumb: "Historique"
- history_show:
- title: "Historique %{model_label} '%{object_label}'"
- menu: "Historique"
- breadcrumb: "Historique"
- form:
- cancel: "Annuler"
- basic_info: "Informations de base"
- required: "Obligatoire"
- optional: "Facultatif"
- one_char: "caractère"
- char_length_up_to: "longueur jusqu'à"
- char_length_of: "longueur de"
- save: "Enregistrer"
- save_and_add_another: "Enregistrer et créer un(e) autre"
- save_and_edit: "Enregistrer et re-modifier"
- all_of_the_following_related_items_will_be_deleted: " ? Les objets suivants peuvent être affectés (supprimés ou orphelins) : "
- are_you_sure_you_want_to_delete_the_object: "Êtes-vous sûr de vouloir supprimer cet(te) %{model_name}"
- confirmation: "Oui, je suis sûr(e)"
- bulk_delete: "Les objets suivants seront supprimés, ce qui pourrait supprimer ou rendre orpheline les dépendances affichées :"
- new_model: "%{name} (nouveau)"
- export:
- confirmation: "Exporter en %{name}"
- select: "Sélectionner les champs à exporter"
- select_all_fields: "Selectionner Tous Les Champs"
- fields_from: "Champs pour '%{name}'"
- fields_from_associated: "Champs pour l'association '%{name}'"
- display: "Afficher %{name} : %{type}"
- options_for: "Options pour %{name}"
- empty_value_for_associated_objects: ""
- click_to_reverse_selection: 'Cliquer pour inverser la sélection'
- csv:
- header_for_root_methods: "%{name}" # 'model' is available
- header_for_association_methods: "%{name} [%{association}]"
- encoding_to: "Encoder en..."
- encoding_to_help: "Choisir l'encodage de sortie. Laisser vide pour garder l'encodage d'entrée : (%{name})"
- skip_header: "Pas d'en-tête"
- skip_header_help: "Ne pas afficher d'en-tête (pas de champs de description)"
- default_col_sep: ";"
- col_sep: "Séparateur de colonnes"
- col_sep_help: "Laisser vide pour utiliser la valeur par défaut recommandée pour votre système ('%{value}')"
diff --git a/config/locales/rollincode.en.yml b/config/locales/rollincode.en.yml
deleted file mode 100644
index 1faf542..0000000
--- a/config/locales/rollincode.en.yml
+++ /dev/null
@@ -1,5 +0,0 @@
-en:
- admin:
- rollincode:
- number: "Number"
- show: "Show"
\ No newline at end of file
diff --git a/config/locales/simple_form.en.yml b/config/locales/simple_form.en.yml
index 7241e18..2374383 100644
--- a/config/locales/simple_form.en.yml
+++ b/config/locales/simple_form.en.yml
@@ -3,11 +3,11 @@ en:
"yes": 'Yes'
"no": 'No'
required:
- # text: 'required'
- # mark: '*'
+ text: 'required'
+ mark: '*'
# You can uncomment the line below if you need to overwrite the whole required html.
# When using html, text and mark won't be used.
- html: '*'
+ # html: '*'
error_notification:
default_message: "Please review the problems below:"
# Examples
diff --git a/config/locales/simple_form.fr.yml b/config/locales/simple_form.fr.yml
deleted file mode 100644
index 47d10f5..0000000
--- a/config/locales/simple_form.fr.yml
+++ /dev/null
@@ -1,28 +0,0 @@
-fr:
- simple_form:
- "yes": 'Oui'
- "no": 'Non'
- required:
- # text: 'obligatoire'
- # mark: '*'
- # You can uncomment the line below if you need to overwrite the whole required html.
- # When using html, text and mark won't be used.
- html: '*'
- error_notification:
- default_message: "Merci de corriger les champs ci-dessous:"
- labels:
- defaults:
- first_name: "Nom"
- last_name: "Prénom"
- address: "Adresse"
- facebook_identifier: Identifiant Facebook
- city: Ville
- postal_code: Code postal
- country: Pays
- phone: Téléphone
- email: E-mail
- birth_date: Date de naissance
- is_subscribed_newsletter: Inscrit à la newsletter
- has_accepted_rules: A accepté les règles
- created_at: Créé le
- updated_at: Mis à jour le
diff --git a/config/puma.rb b/config/puma.rb
new file mode 100644
index 0000000..c7f311f
--- /dev/null
+++ b/config/puma.rb
@@ -0,0 +1,47 @@
+# Puma can serve each request in a thread from an internal thread pool.
+# The `threads` method setting takes two numbers a minimum and maximum.
+# Any libraries that use thread pools should be configured to match
+# the maximum value specified for Puma. Default is set to 5 threads for minimum
+# and maximum, this matches the default thread size of Active Record.
+#
+threads_count = ENV.fetch("RAILS_MAX_THREADS") { 5 }.to_i
+threads threads_count, threads_count
+
+# Specifies the `port` that Puma will listen on to receive requests, default is 3000.
+#
+port ENV.fetch("PORT") { 3000 }
+
+# Specifies the `environment` that Puma will run in.
+#
+environment ENV.fetch("RAILS_ENV") { "development" }
+
+# Specifies the number of `workers` to boot in clustered mode.
+# Workers are forked webserver processes. If using threads and workers together
+# the concurrency of the application would be max `threads` * `workers`.
+# Workers do not work on JRuby or Windows (both of which do not support
+# processes).
+#
+# workers ENV.fetch("WEB_CONCURRENCY") { 2 }
+
+# Use the `preload_app!` method when specifying a `workers` number.
+# This directive tells Puma to first boot the application and load code
+# before forking the application. This takes advantage of Copy On Write
+# process behavior so workers use less memory. If you use this option
+# you need to make sure to reconnect any threads in the `on_worker_boot`
+# block.
+#
+# preload_app!
+
+# The code in the `on_worker_boot` will be called if you are using
+# clustered mode by specifying a number of `workers`. After each worker
+# process is booted this block will be run, if you are using `preload_app!`
+# option you will want to use this block to reconnect to any threads
+# or connections that may have been created at application boot, Ruby
+# cannot share connections between processes.
+#
+# on_worker_boot do
+# ActiveRecord::Base.establish_connection if defined?(ActiveRecord)
+# end
+
+# Allow puma to be restarted by `rails restart` command.
+plugin :tmp_restart
diff --git a/config/recaptcha.rb b/config/recaptcha.rb
new file mode 100644
index 0000000..6a46144
--- /dev/null
+++ b/config/recaptcha.rb
@@ -0,0 +1,4 @@
+Recaptcha.configure do |config|
+ config.public_key = 'KEY'
+ config.private_key = 'KEY'
+end
diff --git a/config/routes.rb b/config/routes.rb
index 4654481..4092618 100644
--- a/config/routes.rb
+++ b/config/routes.rb
@@ -1,17 +1,15 @@
Rails.application.routes.draw do
+ # For details on the DSL available within this file, see http://guides.rubyonrails.org/routing.html
+
# USERS & ADMINISTRATION
devise_for :admins
- devise_for :users
mount RailsAdmin::Engine => '/admin', as: 'rails_admin'
- # HOME
- root to: 'home#index'
-
- # PAGE
- get '/pages/:id' => 'pages#show', as: 'page'
-
# FROALA (WYSIWYG)
post '/froala_upload' => 'froala#upload'
post '/froala_manage' => 'froala#manage'
delete '/froala_delete' => 'froala#delete'
+
+ # HOME / root
+ root to: 'site#index'
end
diff --git a/config/schedule.rb b/config/schedule.rb
new file mode 100644
index 0000000..de75cf9
--- /dev/null
+++ b/config/schedule.rb
@@ -0,0 +1,20 @@
+# Use this file to easily define all of your cron jobs.
+#
+# It's helpful, but not entirely necessary to understand cron before proceeding.
+# http://en.wikipedia.org/wiki/Cron
+
+# Example:
+#
+# set :output, "/path/to/my/cron_log.log"
+#
+# every 2.hours do
+# command "/usr/bin/some_great_command"
+# runner "MyModel.some_method"
+# rake "some:great:rake:task"
+# end
+#
+# every 4.days do
+# runner "AnotherModel.prune_old_records"
+# end
+
+# Learn more: http://github.com/javan/whenever
diff --git a/config/secrets.yml b/config/secrets.yml
index 89075bf..9d722a9 100644
--- a/config/secrets.yml
+++ b/config/secrets.yml
@@ -5,16 +5,16 @@
# Make sure the secret is at least 30 characters and all random,
# no regular words or you'll be exposed to dictionary attacks.
-# You can use `rake secret` to generate a secure secret key.
+# You can use `rails secret` to generate a secure secret key.
# Make sure the secrets in this file are kept private
# if you're sharing your code publicly.
development:
- secret_key_base: YOUR_SECRET_KEY_BASE
+ secret_key_base: 530117e1846b70954a81110125c146d4d2daa8c20c68cf1d3321e6846c3308a58e8b085f23c43509ba88ead030fb40db6ae1356ad90170efa641c49b6d440a05
test:
- secret_key_base: YOUR_SECRET_KEY_BASE
+ secret_key_base: c9baac6eec4855350d65d544a8d01c273312158168c1bf3b9410c744df3035a44d968d87370ebde3a5bd6797860a57109ebd54e544a1c2bba97cb34342d14e75
# Do not keep production secrets in the repository,
# instead read values from the environment.
diff --git a/config/sitemap.rb b/config/sitemap.rb
new file mode 100644
index 0000000..7e3ace7
--- /dev/null
+++ b/config/sitemap.rb
@@ -0,0 +1,27 @@
+# Set the host name for URL creation
+SitemapGenerator::Sitemap.default_host = 'http://www.example.com'
+
+SitemapGenerator::Sitemap.create do
+ # Put links creation logic here.
+ #
+ # The root path '/' and sitemap index file are added automatically for you.
+ # Links are added to the Sitemap in the order they are specified.
+ #
+ # Usage: add(path, options={})
+ # (default options are used if you don't specify)
+ #
+ # Defaults: :priority => 0.5, :changefreq => 'weekly',
+ # :lastmod => Time.now, :host => default_host
+ #
+ # Examples:
+ #
+ # Add '/articles'
+ #
+ # add articles_path, :priority => 0.7, :changefreq => 'daily'
+ #
+ # Add all articles:
+ #
+ # Article.find_each do |article|
+ # add article_path(article), :lastmod => article.updated_at
+ # end
+end
diff --git a/config/spring.rb b/config/spring.rb
new file mode 100644
index 0000000..c9119b4
--- /dev/null
+++ b/config/spring.rb
@@ -0,0 +1,6 @@
+%w(
+ .ruby-version
+ .rbenv-vars
+ tmp/restart.txt
+ tmp/caching-dev.txt
+).each { |path| Spring.watch(path) }
diff --git a/db/migrate/20160520090646_create_pages.rb b/db/migrate/20160520090646_create_pages.rb
deleted file mode 100644
index 213bbf1..0000000
--- a/db/migrate/20160520090646_create_pages.rb
+++ /dev/null
@@ -1,12 +0,0 @@
-class CreatePages < ActiveRecord::Migration
- def change
- create_table :pages do |t|
- t.string :title, null: false
- t.string :code, unique: true, index: true
- t.text :content, null: false
- t.integer :position
-
- t.timestamps null: false
- end
- end
-end
diff --git a/db/migrate/20160520094338_add_ancestry_to_page.rb b/db/migrate/20160520094338_add_ancestry_to_page.rb
deleted file mode 100644
index 5f93b65..0000000
--- a/db/migrate/20160520094338_add_ancestry_to_page.rb
+++ /dev/null
@@ -1,6 +0,0 @@
-class AddAncestryToPage < ActiveRecord::Migration
- def change
- add_column :pages, :ancestry, :string
- add_index :pages, :ancestry
- end
-end
diff --git a/db/migrate/20160520094950_add_slug_to_pages.rb b/db/migrate/20160520094950_add_slug_to_pages.rb
deleted file mode 100644
index 57f7987..0000000
--- a/db/migrate/20160520094950_add_slug_to_pages.rb
+++ /dev/null
@@ -1,5 +0,0 @@
-class AddSlugToPages < ActiveRecord::Migration
- def change
- add_column :pages, :slug, :string
- end
-end
diff --git a/db/migrate/20160225110329_create_contents.rb b/db/migrate/20161209084231_create_contents.rb
similarity index 78%
rename from db/migrate/20160225110329_create_contents.rb
rename to db/migrate/20161209084231_create_contents.rb
index 7e3f855..19022a7 100644
--- a/db/migrate/20160225110329_create_contents.rb
+++ b/db/migrate/20161209084231_create_contents.rb
@@ -1,4 +1,4 @@
-class CreateContents < ActiveRecord::Migration
+class CreateContents < ActiveRecord::Migration[5.0]
def change
create_table :contents do |t|
t.string :code, index: {unique: true}, null: false
diff --git a/db/migrate/20160217161425_create_parameters.rb b/db/migrate/20161209084433_create_parameters.rb
similarity index 77%
rename from db/migrate/20160217161425_create_parameters.rb
rename to db/migrate/20161209084433_create_parameters.rb
index 701ccac..28ffddf 100644
--- a/db/migrate/20160217161425_create_parameters.rb
+++ b/db/migrate/20161209084433_create_parameters.rb
@@ -1,4 +1,4 @@
-class CreateParameters < ActiveRecord::Migration
+class CreateParameters < ActiveRecord::Migration[5.0]
def change
create_table :parameters do |t|
t.string :code, index: {unique: true}, null: false
diff --git a/db/migrate/20160217160430_devise_create_admins.rb b/db/migrate/20161209093430_devise_create_admins.rb
similarity index 84%
rename from db/migrate/20160217160430_devise_create_admins.rb
rename to db/migrate/20161209093430_devise_create_admins.rb
index 0127b2d..1b875c3 100644
--- a/db/migrate/20160217160430_devise_create_admins.rb
+++ b/db/migrate/20161209093430_devise_create_admins.rb
@@ -1,9 +1,9 @@
-class DeviseCreateAdmins < ActiveRecord::Migration
+class DeviseCreateAdmins < ActiveRecord::Migration[5.0]
def change
- create_table(:admins) do |t|
+ create_table :admins do |t|
## Database authenticatable
- t.string :email, null: false, default: ''
- t.string :encrypted_password, null: false, default: ''
+ t.string :email, null: false, default: ""
+ t.string :encrypted_password, null: false, default: ""
## Recoverable
t.string :reset_password_token
@@ -29,6 +29,8 @@ def change
# t.integer :failed_attempts, default: 0, null: false # Only if lock strategy is :failed_attempts
# t.string :unlock_token # Only if unlock strategy is :email or :both
# t.datetime :locked_at
+
+
t.timestamps null: false
end
diff --git a/db/migrate/20160120220908_devise_create_users.rb b/db/migrate/20161209093436_devise_create_users.rb
similarity index 82%
rename from db/migrate/20160120220908_devise_create_users.rb
rename to db/migrate/20161209093436_devise_create_users.rb
index 251d20e..1fefeee 100644
--- a/db/migrate/20160120220908_devise_create_users.rb
+++ b/db/migrate/20161209093436_devise_create_users.rb
@@ -1,9 +1,9 @@
-class DeviseCreateUsers < ActiveRecord::Migration
+class DeviseCreateUsers < ActiveRecord::Migration[5.0]
def change
- create_table(:users) do |t|
+ create_table :users do |t|
## Database authenticatable
- t.string :email, null: false, default: ''
- t.string :encrypted_password, null: false, default: ''
+ t.string :email, null: false, default: ""
+ t.string :encrypted_password, null: false, default: ""
## Recoverable
t.string :reset_password_token
@@ -19,9 +19,6 @@ def change
t.string :current_sign_in_ip
t.string :last_sign_in_ip
- ## Custom
- t.text :adress
-
## Confirmable
# t.string :confirmation_token
# t.datetime :confirmed_at
@@ -33,6 +30,7 @@ def change
# t.string :unlock_token # Only if unlock strategy is :email or :both
# t.datetime :locked_at
+
t.timestamps null: false
end
diff --git a/db/migrate/20160520095019_create_friendly_id_slugs.rb b/db/migrate/20161209094716_create_friendly_id_slugs.rb
similarity index 100%
rename from db/migrate/20160520095019_create_friendly_id_slugs.rb
rename to db/migrate/20161209094716_create_friendly_id_slugs.rb
diff --git a/db/migrate/20160520092946_create_seos.rb b/db/migrate/20161209095051_create_seos.rb
similarity index 67%
rename from db/migrate/20160520092946_create_seos.rb
rename to db/migrate/20161209095051_create_seos.rb
index d1693ef..21971e7 100644
--- a/db/migrate/20160520092946_create_seos.rb
+++ b/db/migrate/20161209095051_create_seos.rb
@@ -1,11 +1,9 @@
-class CreateSeos < ActiveRecord::Migration
+class CreateSeos < ActiveRecord::Migration[5.0]
def change
create_table :seos do |t|
t.string :title, null: false
t.text :description, null: false
- t.belongs_to :page, index: true
-
t.timestamps null: false
end
end
diff --git a/db/schema.rb b/db/schema.rb
index 8dfc1b1..224405f 100644
--- a/db/schema.rb
+++ b/db/schema.rb
@@ -1,4 +1,3 @@
-# encoding: UTF-8
# This file is auto-generated from the current state of the database. Instead
# of editing this file, please use the migrations feature of Active Record to
# incrementally modify your database, and then regenerate this schema definition.
@@ -11,7 +10,7 @@
#
# It's strongly recommended that you check this file into your version control system.
-ActiveRecord::Schema.define(version: 20160520095019) do
+ActiveRecord::Schema.define(version: 20161209095051) do
create_table "admins", force: :cascade do |t|
t.string "email", default: "", null: false
@@ -26,66 +25,45 @@
t.string "last_sign_in_ip"
t.datetime "created_at", null: false
t.datetime "updated_at", null: false
+ t.index ["email"], name: "index_admins_on_email", unique: true
+ t.index ["reset_password_token"], name: "index_admins_on_reset_password_token", unique: true
end
- add_index "admins", ["email"], name: "index_admins_on_email", unique: true
- add_index "admins", ["reset_password_token"], name: "index_admins_on_reset_password_token", unique: true
-
create_table "contents", force: :cascade do |t|
t.string "code", null: false
t.text "content", null: false
t.datetime "created_at", null: false
t.datetime "updated_at", null: false
+ t.index ["code"], name: "index_contents_on_code", unique: true
end
- add_index "contents", ["code"], name: "index_contents_on_code", unique: true
-
create_table "friendly_id_slugs", force: :cascade do |t|
t.string "slug", null: false
t.integer "sluggable_id", null: false
t.string "sluggable_type", limit: 50
t.string "scope"
t.datetime "created_at"
+ t.index ["slug", "sluggable_type", "scope"], name: "index_friendly_id_slugs_on_slug_and_sluggable_type_and_scope", unique: true
+ t.index ["slug", "sluggable_type"], name: "index_friendly_id_slugs_on_slug_and_sluggable_type"
+ t.index ["sluggable_id"], name: "index_friendly_id_slugs_on_sluggable_id"
+ t.index ["sluggable_type"], name: "index_friendly_id_slugs_on_sluggable_type"
end
- add_index "friendly_id_slugs", ["slug", "sluggable_type", "scope"], name: "index_friendly_id_slugs_on_slug_and_sluggable_type_and_scope", unique: true
- add_index "friendly_id_slugs", ["slug", "sluggable_type"], name: "index_friendly_id_slugs_on_slug_and_sluggable_type"
- add_index "friendly_id_slugs", ["sluggable_id"], name: "index_friendly_id_slugs_on_sluggable_id"
- add_index "friendly_id_slugs", ["sluggable_type"], name: "index_friendly_id_slugs_on_sluggable_type"
-
- create_table "pages", force: :cascade do |t|
- t.string "title", null: false
- t.string "code"
- t.text "content", null: false
- t.integer "position"
- t.datetime "created_at", null: false
- t.datetime "updated_at", null: false
- t.string "ancestry"
- t.string "slug"
- end
-
- add_index "pages", ["ancestry"], name: "index_pages_on_ancestry"
- add_index "pages", ["code"], name: "index_pages_on_code"
-
create_table "parameters", force: :cascade do |t|
t.string "code", null: false
t.string "value", null: false
t.datetime "created_at", null: false
t.datetime "updated_at", null: false
+ t.index ["code"], name: "index_parameters_on_code", unique: true
end
- add_index "parameters", ["code"], name: "index_parameters_on_code", unique: true
-
create_table "seos", force: :cascade do |t|
t.string "title", null: false
t.text "description", null: false
- t.integer "page_id"
t.datetime "created_at", null: false
t.datetime "updated_at", null: false
end
- add_index "seos", ["page_id"], name: "index_seos_on_page_id"
-
create_table "users", force: :cascade do |t|
t.string "email", default: "", null: false
t.string "encrypted_password", default: "", null: false
@@ -97,12 +75,10 @@
t.datetime "last_sign_in_at"
t.string "current_sign_in_ip"
t.string "last_sign_in_ip"
- t.text "adress"
t.datetime "created_at", null: false
t.datetime "updated_at", null: false
+ t.index ["email"], name: "index_users_on_email", unique: true
+ t.index ["reset_password_token"], name: "index_users_on_reset_password_token", unique: true
end
- add_index "users", ["email"], name: "index_users_on_email", unique: true
- add_index "users", ["reset_password_token"], name: "index_users_on_reset_password_token", unique: true
-
end
diff --git a/db/seeds.rb b/db/seeds.rb
index 0b4b1c6..dfc40ca 100644
--- a/db/seeds.rb
+++ b/db/seeds.rb
@@ -1,6 +1,15 @@
-# Admin default
Admin.create!(
email: 'admin@admin.com',
password: 'admin888',
password_confirmation: 'admin888'
)
+
+Parameter.create!(
+ code: 'DEFAULT_SEO_TITLE',
+ value: 'DEFAULT TITLE'
+)
+
+Parameter.create!(
+ code: 'DEFAULT_SEO_DESCRIPTION',
+ value: 'DEFAULT DESCRIPTION'
+)
diff --git a/lib/tasks/auto_annotate_models.rake b/lib/tasks/auto_annotate_models.rake
deleted file mode 100644
index 10d37e2..0000000
--- a/lib/tasks/auto_annotate_models.rake
+++ /dev/null
@@ -1,47 +0,0 @@
-# NOTE: only doing this in development as some production environments (Heroku)
-# NOTE: are sensitive to local FS writes, and besides -- it's just not proper
-# NOTE: to have a dev-mode tool do its thing in production.
-if Rails.env.development?
- task :set_annotation_options do
- # You can override any of these by setting an environment variable of the
- # same name.
- Annotate.set_defaults(
- 'routes' => 'false',
- 'position_in_routes' => 'before',
- 'position_in_class' => 'before',
- 'position_in_test' => 'before',
- 'position_in_fixture' => 'before',
- 'position_in_factory' => 'before',
- 'position_in_serializer' => 'before',
- 'show_foreign_keys' => 'true',
- 'show_indexes' => 'true',
- 'simple_indexes' => 'false',
- 'model_dir' => 'app/models',
- 'root_dir' => '',
- 'include_version' => 'false',
- 'require' => '',
- 'exclude_tests' => 'false',
- 'exclude_fixtures' => 'false',
- 'exclude_factories' => 'false',
- 'exclude_serializers' => 'false',
- 'exclude_scaffolds' => 'false',
- 'exclude_controllers' => 'false',
- 'exclude_helpers' => 'false',
- 'ignore_model_sub_dir' => 'false',
- 'ignore_columns' => nil,
- 'ignore_unknown_models' => 'false',
- 'hide_limit_column_types' => 'integer,boolean',
- 'skip_on_db_migrate' => 'false',
- 'format_bare' => 'true',
- 'format_rdoc' => 'false',
- 'format_markdown' => 'false',
- 'sort' => 'false',
- 'force' => 'false',
- 'trace' => 'false',
- 'wrapper_open' => nil,
- 'wrapper_close' => nil,
- )
- end
-
- Annotate.load_tasks
-end
diff --git a/app/assets/javascripts/components/.gitkeep b/public/apple-touch-icon-precomposed.png
similarity index 100%
rename from app/assets/javascripts/components/.gitkeep
rename to public/apple-touch-icon-precomposed.png
diff --git a/app/assets/stylesheets/colors.scss b/public/apple-touch-icon.png
similarity index 100%
rename from app/assets/stylesheets/colors.scss
rename to public/apple-touch-icon.png
diff --git a/app/views/layouts/_footer.html.erb b/test/controllers/.keep
similarity index 100%
rename from app/views/layouts/_footer.html.erb
rename to test/controllers/.keep
diff --git a/test/fixtures/.keep b/test/fixtures/.keep
new file mode 100644
index 0000000..e69de29
diff --git a/test/fixtures/admins.yml b/test/fixtures/admins.yml
new file mode 100644
index 0000000..80aed36
--- /dev/null
+++ b/test/fixtures/admins.yml
@@ -0,0 +1,11 @@
+# Read about fixtures at http://api.rubyonrails.org/classes/ActiveRecord/FixtureSet.html
+
+# This model initially had no columns defined. If you add columns to the
+# model remove the '{}' from the fixture names and add the columns immediately
+# below each fixture, per the syntax in the comments below
+#
+one: {}
+# column: value
+#
+two: {}
+# column: value
diff --git a/test/fixtures/contents.yml b/test/fixtures/contents.yml
new file mode 100644
index 0000000..80aed36
--- /dev/null
+++ b/test/fixtures/contents.yml
@@ -0,0 +1,11 @@
+# Read about fixtures at http://api.rubyonrails.org/classes/ActiveRecord/FixtureSet.html
+
+# This model initially had no columns defined. If you add columns to the
+# model remove the '{}' from the fixture names and add the columns immediately
+# below each fixture, per the syntax in the comments below
+#
+one: {}
+# column: value
+#
+two: {}
+# column: value
diff --git a/test/fixtures/files/.keep b/test/fixtures/files/.keep
new file mode 100644
index 0000000..e69de29
diff --git a/test/fixtures/parameters.yml b/test/fixtures/parameters.yml
new file mode 100644
index 0000000..80aed36
--- /dev/null
+++ b/test/fixtures/parameters.yml
@@ -0,0 +1,11 @@
+# Read about fixtures at http://api.rubyonrails.org/classes/ActiveRecord/FixtureSet.html
+
+# This model initially had no columns defined. If you add columns to the
+# model remove the '{}' from the fixture names and add the columns immediately
+# below each fixture, per the syntax in the comments below
+#
+one: {}
+# column: value
+#
+two: {}
+# column: value
diff --git a/test/fixtures/seos.yml b/test/fixtures/seos.yml
new file mode 100644
index 0000000..80aed36
--- /dev/null
+++ b/test/fixtures/seos.yml
@@ -0,0 +1,11 @@
+# Read about fixtures at http://api.rubyonrails.org/classes/ActiveRecord/FixtureSet.html
+
+# This model initially had no columns defined. If you add columns to the
+# model remove the '{}' from the fixture names and add the columns immediately
+# below each fixture, per the syntax in the comments below
+#
+one: {}
+# column: value
+#
+two: {}
+# column: value
diff --git a/test/fixtures/users.yml b/test/fixtures/users.yml
new file mode 100644
index 0000000..80aed36
--- /dev/null
+++ b/test/fixtures/users.yml
@@ -0,0 +1,11 @@
+# Read about fixtures at http://api.rubyonrails.org/classes/ActiveRecord/FixtureSet.html
+
+# This model initially had no columns defined. If you add columns to the
+# model remove the '{}' from the fixture names and add the columns immediately
+# below each fixture, per the syntax in the comments below
+#
+one: {}
+# column: value
+#
+two: {}
+# column: value
diff --git a/test/helpers/.keep b/test/helpers/.keep
new file mode 100644
index 0000000..e69de29
diff --git a/test/integration/.keep b/test/integration/.keep
new file mode 100644
index 0000000..e69de29
diff --git a/test/mailers/.keep b/test/mailers/.keep
new file mode 100644
index 0000000..e69de29
diff --git a/test/models/.keep b/test/models/.keep
new file mode 100644
index 0000000..e69de29
diff --git a/test/models/admin_test.rb b/test/models/admin_test.rb
new file mode 100644
index 0000000..ab20b8c
--- /dev/null
+++ b/test/models/admin_test.rb
@@ -0,0 +1,7 @@
+require 'test_helper'
+
+class AdminTest < ActiveSupport::TestCase
+ # test "the truth" do
+ # assert true
+ # end
+end
diff --git a/test/models/content_test.rb b/test/models/content_test.rb
new file mode 100644
index 0000000..530663b
--- /dev/null
+++ b/test/models/content_test.rb
@@ -0,0 +1,7 @@
+require 'test_helper'
+
+class ContentTest < ActiveSupport::TestCase
+ # test "the truth" do
+ # assert true
+ # end
+end
diff --git a/test/models/parameter_test.rb b/test/models/parameter_test.rb
new file mode 100644
index 0000000..a57d24f
--- /dev/null
+++ b/test/models/parameter_test.rb
@@ -0,0 +1,7 @@
+require 'test_helper'
+
+class ParameterTest < ActiveSupport::TestCase
+ # test "the truth" do
+ # assert true
+ # end
+end
diff --git a/test/models/seo_test.rb b/test/models/seo_test.rb
new file mode 100644
index 0000000..9ec7b1a
--- /dev/null
+++ b/test/models/seo_test.rb
@@ -0,0 +1,7 @@
+require 'test_helper'
+
+class SeoTest < ActiveSupport::TestCase
+ # test "the truth" do
+ # assert true
+ # end
+end
diff --git a/test/models/user_test.rb b/test/models/user_test.rb
new file mode 100644
index 0000000..82f61e0
--- /dev/null
+++ b/test/models/user_test.rb
@@ -0,0 +1,7 @@
+require 'test_helper'
+
+class UserTest < ActiveSupport::TestCase
+ # test "the truth" do
+ # assert true
+ # end
+end
diff --git a/test/test_helper.rb b/test/test_helper.rb
new file mode 100644
index 0000000..92e39b2
--- /dev/null
+++ b/test/test_helper.rb
@@ -0,0 +1,10 @@
+ENV['RAILS_ENV'] ||= 'test'
+require File.expand_path('../../config/environment', __FILE__)
+require 'rails/test_help'
+
+class ActiveSupport::TestCase
+ # Setup all fixtures in test/fixtures/*.yml for all tests in alphabetical order.
+ fixtures :all
+
+ # Add more helper methods to be used by all tests here...
+end
diff --git a/tmp/.keep b/tmp/.keep
new file mode 100644
index 0000000..e69de29
diff --git a/app/assets/stylesheets/animate.css b/vendor/assets/stylesheets/animate.css
similarity index 100%
rename from app/assets/stylesheets/animate.css
rename to vendor/assets/stylesheets/animate.css