8 |
--------------------------------------------------------------------------------
/bin/bundle:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env ruby
2 | ENV['BUNDLE_GEMFILE'] ||= File.expand_path('../../Gemfile', __FILE__)
3 | load Gem.bin_path('bundler', 'bundle')
4 |
--------------------------------------------------------------------------------
/bin/rails:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env ruby
2 | APP_PATH = File.expand_path('../config/application', __dir__)
3 | require_relative '../config/boot'
4 | require 'rails/commands'
5 |
--------------------------------------------------------------------------------
/bin/rake:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env ruby
2 | require_relative '../config/boot'
3 | require 'rake'
4 | Rake.application.run
5 |
--------------------------------------------------------------------------------
/bin/setup:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env ruby
2 | require 'pathname'
3 | require 'fileutils'
4 | include FileUtils
5 |
6 | # path to your application root.
7 | APP_ROOT = Pathname.new File.expand_path('../../', __FILE__)
8 |
9 | def system!(*args)
10 | system(*args) || abort("\n== Command #{args} failed ==")
11 | end
12 |
13 | chdir APP_ROOT do
14 | # This script is a starting point to setup your application.
15 | # Add necessary setup steps to this file.
16 |
17 | puts '== Installing dependencies =='
18 | system! 'gem install bundler --conservative'
19 | system('bundle check') || system!('bundle install')
20 |
21 | # puts "\n== Copying sample files =="
22 | # unless File.exist?('config/database.yml')
23 | # cp 'config/database.yml.sample', 'config/database.yml'
24 | # end
25 |
26 | puts "\n== Preparing database =="
27 | system! 'bin/rails db:setup'
28 |
29 | puts "\n== Removing old logs and tempfiles =="
30 | system! 'bin/rails log:clear tmp:clear'
31 |
32 | puts "\n== Restarting application server =="
33 | system! 'bin/rails restart'
34 | end
35 |
--------------------------------------------------------------------------------
/bin/spring:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env ruby
2 |
3 | # This file loads spring without using Bundler, in order to be fast.
4 | # It gets overwritten when you run the `spring binstub` command.
5 |
6 | unless defined?(Spring)
7 | require 'rubygems'
8 | require 'bundler'
9 |
10 | lockfile = Bundler::LockfileParser.new(Bundler.default_lockfile.read)
11 | if spring = lockfile.specs.detect { |spec| spec.name == "spring" }
12 | Gem.use_paths Gem.dir, Bundler.bundle_path.to_s, *Gem.path
13 | gem 'spring', spring.version
14 | require 'spring/binstub'
15 | end
16 | end
17 |
--------------------------------------------------------------------------------
/bin/update:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env ruby
2 | require 'pathname'
3 | require 'fileutils'
4 | include FileUtils
5 |
6 | # path to your application root.
7 | APP_ROOT = Pathname.new File.expand_path('../../', __FILE__)
8 |
9 | def system!(*args)
10 | system(*args) || abort("\n== Command #{args} failed ==")
11 | end
12 |
13 | chdir APP_ROOT do
14 | # This script is a way to update your development environment automatically.
15 | # Add necessary update steps to this file.
16 |
17 | puts '== Installing dependencies =='
18 | system! 'gem install bundler --conservative'
19 | system('bundle check') || system!('bundle install')
20 |
21 | puts "\n== Updating database =="
22 | system! 'bin/rails db:migrate'
23 |
24 | puts "\n== Removing old logs and tempfiles =="
25 | system! 'bin/rails log:clear tmp:clear'
26 |
27 | puts "\n== Restarting application server =="
28 | system! 'bin/rails restart'
29 | end
30 |
--------------------------------------------------------------------------------
/config.ru:
--------------------------------------------------------------------------------
1 | # This file is used by Rack-based servers to start the application.
2 |
3 | require_relative 'config/environment'
4 |
5 | run Rails.application
6 |
--------------------------------------------------------------------------------
/config/application.rb:
--------------------------------------------------------------------------------
1 | require_relative 'boot'
2 |
3 | require 'rails/all'
4 |
5 | # Require the gems listed in Gemfile, including any gems
6 | # you've limited to :test, :development, or :production.
7 | Bundler.require(*Rails.groups)
8 |
9 | ENV['RAILS_ADMIN_THEME'] = 'rollincode'
10 |
11 | module Rollinbox
12 | class Application < Rails::Application
13 | # Settings in config/environments/* take precedence over those specified here.
14 | # Application configuration should go into files in config/initializers
15 | # -- all .rb files in that directory are automatically loaded.
16 | config.i18n.default_locale = :en
17 |
18 | config.assets.paths << Rails.root.join('vendor', 'assets', 'images')
19 |
20 | config.to_prepare do
21 | Devise::SessionsController.layout 'devise'
22 | end
23 | end
24 | end
25 |
--------------------------------------------------------------------------------
/config/boot.rb:
--------------------------------------------------------------------------------
1 | ENV['BUNDLE_GEMFILE'] ||= File.expand_path('../Gemfile', __dir__)
2 |
3 | require 'bundler/setup' # Set up gems listed in the Gemfile.
4 |
--------------------------------------------------------------------------------
/config/cable.yml:
--------------------------------------------------------------------------------
1 | development:
2 | adapter: async
3 |
4 | test:
5 | adapter: async
6 |
7 | production:
8 | adapter: redis
9 | url: redis://localhost:6379/1
10 |
--------------------------------------------------------------------------------
/config/database.yml:
--------------------------------------------------------------------------------
1 | # SQLite version 3.x
2 | # gem install sqlite3
3 | #
4 | # Ensure the SQLite 3 gem is defined in your Gemfile
5 | # gem 'sqlite3'
6 | #
7 | default: &default
8 | adapter: sqlite3
9 | pool: 5
10 | timeout: 5000
11 |
12 | development:
13 | <<: *default
14 | database: db/development.sqlite3
15 |
16 | # Warning: The database defined as "test" will be erased and
17 | # re-generated from your development database when you run "rake".
18 | # Do not set this db to the same as development or production.
19 | test:
20 | <<: *default
21 | database: db/test.sqlite3
22 |
23 | production:
24 | <<: *default
25 | database: db/production.sqlite3
26 |
--------------------------------------------------------------------------------
/config/deploy.rb:
--------------------------------------------------------------------------------
1 | # config valid only for current version of Capistrano
2 | lock '3.6.1'
3 |
4 | set :application, 'my_app_name'
5 | set :repo_url, 'git@example.com:me/my_repo.git'
6 | set :deploy_to, '/home/project/www'
7 |
8 | append :linked_files, 'config/database.yml', 'config/secrets.yml'
9 | set :linked_dirs, %w(bin log tmp/pids tmp/cache tmp/sockets vendor/bundle public/system public/uploads)
10 |
11 | set :keep_releases, 1
12 | after 'deploy:publishing', 'passenger:restart'
13 |
14 | # Default branch is :master
15 | # ask :branch, `git rev-parse --abbrev-ref HEAD`.chomp
16 |
17 | # Default deploy_to directory is /var/www/my_app_name
18 | # set :deploy_to, '/var/www/my_app_name'
19 |
20 | # Default value for :scm is :git
21 | # set :scm, :git
22 |
23 | # Default value for :format is :airbrussh.
24 | # set :format, :airbrussh
25 |
26 | # You can configure the Airbrussh format using :format_options.
27 | # These are the defaults.
28 | # set :format_options, command_output: true, log_file: 'log/capistrano.log', color: :auto, truncate: :auto
29 |
30 | # Default value for :pty is false
31 | # set :pty, true
32 |
33 | # Default value for :linked_files is []
34 | # append :linked_files, 'config/database.yml', 'config/secrets.yml'
35 |
36 | # Default value for linked_dirs is []
37 | # append :linked_dirs, 'log', 'tmp/pids', 'tmp/cache', 'tmp/sockets', 'public/system'
38 |
39 | # Default value for default_env is {}
40 | # set :default_env, { path: "/opt/ruby/bin:$PATH" }
41 |
42 | # Default value for keep_releases is 5
43 | # set :keep_releases, 5
44 |
--------------------------------------------------------------------------------
/config/deploy/production.rb:
--------------------------------------------------------------------------------
1 | # server-based syntax
2 | # ======================
3 | # Defines a single server with a list of roles and multiple properties.
4 | # You can define all roles on a single server, or split them:
5 |
6 | # server 'example.com', user: 'deploy', roles: %w{app db web}, my_property: :my_value
7 | # server 'example.com', user: 'deploy', roles: %w{app web}, other_property: :other_value
8 | # server 'db.example.com', user: 'deploy', roles: %w{db}
9 |
10 |
11 |
12 | # role-based syntax
13 | # ==================
14 |
15 | # Defines a role with one or multiple servers. The primary server in each
16 | # group is considered to be the first unless any hosts have the primary
17 | # property set. Specify the username and a domain or IP for the server.
18 | # Don't use `:all`, it's a meta role.
19 |
20 | # role :app, %w{deploy@example.com}, my_property: :my_value
21 | # role :web, %w{user1@primary.com user2@additional.com}, other_property: :other_value
22 | # role :db, %w{deploy@example.com}
23 |
24 |
25 |
26 | # Configuration
27 | # =============
28 | # You can set any configuration variable like in config/deploy.rb
29 | # These variables are then only loaded and set in this stage.
30 | # For available Capistrano configuration variables see the documentation page.
31 | # http://capistranorb.com/documentation/getting-started/configuration/
32 | # Feel free to add new variables to customise your setup.
33 |
34 |
35 |
36 | # Custom SSH Options
37 | # ==================
38 | # You may pass any option but keep in mind that net/ssh understands a
39 | # limited set of options, consult the Net::SSH documentation.
40 | # http://net-ssh.github.io/net-ssh/classes/Net/SSH.html#method-c-start
41 | #
42 | # Global options
43 | # --------------
44 | # set :ssh_options, {
45 | # keys: %w(/home/rlisowski/.ssh/id_rsa),
46 | # forward_agent: false,
47 | # auth_methods: %w(password)
48 | # }
49 | #
50 | # The server-based syntax can be used to override options:
51 | # ------------------------------------
52 | # server 'example.com',
53 | # user: 'user_name',
54 | # roles: %w{web app},
55 | # ssh_options: {
56 | # user: 'user_name', # overrides user setting above
57 | # keys: %w(/home/user_name/.ssh/id_rsa),
58 | # forward_agent: false,
59 | # auth_methods: %w(publickey password)
60 | # # password: 'please use keys'
61 | # }
62 |
--------------------------------------------------------------------------------
/config/deploy/staging.rb:
--------------------------------------------------------------------------------
1 | # server-based syntax
2 | # ======================
3 | # Defines a single server with a list of roles and multiple properties.
4 | # You can define all roles on a single server, or split them:
5 |
6 | # server 'example.com', user: 'deploy', roles: %w{app db web}, my_property: :my_value
7 | # server 'example.com', user: 'deploy', roles: %w{app web}, other_property: :other_value
8 | # server 'db.example.com', user: 'deploy', roles: %w{db}
9 |
10 |
11 |
12 | # role-based syntax
13 | # ==================
14 |
15 | # Defines a role with one or multiple servers. The primary server in each
16 | # group is considered to be the first unless any hosts have the primary
17 | # property set. Specify the username and a domain or IP for the server.
18 | # Don't use `:all`, it's a meta role.
19 |
20 | # role :app, %w{deploy@example.com}, my_property: :my_value
21 | # role :web, %w{user1@primary.com user2@additional.com}, other_property: :other_value
22 | # role :db, %w{deploy@example.com}
23 |
24 |
25 |
26 | # Configuration
27 | # =============
28 | # You can set any configuration variable like in config/deploy.rb
29 | # These variables are then only loaded and set in this stage.
30 | # For available Capistrano configuration variables see the documentation page.
31 | # http://capistranorb.com/documentation/getting-started/configuration/
32 | # Feel free to add new variables to customise your setup.
33 |
34 |
35 |
36 | # Custom SSH Options
37 | # ==================
38 | # You may pass any option but keep in mind that net/ssh understands a
39 | # limited set of options, consult the Net::SSH documentation.
40 | # http://net-ssh.github.io/net-ssh/classes/Net/SSH.html#method-c-start
41 | #
42 | # Global options
43 | # --------------
44 | # set :ssh_options, {
45 | # keys: %w(/home/rlisowski/.ssh/id_rsa),
46 | # forward_agent: false,
47 | # auth_methods: %w(password)
48 | # }
49 | #
50 | # The server-based syntax can be used to override options:
51 | # ------------------------------------
52 | # server 'example.com',
53 | # user: 'user_name',
54 | # roles: %w{web app},
55 | # ssh_options: {
56 | # user: 'user_name', # overrides user setting above
57 | # keys: %w(/home/user_name/.ssh/id_rsa),
58 | # forward_agent: false,
59 | # auth_methods: %w(publickey password)
60 | # # password: 'please use keys'
61 | # }
62 |
--------------------------------------------------------------------------------
/config/environment.rb:
--------------------------------------------------------------------------------
1 | # Load the Rails application.
2 | require_relative 'application'
3 |
4 | # Initialize the Rails application.
5 | Rails.application.initialize!
6 |
--------------------------------------------------------------------------------
/config/environments/development.rb:
--------------------------------------------------------------------------------
1 | Rails.application.configure do
2 | # Settings specified here will take precedence over those in config/application.rb.
3 |
4 | # In the development environment your application's code is reloaded on
5 | # every request. This slows down response time but is perfect for development
6 | # since you don't have to restart the web server when you make code changes.
7 | config.cache_classes = false
8 |
9 | # Do not eager load code on boot.
10 | config.eager_load = false
11 |
12 | # Show full error reports.
13 | config.consider_all_requests_local = true
14 |
15 | # Enable/disable caching. By default caching is disabled.
16 | if Rails.root.join('tmp/caching-dev.txt').exist?
17 | config.action_controller.perform_caching = true
18 |
19 | config.cache_store = :memory_store
20 | config.public_file_server.headers = {
21 | 'Cache-Control' => 'public, max-age=172800'
22 | }
23 | else
24 | config.action_controller.perform_caching = false
25 |
26 | config.cache_store = :null_store
27 | end
28 |
29 | # Don't care if the mailer can't send.
30 | config.action_mailer.raise_delivery_errors = false
31 |
32 | config.action_mailer.perform_caching = false
33 |
34 | # Print deprecation notices to the Rails logger.
35 | config.active_support.deprecation = :log
36 |
37 | # Raise an error on page load if there are pending migrations.
38 | config.active_record.migration_error = :page_load
39 |
40 | # Debug mode disables concatenation and preprocessing of assets.
41 | # This option may cause significant delays in view rendering with a large
42 | # number of complex assets.
43 | config.assets.debug = true
44 |
45 | # Suppress logger output for asset requests.
46 | config.assets.quiet = true
47 |
48 | # Raises error for missing translations
49 | # config.action_view.raise_on_missing_translations = true
50 |
51 | # Use an evented file watcher to asynchronously detect changes in source code,
52 | # routes, locales, etc. This feature depends on the listen gem.
53 | config.file_watcher = ActiveSupport::EventedFileUpdateChecker
54 |
55 | # Devise
56 | config.action_mailer.default_url_options = {host: 'localhost', port: 3000}
57 |
58 | # Mailcatcher
59 | config.action_mailer.delivery_method = :smtp
60 | config.action_mailer.smtp_settings = {address: 'localhost', port: 1025}
61 | end
62 |
--------------------------------------------------------------------------------
/config/environments/production.rb:
--------------------------------------------------------------------------------
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 | # Disable serving static files from the `/public` folder by default since
18 | # Apache or NGINX already handles this.
19 | config.public_file_server.enabled = ENV['RAILS_SERVE_STATIC_FILES'].present?
20 |
21 | # Compress JavaScripts and CSS.
22 | config.assets.js_compressor = :uglifier
23 | # config.assets.css_compressor = :sass
24 |
25 | # Do not fallback to assets pipeline if a precompiled asset is missed.
26 | config.assets.compile = false
27 |
28 | # `config.assets.precompile` and `config.assets.version` have moved to config/initializers/assets.rb
29 |
30 | # Enable serving of images, stylesheets, and JavaScripts from an asset server.
31 | # config.action_controller.asset_host = 'http://assets.example.com'
32 |
33 | # Specifies the header that your server uses for sending files.
34 | # config.action_dispatch.x_sendfile_header = 'X-Sendfile' # for Apache
35 | # config.action_dispatch.x_sendfile_header = 'X-Accel-Redirect' # for NGINX
36 |
37 | # Mount Action Cable outside main process or domain
38 | # config.action_cable.mount_path = nil
39 | # config.action_cable.url = 'wss://example.com/cable'
40 | # config.action_cable.allowed_request_origins = [ 'http://example.com', /http:\/\/example.*/ ]
41 |
42 | # Force all access to the app over SSL, use Strict-Transport-Security, and use secure cookies.
43 | # config.force_ssl = true
44 |
45 | # Use the lowest log level to ensure availability of diagnostic information
46 | # when problems arise.
47 | config.log_level = :debug
48 |
49 | # Prepend all log lines with the following tags.
50 | config.log_tags = [ :request_id ]
51 |
52 | # Use a different cache store in production.
53 | # config.cache_store = :mem_cache_store
54 |
55 | # Use a real queuing backend for Active Job (and separate queues per environment)
56 | # config.active_job.queue_adapter = :resque
57 | # config.active_job.queue_name_prefix = "rollinbox_#{Rails.env}"
58 | config.action_mailer.perform_caching = false
59 |
60 | # Ignore bad email addresses and do not raise email delivery errors.
61 | # Set this to true and configure the email server for immediate delivery to raise delivery errors.
62 | # config.action_mailer.raise_delivery_errors = false
63 |
64 | # Enable locale fallbacks for I18n (makes lookups for any locale fall back to
65 | # the I18n.default_locale when a translation cannot be found).
66 | config.i18n.fallbacks = true
67 |
68 | # Send deprecation notices to registered listeners.
69 | config.active_support.deprecation = :notify
70 |
71 | # Use default logging formatter so that PID and timestamp are not suppressed.
72 | config.log_formatter = ::Logger::Formatter.new
73 |
74 | # Use a different logger for distributed setups.
75 | # require 'syslog/logger'
76 | # config.logger = ActiveSupport::TaggedLogging.new(Syslog::Logger.new 'app-name')
77 |
78 | if ENV["RAILS_LOG_TO_STDOUT"].present?
79 | logger = ActiveSupport::Logger.new(STDOUT)
80 | logger.formatter = config.log_formatter
81 | config.logger = ActiveSupport::TaggedLogging.new(logger)
82 | end
83 |
84 | # Do not dump schema after migrations.
85 | config.active_record.dump_schema_after_migration = false
86 | end
87 |
--------------------------------------------------------------------------------
/config/environments/test.rb:
--------------------------------------------------------------------------------
1 | Rails.application.configure do
2 | # Settings specified here will take precedence over those in config/application.rb.
3 |
4 | # The test environment is used exclusively to run your application's
5 | # test suite. You never need to work with it otherwise. Remember that
6 | # your test database is "scratch space" for the test suite and is wiped
7 | # and recreated between test runs. Don't rely on the data there!
8 | config.cache_classes = true
9 |
10 | # Do not eager load code on boot. This avoids loading your whole application
11 | # just for the purpose of running a single test. If you are using a tool that
12 | # preloads Rails for running tests, you may have to set it to true.
13 | config.eager_load = false
14 |
15 | # Configure public file server for tests with Cache-Control for performance.
16 | config.public_file_server.enabled = true
17 | config.public_file_server.headers = {
18 | 'Cache-Control' => 'public, max-age=3600'
19 | }
20 |
21 | # Show full error reports and disable caching.
22 | config.consider_all_requests_local = true
23 | config.action_controller.perform_caching = false
24 |
25 | # Raise exceptions instead of rendering exception templates.
26 | config.action_dispatch.show_exceptions = false
27 |
28 | # Disable request forgery protection in test environment.
29 | config.action_controller.allow_forgery_protection = false
30 | config.action_mailer.perform_caching = false
31 |
32 | # Tell Action Mailer not to deliver emails to the real world.
33 | # The :test delivery method accumulates sent emails in the
34 | # ActionMailer::Base.deliveries array.
35 | config.action_mailer.delivery_method = :test
36 |
37 | # Print deprecation notices to the stderr.
38 | config.active_support.deprecation = :stderr
39 |
40 | # Raises error for missing translations
41 | # config.action_view.raise_on_missing_translations = true
42 | end
43 |
--------------------------------------------------------------------------------
/config/initializers/application_controller_renderer.rb:
--------------------------------------------------------------------------------
1 | # Be sure to restart your server when you modify this file.
2 |
3 | # ApplicationController.renderer.defaults.merge!(
4 | # http_host: 'example.org',
5 | # https: false
6 | # )
7 |
--------------------------------------------------------------------------------
/config/initializers/assets.rb:
--------------------------------------------------------------------------------
1 | # Be sure to restart your server when you modify this file.
2 |
3 | # Version of your assets, change this if you want to expire all your assets.
4 | Rails.application.config.assets.version = '1.0'
5 |
6 | # Add additional assets to the asset load path
7 | # Rails.application.config.assets.paths << Emoji.images_path
8 |
9 | # Precompile additional assets.
10 | # application.js, application.css, and all non-JS/CSS in app/assets folder are already added.
11 | # Rails.application.config.assets.precompile += %w( search.js )
12 |
13 | Rails.application.config.assets.precompile += %w(ie.js)
14 |
--------------------------------------------------------------------------------
/config/initializers/backtrace_silencers.rb:
--------------------------------------------------------------------------------
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!
8 |
--------------------------------------------------------------------------------
/config/initializers/cookies_serializer.rb:
--------------------------------------------------------------------------------
1 | # Be sure to restart your server when you modify this file.
2 |
3 | # Specify a serializer for the signed and encrypted cookie jars.
4 | # Valid options are :json, :marshal, and :hybrid.
5 | Rails.application.config.action_dispatch.cookies_serializer = :json
6 |
--------------------------------------------------------------------------------
/config/initializers/devise.rb:
--------------------------------------------------------------------------------
1 | # Use this hook to configure devise mailer, warden hooks and so forth.
2 | # Many of these configuration options can be set straight in your model.
3 | Devise.setup do |config|
4 | # The secret key used by Devise. Devise uses this key to generate
5 | # random tokens. Changing this key will render invalid all existing
6 | # confirmation, reset password and unlock tokens in the database.
7 | # Devise will use the `secret_key_base` as its `secret_key`
8 | # by default. You can change it below and use your own secret key.
9 | config.secret_key = '<%= ENV["SECRET_KEY_BASE"] %>'
10 |
11 | # ==> Mailer Configuration
12 | # Configure the e-mail address which will be shown in Devise::Mailer,
13 | # note that it will be overwritten if you use your own mailer class
14 | # with default "from" parameter.
15 | config.mailer_sender = 'please-change-me-at-config-initializers-devise@example.com'
16 |
17 | # Configure the class responsible to send e-mails.
18 | # config.mailer = 'Devise::Mailer'
19 |
20 | # Configure the parent class responsible to send e-mails.
21 | # config.parent_mailer = 'ActionMailer::Base'
22 |
23 | # ==> ORM configuration
24 | # Load and configure the ORM. Supports :active_record (default) and
25 | # :mongoid (bson_ext recommended) by default. Other ORMs may be
26 | # available as additional gems.
27 | require 'devise/orm/active_record'
28 |
29 | # ==> Configuration for any authentication mechanism
30 | # Configure which keys are used when authenticating a user. The default is
31 | # just :email. You can configure it to use [:username, :subdomain], so for
32 | # authenticating a user, both parameters are required. Remember that those
33 | # parameters are used only when authenticating and not when retrieving from
34 | # session. If you need permissions, you should implement that in a before filter.
35 | # You can also supply a hash where the value is a boolean determining whether
36 | # or not authentication should be aborted when the value is not present.
37 | # config.authentication_keys = [:email]
38 |
39 | # Configure parameters from the request object used for authentication. Each entry
40 | # given should be a request method and it will automatically be passed to the
41 | # find_for_authentication method and considered in your model lookup. For instance,
42 | # if you set :request_keys to [:subdomain], :subdomain will be used on authentication.
43 | # The same considerations mentioned for authentication_keys also apply to request_keys.
44 | # config.request_keys = []
45 |
46 | # Configure which authentication keys should be case-insensitive.
47 | # These keys will be downcased upon creating or modifying a user and when used
48 | # to authenticate or find a user. Default is :email.
49 | config.case_insensitive_keys = [:email]
50 |
51 | # Configure which authentication keys should have whitespace stripped.
52 | # These keys will have whitespace before and after removed upon creating or
53 | # modifying a user and when used to authenticate or find a user. Default is :email.
54 | config.strip_whitespace_keys = [:email]
55 |
56 | # Tell if authentication through request.params is enabled. True by default.
57 | # It can be set to an array that will enable params authentication only for the
58 | # given strategies, for example, `config.params_authenticatable = [:database]` will
59 | # enable it only for database (email + password) authentication.
60 | # config.params_authenticatable = true
61 |
62 | # Tell if authentication through HTTP Auth is enabled. False by default.
63 | # It can be set to an array that will enable http authentication only for the
64 | # given strategies, for example, `config.http_authenticatable = [:database]` will
65 | # enable it only for database authentication. The supported strategies are:
66 | # :database = Support basic authentication with authentication key + password
67 | # config.http_authenticatable = false
68 |
69 | # If 401 status code should be returned for AJAX requests. True by default.
70 | # config.http_authenticatable_on_xhr = true
71 |
72 | # The realm used in Http Basic Authentication. 'Application' by default.
73 | # config.http_authentication_realm = 'Application'
74 |
75 | # It will change confirmation, password recovery and other workflows
76 | # to behave the same regardless if the e-mail provided was right or wrong.
77 | # Does not affect registerable.
78 | # config.paranoid = true
79 |
80 | # By default Devise will store the user in session. You can skip storage for
81 | # particular strategies by setting this option.
82 | # Notice that if you are skipping storage for all authentication paths, you
83 | # may want to disable generating routes to Devise's sessions controller by
84 | # passing skip: :sessions to `devise_for` in your config/routes.rb
85 | config.skip_session_storage = [:http_auth]
86 |
87 | # By default, Devise cleans up the CSRF token on authentication to
88 | # avoid CSRF token fixation attacks. This means that, when using AJAX
89 | # requests for sign in and sign up, you need to get a new CSRF token
90 | # from the server. You can disable this option at your own risk.
91 | # config.clean_up_csrf_token_on_authentication = true
92 |
93 | # When false, Devise will not attempt to reload routes on eager load.
94 | # This can reduce the time taken to boot the app but if your application
95 | # requires the Devise mappings to be loaded during boot time the application
96 | # won't boot properly.
97 | # config.reload_routes = true
98 |
99 | # ==> Configuration for :database_authenticatable
100 | # For bcrypt, this is the cost for hashing the password and defaults to 11. If
101 | # using other algorithms, it sets how many times you want the password to be hashed.
102 | #
103 | # Limiting the stretches to just one in testing will increase the performance of
104 | # your test suite dramatically. However, it is STRONGLY RECOMMENDED to not use
105 | # a value less than 10 in other environments. Note that, for bcrypt (the default
106 | # algorithm), the cost increases exponentially with the number of stretches (e.g.
107 | # a value of 20 is already extremely slow: approx. 60 seconds for 1 calculation).
108 | config.stretches = Rails.env.test? ? 1 : 11
109 |
110 | # Set up a pepper to generate the hashed password.
111 | # config.pepper = 'e4d24decca0c0472c1868617325aeed136df6a5b4e4e9918c264ae83aea200c826441f071d61582e3f4cf17b64693621c4ea263f3d74aca0147bb5a12af40efc'
112 |
113 | # Send a notification email when the user's password is changed
114 | # config.send_password_change_notification = false
115 |
116 | # ==> Configuration for :confirmable
117 | # A period that the user is allowed to access the website even without
118 | # confirming their account. For instance, if set to 2.days, the user will be
119 | # able to access the website for two days without confirming their account,
120 | # access will be blocked just in the third day. Default is 0.days, meaning
121 | # the user cannot access the website without confirming their account.
122 | # config.allow_unconfirmed_access_for = 2.days
123 |
124 | # A period that the user is allowed to confirm their account before their
125 | # token becomes invalid. For example, if set to 3.days, the user can confirm
126 | # their account within 3 days after the mail was sent, but on the fourth day
127 | # their account can't be confirmed with the token any more.
128 | # Default is nil, meaning there is no restriction on how long a user can take
129 | # before confirming their account.
130 | # config.confirm_within = 3.days
131 |
132 | # If true, requires any email changes to be confirmed (exactly the same way as
133 | # initial account confirmation) to be applied. Requires additional unconfirmed_email
134 | # db field (see migrations). Until confirmed, new email is stored in
135 | # unconfirmed_email column, and copied to email column on successful confirmation.
136 | config.reconfirmable = true
137 |
138 | # Defines which key will be used when confirming an account
139 | # config.confirmation_keys = [:email]
140 |
141 | # ==> Configuration for :rememberable
142 | # The time the user will be remembered without asking for credentials again.
143 | # config.remember_for = 2.weeks
144 |
145 | # Invalidates all the remember me tokens when the user signs out.
146 | config.expire_all_remember_me_on_sign_out = true
147 |
148 | # If true, extends the user's remember period when remembered via cookie.
149 | # config.extend_remember_period = false
150 |
151 | # Options to be passed to the created cookie. For instance, you can set
152 | # secure: true in order to force SSL only cookies.
153 | # config.rememberable_options = {}
154 |
155 | # ==> Configuration for :validatable
156 | # Range for password length.
157 | config.password_length = 6..128
158 |
159 | # Email regex used to validate email formats. It simply asserts that
160 | # one (and only one) @ exists in the given string. This is mainly
161 | # to give user feedback and not to assert the e-mail validity.
162 | config.email_regexp = /\A[^@\s]+@[^@\s]+\z/
163 |
164 | # ==> Configuration for :timeoutable
165 | # The time you want to timeout the user session without activity. After this
166 | # time the user will be asked for credentials again. Default is 30 minutes.
167 | # config.timeout_in = 30.minutes
168 |
169 | # ==> Configuration for :lockable
170 | # Defines which strategy will be used to lock an account.
171 | # :failed_attempts = Locks an account after a number of failed attempts to sign in.
172 | # :none = No lock strategy. You should handle locking by yourself.
173 | # config.lock_strategy = :failed_attempts
174 |
175 | # Defines which key will be used when locking and unlocking an account
176 | # config.unlock_keys = [:email]
177 |
178 | # Defines which strategy will be used to unlock an account.
179 | # :email = Sends an unlock link to the user email
180 | # :time = Re-enables login after a certain amount of time (see :unlock_in below)
181 | # :both = Enables both strategies
182 | # :none = No unlock strategy. You should handle unlocking by yourself.
183 | # config.unlock_strategy = :both
184 |
185 | # Number of authentication tries before locking an account if lock_strategy
186 | # is failed attempts.
187 | # config.maximum_attempts = 20
188 |
189 | # Time interval to unlock the account if :time is enabled as unlock_strategy.
190 | # config.unlock_in = 1.hour
191 |
192 | # Warn on the last attempt before the account is locked.
193 | # config.last_attempt_warning = true
194 |
195 | # ==> Configuration for :recoverable
196 | #
197 | # Defines which key will be used when recovering the password for an account
198 | # config.reset_password_keys = [:email]
199 |
200 | # Time interval you can reset your password with a reset password key.
201 | # Don't put a too small interval or your users won't have the time to
202 | # change their passwords.
203 | config.reset_password_within = 6.hours
204 |
205 | # When set to false, does not sign a user in automatically after their password is
206 | # reset. Defaults to true, so a user is signed in automatically after a reset.
207 | # config.sign_in_after_reset_password = true
208 |
209 | # ==> Configuration for :encryptable
210 | # Allow you to use another hashing or encryption algorithm besides bcrypt (default).
211 | # You can use :sha1, :sha512 or algorithms from others authentication tools as
212 | # :clearance_sha1, :authlogic_sha512 (then you should set stretches above to 20
213 | # for default behavior) and :restful_authentication_sha1 (then you should set
214 | # stretches to 10, and copy REST_AUTH_SITE_KEY to pepper).
215 | #
216 | # Require the `devise-encryptable` gem when using anything other than bcrypt
217 | # config.encryptor = :sha512
218 |
219 | # ==> Scopes configuration
220 | # Turn scoped views on. Before rendering "sessions/new", it will first check for
221 | # "users/sessions/new". It's turned off by default because it's slower if you
222 | # are using only default views.
223 | config.scoped_views = true
224 |
225 | # Configure the default scope given to Warden. By default it's the first
226 | # devise role declared in your routes (usually :user).
227 | # config.default_scope = :user
228 |
229 | # Set this configuration to false if you want /users/sign_out to sign out
230 | # only the current scope. By default, Devise signs out all scopes.
231 | # config.sign_out_all_scopes = true
232 |
233 | # ==> Navigation configuration
234 | # Lists the formats that should be treated as navigational. Formats like
235 | # :html, should redirect to the sign in page when the user does not have
236 | # access, but formats like :xml or :json, should return 401.
237 | #
238 | # If you have any extra navigational formats, like :iphone or :mobile, you
239 | # should add them to the navigational formats lists.
240 | #
241 | # The "*/*" below is required to match Internet Explorer requests.
242 | # config.navigational_formats = ['*/*', :html]
243 |
244 | # The default HTTP method used to sign out a resource. Default is :delete.
245 | config.sign_out_via = :delete
246 |
247 | # ==> OmniAuth
248 | # Add a new OmniAuth provider. Check the wiki for more information on setting
249 | # up on your models and hooks.
250 | # config.omniauth :github, 'APP_ID', 'APP_SECRET', scope: 'user,public_repo'
251 |
252 | # ==> Warden configuration
253 | # If you want to use other strategies, that are not supported by Devise, or
254 | # change the failure app, you can configure them inside the config.warden block.
255 | #
256 | # config.warden do |manager|
257 | # manager.intercept_401 = false
258 | # manager.default_strategies(scope: :user).unshift :some_external_strategy
259 | # end
260 |
261 | # ==> Mountable engine configurations
262 | # When using Devise inside an engine, let's call it `MyEngine`, and this engine
263 | # is mountable, there are some extra configurations to be taken into account.
264 | # The following options are available, assuming the engine is mounted as:
265 | #
266 | # mount MyEngine, at: '/my_engine'
267 | #
268 | # The router that invoked `devise_for`, in the example above, would be:
269 | # config.router_name = :my_engine
270 | #
271 | # When using OmniAuth, Devise cannot automatically set OmniAuth path,
272 | # so you need to do it manually. For the users scope, it would be:
273 | # config.omniauth_path_prefix = '/my_engine/users/auth'
274 | end
275 |
--------------------------------------------------------------------------------
/config/initializers/filter_parameter_logging.rb:
--------------------------------------------------------------------------------
1 | # Be sure to restart your server when you modify this file.
2 |
3 | # Configure sensitive parameters which will be filtered from the log file.
4 | Rails.application.config.filter_parameters += [:password]
5 |
--------------------------------------------------------------------------------
/config/initializers/friendly_id.rb:
--------------------------------------------------------------------------------
1 | # FriendlyId Global Configuration
2 | #
3 | # Use this to set up shared configuration options for your entire application.
4 | # Any of the configuration options shown here can also be applied to single
5 | # models by passing arguments to the `friendly_id` class method or defining
6 | # methods in your model.
7 | #
8 | # To learn more, check out the guide:
9 | #
10 | # http://norman.github.io/friendly_id/file.Guide.html
11 |
12 | FriendlyId.defaults do |config|
13 | # ## Reserved Words
14 | #
15 | # Some words could conflict with Rails's routes when used as slugs, or are
16 | # undesirable to allow as slugs. Edit this list as needed for your app.
17 | config.use :reserved
18 |
19 | config.reserved_words = %w(new edit index session login logout users admin
20 | stylesheets assets javascripts images)
21 |
22 | # ## Friendly Finders
23 | #
24 | # Uncomment this to use friendly finders in all models. By default, if
25 | # you wish to find a record by its friendly id, you must do:
26 | #
27 | # MyModel.friendly.find('foo')
28 | #
29 | # If you uncomment this, you can do:
30 | #
31 | # MyModel.find('foo')
32 | #
33 | # This is significantly more convenient but may not be appropriate for
34 | # all applications, so you must explicity opt-in to this behavior. You can
35 | # always also configure it on a per-model basis if you prefer.
36 | #
37 | # Something else to consider is that using the :finders addon boosts
38 | # performance because it will avoid Rails-internal code that makes runtime
39 | # calls to `Module.extend`.
40 | #
41 | # config.use :finders
42 | #
43 | # ## Slugs
44 | #
45 | # Most applications will use the :slugged module everywhere. If you wish
46 | # to do so, uncomment the following line.
47 | #
48 | # config.use :slugged
49 | #
50 | # By default, FriendlyId's :slugged addon expects the slug column to be named
51 | # 'slug', but you can change it if you wish.
52 | #
53 | # config.slug_column = 'slug'
54 | #
55 | # When FriendlyId can not generate a unique ID from your base method, it appends
56 | # a UUID, separated by a single dash. You can configure the character used as the
57 | # separator. If you're upgrading from FriendlyId 4, you may wish to replace this
58 | # with two dashes.
59 | #
60 | # config.sequence_separator = '-'
61 | #
62 | # ## Tips and Tricks
63 | #
64 | # ### Controlling when slugs are generated
65 | #
66 | # As of FriendlyId 5.0, new slugs are generated only when the slug field is
67 | # nil, but if you're using a column as your base method can change this
68 | # behavior by overriding the `should_generate_new_friendly_id` method that
69 | # FriendlyId adds to your model. The change below makes FriendlyId 5.0 behave
70 | # more like 4.0.
71 | #
72 | # config.use Module.new {
73 | # def should_generate_new_friendly_id?
74 | # slug.blank? || _changed?
75 | # end
76 | # }
77 | #
78 | # FriendlyId uses Rails's `parameterize` method to generate slugs, but for
79 | # languages that don't use the Roman alphabet, that's not usually sufficient.
80 | # Here we use the Babosa library to transliterate Russian Cyrillic slugs to
81 | # ASCII. If you use this, don't forget to add "babosa" to your Gemfile.
82 | #
83 | # config.use Module.new {
84 | # def normalize_friendly_id(text)
85 | # text.to_slug.normalize! :transliterations => [:russian, :latin]
86 | # end
87 | # }
88 | end
89 |
--------------------------------------------------------------------------------
/config/initializers/inflections.rb:
--------------------------------------------------------------------------------
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
17 |
--------------------------------------------------------------------------------
/config/initializers/kaminari_config.rb:
--------------------------------------------------------------------------------
1 | Kaminari.configure do |config|
2 | config.default_per_page = 20
3 | # config.max_per_page = nil
4 | # config.window = 4
5 | # config.outer_window = 0
6 | # config.left = 0
7 | # config.right = 0
8 | # config.page_method_name = :page
9 | # config.param_name = :page
10 | end
11 |
--------------------------------------------------------------------------------
/config/initializers/mime_types.rb:
--------------------------------------------------------------------------------
1 | # Be sure to restart your server when you modify this file.
2 |
3 | # Add new mime types for use in respond_to blocks:
4 | # Mime::Type.register "text/richtext", :rtf
5 |
--------------------------------------------------------------------------------
/config/initializers/new_framework_defaults.rb:
--------------------------------------------------------------------------------
1 | # Be sure to restart your server when you modify this file.
2 | #
3 | # This file contains migration options to ease your Rails 5.0 upgrade.
4 | #
5 | # Once upgraded flip defaults one by one to migrate to the new default.
6 | #
7 | # Read the Guide for Upgrading Ruby on Rails for more info on each option.
8 |
9 | # Enable per-form CSRF tokens. Previous versions had false.
10 | Rails.application.config.action_controller.per_form_csrf_tokens = true
11 |
12 | # Enable origin-checking CSRF mitigation. Previous versions had false.
13 | Rails.application.config.action_controller.forgery_protection_origin_check = true
14 |
15 | # Make Ruby 2.4 preserve the timezone of the receiver when calling `to_time`.
16 | # Previous versions had false.
17 | ActiveSupport.to_time_preserves_timezone = true
18 |
19 | # Require `belongs_to` associations by default. Previous versions had false.
20 | Rails.application.config.active_record.belongs_to_required_by_default = true
21 |
22 | # Do not halt callback chains when a callback returns false. Previous versions had true.
23 | ActiveSupport.halt_callback_chains_on_return_false = false
24 |
25 | # Configure SSL options to enable HSTS with subdomains. Previous versions had false.
26 | Rails.application.config.ssl_options = { hsts: { subdomains: true } }
27 |
--------------------------------------------------------------------------------
/config/initializers/rails_admin.rb:
--------------------------------------------------------------------------------
1 | RailsAdmin.config do |config|
2 | ### Popular gems integration
3 |
4 | ## == Devise ==
5 | config.authenticate_with do
6 | warden.authenticate! scope: :admin
7 | end
8 | config.current_user_method(&:current_admin)
9 |
10 | ## == Cancan ==
11 | # config.authorize_with :cancan
12 |
13 | ## == Pundit ==
14 | # config.authorize_with :pundit
15 |
16 | ## == PaperTrail ==
17 | # config.audit_with :paper_trail, 'User', 'PaperTrail::Version' # PaperTrail >= 3.0.0
18 |
19 | ### More at https://github.com/sferik/rails_admin/wiki/Base-configuration
20 |
21 | config.actions do
22 | dashboard # mandatory
23 | index # mandatory
24 | new do
25 | except [SeoTool]
26 | end
27 |
28 | export
29 | bulk_delete
30 | show
31 | edit
32 | delete do
33 | except [SeoTool]
34 | end
35 |
36 | ## With an audit adapter, you can add:
37 | # history_index
38 | # history_show
39 |
40 | nestable
41 | end
42 |
43 | config.main_app_name = ['Rollinbox', '']
44 | end
45 |
--------------------------------------------------------------------------------
/config/initializers/session_store.rb:
--------------------------------------------------------------------------------
1 | # Be sure to restart your server when you modify this file.
2 |
3 | Rails.application.config.session_store :cookie_store, key: '_rollinbox_session'
4 |
--------------------------------------------------------------------------------
/config/initializers/wrap_parameters.rb:
--------------------------------------------------------------------------------
1 | # Be sure to restart your server when you modify this file.
2 |
3 | # This file contains settings for ActionController::ParamsWrapper which
4 | # is enabled by default.
5 |
6 | # Enable parameter wrapping for JSON. You can disable this by setting :format to an empty array.
7 | ActiveSupport.on_load(:action_controller) do
8 | wrap_parameters format: [:json]
9 | end
10 |
11 | # To enable root element in JSON for ActiveRecord objects.
12 | # ActiveSupport.on_load(:active_record) do
13 | # self.include_root_in_json = true
14 | # end
15 |
--------------------------------------------------------------------------------
/config/locales/devise.en.yml:
--------------------------------------------------------------------------------
1 | # Additional translations at https://github.com/plataformatec/devise/wiki/I18n
2 |
3 | en:
4 | devise:
5 | confirmations:
6 | confirmed: "Your email address has been successfully confirmed."
7 | send_instructions: "You will receive an email with instructions for how to confirm your email address in a few minutes."
8 | send_paranoid_instructions: "If your email address exists in our database, you will receive an email with instructions for how to confirm your email address in a few minutes."
9 | failure:
10 | already_authenticated: "You are already signed in."
11 | inactive: "Your account is not activated yet."
12 | invalid: "Invalid %{authentication_keys} or password."
13 | locked: "Your account is locked."
14 | last_attempt: "You have one more attempt before your account is locked."
15 | not_found_in_database: "Invalid %{authentication_keys} or password."
16 | timeout: "Your session expired. Please sign in again to continue."
17 | unauthenticated: "You need to sign in or sign up before continuing."
18 | unconfirmed: "You have to confirm your email address before continuing."
19 | mailer:
20 | confirmation_instructions:
21 | subject: "Confirmation instructions"
22 | reset_password_instructions:
23 | subject: "Reset password instructions"
24 | unlock_instructions:
25 | subject: "Unlock instructions"
26 | password_change:
27 | subject: "Password Changed"
28 | omniauth_callbacks:
29 | failure: "Could not authenticate you from %{kind} because \"%{reason}\"."
30 | success: "Successfully authenticated from %{kind} account."
31 | passwords:
32 | no_token: "You can't access this page without coming from a password reset email. If you do come from a password reset email, please make sure you used the full URL provided."
33 | send_instructions: "You will receive an email with instructions on how to reset your password in a few minutes."
34 | send_paranoid_instructions: "If your email address exists in our database, you will receive a password recovery link at your email address in a few minutes."
35 | updated: "Your password has been changed successfully. You are now signed in."
36 | updated_not_active: "Your password has been changed successfully."
37 | registrations:
38 | destroyed: "Bye! Your account has been successfully cancelled. We hope to see you again soon."
39 | signed_up: "Welcome! You have signed up successfully."
40 | signed_up_but_inactive: "You have signed up successfully. However, we could not sign you in because your account is not yet activated."
41 | signed_up_but_locked: "You have signed up successfully. However, we could not sign you in because your account is locked."
42 | signed_up_but_unconfirmed: "A message with a confirmation link has been sent to your email address. Please follow the link to activate your account."
43 | update_needs_confirmation: "You updated your account successfully, but we need to verify your new email address. Please check your email and follow the confirm link to confirm your new email address."
44 | updated: "Your account has been updated successfully."
45 | sessions:
46 | signed_in: "Signed in successfully."
47 | signed_out: "Signed out successfully."
48 | already_signed_out: "Signed out successfully."
49 | shared:
50 | links:
51 | back: Back
52 | didn_t_receive_confirmation_instructions: Didn't receive confirmation instructions?
53 | didn_t_receive_unlock_instructions: Didn't receive unlock instructions?
54 | forgot_your_password: Forgot your password?
55 | sign_in: Sign in
56 | sign_in_with_provider: Sign in with %{provider}
57 | sign_up: Sign up
58 | unlocks:
59 | send_instructions: "You will receive an email with instructions for how to unlock your account in a few minutes."
60 | send_paranoid_instructions: "If your account exists, you will receive an email with instructions for how to unlock it in a few minutes."
61 | unlocked: "Your account has been unlocked successfully. Please sign in to continue."
62 | errors:
63 | messages:
64 | already_confirmed: "was already confirmed, please try signing in"
65 | confirmation_period_expired: "needs to be confirmed within %{period}, please request a new one"
66 | expired: "has expired, please request a new one"
67 | not_found: "not found"
68 | not_locked: "was not locked"
69 | not_saved:
70 | one: "1 error prohibited this %{resource} from being saved:"
71 | other: "%{count} errors prohibited this %{resource} from being saved:"
72 |
--------------------------------------------------------------------------------
/config/locales/devise.fr.yml:
--------------------------------------------------------------------------------
1 | fr:
2 | activerecord:
3 | attributes:
4 | user:
5 | current_password: Mot de passe actuel
6 | email: Courriel
7 | password: Mot de passe
8 | password_confirmation: Confirmation du mot de passe
9 | remember_me: Se souvenir de moi
10 | reset_password_token: Clé de Réinitialisation du Mot de Passe
11 | unlock_token: Clé de déblocage
12 | models:
13 | user: Utilisateur
14 | devise:
15 | confirmations:
16 | confirmed: Votre compte a été confirmé avec succès.
17 | new:
18 | resend_confirmation_instructions: Renvoyer les instructions de confirmation
19 | send_instructions: Vous allez recevoir sous quelques minutes un courriel comportant des instructions pour confirmer votre compte.
20 | send_paranoid_instructions: Si votre courriel existe sur notre base de données, vous recevrez sous quelques minutes un message avec des instructions pour confirmer votre compte.
21 | failure:
22 | already_authenticated: Vous êtes déjà connecté(e).
23 | inactive: Votre compte n’est pas encore activé.
24 | invalid: Courriel ou mot de passe incorrect.
25 | last_attempt: Il vous reste une chance avant que votre compte soit bloqué.
26 | locked: Votre compte est verrouillé.
27 | not_found_in_database: Courriel ou mot de passe incorrect.
28 | timeout: Votre session est expirée, veuillez vous reconnecter pour continuer.
29 | unauthenticated: Vous devez vous connecter ou vous enregistrer pour continuer.
30 | unconfirmed: Vous devez confirmer votre compte par courriel.
31 | mailer:
32 | confirmation_instructions:
33 | action: Confirmer mon courriel
34 | greeting: Bienvenue %{recipient}!
35 | instruction: 'Vous pouvez confirmer votre courriel grâce au lien ci-dessous:'
36 | subject: Instructions de confirmation
37 | password_change:
38 | greeting: Bonjour %{recipient}!
39 | message: Nous vous contactons pour vous notifier que votre mot de passe a été modifié.
40 | subject: Mot de passe modifié.
41 | reset_password_instructions:
42 | action: Changer mon mot de passe
43 | greeting: Bonjour %{recipient}!
44 | instruction: 'Quelqu''un a demandé un lien pour changer votre mot de passe, le voici :'
45 | instruction_2: Si vous n'avez pas émis cette demande, merci d'ignorer ce courriel.
46 | instruction_3: Votre mot de passe ne changera pas tant que vous n'aurez pas cliqué sur ce lien et renseigné un nouveau mot de passe.
47 | subject: Instructions pour changer le mot de passe
48 | unlock_instructions:
49 | action: Débloquer mon compte
50 | greeting: Bonjour %{recipient}!
51 | instruction: 'Suivez ce lien pour débloquer votre compte:'
52 | message: Votre compte a été bloqué suite à un nombre d'essais de connexions manquées trop important
53 | subject: Instructions pour déverrouiller le compte
54 | omniauth_callbacks:
55 | failure: 'Nous ne pouvons pas vous authentifier depuis %{kind} pour la raison suivante : ''%{reason}''.'
56 | success: Autorisé avec succès par votre compte %{kind}.
57 | passwords:
58 | edit:
59 | change_my_password: Changer mon mot de passe
60 | change_your_password: Changer votre mot de passe
61 | confirm_new_password: Confirmez votre nouveau mot de passe
62 | new_password: Nouveau mot de passe
63 | new:
64 | forgot_your_password: Mot de passe oublié ?
65 | send_me_reset_password_instructions: Envoyez-moi des instructions pour réinitialiser mon mot de passe
66 | no_token: Vous ne pouvez pas accéder à cette page si vous n’y accédez pas depuis un courriel de réinitialisation de mot de passe. Si vous venez en effet d’un tel courriel, vérifiez que vous avez copié l’adresse URL en entier.
67 | send_instructions: Vous allez recevoir sous quelques minutes un courriel vous indiquant comment réinitialiser votre mot de passe.
68 | send_paranoid_instructions: Si votre courriel existe dans notre base de données, vous recevrez un lien vous permettant de récupérer votre mot de passe.
69 | updated: Votre mot de passe a été modifié avec succès. Vous êtes maintenant connecté(e).
70 | updated_not_active: Votre mot de passe a été modifié avec succès.
71 | registrations:
72 | destroyed: Au revoir ! Votre compte a été annulé avec succès. Nous espérons vous revoir bientôt.
73 | edit:
74 | are_you_sure: "Êtes-vous sûr ?"
75 | cancel_my_account: Supprimer mon compte
76 | currently_waiting_confirmation_for_email: 'Confirmation en attente pour: %{email}'
77 | leave_blank_if_you_don_t_want_to_change_it: laissez ce champ vide pour le laisser inchangé
78 | title: "Éditer %{resource}"
79 | unhappy: 'Pas content '
80 | update: Modifier
81 | we_need_your_current_password_to_confirm_your_changes: nous avons besoin de votre mot de passe actuel pour valider ces modifications
82 | new:
83 | sign_up: Inscription
84 | signed_up: Bienvenue ! Vous vous êtes enregistré(e) avec succès.
85 | signed_up_but_inactive: Vous vous êtes enregistré(e) avec succès. Cependant, nous n’avons pas pu vous connecter car votre compte n’a pas encore été activé.
86 | signed_up_but_locked: Vous vous êtes enregistré(e) avec succès. Cependant, nous n’avons pas pu vous connecter car votre compte est verrouillé.
87 | signed_up_but_unconfirmed: Un message avec un lien de confirmation vous a été envoyé par mail. Veuillez suivre ce lien pour activer votre compte.
88 | update_needs_confirmation: Vous avez modifié votre compte avec succès, mais nous devons vérifier votre nouvelle adresse de courriel. Veuillez consulter vos courriels et cliquer sur le lien de confirmation pour confirmer votre nouvelle adresse.
89 | updated: Votre compte a été modifié avec succès.
90 | sessions:
91 | already_signed_out: Déconnecté(e).
92 | new:
93 | sign_in: Connexion
94 | signed_in: Connecté(e) avec succès.
95 | signed_out: Déconnecté(e) avec succès.
96 | shared:
97 | links:
98 | back: Retour
99 | didn_t_receive_confirmation_instructions: Vous n'avez pas reçu le courriel de confirmation ?
100 | didn_t_receive_unlock_instructions: Vous n'avez pas reçu le courriel de déblocage ?
101 | forgot_your_password: Mot de passe oublié ?
102 | sign_in: Connexion
103 | sign_in_with_provider: Connexion avec %{provider}
104 | sign_up: Inscription
105 | unlocks:
106 | new:
107 | resend_unlock_instructions: Renvoyer les instructions de déblocage
108 | send_instructions: Vous allez recevoir sous quelques minutes un courriel comportant des instructions pour déverrouiller votre compte.
109 | send_paranoid_instructions: Si votre courriel existe sur notre base de données, vous recevrez sous quelques minutes un message avec des instructions pour déverrouiller votre compte.
110 | unlocked: Votre compte a été déverrouillé avec succès. Veuillez vous connecter.
111 | errors:
112 | messages:
113 | already_confirmed: a déjà été confirmé(e)
114 | confirmation_period_expired: doit être confirmé(e) en %{period}, veuillez en demander un(e) autre
115 | expired: est expiré, veuillez en demander un autre
116 | not_found: n’a pas été trouvé(e)
117 | not_locked: n’était pas verrouillé(e)
118 | not_saved:
119 | one: 'une erreur a empêché ce (cet ou cette) %{resource} d’être enregistré(e) :'
120 | other: "%{count} erreurs ont empêché ce (cet ou cette) %{resource} d’être enregistré(e) :"
121 |
--------------------------------------------------------------------------------
/config/locales/en.yml:
--------------------------------------------------------------------------------
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"
24 |
--------------------------------------------------------------------------------
/config/locales/fr.yml:
--------------------------------------------------------------------------------
1 | fr:
2 | admin:
3 | actions:
4 | nestable:
5 | title: "Trier les %{model_label_plural}"
6 | menu: "Trier"
7 | breadcrumb: "Triage"
8 | link: "Triage"
9 | bulk_link: "Trier la selection de %{model_label_plural}"
10 | done: "Trié"
11 | success: "Succès"
12 | error: "Erreur"
13 | update: "Mettre à jour"
14 | live_update: "Mise à jour auto."
15 | activerecord:
16 | errors:
17 | messages:
18 | record_invalid: 'La validation a échoué : %{errors}'
19 | models:
20 | admin:
21 | one: Admin
22 | other: Admins
23 | parameter:
24 | one: Paramètre
25 | other: Paramètres
26 | content:
27 | one: Contenu
28 | other: Contenu
29 | defaults: &defaults
30 | title: Titre
31 | value: Valeur
32 | content: Contenu
33 | created_at: Créé(e) le
34 | updated_at: Mis à jours le
35 | featured: Mis en avant
36 | attributes:
37 | parameter:
38 | <<: *defaults
39 | content:
40 | <<: *defaults
41 | page:
42 | <<: *defaults
43 | admin:
44 | username: Identifiant
45 | email: E-mail
46 | encrypted_password: Mot de passe crypté
47 | password: Mot de passe
48 | reset_password_token: Token de réinitilisation de mot de passe
49 | reset_password_sent_at: Demande de réinitialisation envoyé le
50 | remember_created_at:
51 | sign_in_count: Nombre de fois conneté
52 | current_sign_in_at: Actuellement connecté le
53 | last_sign_in_at: Dernière connexion le
54 | current_sign_in_ip: Actuellement connecté via
55 | last_sign_in_ip: Dernière connexion via
56 | time:
57 | am: am
58 | formats:
59 | default: "%a, %d %b %Y %I:%M:%S %p %Z"
60 | long: "%B %d, %Y %I:%M %p"
61 | short: "%d %b %I:%M %p"
62 | pm: pm
63 | date:
64 | abbr_day_names:
65 | - Dim
66 | - Lun
67 | - Mar
68 | - Mer
69 | - Jeu
70 | - Ven
71 | - Sam
72 | abbr_month_names:
73 | -
74 | - Jan.
75 | - Fév.
76 | - Mar.
77 | - Avr.
78 | - Mai
79 | - Juin
80 | - Juil.
81 | - Août
82 | - Sept.
83 | - Oct.
84 | - Nov.
85 | - Déc.
86 | day_names:
87 | - Dimanche
88 | - Lundi
89 | - Mardi
90 | - Mercredi
91 | - Jeudi
92 | - Vendredi
93 | - Samedi
94 | formats:
95 | default: "%m-%d-%Y"
96 | long: "%B %d, %Y"
97 | short: "%b %d"
98 | month_names:
99 | -
100 | - Janvier
101 | - Février
102 | - Mars
103 | - Avril
104 | - Mai
105 | - Juin
106 | - Juillet
107 | - Août
108 | - Septembre
109 | - Octobre
110 | - Novembre
111 | - Décembre
112 | order:
113 | - :day
114 | - :month
115 | - :year
116 | datetime:
117 | distance_in_words:
118 | about_x_hours:
119 | one: environ une heure
120 | other: environ %{count} heures
121 | about_x_months:
122 | one: environ un mois
123 | other: environ %{count} mois
124 | about_x_years:
125 | one: environ un an
126 | other: environ %{count} ans
127 | almost_x_years:
128 | one: presqu'un an
129 | other: presque %{count} ans
130 | half_a_minute: une demi-minute
131 | less_than_x_minutes:
132 | zero: moins d'une minute
133 | one: moins d'une minute
134 | other: moins de %{count} minutes
135 | less_than_x_seconds:
136 | zero: moins d'une seconde
137 | one: moins d'une seconde
138 | other: moins de %{count} secondes
139 | over_x_years:
140 | one: plus d'un an
141 | other: plus de %{count} ans
142 | x_days:
143 | one: 1 jour
144 | other: "%{count} jours"
145 | x_minutes:
146 | one: 1 minute
147 | other: "%{count} minutes"
148 | x_months:
149 | one: 1 mois
150 | other: "%{count} mois"
151 | x_seconds:
152 | one: 1 seconde
153 | other: "%{count} secondes"
154 | prompts:
155 | day: Jour
156 | hour: Heure
157 | minute: Minute
158 | month: Mois
159 | second: Seconde
160 | year: Année
161 | errors:
162 | format: "%{attribute} %{message}"
163 | messages:
164 | extension_white_list_error: "Vous n'êtes pas autorisé à envoyer des fichiers %{extension}, seuls sont autorisés: %{allowed_types}"
165 | accepted: doit être accepté(e)
166 | blank: doit être rempli(e)
167 | present: doit être vide
168 | confirmation: ne concorde pas avec %{attribute}
169 | empty: doit être rempli(e)
170 | equal_to: doit être égal à %{count}
171 | even: doit être pair
172 | exclusion: n'est pas disponible
173 | greater_than: doit être supérieur à %{count}
174 | greater_than_or_equal_to: doit être supérieur ou égal à %{count}
175 | inclusion: n'est pas inclus(e) dans la liste
176 | invalid: n'est pas valide
177 | less_than: doit être inférieur à %{count}
178 | less_than_or_equal_to: doit être inférieur ou égal à %{count}
179 | not_a_number: n'est pas un nombre
180 | not_an_integer: doit être un nombre entier
181 | odd: doit être impair
182 | taken: n'est pas disponible
183 | too_long:
184 | one: est trop long (pas plus d'un caractère)
185 | other: est trop long (pas plus de %{count} caractères)
186 | too_short:
187 | one: est trop court (au moins un caractère)
188 | other: est trop court (au moins %{count} caractères)
189 | wrong_length:
190 | one: ne fait pas la bonne longueur (doit comporter un seul caractère)
191 | other: ne fait pas la bonne longueur (doit comporter %{count} caractères)
192 | other_than: doit être différent de %{count}
193 | template:
194 | body: 'Veuillez vérifier les champs suivants : '
195 | header:
196 | one: 'Impossible d''enregistrer ce(tte) %{model} : 1 erreur'
197 | other: 'Impossible d''enregistrer ce(tte) %{model} : %{count} erreurs'
198 | helpers:
199 | select:
200 | prompt: Veuillez sélectionner
201 | submit:
202 | create: Créer un(e) %{model}
203 | submit: Enregistrer ce(tte) %{model}
204 | update: Modifier ce(tte) %{model}
205 | number:
206 | currency:
207 | format:
208 | delimiter: " "
209 | format: "%n %u"
210 | precision: 2
211 | separator: ","
212 | significant: false
213 | strip_insignificant_zeros: false
214 | unit: "€"
215 | format:
216 | delimiter: " "
217 | precision: 3
218 | separator: ","
219 | significant: false
220 | strip_insignificant_zeros: false
221 | human:
222 | decimal_units:
223 | format: "%n %u"
224 | units:
225 | billion: milliard
226 | million: million
227 | quadrillion: million de milliards
228 | thousand: millier
229 | trillion: billion
230 | unit: ''
231 | format:
232 | delimiter: ''
233 | precision: 2
234 | significant: true
235 | strip_insignificant_zeros: true
236 | storage_units:
237 | format: "%n %u"
238 | units:
239 | byte:
240 | one: octet
241 | other: octets
242 | gb: Go
243 | kb: ko
244 | mb: Mo
245 | tb: To
246 | percentage:
247 | format:
248 | delimiter: ''
249 | format: "%n%"
250 | precision:
251 | format:
252 | delimiter: ''
253 | support:
254 | array:
255 | last_word_connector: " et "
256 | two_words_connector: " et "
257 | words_connector: ", "
258 | views:
259 | pagination:
260 | first: "« Premier"
261 | last: Dernier »
262 | next: Suivant ›
263 | previous: "‹ Précédent"
264 | truncate: "…"
265 |
--------------------------------------------------------------------------------
/config/locales/rails_admin.fr.yml:
--------------------------------------------------------------------------------
1 | fr:
2 | admin:
3 | js:
4 | true: Vrai
5 | false: Faux
6 | is_present: Est présent
7 | is_blank: Est vide
8 | date: Date ...
9 | between_and_: Entre le ... et le ...
10 | today: "Aujourd'hui"
11 | yesterday: Hier
12 | this_week: Cette semaine
13 | last_week: Semaine précédente
14 | number: Nombre ...
15 | contains: Contient
16 | is_exactly: Est exactement
17 | starts_with: Commence par
18 | ends_with: Termine par
19 | loading: "Chargement..."
20 | home:
21 | name: Accueil
22 | pagination:
23 | previous: "« Préc."
24 | next: "Suiv. »"
25 | truncate: "…"
26 | misc:
27 | filter_date_format: "dd/mm/yy" # a combination of 'dd', 'mm' and 'yy' with any delimiter. No other interpolation will be done!
28 | search: "Rechercher"
29 | filter: "Filtrer"
30 | refresh: "Rafraîchir"
31 | show_all: "Voir tout"
32 | add_filter: "Ajouter un filtre..."
33 | bulk_menu_title: "Objets sélectionnés..."
34 | remove: "Enlever"
35 | add_new: "Ajouter nouveau"
36 | chosen: "%{name} choisis"
37 | chose_all: "Prendre tout"
38 | clear_all: "Tout enlever"
39 | up: "Monter"
40 | down: "Descendre"
41 | navigation: "Navigation"
42 | navigation_static_label: "Liens"
43 | log_out: "Déconnexion"
44 | ago: ""
45 | flash:
46 | successful: "%{name} a été %{action} avec succès"
47 | error: "%{name} n'a pas pu être %{action}"
48 | noaction: "Aucune action !"
49 | model_not_found: "Le model '%{model}' n'a pas été trouvé"
50 | object_not_found: "%{model} avec id '%{id}' n'a pas été trouvé"
51 | table_headers:
52 | model_name: "Nom du modèle"
53 | last_used: "Utilisé"
54 | records: "Enregistrements"
55 | username: "Utilisateur"
56 | changes: "Changements"
57 | created_at: "Date/Heure"
58 | item: "Objet"
59 | message: "Message"
60 | actions:
61 | dashboard:
62 | title: "Administration"
63 | menu: "Administration"
64 | breadcrumb: "Administration"
65 | index:
66 | title: "Listing des %{model_label_plural}"
67 | menu: "Liste"
68 | breadcrumb: "%{model_label_plural}"
69 | show:
70 | title: "Détails pour %{model_label} '%{object_label}'"
71 | menu: "Voir"
72 | breadcrumb: "%{object_label}"
73 | show_in_app:
74 | menu: "Voir dans l'application"
75 | new:
76 | title: "Création d'un(e) %{model_label}"
77 | menu: "Nouveau"
78 | breadcrumb: "Nouveau"
79 | link: "Ajouter un(e) %{model_label}"
80 | done: "créé(e)"
81 | edit:
82 | title: "Édition %{model_label} '%{object_label}'"
83 | menu: "Édition"
84 | breadcrumb: "Édition"
85 | link: "Éditer ce(tte) %{model_label}"
86 | done: "modifié(e)"
87 | delete:
88 | title: "Suppression %{model_label} '%{object_label}'"
89 | menu: "Supprimer"
90 | breadcrumb: "Suppression"
91 | link: "Supprimer '%{object_label}'"
92 | done: "supprimé(e)"
93 | bulk_delete:
94 | title: "Suppression de %{model_label_plural}"
95 | menu: "Délétion multiple"
96 | breadcrumb: "Délétion multiple"
97 | bulk_link: "Supprimer les %{model_label_plural} sélectionné(e)s"
98 | export:
99 | title: "Export de %{model_label_plural}"
100 | menu: "Export"
101 | breadcrumb: "Export"
102 | link: "Export des %{model_label_plural} trouvé(e)s"
103 | bulk_link: "Exporter les %{model_label_plural} sélectionné(e)s"
104 | done: "exporté(e)s"
105 | history_index:
106 | title: "Historique des %{model_label_plural}"
107 | menu: "Historique"
108 | breadcrumb: "Historique"
109 | history_show:
110 | title: "Historique %{model_label} '%{object_label}'"
111 | menu: "Historique"
112 | breadcrumb: "Historique"
113 | form:
114 | cancel: "Annuler"
115 | basic_info: "Informations de base"
116 | required: "Obligatoire"
117 | optional: "Facultatif"
118 | one_char: "caractère"
119 | char_length_up_to: "longueur jusqu'à"
120 | char_length_of: "longueur de"
121 | save: "Enregistrer"
122 | save_and_add_another: "Enregistrer et créer un(e) autre"
123 | save_and_edit: "Enregistrer et re-modifier"
124 | all_of_the_following_related_items_will_be_deleted: " ? Les objets suivants peuvent être affectés (supprimés ou orphelins) : "
125 | are_you_sure_you_want_to_delete_the_object: "Êtes-vous sûr de vouloir supprimer cet(te) %{model_name}"
126 | confirmation: "Oui, je suis sûr(e)"
127 | bulk_delete: "Les objets suivants seront supprimés, ce qui pourrait supprimer ou rendre orpheline les dépendances affichées :"
128 | new_model: "%{name} (nouveau)"
129 | export:
130 | confirmation: "Exporter en %{name}"
131 | select: "Sélectionner les champs à exporter"
132 | select_all_fields: "Selectionner Tous Les Champs"
133 | fields_from: "Champs pour '%{name}'"
134 | fields_from_associated: "Champs pour l'association '%{name}'"
135 | display: "Afficher %{name} : %{type}"
136 | options_for: "Options pour %{name}"
137 | empty_value_for_associated_objects: ""
138 | click_to_reverse_selection: 'Cliquer pour inverser la sélection'
139 | csv:
140 | header_for_root_methods: "%{name}" # 'model' is available
141 | header_for_association_methods: "%{name} [%{association}]"
142 | encoding_to: "Encoder en..."
143 | encoding_to_help: "Choisir l'encodage de sortie. Laisser vide pour garder l'encodage d'entrée : (%{name})"
144 | skip_header: "Pas d'en-tête"
145 | skip_header_help: "Ne pas afficher d'en-tête (pas de champs de description)"
146 | default_col_sep: ";"
147 | col_sep: "Séparateur de colonnes"
148 | col_sep_help: "Laisser vide pour utiliser la valeur par défaut recommandée pour votre système ('%{value}')"
149 |
--------------------------------------------------------------------------------
/config/locales/rollincode.fr.yml:
--------------------------------------------------------------------------------
1 | fr:
2 | admin:
3 | rollincode:
4 | number: "Nombre"
5 | show: "Voir les"
--------------------------------------------------------------------------------
/config/locales/simple_form.en.yml:
--------------------------------------------------------------------------------
1 | en:
2 | simple_form:
3 | "yes": 'Yes'
4 | "no": 'No'
5 | required:
6 | text: 'required'
7 | mark: '*'
8 | # You can uncomment the line below if you need to overwrite the whole required html.
9 | # When using html, text and mark won't be used.
10 | # html: '*'
11 | error_notification:
12 | default_message: "Some errors were found, please take a look:"
13 | # Labels and hints examples
14 | # labels:
15 | # password: 'Password'
16 | # user:
17 | # new:
18 | # email: 'E-mail para efetuar o sign in.'
19 | # edit:
20 | # email: 'E-mail.'
21 | # hints:
22 | # username: 'User name to sign in.'
23 | # password: 'No special characters, please.'
24 |
25 |
--------------------------------------------------------------------------------
/config/locales/simple_form.fr.yml:
--------------------------------------------------------------------------------
1 | fr:
2 | simple_form:
3 | "yes": 'Oui'
4 | "no": 'Non'
5 | required:
6 | # text: 'obligatoire'
7 | # mark: '*'
8 | # You can uncomment the line below if you need to overwrite the whole required html.
9 | # When using html, text and mark won't be used.
10 | html: '*'
11 | error_notification:
12 | default_message: "Merci de corriger les champs ci-dessous:"
13 | labels:
14 | defaults:
15 | first_name: "Prénom"
16 | last_name: "Nom"
17 | address: "Adresse"
18 | facebook_identifier: Identifiant Facebook
19 | city: Ville
20 | postal_code: Code postal
21 | country: Pays
22 | phone: Téléphone
23 | email: E-mail
24 | birth_date: Date de naissance
25 | is_subscribed_newsletter: Inscrit à la newsletter
26 | has_accepted_rules: A accepté les règles
27 | created_at: Créé le
28 | updated_at: Mis à jour le
29 |
--------------------------------------------------------------------------------
/config/puma.rb:
--------------------------------------------------------------------------------
1 | # Puma can serve each request in a thread from an internal thread pool.
2 | # The `threads` method setting takes two numbers a minimum and maximum.
3 | # Any libraries that use thread pools should be configured to match
4 | # the maximum value specified for Puma. Default is set to 5 threads for minimum
5 | # and maximum, this matches the default thread size of Active Record.
6 | #
7 | threads_count = ENV.fetch("RAILS_MAX_THREADS") { 5 }.to_i
8 | threads threads_count, threads_count
9 |
10 | # Specifies the `port` that Puma will listen on to receive requests, default is 3000.
11 | #
12 | port ENV.fetch("PORT") { 3000 }
13 |
14 | # Specifies the `environment` that Puma will run in.
15 | #
16 | environment ENV.fetch("RAILS_ENV") { "development" }
17 |
18 | # Specifies the number of `workers` to boot in clustered mode.
19 | # Workers are forked webserver processes. If using threads and workers together
20 | # the concurrency of the application would be max `threads` * `workers`.
21 | # Workers do not work on JRuby or Windows (both of which do not support
22 | # processes).
23 | #
24 | # workers ENV.fetch("WEB_CONCURRENCY") { 2 }
25 |
26 | # Use the `preload_app!` method when specifying a `workers` number.
27 | # This directive tells Puma to first boot the application and load code
28 | # before forking the application. This takes advantage of Copy On Write
29 | # process behavior so workers use less memory. If you use this option
30 | # you need to make sure to reconnect any threads in the `on_worker_boot`
31 | # block.
32 | #
33 | # preload_app!
34 |
35 | # The code in the `on_worker_boot` will be called if you are using
36 | # clustered mode by specifying a number of `workers`. After each worker
37 | # process is booted this block will be run, if you are using `preload_app!`
38 | # option you will want to use this block to reconnect to any threads
39 | # or connections that may have been created at application boot, Ruby
40 | # cannot share connections between processes.
41 | #
42 | # on_worker_boot do
43 | # ActiveRecord::Base.establish_connection if defined?(ActiveRecord)
44 | # end
45 |
46 | # Allow puma to be restarted by `rails restart` command.
47 | plugin :tmp_restart
48 |
--------------------------------------------------------------------------------
/config/recaptcha.rb:
--------------------------------------------------------------------------------
1 | Recaptcha.configure do |config|
2 | config.public_key = 'KEY'
3 | config.private_key = 'KEY'
4 | end
5 |
--------------------------------------------------------------------------------
/config/routes.rb:
--------------------------------------------------------------------------------
1 | Rails.application.routes.draw do
2 | # For details on the DSL available within this file, see http://guides.rubyonrails.org/routing.html
3 |
4 | # USERS & ADMINISTRATION
5 | devise_for :admins
6 | mount RailsAdmin::Engine => '/admin', as: 'rails_admin'
7 |
8 | # FROALA (WYSIWYG)
9 | post '/froala_upload' => 'froala#upload'
10 | post '/froala_manage' => 'froala#manage'
11 | delete '/froala_delete' => 'froala#delete'
12 |
13 | # HOME / root
14 | root to: 'site#index'
15 | end
16 |
--------------------------------------------------------------------------------
/config/schedule.rb:
--------------------------------------------------------------------------------
1 | # Use this file to easily define all of your cron jobs.
2 | #
3 | # It's helpful, but not entirely necessary to understand cron before proceeding.
4 | # http://en.wikipedia.org/wiki/Cron
5 |
6 | # Example:
7 | #
8 | # set :output, "/path/to/my/cron_log.log"
9 | #
10 | # every 2.hours do
11 | # command "/usr/bin/some_great_command"
12 | # runner "MyModel.some_method"
13 | # rake "some:great:rake:task"
14 | # end
15 | #
16 | # every 4.days do
17 | # runner "AnotherModel.prune_old_records"
18 | # end
19 |
20 | # Learn more: http://github.com/javan/whenever
21 |
--------------------------------------------------------------------------------
/config/secrets.yml:
--------------------------------------------------------------------------------
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 `rails 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: 530117e1846b70954a81110125c146d4d2daa8c20c68cf1d3321e6846c3308a58e8b085f23c43509ba88ead030fb40db6ae1356ad90170efa641c49b6d440a05
15 |
16 | test:
17 | secret_key_base: c9baac6eec4855350d65d544a8d01c273312158168c1bf3b9410c744df3035a44d968d87370ebde3a5bd6797860a57109ebd54e544a1c2bba97cb34342d14e75
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"] %>
23 |
--------------------------------------------------------------------------------
/config/sitemap.rb:
--------------------------------------------------------------------------------
1 | # Set the host name for URL creation
2 | SitemapGenerator::Sitemap.default_host = 'http://www.example.com'
3 |
4 | SitemapGenerator::Sitemap.create do
5 | # Put links creation logic here.
6 | #
7 | # The root path '/' and sitemap index file are added automatically for you.
8 | # Links are added to the Sitemap in the order they are specified.
9 | #
10 | # Usage: add(path, options={})
11 | # (default options are used if you don't specify)
12 | #
13 | # Defaults: :priority => 0.5, :changefreq => 'weekly',
14 | # :lastmod => Time.now, :host => default_host
15 | #
16 | # Examples:
17 | #
18 | # Add '/articles'
19 | #
20 | # add articles_path, :priority => 0.7, :changefreq => 'daily'
21 | #
22 | # Add all articles:
23 | #
24 | # Article.find_each do |article|
25 | # add article_path(article), :lastmod => article.updated_at
26 | # end
27 | end
28 |
--------------------------------------------------------------------------------
/config/spring.rb:
--------------------------------------------------------------------------------
1 | %w(
2 | .ruby-version
3 | .rbenv-vars
4 | tmp/restart.txt
5 | tmp/caching-dev.txt
6 | ).each { |path| Spring.watch(path) }
7 |
--------------------------------------------------------------------------------
/db/migrate/20161209084231_create_contents.rb:
--------------------------------------------------------------------------------
1 | class CreateContents < ActiveRecord::Migration[5.0]
2 | def change
3 | create_table :contents do |t|
4 | t.string :code, index: {unique: true}, null: false
5 | t.text :content, null: false
6 |
7 | t.timestamps null: false
8 | end
9 | end
10 | end
11 |
--------------------------------------------------------------------------------
/db/migrate/20161209084433_create_parameters.rb:
--------------------------------------------------------------------------------
1 | class CreateParameters < ActiveRecord::Migration[5.0]
2 | def change
3 | create_table :parameters do |t|
4 | t.string :code, index: {unique: true}, null: false
5 | t.string :value, null: false
6 |
7 | t.timestamps null: false
8 | end
9 | end
10 | end
11 |
--------------------------------------------------------------------------------
/db/migrate/20161209093430_devise_create_admins.rb:
--------------------------------------------------------------------------------
1 | class DeviseCreateAdmins < ActiveRecord::Migration[5.0]
2 | def change
3 | create_table :admins do |t|
4 | ## Database authenticatable
5 | t.string :email, null: false, default: ""
6 | t.string :encrypted_password, null: false, default: ""
7 |
8 | ## Recoverable
9 | t.string :reset_password_token
10 | t.datetime :reset_password_sent_at
11 |
12 | ## Rememberable
13 | t.datetime :remember_created_at
14 |
15 | ## Trackable
16 | t.integer :sign_in_count, default: 0, null: false
17 | t.datetime :current_sign_in_at
18 | t.datetime :last_sign_in_at
19 | t.string :current_sign_in_ip
20 | t.string :last_sign_in_ip
21 |
22 | ## Confirmable
23 | # t.string :confirmation_token
24 | # t.datetime :confirmed_at
25 | # t.datetime :confirmation_sent_at
26 | # t.string :unconfirmed_email # Only if using reconfirmable
27 |
28 | ## Lockable
29 | # t.integer :failed_attempts, default: 0, null: false # Only if lock strategy is :failed_attempts
30 | # t.string :unlock_token # Only if unlock strategy is :email or :both
31 | # t.datetime :locked_at
32 |
33 |
34 | t.timestamps null: false
35 | end
36 |
37 | add_index :admins, :email, unique: true
38 | add_index :admins, :reset_password_token, unique: true
39 | # add_index :admins, :confirmation_token, unique: true
40 | # add_index :admins, :unlock_token, unique: true
41 | end
42 | end
43 |
--------------------------------------------------------------------------------
/db/migrate/20161209093436_devise_create_users.rb:
--------------------------------------------------------------------------------
1 | class DeviseCreateUsers < ActiveRecord::Migration[5.0]
2 | def change
3 | create_table :users do |t|
4 | ## Database authenticatable
5 | t.string :email, null: false, default: ""
6 | t.string :encrypted_password, null: false, default: ""
7 |
8 | ## Recoverable
9 | t.string :reset_password_token
10 | t.datetime :reset_password_sent_at
11 |
12 | ## Rememberable
13 | t.datetime :remember_created_at
14 |
15 | ## Trackable
16 | t.integer :sign_in_count, default: 0, null: false
17 | t.datetime :current_sign_in_at
18 | t.datetime :last_sign_in_at
19 | t.string :current_sign_in_ip
20 | t.string :last_sign_in_ip
21 |
22 | ## Confirmable
23 | # t.string :confirmation_token
24 | # t.datetime :confirmed_at
25 | # t.datetime :confirmation_sent_at
26 | # t.string :unconfirmed_email # Only if using reconfirmable
27 |
28 | ## Lockable
29 | # t.integer :failed_attempts, default: 0, null: false # Only if lock strategy is :failed_attempts
30 | # t.string :unlock_token # Only if unlock strategy is :email or :both
31 | # t.datetime :locked_at
32 |
33 |
34 | t.timestamps null: false
35 | end
36 |
37 | add_index :users, :email, unique: true
38 | add_index :users, :reset_password_token, unique: true
39 | # add_index :users, :confirmation_token, unique: true
40 | # add_index :users, :unlock_token, unique: true
41 | end
42 | end
43 |
--------------------------------------------------------------------------------
/db/migrate/20161209094716_create_friendly_id_slugs.rb:
--------------------------------------------------------------------------------
1 | class CreateFriendlyIdSlugs < ActiveRecord::Migration[5.0]
2 | def change
3 | create_table :friendly_id_slugs do |t|
4 | t.string :slug, :null => false
5 | t.integer :sluggable_id, :null => false
6 | t.string :sluggable_type, :limit => 50
7 | t.string :scope
8 | t.datetime :created_at
9 | end
10 | add_index :friendly_id_slugs, :sluggable_id
11 | add_index :friendly_id_slugs, [:slug, :sluggable_type]
12 | add_index :friendly_id_slugs, [:slug, :sluggable_type, :scope], :unique => true
13 | add_index :friendly_id_slugs, :sluggable_type
14 | end
15 | end
16 |
--------------------------------------------------------------------------------
/db/migrate/20161209095051_create_seos.rb:
--------------------------------------------------------------------------------
1 | class CreateSeos < ActiveRecord::Migration[5.0]
2 | def change
3 | create_table :seos do |t|
4 | t.string :title, null: false
5 | t.text :description, null: false
6 |
7 | t.timestamps null: false
8 | end
9 | end
10 | end
11 |
--------------------------------------------------------------------------------
/db/migrate/20170524131642_create_seo_tools.rb:
--------------------------------------------------------------------------------
1 | class CreateSeoTools < ActiveRecord::Migration[5.0]
2 | def change
3 | create_table :seo_tools do |t|
4 | t.string :code, index: {unique: true}, null: false
5 | t.string :value
6 |
7 | t.timestamps null: false
8 | end
9 | end
10 | end
11 |
--------------------------------------------------------------------------------
/db/schema.rb:
--------------------------------------------------------------------------------
1 | # This file is auto-generated from the current state of the database. Instead
2 | # of editing this file, please use the migrations feature of Active Record to
3 | # incrementally modify your database, and then regenerate this schema definition.
4 | #
5 | # Note that this schema.rb definition is the authoritative source for your
6 | # database schema. If you need to create the application database on another
7 | # system, you should be using db:schema:load, not running all the migrations
8 | # from scratch. The latter is a flawed and unsustainable approach (the more migrations
9 | # you'll amass, the slower it'll run and the greater likelihood for issues).
10 | #
11 | # It's strongly recommended that you check this file into your version control system.
12 |
13 | ActiveRecord::Schema.define(version: 20170524131642) do
14 |
15 | create_table "admins", force: :cascade do |t|
16 | t.string "email", default: "", null: false
17 | t.string "encrypted_password", default: "", null: false
18 | t.string "reset_password_token"
19 | t.datetime "reset_password_sent_at"
20 | t.datetime "remember_created_at"
21 | t.integer "sign_in_count", default: 0, null: false
22 | t.datetime "current_sign_in_at"
23 | t.datetime "last_sign_in_at"
24 | t.string "current_sign_in_ip"
25 | t.string "last_sign_in_ip"
26 | t.datetime "created_at", null: false
27 | t.datetime "updated_at", null: false
28 | t.index ["email"], name: "index_admins_on_email", unique: true
29 | t.index ["reset_password_token"], name: "index_admins_on_reset_password_token", unique: true
30 | end
31 |
32 | create_table "contents", force: :cascade do |t|
33 | t.string "code", null: false
34 | t.text "content", null: false
35 | t.datetime "created_at", null: false
36 | t.datetime "updated_at", null: false
37 | t.index ["code"], name: "index_contents_on_code", unique: true
38 | end
39 |
40 | create_table "friendly_id_slugs", force: :cascade do |t|
41 | t.string "slug", null: false
42 | t.integer "sluggable_id", null: false
43 | t.string "sluggable_type", limit: 50
44 | t.string "scope"
45 | t.datetime "created_at"
46 | t.index ["slug", "sluggable_type", "scope"], name: "index_friendly_id_slugs_on_slug_and_sluggable_type_and_scope", unique: true
47 | t.index ["slug", "sluggable_type"], name: "index_friendly_id_slugs_on_slug_and_sluggable_type"
48 | t.index ["sluggable_id"], name: "index_friendly_id_slugs_on_sluggable_id"
49 | t.index ["sluggable_type"], name: "index_friendly_id_slugs_on_sluggable_type"
50 | end
51 |
52 | create_table "parameters", force: :cascade do |t|
53 | t.string "code", null: false
54 | t.string "value", null: false
55 | t.datetime "created_at", null: false
56 | t.datetime "updated_at", null: false
57 | t.index ["code"], name: "index_parameters_on_code", unique: true
58 | end
59 |
60 | create_table "seo_tools", force: :cascade do |t|
61 | t.string "code", null: false
62 | t.string "value"
63 | t.datetime "created_at", null: false
64 | t.datetime "updated_at", null: false
65 | t.index ["code"], name: "index_seo_tools_on_code", unique: true
66 | end
67 |
68 | create_table "seos", force: :cascade do |t|
69 | t.string "title", null: false
70 | t.text "description", null: false
71 | t.datetime "created_at", null: false
72 | t.datetime "updated_at", null: false
73 | end
74 |
75 | create_table "users", force: :cascade do |t|
76 | t.string "email", default: "", null: false
77 | t.string "encrypted_password", default: "", null: false
78 | t.string "reset_password_token"
79 | t.datetime "reset_password_sent_at"
80 | t.datetime "remember_created_at"
81 | t.integer "sign_in_count", default: 0, null: false
82 | t.datetime "current_sign_in_at"
83 | t.datetime "last_sign_in_at"
84 | t.string "current_sign_in_ip"
85 | t.string "last_sign_in_ip"
86 | t.datetime "created_at", null: false
87 | t.datetime "updated_at", null: false
88 | t.index ["email"], name: "index_users_on_email", unique: true
89 | t.index ["reset_password_token"], name: "index_users_on_reset_password_token", unique: true
90 | end
91 |
92 | end
93 |
--------------------------------------------------------------------------------
/db/seeds.rb:
--------------------------------------------------------------------------------
1 | Admin.create!(
2 | email: 'admin@admin.com',
3 | password: 'admin888',
4 | password_confirmation: 'admin888'
5 | )
6 |
7 | Parameter.create!(
8 | code: 'DEFAULT_SEO_TITLE',
9 | value: 'DEFAULT TITLE'
10 | )
11 |
12 | Parameter.create!(
13 | code: 'DEFAULT_SEO_DESCRIPTION',
14 | value: 'DEFAULT DESCRIPTION'
15 | )
16 |
17 | SeoTool.create!(
18 | code: 'GOOGLE_SITE_VERIFICATION_CODE',
19 | value: ''
20 | )
21 |
22 | SeoTool.create!(
23 | code: 'GOOGLE_ANALYTIC_CODE',
24 | value: ''
25 | )
26 |
27 | SeoTool.create!(
28 | code: 'GOOGLE_TAG_MANAGER_CODE',
29 | value: ''
30 | )
--------------------------------------------------------------------------------
/lib/assets/.keep:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/rollincode/rollinbox/154c435d07dc5576867bc7daf46f547b66b12384/lib/assets/.keep
--------------------------------------------------------------------------------
/lib/tasks/.keep:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/rollincode/rollinbox/154c435d07dc5576867bc7daf46f547b66b12384/lib/tasks/.keep
--------------------------------------------------------------------------------
/lib/tasks/auto_annotate_models.rake:
--------------------------------------------------------------------------------
1 | # NOTE: only doing this in development as some production environments (Heroku)
2 | # NOTE: are sensitive to local FS writes, and besides -- it's just not proper
3 | # NOTE: to have a dev-mode tool do its thing in production.
4 | if Rails.env.development?
5 | task :set_annotation_options do
6 | # You can override any of these by setting an environment variable of the
7 | # same name.
8 | Annotate.set_defaults({
9 | 'position_in_routes' => "before",
10 | 'position_in_class' => "before",
11 | 'position_in_test' => "before",
12 | 'position_in_fixture' => "before",
13 | 'position_in_factory' => "before",
14 | 'show_indexes' => "true",
15 | 'simple_indexes' => "false",
16 | 'model_dir' => "app/models",
17 | 'include_version' => "false",
18 | 'require' => "",
19 | 'exclude_tests' => "false",
20 | 'exclude_fixtures' => "false",
21 | 'exclude_factories' => "false",
22 | 'ignore_model_sub_dir' => "false",
23 | 'skip_on_db_migrate' => "false",
24 | 'format_bare' => "true",
25 | 'format_rdoc' => "false",
26 | 'format_markdown' => "false",
27 | 'sort' => "false",
28 | 'force' => "false",
29 | 'trace' => "false",
30 | })
31 | end
32 |
33 | Annotate.load_tasks
34 | end
35 |
--------------------------------------------------------------------------------
/lib/templates/erb/scaffold/_form.html.erb:
--------------------------------------------------------------------------------
1 | <%%= simple_form_for(@<%= singular_table_name %>) do |f| %>
2 | <%%= f.error_notification %>
3 |
4 |