7 | Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book. It has survived not only five centuries, but also the leap into electronic typesetting, remaining essentially unchanged. It was popularised in the 1960s with the release of Letraset sheets containing Lorem Ipsum passages, and more recently with desktop publishing software like Aldus PageMaker including versions of Lorem Ipsum.
8 |
4 | VueGraphqlAuthExample
5 | <%= csrf_meta_tags %>
6 | <%= csp_meta_tag %>
7 |
8 | <%= stylesheet_link_tag 'application', media: 'all', 'data-turbolinks-track': 'reload' %>
9 | <%= javascript_include_tag 'application', 'data-turbolinks-track': 'reload' %>
10 |
11 | <%= javascript_pack_tag "application" %>
12 | <%= stylesheet_link_tag "application", :media => "all" %>
13 |
14 |
15 |
16 |
17 |
18 |
19 |
--------------------------------------------------------------------------------
/app/views/layouts/mailer.html.erb:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
8 |
9 |
10 |
11 | <%= yield %>
12 |
13 |
14 |
--------------------------------------------------------------------------------
/app/views/layouts/mailer.text.erb:
--------------------------------------------------------------------------------
1 | <%= yield %>
2 |
--------------------------------------------------------------------------------
/bin/bundle:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env ruby
2 | # frozen_string_literal: true
3 |
4 | #
5 | # This file was generated by Bundler.
6 | #
7 | # The application 'bundle' is installed as part of a gem, and
8 | # this file is here to facilitate running it.
9 | #
10 |
11 | require "rubygems"
12 |
13 | m = Module.new do
14 | module_function
15 |
16 | def invoked_as_script?
17 | File.expand_path($0) == File.expand_path(__FILE__)
18 | end
19 |
20 | def env_var_version
21 | ENV["BUNDLER_VERSION"]
22 | end
23 |
24 | def cli_arg_version
25 | return unless invoked_as_script? # don't want to hijack other binstubs
26 | return unless "update".start_with?(ARGV.first || " ") # must be running `bundle update`
27 | bundler_version = nil
28 | update_index = nil
29 | ARGV.each_with_index do |a, i|
30 | if update_index && update_index.succ == i && a =~ Gem::Version::ANCHORED_VERSION_PATTERN
31 | bundler_version = a
32 | end
33 | next unless a =~ /\A--bundler(?:[= ](#{Gem::Version::VERSION_PATTERN}))?\z/
34 | bundler_version = $1 || ">= 0.a"
35 | update_index = i
36 | end
37 | bundler_version
38 | end
39 |
40 | def gemfile
41 | gemfile = ENV["BUNDLE_GEMFILE"]
42 | return gemfile if gemfile && !gemfile.empty?
43 |
44 | File.expand_path("../../Gemfile", __FILE__)
45 | end
46 |
47 | def lockfile
48 | lockfile =
49 | case File.basename(gemfile)
50 | when "gems.rb" then gemfile.sub(/\.rb$/, gemfile)
51 | else "#{gemfile}.lock"
52 | end
53 | File.expand_path(lockfile)
54 | end
55 |
56 | def lockfile_version
57 | return unless File.file?(lockfile)
58 | lockfile_contents = File.read(lockfile)
59 | return unless lockfile_contents =~ /\n\nBUNDLED WITH\n\s{2,}(#{Gem::Version::VERSION_PATTERN})\n/
60 | Regexp.last_match(1)
61 | end
62 |
63 | def bundler_version
64 | @bundler_version ||= begin
65 | env_var_version || cli_arg_version ||
66 | lockfile_version || "#{Gem::Requirement.default}.a"
67 | end
68 | end
69 |
70 | def load_bundler!
71 | ENV["BUNDLE_GEMFILE"] ||= gemfile
72 |
73 | # must dup string for RG < 1.8 compatibility
74 | activate_bundler(bundler_version.dup)
75 | end
76 |
77 | def activate_bundler(bundler_version)
78 | if Gem::Version.correct?(bundler_version) && Gem::Version.new(bundler_version).release < Gem::Version.new("2.0")
79 | bundler_version = "< 2"
80 | end
81 | gem_error = activation_error_handling do
82 | gem "bundler", bundler_version
83 | end
84 | return if gem_error.nil?
85 | require_error = activation_error_handling do
86 | require "bundler/version"
87 | end
88 | return if require_error.nil? && Gem::Requirement.new(bundler_version).satisfied_by?(Gem::Version.new(Bundler::VERSION))
89 | warn "Activating bundler (#{bundler_version}) failed:\n#{gem_error.message}\n\nTo install the version of bundler this project requires, run `gem install bundler -v '#{bundler_version}'`"
90 | exit 42
91 | end
92 |
93 | def activation_error_handling
94 | yield
95 | nil
96 | rescue StandardError, LoadError => e
97 | e
98 | end
99 | end
100 |
101 | m.load_bundler!
102 |
103 | if m.invoked_as_script?
104 | load Gem.bin_path("bundler", "bundle")
105 | end
106 |
--------------------------------------------------------------------------------
/bin/rails:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env ruby
2 | begin
3 | load File.expand_path('../spring', __FILE__)
4 | rescue LoadError => e
5 | raise unless e.message.include?('spring')
6 | end
7 | APP_PATH = File.expand_path('../config/application', __dir__)
8 | require_relative '../config/boot'
9 | require 'rails/commands'
10 |
--------------------------------------------------------------------------------
/bin/rake:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env ruby
2 | begin
3 | load File.expand_path('../spring', __FILE__)
4 | rescue LoadError => e
5 | raise unless e.message.include?('spring')
6 | end
7 | require_relative '../config/boot'
8 | require 'rake'
9 | Rake.application.run
10 |
--------------------------------------------------------------------------------
/bin/rspec:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env ruby
2 | # frozen_string_literal: true
3 |
4 | #
5 | # This file was generated by Bundler.
6 | #
7 | # The application 'rspec' is installed as part of a gem, and
8 | # this file is here to facilitate running it.
9 | #
10 |
11 | require "pathname"
12 | ENV["BUNDLE_GEMFILE"] ||= File.expand_path("../../Gemfile",
13 | Pathname.new(__FILE__).realpath)
14 |
15 | bundle_binstub = File.expand_path("../bundle", __FILE__)
16 |
17 | if File.file?(bundle_binstub)
18 | if File.read(bundle_binstub, 300) =~ /This file was generated by Bundler/
19 | load(bundle_binstub)
20 | else
21 | abort("Your `bin/bundle` was not generated by Bundler, so this binstub cannot run.
22 | Replace `bin/bundle` by running `bundle binstubs bundler --force`, then run this command again.")
23 | end
24 | end
25 |
26 | require "rubygems"
27 | require "bundler/setup"
28 |
29 | load Gem.bin_path("rspec-core", "rspec")
30 |
--------------------------------------------------------------------------------
/bin/setup:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env ruby
2 | require "fileutils"
3 | include FileUtils
4 |
5 | # path to your application root.
6 | APP_ROOT = File.expand_path("..", __dir__)
7 |
8 | def system!(*args)
9 | system(*args) || abort("\n== Command #{args} failed ==")
10 | end
11 |
12 | chdir APP_ROOT do
13 | # This script is a starting point to setup your application.
14 | # Add necessary setup steps to this file.
15 |
16 | puts "== Installing dependencies =="
17 | system! "gem install bundler --conservative"
18 | system("bundle check") || system!("bundle install")
19 |
20 | # Install JavaScript dependencies if using Yarn
21 | system("bin/yarn")
22 |
23 | puts "\n== Preparing database =="
24 | system! "bin/rails db:setup"
25 |
26 | puts "\n== Removing old logs and tempfiles =="
27 | system! "bin/rails log:clear tmp:clear"
28 | end
29 |
--------------------------------------------------------------------------------
/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 | spring = lockfile.specs.detect { |spec| spec.name == 'spring' }
12 | if spring
13 | Gem.use_paths Gem.dir, Bundler.bundle_path.to_s, *Gem.path
14 | gem 'spring', spring.version
15 | require 'spring/binstub'
16 | end
17 | end
18 |
--------------------------------------------------------------------------------
/bin/update:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env ruby
2 | require 'fileutils'
3 | include FileUtils
4 |
5 | # path to your application root.
6 | APP_ROOT = File.expand_path('..', __dir__)
7 |
8 | def system!(*args)
9 | system(*args) || abort("\n== Command #{args} failed ==")
10 | end
11 |
12 | chdir APP_ROOT do
13 | # This script is a way to update your development environment automatically.
14 | # Add necessary update steps to this file.
15 |
16 | puts '== Installing dependencies =='
17 | system! 'gem install bundler --conservative'
18 | system('bundle check') || system!('bundle install')
19 |
20 | # Install JavaScript dependencies if using Yarn
21 | # system('bin/yarn')
22 |
23 | puts "\n== Updating database =="
24 | system! 'bin/rails db:migrate'
25 |
26 | puts "\n== Removing old logs and tempfiles =="
27 | system! 'bin/rails log:clear tmp:clear'
28 |
29 | puts "\n== Restarting application server =="
30 | system! 'bin/rails restart'
31 | end
32 |
--------------------------------------------------------------------------------
/bin/webpack:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env ruby
2 |
3 | ENV["RAILS_ENV"] ||= ENV["RACK_ENV"] || "development"
4 | ENV["NODE_ENV"] ||= "development"
5 |
6 | require "pathname"
7 | ENV["BUNDLE_GEMFILE"] ||= File.expand_path("../../Gemfile",
8 | Pathname.new(__FILE__).realpath)
9 |
10 | require "rubygems"
11 | require "bundler/setup"
12 |
13 | require "webpacker"
14 | require "webpacker/webpack_runner"
15 |
16 | APP_ROOT = File.expand_path("..", __dir__)
17 | Dir.chdir(APP_ROOT) do
18 | Webpacker::WebpackRunner.run(ARGV)
19 | end
20 |
--------------------------------------------------------------------------------
/bin/webpack-dev-server:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env ruby
2 | # frozen_string_literal: true
3 |
4 | ENV["RAILS_ENV"] ||= ENV["RACK_ENV"] || "development"
5 | ENV["NODE_ENV"] ||= ENV["RAILS_ENV"]
6 |
7 | require "pathname"
8 | ENV["BUNDLE_GEMFILE"] ||= File.expand_path("../../Gemfile",
9 | Pathname.new(__FILE__).realpath)
10 |
11 | require "rubygems"
12 | require "bundler/setup"
13 |
14 | require "webpacker"
15 | require "webpacker/dev_server_runner"
16 | Webpacker::DevServerRunner.run(ARGV)
17 |
--------------------------------------------------------------------------------
/bin/yarn:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env ruby
2 | APP_ROOT = File.expand_path('..', __dir__)
3 | Dir.chdir(APP_ROOT) do
4 | begin
5 | exec "yarnpkg", *ARGV
6 | rescue Errno::ENOENT
7 | $stderr.puts "Yarn executable was not detected in the system."
8 | $stderr.puts "Download Yarn at https://yarnpkg.com/en/docs/install"
9 | exit 1
10 | end
11 | end
12 |
--------------------------------------------------------------------------------
/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 | module VueGraphqlAuthExample
10 | class Application < Rails::Application
11 | # Initialize configuration defaults for originally generated Rails version.
12 | config.load_defaults 5.2
13 |
14 | # Settings in config/environments/* take precedence over those specified here.
15 | # Application configuration can go into files in config/initializers
16 | # -- all .rb files in that directory are automatically loaded after loading
17 | # the framework and any gems in your application.
18 | config.autoload_paths += %W[#{config.root}/app]
19 | end
20 | end
21 |
--------------------------------------------------------------------------------
/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 | require 'bootsnap/setup' # Speed up boot time by caching expensive operations.
5 |
--------------------------------------------------------------------------------
/config/cable.yml:
--------------------------------------------------------------------------------
1 | development:
2 | adapter: async
3 |
4 | test:
5 | adapter: async
6 |
7 | production:
8 | adapter: redis
9 | url: <%= ENV.fetch("REDIS_URL") { "redis://localhost:6379/1" } %>
10 | channel_prefix: vue_graphql_auth_example_production
11 |
--------------------------------------------------------------------------------
/config/credentials.yml.enc:
--------------------------------------------------------------------------------
1 | Igkt3wiaBVEvfl+KxIjgeuUxc4w8ZQ0LaaPhldBLTB4GmFfTj+51vHsZsNfuOHBiRylEcdHch3WWEcYpHvPPiQeFMM7Y1CVBvcM+RaZM9MPr6VBXxyQhMSuTDaQ5bRp7MQ5QA8n1z0mGwuXB/2/CcBAW0Oe4W/ks7WW3XfLXWA1wnwVdHBLYc9nRkJ3/i8Jb0o6bhy9prPYMG2L643xvDTzbyTeYO31XpXcOrlJD2egbWWgVDU4wJESp+Cvwy4mPHMpUDi7KzgwlZlJbjrEa3S3aV83E5hk3WIA2rPISa+yZdREO+iFFoFJN65D4OPTQG2wokhK+gY42YOD+s7zbFX2/E7faBWnEYevTy4PnONOpEA2Z5t4BsD3CORLIpM9gKcmPy5Q9f6npd21+n5LfSKfY12C1NuJtA7AO--bwYfwArRQekB2BHN--AdY6cDqIeaku4M55FhVmjQ==
--------------------------------------------------------------------------------
/config/database.yml:
--------------------------------------------------------------------------------
1 | # PostgreSQL. Versions 8.2 and up are supported.
2 | #
3 | # Install the pg driver:
4 | # gem install pg
5 | # On OS X with Homebrew:
6 | # gem install pg -- --with-pg-config=/usr/local/bin/pg_config
7 | # On OS X with MacPorts:
8 | # gem install pg -- --with-pg-config=/opt/local/lib/postgresql84/bin/pg_config
9 | # On Windows:
10 | # gem install pg
11 | # Choose the win32 build.
12 | # Install PostgreSQL and put its /bin directory on your path.
13 | #
14 | # Configure Using Gemfile
15 | # gem 'pg'
16 | #
17 | default: &default
18 | adapter: postgresql
19 | encoding: unicode
20 | # For details on connection pooling, see rails configuration guide
21 | # http://guides.rubyonrails.org/configuring.html#database-pooling
22 | pool: <%= ENV.fetch("RAILS_MAX_THREADS") { 5 } %>
23 | timeout: 5000
24 |
25 | development:
26 | <<: *default
27 | database: vue_graphql_auth_example_development
28 |
29 | # The specified database role being used to connect to postgres.
30 | # To create additional roles in postgres see `$ createuser --help`.
31 | # When left blank, postgres will use the default role. This is
32 | # the same name as the operating system user that initialized the database.
33 | #username: vue_graphql_auth_example
34 |
35 | # The password associated with the postgres role (username).
36 | #password:
37 |
38 | # Connect on a TCP socket. Omitted by default since the client uses a
39 | # domain socket that doesn't need configuration. Windows does not have
40 | # domain sockets, so uncomment these lines.
41 | #host: localhost
42 |
43 | # The TCP port the server listens on. Defaults to 5432.
44 | # If your server runs on a different port number, change accordingly.
45 | #port: 5432
46 |
47 | # Schema search path. The server defaults to $user,public
48 | #schema_search_path: myapp,sharedapp,public
49 |
50 | # Minimum log levels, in increasing order:
51 | # debug5, debug4, debug3, debug2, debug1,
52 | # log, notice, warning, error, fatal, and panic
53 | # Defaults to warning.
54 | #min_messages: notice
55 |
56 | # Warning: The database defined as "test" will be erased and
57 | # re-generated from your development database when you run "rake".
58 | # Do not set this db to the same as development or production.
59 | test:
60 | <<: *default
61 | database: vue_graphql_auth_example_test
62 |
63 | # As with config/secrets.yml, you never want to store sensitive information,
64 | # like your database password, in your source code. If your source code is
65 | # ever seen by anyone, they now have access to your database.
66 | #
67 | # Instead, provide the password as a unix environment variable when you boot
68 | # the app. Read http://guides.rubyonrails.org/configuring.html#configuring-a-database
69 | # for a full rundown on how to provide these environment variables in a
70 | # production deployment.
71 | #
72 | # On Heroku and other platform providers, you may have a full connection URL
73 | # available as an environment variable. For example:
74 | #
75 | # DATABASE_URL="postgres://myuser:mypass@localhost/somedatabase"
76 | #
77 | # You can use this database configuration with:
78 | #
79 | # production:
80 | # url: <%= ENV['DATABASE_URL'] %>
81 | #
82 | production:
83 | <<: *default
84 | database: vue_graphql_auth_example_production
85 | username: vue_graphql_auth_example
86 | password: <%= ENV['VUE_GRAPHQL_AUTH_EXAMPLE_DATABASE_PASSWORD'] %>
87 |
--------------------------------------------------------------------------------
/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 | config.action_mailer.default_url_options = { host: 'localhost', port: 3000 }
3 |
4 | # Settings specified here will take precedence over those in config/application.rb.
5 |
6 | # In the development environment your application's code is reloaded on
7 | # every request. This slows down response time but is perfect for development
8 | # since you don't have to restart the web server when you make code changes.
9 | config.cache_classes = false
10 |
11 | # Do not eager load code on boot.
12 | config.eager_load = false
13 |
14 | # Show full error reports.
15 | config.consider_all_requests_local = true
16 |
17 | # Enable/disable caching. By default caching is disabled.
18 | # Run rails dev:cache to toggle caching.
19 | if Rails.root.join('tmp', 'caching-dev.txt').exist?
20 | config.action_controller.perform_caching = true
21 |
22 | config.cache_store = :memory_store
23 | config.public_file_server.headers = {
24 | 'Cache-Control' => "public, max-age=#{2.days.to_i}"
25 | }
26 | else
27 | config.action_controller.perform_caching = false
28 |
29 | config.cache_store = :null_store
30 | end
31 |
32 | # Store uploaded files on the local file system (see config/storage.yml for options)
33 | config.active_storage.service = :local
34 |
35 | # Don't care if the mailer can't send.
36 | config.action_mailer.raise_delivery_errors = false
37 |
38 | config.action_mailer.perform_caching = false
39 |
40 | # Print deprecation notices to the Rails logger.
41 | config.active_support.deprecation = :log
42 |
43 | # Raise an error on page load if there are pending migrations.
44 | config.active_record.migration_error = :page_load
45 |
46 | # Highlight code that triggered database queries in logs.
47 | config.active_record.verbose_query_logs = true
48 |
49 | # Debug mode disables concatenation and preprocessing of assets.
50 | # This option may cause significant delays in view rendering with a large
51 | # number of complex assets.
52 | config.assets.debug = true
53 |
54 | # Suppress logger output for asset requests.
55 | config.assets.quiet = true
56 |
57 | # Raises error for missing translations
58 | # config.action_view.raise_on_missing_translations = true
59 |
60 | # Use an evented file watcher to asynchronously detect changes in source code,
61 | # routes, locales, etc. This feature depends on the listen gem.
62 | config.file_watcher = ActiveSupport::EventedFileUpdateChecker
63 | end
64 |
--------------------------------------------------------------------------------
/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 | # Ensures that a master key has been made available in either ENV["RAILS_MASTER_KEY"]
18 | # or in config/master.key. This key is used to decrypt credentials (and other encrypted files).
19 | # config.require_master_key = true
20 |
21 | # Disable serving static files from the `/public` folder by default since
22 | # Apache or NGINX already handles this.
23 | config.public_file_server.enabled = ENV['RAILS_SERVE_STATIC_FILES'].present?
24 |
25 | # Compress JavaScripts and CSS.
26 | config.assets.js_compressor = :uglifier
27 | # config.assets.css_compressor = :sass
28 |
29 | # Do not fallback to assets pipeline if a precompiled asset is missed.
30 | config.assets.compile = false
31 |
32 | # `config.assets.precompile` and `config.assets.version` have moved to config/initializers/assets.rb
33 |
34 | # Enable serving of images, stylesheets, and JavaScripts from an asset server.
35 | # config.action_controller.asset_host = 'http://assets.example.com'
36 |
37 | # Specifies the header that your server uses for sending files.
38 | # config.action_dispatch.x_sendfile_header = 'X-Sendfile' # for Apache
39 | # config.action_dispatch.x_sendfile_header = 'X-Accel-Redirect' # for NGINX
40 |
41 | # Store uploaded files on the local file system (see config/storage.yml for options)
42 | config.active_storage.service = :local
43 |
44 | # Mount Action Cable outside main process or domain
45 | # config.action_cable.mount_path = nil
46 | # config.action_cable.url = 'wss://example.com/cable'
47 | # config.action_cable.allowed_request_origins = [ 'http://example.com', /http:\/\/example.*/ ]
48 |
49 | # Force all access to the app over SSL, use Strict-Transport-Security, and use secure cookies.
50 | # config.force_ssl = true
51 |
52 | # Use the lowest log level to ensure availability of diagnostic information
53 | # when problems arise.
54 | config.log_level = :debug
55 |
56 | # Prepend all log lines with the following tags.
57 | config.log_tags = [ :request_id ]
58 |
59 | # Use a different cache store in production.
60 | # config.cache_store = :mem_cache_store
61 |
62 | # Use a real queuing backend for Active Job (and separate queues per environment)
63 | # config.active_job.queue_adapter = :resque
64 | # config.active_job.queue_name_prefix = "vue_graphql_auth_example_#{Rails.env}"
65 |
66 | config.action_mailer.perform_caching = false
67 |
68 | # Ignore bad email addresses and do not raise email delivery errors.
69 | # Set this to true and configure the email server for immediate delivery to raise delivery errors.
70 | # config.action_mailer.raise_delivery_errors = false
71 |
72 | # Enable locale fallbacks for I18n (makes lookups for any locale fall back to
73 | # the I18n.default_locale when a translation cannot be found).
74 | config.i18n.fallbacks = true
75 |
76 | # Send deprecation notices to registered listeners.
77 | config.active_support.deprecation = :notify
78 |
79 | # Use default logging formatter so that PID and timestamp are not suppressed.
80 | config.log_formatter = ::Logger::Formatter.new
81 |
82 | # Use a different logger for distributed setups.
83 | # require 'syslog/logger'
84 | # config.logger = ActiveSupport::TaggedLogging.new(Syslog::Logger.new 'app-name')
85 |
86 | if ENV["RAILS_LOG_TO_STDOUT"].present?
87 | logger = ActiveSupport::Logger.new(STDOUT)
88 | logger.formatter = config.log_formatter
89 | config.logger = ActiveSupport::TaggedLogging.new(logger)
90 | end
91 |
92 | # Do not dump schema after migrations.
93 | config.active_record.dump_schema_after_migration = false
94 | end
95 |
--------------------------------------------------------------------------------
/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=#{1.hour.to_i}"
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 |
31 | # Store uploaded files on the local file system in a temporary directory
32 | config.active_storage.service = :test
33 |
34 | config.action_mailer.perform_caching = false
35 |
36 | # Tell Action Mailer not to deliver emails to the real world.
37 | # The :test delivery method accumulates sent emails in the
38 | # ActionMailer::Base.deliveries array.
39 | config.action_mailer.delivery_method = :test
40 |
41 | # Print deprecation notices to the stderr.
42 | config.active_support.deprecation = :stderr
43 |
44 | # Raises error for missing translations
45 | # config.action_view.raise_on_missing_translations = true
46 | end
47 |
--------------------------------------------------------------------------------
/config/initializers/application_controller_renderer.rb:
--------------------------------------------------------------------------------
1 | # Be sure to restart your server when you modify this file.
2 |
3 | # ActiveSupport::Reloader.to_prepare do
4 | # ApplicationController.renderer.defaults.merge!(
5 | # http_host: 'example.org',
6 | # https: false
7 | # )
8 | # end
9 |
--------------------------------------------------------------------------------
/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 | # Add Yarn node_modules folder to the asset load path.
9 | Rails.application.config.assets.paths << Rails.root.join('node_modules')
10 |
11 | # Precompile additional assets.
12 | # application.js, application.css, and all non-JS/CSS in the app/assets
13 | # folder are already added.
14 | # Rails.application.config.assets.precompile += %w( admin.js admin.css )
15 |
--------------------------------------------------------------------------------
/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/content_security_policy.rb:
--------------------------------------------------------------------------------
1 | # Be sure to restart your server when you modify this file.
2 |
3 | # Define an application-wide content security policy
4 | # For further information see the following documentation
5 | # https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Content-Security-Policy
6 |
7 | # Rails.application.config.content_security_policy do |policy|
8 | # policy.default_src :self, :https
9 | # policy.font_src :self, :https, :data
10 | # policy.img_src :self, :https, :data
11 | # policy.object_src :none
12 | # policy.script_src :self, :https
13 | # policy.style_src :self, :https
14 |
15 | # # Specify URI for violation reports
16 | # # policy.report_uri "/csp-violation-report-endpoint"
17 | # end
18 |
19 | # If you are using UJS then enable automatic nonce generation
20 | # Rails.application.config.content_security_policy_nonce_generator = -> request { SecureRandom.base64(16) }
21 |
22 | # Report CSP violations to a specified URI
23 | # For further information see the following documentation:
24 | # https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Content-Security-Policy-Report-Only
25 | # Rails.application.config.content_security_policy_report_only = true
26 |
--------------------------------------------------------------------------------
/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 | # frozen_string_literal: true
2 |
3 | Devise::TokenAuthenticatable.setup do |config|
4 | # enables the expiration of a token after a specified amount of time,
5 | # requires an additional field on the model: `authentication_token_created_at`
6 | # defaults to nil
7 | # config.token_expires_in = 1.day
8 |
9 | # set the authentication key name used by this module,
10 | # defaults to :auth_token
11 | # config.token_authentication_key = :auth_token
12 |
13 | # enable reset of the authentication token before the model is saved,
14 | # defaults to false
15 | # config.should_reset_authentication_token = true
16 |
17 | # enables the setting of the authentication token - if not already - before the model is saved,
18 | # defaults to false
19 | config.should_ensure_authentication_token = true
20 | end
21 |
22 | # Use this hook to configure devise mailer, warden hooks and so forth.
23 | # Many of these configuration options can be set straight in your model.
24 | Devise.setup do |config|
25 | # The secret key used by Devise. Devise uses this key to generate
26 | # random tokens. Changing this key will render invalid all existing
27 | # confirmation, reset password and unlock tokens in the database.
28 | # Devise will use the `secret_key_base` as its `secret_key`
29 | # by default. You can change it below and use your own secret key.
30 | # config.secret_key = 'dec4f922677ba09b52f419f4ba46a13ebdfd10bac421e96e5577e4b6f95a961efa49a5614704b58553dff708ab98275c2b38a4d62d2fb7a7957df1cfa85cedd0'
31 |
32 | # ==> Controller configuration
33 | # Configure the parent class to the devise controllers.
34 | # config.parent_controller = 'DeviseController'
35 |
36 | # ==> Mailer Configuration
37 | # Configure the e-mail address which will be shown in Devise::Mailer,
38 | # note that it will be overwritten if you use your own mailer class
39 | # with default "from" parameter.
40 | config.mailer_sender = 'please-change-me-at-config-initializers-devise@example.com'
41 |
42 | # Configure the class responsible to send e-mails.
43 | # config.mailer = 'Devise::Mailer'
44 |
45 | # Configure the parent class responsible to send e-mails.
46 | # config.parent_mailer = 'ActionMailer::Base'
47 |
48 | # ==> ORM configuration
49 | # Load and configure the ORM. Supports :active_record (default) and
50 | # :mongoid (bson_ext recommended) by default. Other ORMs may be
51 | # available as additional gems.
52 | require 'devise/orm/active_record'
53 |
54 | # ==> Configuration for any authentication mechanism
55 | # Configure which keys are used when authenticating a user. The default is
56 | # just :email. You can configure it to use [:username, :subdomain], so for
57 | # authenticating a user, both parameters are required. Remember that those
58 | # parameters are used only when authenticating and not when retrieving from
59 | # session. If you need permissions, you should implement that in a before filter.
60 | # You can also supply a hash where the value is a boolean determining whether
61 | # or not authentication should be aborted when the value is not present.
62 | # config.authentication_keys = [:email]
63 |
64 | # Configure parameters from the request object used for authentication. Each entry
65 | # given should be a request method and it will automatically be passed to the
66 | # find_for_authentication method and considered in your model lookup. For instance,
67 | # if you set :request_keys to [:subdomain], :subdomain will be used on authentication.
68 | # The same considerations mentioned for authentication_keys also apply to request_keys.
69 | # config.request_keys = []
70 |
71 | # Configure which authentication keys should be case-insensitive.
72 | # These keys will be downcased upon creating or modifying a user and when used
73 | # to authenticate or find a user. Default is :email.
74 | config.case_insensitive_keys = [:email]
75 |
76 | # Configure which authentication keys should have whitespace stripped.
77 | # These keys will have whitespace before and after removed upon creating or
78 | # modifying a user and when used to authenticate or find a user. Default is :email.
79 | config.strip_whitespace_keys = [:email]
80 |
81 | # Tell if authentication through request.params is enabled. True by default.
82 | # It can be set to an array that will enable params authentication only for the
83 | # given strategies, for example, `config.params_authenticatable = [:database]` will
84 | # enable it only for database (email + password) authentication.
85 | # config.params_authenticatable = true
86 |
87 | # Tell if authentication through HTTP Auth is enabled. False by default.
88 | # It can be set to an array that will enable http authentication only for the
89 | # given strategies, for example, `config.http_authenticatable = [:database]` will
90 | # enable it only for database authentication. The supported strategies are:
91 | # :database = Support basic authentication with authentication key + password
92 | config.http_authenticatable = true
93 |
94 | # If 401 status code should be returned for AJAX requests. True by default.
95 | config.http_authenticatable_on_xhr = false
96 |
97 | # The realm used in Http Basic Authentication. 'Application' by default.
98 | # config.http_authentication_realm = 'Application'
99 |
100 | # It will change confirmation, password recovery and other workflows
101 | # to behave the same regardless if the e-mail provided was right or wrong.
102 | # Does not affect registerable.
103 | # config.paranoid = true
104 |
105 | # By default Devise will store the user in session. You can skip storage for
106 | # particular strategies by setting this option.
107 | # Notice that if you are skipping storage for all authentication paths, you
108 | # may want to disable generating routes to Devise's sessions controller by
109 | # passing skip: :sessions to `devise_for` in your config/routes.rb
110 | config.skip_session_storage = [:http_auth, :token_auth]
111 |
112 | # By default, Devise cleans up the CSRF token on authentication to
113 | # avoid CSRF token fixation attacks. This means that, when using AJAX
114 | # requests for sign in and sign up, you need to get a new CSRF token
115 | # from the server. You can disable this option at your own risk.
116 | # config.clean_up_csrf_token_on_authentication = true
117 |
118 | # When false, Devise will not attempt to reload routes on eager load.
119 | # This can reduce the time taken to boot the app but if your application
120 | # requires the Devise mappings to be loaded during boot time the application
121 | # won't boot properly.
122 | # config.reload_routes = true
123 |
124 | # ==> Configuration for :database_authenticatable
125 | # For bcrypt, this is the cost for hashing the password and defaults to 11. If
126 | # using other algorithms, it sets how many times you want the password to be hashed.
127 | #
128 | # Limiting the stretches to just one in testing will increase the performance of
129 | # your test suite dramatically. However, it is STRONGLY RECOMMENDED to not use
130 | # a value less than 10 in other environments. Note that, for bcrypt (the default
131 | # algorithm), the cost increases exponentially with the number of stretches (e.g.
132 | # a value of 20 is already extremely slow: approx. 60 seconds for 1 calculation).
133 | config.stretches = Rails.env.test? ? 1 : 11
134 |
135 | # Set up a pepper to generate the hashed password.
136 | # config.pepper = 'cf36639a337f996e9b4715cdb547d789aab679d6d798e30353d3ef4ca86b5b7aba692813ccd4c5ad584145573785926d5e4bbf2bbe7def8c12acaa2b97f21b56'
137 |
138 | # Send a notification to the original email when the user's email is changed.
139 | # config.send_email_changed_notification = false
140 |
141 | # Send a notification email when the user's password is changed.
142 | # config.send_password_change_notification = false
143 |
144 | # ==> Configuration for :confirmable
145 | # A period that the user is allowed to access the website even without
146 | # confirming their account. For instance, if set to 2.days, the user will be
147 | # able to access the website for two days without confirming their account,
148 | # access will be blocked just in the third day.
149 | # You can also set it to nil, which will allow the user to access the website
150 | # without confirming their account.
151 | # Default is 0.days, meaning the user cannot access the website without
152 | # confirming their account.
153 | # config.allow_unconfirmed_access_for = 2.days
154 |
155 | # A period that the user is allowed to confirm their account before their
156 | # token becomes invalid. For example, if set to 3.days, the user can confirm
157 | # their account within 3 days after the mail was sent, but on the fourth day
158 | # their account can't be confirmed with the token any more.
159 | # Default is nil, meaning there is no restriction on how long a user can take
160 | # before confirming their account.
161 | # config.confirm_within = 3.days
162 |
163 | # If true, requires any email changes to be confirmed (exactly the same way as
164 | # initial account confirmation) to be applied. Requires additional unconfirmed_email
165 | # db field (see migrations). Until confirmed, new email is stored in
166 | # unconfirmed_email column, and copied to email column on successful confirmation.
167 | config.reconfirmable = true
168 |
169 | # Defines which key will be used when confirming an account
170 | # config.confirmation_keys = [:email]
171 |
172 | # ==> Configuration for :rememberable
173 | # The time the user will be remembered without asking for credentials again.
174 | # config.remember_for = 2.weeks
175 |
176 | # Invalidates all the remember me tokens when the user signs out.
177 | config.expire_all_remember_me_on_sign_out = true
178 |
179 | # If true, extends the user's remember period when remembered via cookie.
180 | # config.extend_remember_period = false
181 |
182 | # Options to be passed to the created cookie. For instance, you can set
183 | # secure: true in order to force SSL only cookies.
184 | # config.rememberable_options = {}
185 |
186 | # ==> Configuration for :validatable
187 | # Range for password length.
188 | config.password_length = 6..128
189 |
190 | # Email regex used to validate email formats. It simply asserts that
191 | # one (and only one) @ exists in the given string. This is mainly
192 | # to give user feedback and not to assert the e-mail validity.
193 | config.email_regexp = /\A[^@\s]+@[^@\s]+\z/
194 |
195 | # ==> Configuration for :timeoutable
196 | # The time you want to timeout the user session without activity. After this
197 | # time the user will be asked for credentials again. Default is 30 minutes.
198 | # config.timeout_in = 30.minutes
199 |
200 | # ==> Configuration for :lockable
201 | # Defines which strategy will be used to lock an account.
202 | # :failed_attempts = Locks an account after a number of failed attempts to sign in.
203 | # :none = No lock strategy. You should handle locking by yourself.
204 | # config.lock_strategy = :failed_attempts
205 |
206 | # Defines which key will be used when locking and unlocking an account
207 | # config.unlock_keys = [:email]
208 |
209 | # Defines which strategy will be used to unlock an account.
210 | # :email = Sends an unlock link to the user email
211 | # :time = Re-enables login after a certain amount of time (see :unlock_in below)
212 | # :both = Enables both strategies
213 | # :none = No unlock strategy. You should handle unlocking by yourself.
214 | # config.unlock_strategy = :both
215 |
216 | # Number of authentication tries before locking an account if lock_strategy
217 | # is failed attempts.
218 | # config.maximum_attempts = 20
219 |
220 | # Time interval to unlock the account if :time is enabled as unlock_strategy.
221 | # config.unlock_in = 1.hour
222 |
223 | # Warn on the last attempt before the account is locked.
224 | # config.last_attempt_warning = true
225 |
226 | # ==> Configuration for :recoverable
227 | #
228 | # Defines which key will be used when recovering the password for an account
229 | # config.reset_password_keys = [:email]
230 |
231 | # Time interval you can reset your password with a reset password key.
232 | # Don't put a too small interval or your users won't have the time to
233 | # change their passwords.
234 | config.reset_password_within = 6.hours
235 |
236 | # When set to false, does not sign a user in automatically after their password is
237 | # reset. Defaults to true, so a user is signed in automatically after a reset.
238 | # config.sign_in_after_reset_password = true
239 |
240 | # ==> Configuration for :encryptable
241 | # Allow you to use another hashing or encryption algorithm besides bcrypt (default).
242 | # You can use :sha1, :sha512 or algorithms from others authentication tools as
243 | # :clearance_sha1, :authlogic_sha512 (then you should set stretches above to 20
244 | # for default behavior) and :restful_authentication_sha1 (then you should set
245 | # stretches to 10, and copy REST_AUTH_SITE_KEY to pepper).
246 | #
247 | # Require the `devise-encryptable` gem when using anything other than bcrypt
248 | # config.encryptor = :sha512
249 |
250 | # ==> Scopes configuration
251 | # Turn scoped views on. Before rendering "sessions/new", it will first check for
252 | # "users/sessions/new". It's turned off by default because it's slower if you
253 | # are using only default views.
254 | # config.scoped_views = false
255 |
256 | # Configure the default scope given to Warden. By default it's the first
257 | # devise role declared in your routes (usually :user).
258 | # config.default_scope = :user
259 |
260 | # Set this configuration to false if you want /users/sign_out to sign out
261 | # only the current scope. By default, Devise signs out all scopes.
262 | # config.sign_out_all_scopes = true
263 |
264 | # ==> Navigation configuration
265 | # Lists the formats that should be treated as navigational. Formats like
266 | # :html, should redirect to the sign in page when the user does not have
267 | # access, but formats like :xml or :json, should return 401.
268 | #
269 | # If you have any extra navigational formats, like :iphone or :mobile, you
270 | # should add them to the navigational formats lists.
271 | #
272 | # The "*/*" below is required to match Internet Explorer requests.
273 | # config.navigational_formats = ['*/*', :html]
274 |
275 | # The default HTTP method used to sign out a resource. Default is :delete.
276 | config.sign_out_via = :delete
277 |
278 | # ==> OmniAuth
279 | # Add a new OmniAuth provider. Check the wiki for more information on setting
280 | # up on your models and hooks.
281 | # config.omniauth :github, 'APP_ID', 'APP_SECRET', scope: 'user,public_repo'
282 |
283 | # ==> Warden configuration
284 | # If you want to use other strategies, that are not supported by Devise, or
285 | # change the failure app, you can configure them inside the config.warden block.
286 | #
287 | # config.warden do |manager|
288 | # manager.intercept_401 = false
289 | # manager.default_strategies(scope: :user).unshift :some_external_strategy
290 | # end
291 |
292 | # ==> Mountable engine configurations
293 | # When using Devise inside an engine, let's call it `MyEngine`, and this engine
294 | # is mountable, there are some extra configurations to be taken into account.
295 | # The following options are available, assuming the engine is mounted as:
296 | #
297 | # mount MyEngine, at: '/my_engine'
298 | #
299 | # The router that invoked `devise_for`, in the example above, would be:
300 | # config.router_name = :my_engine
301 | #
302 | # When using OmniAuth, Devise cannot automatically set OmniAuth path,
303 | # so you need to do it manually. For the users scope, it would be:
304 | # config.omniauth_path_prefix = '/my_engine/users/auth'
305 |
306 | # ==> Turbolinks configuration
307 | # If your app is using Turbolinks, Turbolinks::Controller needs to be included to make redirection work correctly:
308 | #
309 | # ActiveSupport.on_load(:devise_failure_app) do
310 | # include Turbolinks::Controller
311 | # end
312 |
313 | # ==> Configuration for :registerable
314 |
315 | # When set to false, does not sign a user in automatically after their password is
316 | # changed. Defaults to true, so a user is signed in automatically after changing a password.
317 | # config.sign_in_after_change_password = true
318 | end
319 |
--------------------------------------------------------------------------------
/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/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/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/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 | email_changed:
27 | subject: "Email Changed"
28 | password_change:
29 | subject: "Password Changed"
30 | omniauth_callbacks:
31 | failure: "Could not authenticate you from %{kind} because \"%{reason}\"."
32 | success: "Successfully authenticated from %{kind} account."
33 | passwords:
34 | 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."
35 | send_instructions: "You will receive an email with instructions on how to reset your password in a few minutes."
36 | 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."
37 | updated: "Your password has been changed successfully. You are now signed in."
38 | updated_not_active: "Your password has been changed successfully."
39 | registrations:
40 | destroyed: "Bye! Your account has been successfully cancelled. We hope to see you again soon."
41 | signed_up: "Welcome! You have signed up successfully."
42 | signed_up_but_inactive: "You have signed up successfully. However, we could not sign you in because your account is not yet activated."
43 | signed_up_but_locked: "You have signed up successfully. However, we could not sign you in because your account is locked."
44 | 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."
45 | 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."
46 | updated: "Your account has been updated successfully."
47 | updated_but_not_signed_in: "Your account has been updated successfully, but since your password was changed, you need to sign in again"
48 | sessions:
49 | signed_in: "Signed in successfully."
50 | signed_out: "Signed out successfully."
51 | already_signed_out: "Signed out successfully."
52 | unlocks:
53 | send_instructions: "You will receive an email with instructions for how to unlock your account in a few minutes."
54 | send_paranoid_instructions: "If your account exists, you will receive an email with instructions for how to unlock it in a few minutes."
55 | unlocked: "Your account has been unlocked successfully. Please sign in to continue."
56 | errors:
57 | messages:
58 | already_confirmed: "was already confirmed, please try signing in"
59 | confirmation_period_expired: "needs to be confirmed within %{period}, please request a new one"
60 | expired: "has expired, please request a new one"
61 | not_found: "not found"
62 | not_locked: "was not locked"
63 | not_saved:
64 | one: "1 error prohibited this %{resource} from being saved:"
65 | other: "%{count} errors prohibited this %{resource} from being saved:"
66 |
--------------------------------------------------------------------------------
/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 | # The following keys must be escaped otherwise they will not be retrieved by
20 | # the default I18n backend:
21 | #
22 | # true, false, on, off, yes, no
23 | #
24 | # Instead, surround them with single quotes.
25 | #
26 | # en:
27 | # 'true': 'foo'
28 | #
29 | # To learn more, please read the Rails Internationalization guide
30 | # available at http://guides.rubyonrails.org/i18n.html.
31 |
32 | en:
33 | hello: "Hello world"
34 |
--------------------------------------------------------------------------------
/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 }
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.
30 | #
31 | # preload_app!
32 |
33 | # Allow puma to be restarted by `rails restart` command.
34 | plugin :tmp_restart
35 |
--------------------------------------------------------------------------------
/config/routes.rb:
--------------------------------------------------------------------------------
1 | # frozen_string_literal: true
2 |
3 | Rails.application.routes.draw do
4 | devise_for :users, skip: :sessions
5 |
6 | if Rails.env.development?
7 | mount GraphiQL::Rails::Engine, at: "/graphiql", graphql_path: "/graphql"
8 | end
9 | post "/graphql", to: "graphql#execute"
10 | # For details on the DSL available within this file, see http://guides.rubyonrails.org/routing.html
11 |
12 | root "application#index"
13 |
14 | # Catch all for HTML 5 history routing. This must be the last route.
15 | get "/*path", to: "application#index", format: false
16 | end
17 |
--------------------------------------------------------------------------------
/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 |
--------------------------------------------------------------------------------
/config/storage.yml:
--------------------------------------------------------------------------------
1 | test:
2 | service: Disk
3 | root: <%= Rails.root.join("tmp/storage") %>
4 |
5 | local:
6 | service: Disk
7 | root: <%= Rails.root.join("storage") %>
8 |
9 | # Use rails credentials:edit to set the AWS secrets (as aws:access_key_id|secret_access_key)
10 | # amazon:
11 | # service: S3
12 | # access_key_id: <%= Rails.application.credentials.dig(:aws, :access_key_id) %>
13 | # secret_access_key: <%= Rails.application.credentials.dig(:aws, :secret_access_key) %>
14 | # region: us-east-1
15 | # bucket: your_own_bucket
16 |
17 | # Remember not to checkin your GCS keyfile to a repository
18 | # google:
19 | # service: GCS
20 | # project: your_project
21 | # credentials: <%= Rails.root.join("path/to/gcs.keyfile") %>
22 | # bucket: your_own_bucket
23 |
24 | # Use rails credentials:edit to set the Azure Storage secret (as azure_storage:storage_access_key)
25 | # microsoft:
26 | # service: AzureStorage
27 | # storage_account_name: your_account_name
28 | # storage_access_key: <%= Rails.application.credentials.dig(:azure_storage, :storage_access_key) %>
29 | # container: your_container_name
30 |
31 | # mirror:
32 | # service: Mirror
33 | # primary: local
34 | # mirrors: [ amazon, google, microsoft ]
35 |
--------------------------------------------------------------------------------
/config/webpack/custom.js:
--------------------------------------------------------------------------------
1 | const path = require('path');
2 | const webpack = require('webpack');
3 | const { VueLoaderPlugin } = require('vue-loader');
4 |
5 | module.exports = {
6 | plugins: [
7 | // See https://github.com/moment/moment/issues/2979#issuecomment-189899510
8 | new webpack
9 | .ContextReplacementPlugin(/\.\/locale$/, 'empty-module', false, /js$/),
10 | new VueLoaderPlugin(),
11 | ],
12 | resolve: {
13 | modules: [
14 | path.resolve('./app/javascript/'),
15 | ],
16 | alias: {
17 | '~components': path.resolve('./app/javascript/components'),
18 | '~configuration': path.resolve('./app/javascript/packs/configuration'),
19 | '~lib': path.resolve('./app/javascript/lib'),
20 | '~mixins': path.resolve('./app/javascript/mixins'),
21 | '~mutations': path.resolve('./app/javascript/mutations'),
22 | '~pages': path.resolve('./app/javascript/pages'),
23 | '~queries': path.resolve('./app/javascript/queries'),
24 | '~store': path.resolve('./app/javascript/store'),
25 | },
26 | extensions: ['*', '.js', '.vue', '.json'],
27 | },
28 | };
29 |
--------------------------------------------------------------------------------
/config/webpack/development.js:
--------------------------------------------------------------------------------
1 | process.env.NODE_ENV = process.env.NODE_ENV || 'development'
2 |
3 | const environment = require('./environment')
4 |
5 | module.exports = environment.toWebpackConfig()
6 |
--------------------------------------------------------------------------------
/config/webpack/environment.js:
--------------------------------------------------------------------------------
1 | const { environment } = require('@rails/webpacker');
2 | const customConfig = require('./custom');
3 | const vue = require('./loaders/vue');
4 |
5 | environment.config.merge(customConfig);
6 |
7 | environment.loaders.append('vue', vue);
8 | module.exports = environment;
9 |
--------------------------------------------------------------------------------
/config/webpack/loaders/vue.js:
--------------------------------------------------------------------------------
1 | const { dev_server: devServer } = require('@rails/webpacker').config
2 |
3 | const isProduction = process.env.NODE_ENV === 'production'
4 | const inDevServer = process.argv.find(v => v.includes('webpack-dev-server'))
5 | const extractCSS = !(inDevServer && (devServer && devServer.hmr)) || isProduction
6 |
7 | module.exports = {
8 | test: /\.vue(\.erb)?$/,
9 | use: [{
10 | loader: 'vue-loader',
11 | options: {
12 | extractCSS,
13 | loaders: {
14 | sass: 'vue-style-loader!css-loader!sass-loader?indentedSyntax' //
55 |
56 |
57 |
58 |
59 |
60 |
61 |
The page you were looking for doesn't exist.
62 |
You may have mistyped the address or the page may have moved.
63 |
64 |
If you are the application owner check the logs for more information.