meroku 2.0.22 → 2.0.23
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.gitignore +0 -1
- data/.travis.yml +0 -10
- data/Guardfile +43 -0
- data/LICENSE.txt +1 -1
- data/README.md +29 -89
- data/bin/meroku +5 -3
- data/{frontend → data}/etc_nginx_sites-enabled_template +0 -0
- data/guard +25 -0
- data/lib/meroku.rb +17 -20
- data/lib/meroku/api.rb +15 -3
- data/lib/meroku/aws.rb +69 -6
- data/lib/meroku/cli.rb +23 -91
- data/lib/meroku/error.rb +11 -0
- data/lib/meroku/node.rb +70 -70
- data/lib/meroku/options.rb +79 -0
- data/lib/meroku/secrets.rb +38 -0
- data/lib/meroku/shared.rb +23 -0
- data/lib/meroku/user.rb +25 -0
- data/lib/meroku/version.rb +3 -1
- data/meroku.gemspec +10 -19
- metadata +20 -319
- data/circle.yml +0 -23
- data/frontend/.gitignore +0 -23
- data/frontend/.ruby-version +0 -2
- data/frontend/Gemfile +0 -61
- data/frontend/Gemfile.lock +0 -236
- data/frontend/README.md +0 -24
- data/frontend/Rakefile +0 -6
- data/frontend/app/assets/config/manifest.js +0 -3
- data/frontend/app/assets/images/.keep +0 -0
- data/frontend/app/assets/javascripts/application.js +0 -15
- data/frontend/app/assets/javascripts/apps.coffee +0 -3
- data/frontend/app/assets/javascripts/cable.js +0 -13
- data/frontend/app/assets/javascripts/channels/.keep +0 -0
- data/frontend/app/assets/javascripts/pages.coffee +0 -3
- data/frontend/app/assets/javascripts/publickeys.coffee +0 -3
- data/frontend/app/assets/stylesheets/application.css +0 -15
- data/frontend/app/assets/stylesheets/apps.scss +0 -3
- data/frontend/app/assets/stylesheets/pages.scss +0 -3
- data/frontend/app/assets/stylesheets/publickeys.scss +0 -3
- data/frontend/app/assets/stylesheets/scaffolds.scss +0 -84
- data/frontend/app/channels/application_cable/channel.rb +0 -4
- data/frontend/app/channels/application_cable/connection.rb +0 -4
- data/frontend/app/controllers/application_controller.rb +0 -4
- data/frontend/app/controllers/apps_controller.rb +0 -83
- data/frontend/app/controllers/concerns/.keep +0 -0
- data/frontend/app/controllers/publickeys_controller.rb +0 -82
- data/frontend/app/controllers/users/confirmations_controller.rb +0 -28
- data/frontend/app/controllers/users/omniauth_callbacks_controller.rb +0 -28
- data/frontend/app/controllers/users/passwords_controller.rb +0 -32
- data/frontend/app/controllers/users/registrations_controller.rb +0 -74
- data/frontend/app/controllers/users/sessions_controller.rb +0 -34
- data/frontend/app/controllers/users/unlocks_controller.rb +0 -28
- data/frontend/app/helpers/application_helper.rb +0 -2
- data/frontend/app/helpers/apps_helper.rb +0 -2
- data/frontend/app/helpers/pages_helper.rb +0 -2
- data/frontend/app/helpers/publickeys_helper.rb +0 -2
- data/frontend/app/jobs/application_job.rb +0 -2
- data/frontend/app/lib/cmd.rb +0 -11
- data/frontend/app/mailers/application_mailer.rb +0 -4
- data/frontend/app/models/app.rb +0 -37
- data/frontend/app/models/application_record.rb +0 -3
- data/frontend/app/models/concerns/.keep +0 -0
- data/frontend/app/models/publickey.rb +0 -15
- data/frontend/app/models/user.rb +0 -22
- data/frontend/app/policies/application_policy.rb +0 -53
- data/frontend/app/policies/publickey_policy.rb +0 -7
- data/frontend/app/serializable/serializable_app.rb +0 -6
- data/frontend/app/serializable/serializable_publickey.rb +0 -7
- data/frontend/app/serializable/serializable_user.rb +0 -8
- data/frontend/app/serializers/app_serializer.rb +0 -3
- data/frontend/app/serializers/publickey_serializer.rb +0 -4
- data/frontend/app/views/apps/_app.json.jbuilder +0 -2
- data/frontend/app/views/apps/_form.html.erb +0 -22
- data/frontend/app/views/apps/edit.html.erb +0 -6
- data/frontend/app/views/apps/index.html.erb +0 -27
- data/frontend/app/views/apps/index.json.jbuilder +0 -1
- data/frontend/app/views/apps/new.html.erb +0 -5
- data/frontend/app/views/apps/show.html.erb +0 -9
- data/frontend/app/views/apps/show.json.jbuilder +0 -1
- data/frontend/app/views/devise/confirmations/new.html.erb +0 -16
- data/frontend/app/views/devise/mailer/confirmation_instructions.html.erb +0 -5
- data/frontend/app/views/devise/mailer/email_changed.html.erb +0 -7
- data/frontend/app/views/devise/mailer/password_change.html.erb +0 -3
- data/frontend/app/views/devise/mailer/reset_password_instructions.html.erb +0 -8
- data/frontend/app/views/devise/mailer/unlock_instructions.html.erb +0 -7
- data/frontend/app/views/devise/passwords/edit.html.erb +0 -25
- data/frontend/app/views/devise/passwords/new.html.erb +0 -16
- data/frontend/app/views/devise/registrations/edit.html.erb +0 -43
- data/frontend/app/views/devise/registrations/new.html.erb +0 -29
- data/frontend/app/views/devise/sessions/new.html.erb +0 -26
- data/frontend/app/views/devise/shared/_links.html.erb +0 -25
- data/frontend/app/views/devise/unlocks/new.html.erb +0 -16
- data/frontend/app/views/layouts/application.html.erb +0 -16
- data/frontend/app/views/layouts/mailer.html.erb +0 -13
- data/frontend/app/views/layouts/mailer.text.erb +0 -1
- data/frontend/app/views/publickeys/_form.html.erb +0 -32
- data/frontend/app/views/publickeys/_publickey.json.jbuilder +0 -2
- data/frontend/app/views/publickeys/edit.html.erb +0 -6
- data/frontend/app/views/publickeys/index.html.erb +0 -31
- data/frontend/app/views/publickeys/index.json.jbuilder +0 -1
- data/frontend/app/views/publickeys/new.html.erb +0 -5
- data/frontend/app/views/publickeys/show.html.erb +0 -19
- data/frontend/app/views/publickeys/show.json.jbuilder +0 -1
- data/frontend/bin/bundle +0 -3
- data/frontend/bin/rails +0 -9
- data/frontend/bin/rake +0 -9
- data/frontend/bin/setup +0 -38
- data/frontend/bin/spring +0 -17
- data/frontend/bin/update +0 -29
- data/frontend/bin/yarn +0 -11
- data/frontend/config.ru +0 -5
- data/frontend/config/application.rb +0 -18
- data/frontend/config/boot.rb +0 -3
- data/frontend/config/cable.yml +0 -10
- data/frontend/config/database.yml +0 -87
- data/frontend/config/environment.rb +0 -5
- data/frontend/config/environments/development.rb +0 -56
- data/frontend/config/environments/production.rb +0 -97
- data/frontend/config/environments/test.rb +0 -42
- data/frontend/config/initializers/ams.rb +0 -3
- data/frontend/config/initializers/application_controller_renderer.rb +0 -8
- data/frontend/config/initializers/assets.rb +0 -14
- data/frontend/config/initializers/backtrace_silencers.rb +0 -7
- data/frontend/config/initializers/cookies_serializer.rb +0 -5
- data/frontend/config/initializers/devise.rb +0 -277
- data/frontend/config/initializers/filter_parameter_logging.rb +0 -4
- data/frontend/config/initializers/inflections.rb +0 -16
- data/frontend/config/initializers/mime_types.rb +0 -4
- data/frontend/config/initializers/wrap_parameters.rb +0 -14
- data/frontend/config/locales/devise.en.yml +0 -64
- data/frontend/config/locales/en.yml +0 -33
- data/frontend/config/puma.rb +0 -66
- data/frontend/config/routes.rb +0 -11
- data/frontend/config/secrets.yml +0 -32
- data/frontend/config/spring.rb +0 -6
- data/frontend/db/migrate/20171023223732_devise_create_users.rb +0 -42
- data/frontend/db/migrate/20171025203706_create_apps.rb +0 -9
- data/frontend/db/migrate/20171025223804_add_user_to_apps.rb +0 -5
- data/frontend/db/migrate/20171026071440_create_publickeys.rb +0 -11
- data/frontend/db/migrate/20171028150506_add_apisecret_to_users.rb +0 -6
- data/frontend/db/schema.rb +0 -32
- data/frontend/db/seeds.rb +0 -7
- data/frontend/etc_nginx_sites-enabled_default +0 -29
- data/frontend/lib/assets/.keep +0 -0
- data/frontend/lib/tasks/.keep +0 -0
- data/frontend/log/.keep +0 -0
- data/frontend/package.json +0 -5
- data/frontend/public/404.html +0 -67
- data/frontend/public/422.html +0 -67
- data/frontend/public/500.html +0 -66
- data/frontend/public/Meroku.html +0 -140
- data/frontend/public/Meroku/Api.html +0 -129
- data/frontend/public/Meroku/Api/Request.html +0 -221
- data/frontend/public/Meroku/Aws/Ec2.html +0 -477
- data/frontend/public/Meroku/CLI.html +0 -796
- data/frontend/public/Meroku/CLI/Help.html +0 -224
- data/frontend/public/Meroku/CLI/Secrets.html +0 -191
- data/frontend/public/Meroku/CLI/Session.html +0 -456
- data/frontend/public/Meroku/Extensions.html +0 -405
- data/frontend/public/Meroku/Infrastructure.html +0 -279
- data/frontend/public/Meroku/Infrastructure/Server.html +0 -373
- data/frontend/public/Meroku/Node.html +0 -845
- data/frontend/public/Meroku/Tunnelable.html +0 -247
- data/frontend/public/_index.html +0 -273
- data/frontend/public/apple-touch-icon-precomposed.png +0 -0
- data/frontend/public/apple-touch-icon.png +0 -0
- data/frontend/public/class_list.html +0 -51
- data/frontend/public/css/common.css +0 -1
- data/frontend/public/css/full_list.css +0 -58
- data/frontend/public/css/style.css +0 -492
- data/frontend/public/favicon.ico +0 -0
- data/frontend/public/file.README.html +0 -179
- data/frontend/public/file_list.html +0 -56
- data/frontend/public/frames.html +0 -17
- data/frontend/public/index.html +0 -179
- data/frontend/public/js/app.js +0 -248
- data/frontend/public/js/full_list.js +0 -216
- data/frontend/public/js/jquery.js +0 -4
- data/frontend/public/method_list.html +0 -395
- data/frontend/public/robots.txt +0 -2
- data/frontend/public/top-level-namespace.html +0 -110
- data/frontend/test/application_system_test_case.rb +0 -5
- data/frontend/test/controllers/.keep +0 -0
- data/frontend/test/controllers/apps_controller_test.rb +0 -48
- data/frontend/test/controllers/pages_controller_test.rb +0 -9
- data/frontend/test/controllers/publickeys_controller_test.rb +0 -48
- data/frontend/test/fixtures/.keep +0 -0
- data/frontend/test/fixtures/apps.yml +0 -7
- data/frontend/test/fixtures/files/.keep +0 -0
- data/frontend/test/fixtures/publickeys.yml +0 -11
- data/frontend/test/fixtures/users.yml +0 -11
- data/frontend/test/helpers/.keep +0 -0
- data/frontend/test/integration/.keep +0 -0
- data/frontend/test/mailers/.keep +0 -0
- data/frontend/test/models/.keep +0 -0
- data/frontend/test/models/app_test.rb +0 -7
- data/frontend/test/models/publickey_test.rb +0 -7
- data/frontend/test/models/user_test.rb +0 -7
- data/frontend/test/policies/publickey_policy_test.rb +0 -19
- data/frontend/test/system/.keep +0 -0
- data/frontend/test/system/apps_test.rb +0 -9
- data/frontend/test/system/publickeys_test.rb +0 -9
- data/frontend/test/test_helper.rb +0 -9
- data/frontend/tmp/.keep +0 -0
- data/frontend/vendor/.keep +0 -0
- data/lib/meroku/api/request.rb +0 -17
- data/lib/meroku/aws/ec2.rb +0 -59
- data/lib/meroku/cli/help.rb +0 -27
- data/lib/meroku/cli/secrets.rb +0 -23
- data/lib/meroku/cli/session.rb +0 -46
- data/lib/meroku/extensions.rb +0 -32
- data/lib/meroku/infrastructure.rb +0 -23
- data/lib/meroku/infrastructure/server.rb +0 -20
- data/lib/meroku/tunnelable.rb +0 -35
- data/modified-cedar-14.sh +0 -171
data/frontend/bin/yarn
DELETED
@@ -1,11 +0,0 @@
|
|
1
|
-
#!/usr/bin/env ruby
|
2
|
-
VENDOR_PATH = File.expand_path('..', __dir__)
|
3
|
-
Dir.chdir(VENDOR_PATH) do
|
4
|
-
begin
|
5
|
-
exec "yarnpkg #{ARGV.join(" ")}"
|
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
|
data/frontend/config.ru
DELETED
@@ -1,18 +0,0 @@
|
|
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 Frontend
|
10
|
-
class Application < Rails::Application
|
11
|
-
# Initialize configuration defaults for originally generated Rails version.
|
12
|
-
config.load_defaults 5.1
|
13
|
-
|
14
|
-
# Settings in config/environments/* take precedence over those specified here.
|
15
|
-
# Application configuration should go into files in config/initializers
|
16
|
-
# -- all .rb files in that directory are automatically loaded.
|
17
|
-
end
|
18
|
-
end
|
data/frontend/config/boot.rb
DELETED
data/frontend/config/cable.yml
DELETED
@@ -1,87 +0,0 @@
|
|
1
|
-
# PostgreSQL. Versions 9.1 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
|
-
|
24
|
-
development:
|
25
|
-
<<: *default
|
26
|
-
database: meroku_development
|
27
|
-
|
28
|
-
# The specified database role being used to connect to postgres.
|
29
|
-
# To create additional roles in postgres see `$ createuser --help`.
|
30
|
-
# When left blank, postgres will use the default role. This is
|
31
|
-
# the same name as the operating system user that initialized the database.
|
32
|
-
username: meroku
|
33
|
-
|
34
|
-
# The password associated with the postgres role (username).
|
35
|
-
password: <%= ENV['SECRET'] %>
|
36
|
-
|
37
|
-
# Connect on a TCP socket. Omitted by default since the client uses a
|
38
|
-
# domain socket that doesn't need configuration. Windows does not have
|
39
|
-
# domain sockets, so uncomment these lines.
|
40
|
-
#host: localhost
|
41
|
-
|
42
|
-
# The TCP port the server listens on. Defaults to 5432.
|
43
|
-
# If your server runs on a different port number, change accordingly.
|
44
|
-
#port: 5432
|
45
|
-
|
46
|
-
# Schema search path. The server defaults to $user,public
|
47
|
-
#schema_search_path: myapp,sharedapp,public
|
48
|
-
|
49
|
-
# Minimum log levels, in increasing order:
|
50
|
-
# debug5, debug4, debug3, debug2, debug1,
|
51
|
-
# log, notice, warning, error, fatal, and panic
|
52
|
-
# Defaults to warning.
|
53
|
-
#min_messages: notice
|
54
|
-
|
55
|
-
# Warning: The database defined as "test" will be erased and
|
56
|
-
# re-generated from your development database when you run "rake".
|
57
|
-
# Do not set this db to the same as development or production.
|
58
|
-
test:
|
59
|
-
<<: *default
|
60
|
-
database: meroku_test
|
61
|
-
password: <%= ENV['SECRET'] %>
|
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: meroku
|
85
|
-
username: meroku
|
86
|
-
password: <%= ENV['SECRET'] %>
|
87
|
-
|
@@ -1,56 +0,0 @@
|
|
1
|
-
Rails.application.configure do
|
2
|
-
# Settings specified here will take precedence over those in config/application.rb.
|
3
|
-
|
4
|
-
# In the development environment your application's code is reloaded on
|
5
|
-
# every request. This slows down response time but is perfect for development
|
6
|
-
# since you don't have to restart the web server when you make code changes.
|
7
|
-
config.cache_classes = false
|
8
|
-
|
9
|
-
# Do not eager load code on boot.
|
10
|
-
config.eager_load = false
|
11
|
-
|
12
|
-
# Show full error reports.
|
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=#{2.days.seconds.to_i}"
|
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
|
-
config.action_mailer.default_url_options = { host: 'localhost', port: 3000 }
|
56
|
-
end
|
@@ -1,97 +0,0 @@
|
|
1
|
-
Rails.application.configure do
|
2
|
-
# Settings specified here will take precedence over those in config/application.rb.
|
3
|
-
|
4
|
-
# Code is not reloaded between requests.
|
5
|
-
config.cache_classes = true
|
6
|
-
|
7
|
-
# Eager load code on boot. This eager loads most of Rails and
|
8
|
-
# your application in memory, allowing both threaded web servers
|
9
|
-
# and those relying on copy on write to perform better.
|
10
|
-
# Rake tasks automatically ignore this option for performance.
|
11
|
-
config.eager_load = true
|
12
|
-
|
13
|
-
# Full error reports are disabled and caching is turned on.
|
14
|
-
config.consider_all_requests_local = false
|
15
|
-
config.action_controller.perform_caching = true
|
16
|
-
|
17
|
-
# Attempt to read encrypted secrets from `config/secrets.yml.enc`.
|
18
|
-
# Requires an encryption key in `ENV["RAILS_MASTER_KEY"]` or
|
19
|
-
# `config/secrets.yml.key`.
|
20
|
-
config.read_encrypted_secrets = true
|
21
|
-
|
22
|
-
# Disable serving static files from the `/public` folder by default since
|
23
|
-
# Apache or NGINX already handles this.
|
24
|
-
#config.public_file_server.enabled = ENV['RAILS_SERVE_STATIC_FILES'].present?
|
25
|
-
config.public_file_server.enabled = true
|
26
|
-
|
27
|
-
# Compress JavaScripts and CSS.
|
28
|
-
config.assets.js_compressor = :uglifier
|
29
|
-
# config.assets.css_compressor = :sass
|
30
|
-
|
31
|
-
# Do not fallback to assets pipeline if a precompiled asset is missed.
|
32
|
-
config.assets.compile = false
|
33
|
-
|
34
|
-
# `config.assets.precompile` and `config.assets.version` have moved to config/initializers/assets.rb
|
35
|
-
|
36
|
-
# Enable serving of images, stylesheets, and JavaScripts from an asset server.
|
37
|
-
# config.action_controller.asset_host = 'http://assets.example.com'
|
38
|
-
|
39
|
-
# Specifies the header that your server uses for sending files.
|
40
|
-
# config.action_dispatch.x_sendfile_header = 'X-Sendfile' # for Apache
|
41
|
-
# config.action_dispatch.x_sendfile_header = 'X-Accel-Redirect' # for NGINX
|
42
|
-
|
43
|
-
# Mount Action Cable outside main process or domain
|
44
|
-
# config.action_cable.mount_path = nil
|
45
|
-
# config.action_cable.url = 'wss://example.com/cable'
|
46
|
-
# config.action_cable.allowed_request_origins = [ 'http://example.com', /http:\/\/example.*/ ]
|
47
|
-
|
48
|
-
# Force all access to the app over SSL, use Strict-Transport-Security, and use secure cookies.
|
49
|
-
# config.force_ssl = true
|
50
|
-
|
51
|
-
# Use the lowest log level to ensure availability of diagnostic information
|
52
|
-
# when problems arise.
|
53
|
-
config.log_level = :debug
|
54
|
-
|
55
|
-
# Prepend all log lines with the following tags.
|
56
|
-
config.log_tags = [ :request_id ]
|
57
|
-
|
58
|
-
# Use a different cache store in production.
|
59
|
-
# config.cache_store = :mem_cache_store
|
60
|
-
|
61
|
-
# Use a real queuing backend for Active Job (and separate queues per environment)
|
62
|
-
# config.active_job.queue_adapter = :resque
|
63
|
-
# config.active_job.queue_name_prefix = "frontend_#{Rails.env}"
|
64
|
-
config.action_mailer.perform_caching = false
|
65
|
-
|
66
|
-
# Ignore bad email addresses and do not raise email delivery errors.
|
67
|
-
# Set this to true and configure the email server for immediate delivery to raise delivery errors.
|
68
|
-
# config.action_mailer.raise_delivery_errors = false
|
69
|
-
|
70
|
-
# Enable locale fallbacks for I18n (makes lookups for any locale fall back to
|
71
|
-
# the I18n.default_locale when a translation cannot be found).
|
72
|
-
config.i18n.fallbacks = true
|
73
|
-
|
74
|
-
# Send deprecation notices to registered listeners.
|
75
|
-
config.active_support.deprecation = :notify
|
76
|
-
|
77
|
-
# Use default logging formatter so that PID and timestamp are not suppressed.
|
78
|
-
config.log_formatter = ::Logger::Formatter.new
|
79
|
-
|
80
|
-
# Use a different logger for distributed setups.
|
81
|
-
# require 'syslog/logger'
|
82
|
-
# config.logger = ActiveSupport::TaggedLogging.new(Syslog::Logger.new 'app-name')
|
83
|
-
|
84
|
-
if ENV["RAILS_LOG_TO_STDOUT"].present?
|
85
|
-
logger = ActiveSupport::Logger.new(STDOUT)
|
86
|
-
logger.formatter = config.log_formatter
|
87
|
-
config.logger = ActiveSupport::TaggedLogging.new(logger)
|
88
|
-
end
|
89
|
-
|
90
|
-
# Do not dump schema after migrations.
|
91
|
-
config.active_record.dump_schema_after_migration = false
|
92
|
-
|
93
|
-
config.action_mailer.default_url_options = { host: 'http://www.meroku.com' }
|
94
|
-
|
95
|
-
|
96
|
-
end
|
97
|
-
|
@@ -1,42 +0,0 @@
|
|
1
|
-
Rails.application.configure do
|
2
|
-
# Settings specified here will take precedence over those in config/application.rb.
|
3
|
-
|
4
|
-
# The test environment is used exclusively to run your application's
|
5
|
-
# test suite. You never need to work with it otherwise. Remember that
|
6
|
-
# your test database is "scratch space" for the test suite and is wiped
|
7
|
-
# and recreated between test runs. Don't rely on the data there!
|
8
|
-
config.cache_classes = true
|
9
|
-
|
10
|
-
# Do not eager load code on boot. This avoids loading your whole application
|
11
|
-
# just for the purpose of running a single test. If you are using a tool that
|
12
|
-
# preloads Rails for running tests, you may have to set it to true.
|
13
|
-
config.eager_load = false
|
14
|
-
|
15
|
-
# Configure 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.seconds.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
|
-
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
|
@@ -1,14 +0,0 @@
|
|
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 )
|
@@ -1,7 +0,0 @@
|
|
1
|
-
# Be sure to restart your server when you modify this file.
|
2
|
-
|
3
|
-
# You can add backtrace silencers for libraries that you're using but don't wish to see in your backtraces.
|
4
|
-
# Rails.backtrace_cleaner.add_silencer { |line| line =~ /my_noisy_library/ }
|
5
|
-
|
6
|
-
# You can also remove all the silencers if you're trying to debug a problem that might stem from framework code.
|
7
|
-
# Rails.backtrace_cleaner.remove_silencers!
|
@@ -1,277 +0,0 @@
|
|
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 = 'c0dc302b7de7236b2d928f3eaff3ec2b262512ed29386795bf660ee909b0c724597f12fd728a4a17948ff97d144ceb0b65b899f7e5acaaa9823909031621a5b7'
|
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 = '2121ae31ed57fbad0c79f730e7690e90e1f1bb46c453e6a81352ed877a4f624495ada4e900ba3807441063571d60265694100d637351036ab1bee702dda88577'
|
112
|
-
|
113
|
-
# Send a notification to the original email when the user's email is changed.
|
114
|
-
# config.send_email_changed_notification = false
|
115
|
-
|
116
|
-
# Send a notification email when the user's password is changed.
|
117
|
-
# config.send_password_change_notification = false
|
118
|
-
|
119
|
-
# ==> Configuration for :confirmable
|
120
|
-
# A period that the user is allowed to access the website even without
|
121
|
-
# confirming their account. For instance, if set to 2.days, the user will be
|
122
|
-
# able to access the website for two days without confirming their account,
|
123
|
-
# access will be blocked just in the third day. Default is 0.days, meaning
|
124
|
-
# the user cannot access the website without confirming their account.
|
125
|
-
# config.allow_unconfirmed_access_for = 2.days
|
126
|
-
|
127
|
-
# A period that the user is allowed to confirm their account before their
|
128
|
-
# token becomes invalid. For example, if set to 3.days, the user can confirm
|
129
|
-
# their account within 3 days after the mail was sent, but on the fourth day
|
130
|
-
# their account can't be confirmed with the token any more.
|
131
|
-
# Default is nil, meaning there is no restriction on how long a user can take
|
132
|
-
# before confirming their account.
|
133
|
-
# config.confirm_within = 3.days
|
134
|
-
|
135
|
-
# If true, requires any email changes to be confirmed (exactly the same way as
|
136
|
-
# initial account confirmation) to be applied. Requires additional unconfirmed_email
|
137
|
-
# db field (see migrations). Until confirmed, new email is stored in
|
138
|
-
# unconfirmed_email column, and copied to email column on successful confirmation.
|
139
|
-
config.reconfirmable = true
|
140
|
-
|
141
|
-
# Defines which key will be used when confirming an account
|
142
|
-
# config.confirmation_keys = [:email]
|
143
|
-
|
144
|
-
# ==> Configuration for :rememberable
|
145
|
-
# The time the user will be remembered without asking for credentials again.
|
146
|
-
# config.remember_for = 2.weeks
|
147
|
-
|
148
|
-
# Invalidates all the remember me tokens when the user signs out.
|
149
|
-
config.expire_all_remember_me_on_sign_out = true
|
150
|
-
|
151
|
-
# If true, extends the user's remember period when remembered via cookie.
|
152
|
-
# config.extend_remember_period = false
|
153
|
-
|
154
|
-
# Options to be passed to the created cookie. For instance, you can set
|
155
|
-
# secure: true in order to force SSL only cookies.
|
156
|
-
# config.rememberable_options = {}
|
157
|
-
|
158
|
-
# ==> Configuration for :validatable
|
159
|
-
# Range for password length.
|
160
|
-
config.password_length = 6..128
|
161
|
-
|
162
|
-
# Email regex used to validate email formats. It simply asserts that
|
163
|
-
# one (and only one) @ exists in the given string. This is mainly
|
164
|
-
# to give user feedback and not to assert the e-mail validity.
|
165
|
-
config.email_regexp = /\A[^@\s]+@[^@\s]+\z/
|
166
|
-
|
167
|
-
# ==> Configuration for :timeoutable
|
168
|
-
# The time you want to timeout the user session without activity. After this
|
169
|
-
# time the user will be asked for credentials again. Default is 30 minutes.
|
170
|
-
# config.timeout_in = 30.minutes
|
171
|
-
|
172
|
-
# ==> Configuration for :lockable
|
173
|
-
# Defines which strategy will be used to lock an account.
|
174
|
-
# :failed_attempts = Locks an account after a number of failed attempts to sign in.
|
175
|
-
# :none = No lock strategy. You should handle locking by yourself.
|
176
|
-
# config.lock_strategy = :failed_attempts
|
177
|
-
|
178
|
-
# Defines which key will be used when locking and unlocking an account
|
179
|
-
# config.unlock_keys = [:email]
|
180
|
-
|
181
|
-
# Defines which strategy will be used to unlock an account.
|
182
|
-
# :email = Sends an unlock link to the user email
|
183
|
-
# :time = Re-enables login after a certain amount of time (see :unlock_in below)
|
184
|
-
# :both = Enables both strategies
|
185
|
-
# :none = No unlock strategy. You should handle unlocking by yourself.
|
186
|
-
# config.unlock_strategy = :both
|
187
|
-
|
188
|
-
# Number of authentication tries before locking an account if lock_strategy
|
189
|
-
# is failed attempts.
|
190
|
-
# config.maximum_attempts = 20
|
191
|
-
|
192
|
-
# Time interval to unlock the account if :time is enabled as unlock_strategy.
|
193
|
-
# config.unlock_in = 1.hour
|
194
|
-
|
195
|
-
# Warn on the last attempt before the account is locked.
|
196
|
-
# config.last_attempt_warning = true
|
197
|
-
|
198
|
-
# ==> Configuration for :recoverable
|
199
|
-
#
|
200
|
-
# Defines which key will be used when recovering the password for an account
|
201
|
-
# config.reset_password_keys = [:email]
|
202
|
-
|
203
|
-
# Time interval you can reset your password with a reset password key.
|
204
|
-
# Don't put a too small interval or your users won't have the time to
|
205
|
-
# change their passwords.
|
206
|
-
config.reset_password_within = 6.hours
|
207
|
-
|
208
|
-
# When set to false, does not sign a user in automatically after their password is
|
209
|
-
# reset. Defaults to true, so a user is signed in automatically after a reset.
|
210
|
-
# config.sign_in_after_reset_password = true
|
211
|
-
|
212
|
-
# ==> Configuration for :encryptable
|
213
|
-
# Allow you to use another hashing or encryption algorithm besides bcrypt (default).
|
214
|
-
# You can use :sha1, :sha512 or algorithms from others authentication tools as
|
215
|
-
# :clearance_sha1, :authlogic_sha512 (then you should set stretches above to 20
|
216
|
-
# for default behavior) and :restful_authentication_sha1 (then you should set
|
217
|
-
# stretches to 10, and copy REST_AUTH_SITE_KEY to pepper).
|
218
|
-
#
|
219
|
-
# Require the `devise-encryptable` gem when using anything other than bcrypt
|
220
|
-
# config.encryptor = :sha512
|
221
|
-
|
222
|
-
# ==> Scopes configuration
|
223
|
-
# Turn scoped views on. Before rendering "sessions/new", it will first check for
|
224
|
-
# "users/sessions/new". It's turned off by default because it's slower if you
|
225
|
-
# are using only default views.
|
226
|
-
# config.scoped_views = false
|
227
|
-
|
228
|
-
# Configure the default scope given to Warden. By default it's the first
|
229
|
-
# devise role declared in your routes (usually :user).
|
230
|
-
# config.default_scope = :user
|
231
|
-
|
232
|
-
# Set this configuration to false if you want /users/sign_out to sign out
|
233
|
-
# only the current scope. By default, Devise signs out all scopes.
|
234
|
-
# config.sign_out_all_scopes = true
|
235
|
-
|
236
|
-
# ==> Navigation configuration
|
237
|
-
# Lists the formats that should be treated as navigational. Formats like
|
238
|
-
# :html, should redirect to the sign in page when the user does not have
|
239
|
-
# access, but formats like :xml or :json, should return 401.
|
240
|
-
#
|
241
|
-
# If you have any extra navigational formats, like :iphone or :mobile, you
|
242
|
-
# should add them to the navigational formats lists.
|
243
|
-
#
|
244
|
-
# The "*/*" below is required to match Internet Explorer requests.
|
245
|
-
# config.navigational_formats = ['*/*', :html]
|
246
|
-
|
247
|
-
# The default HTTP method used to sign out a resource. Default is :delete.
|
248
|
-
config.sign_out_via = :delete
|
249
|
-
|
250
|
-
# ==> OmniAuth
|
251
|
-
# Add a new OmniAuth provider. Check the wiki for more information on setting
|
252
|
-
# up on your models and hooks.
|
253
|
-
# config.omniauth :github, 'APP_ID', 'APP_SECRET', scope: 'user,public_repo'
|
254
|
-
|
255
|
-
# ==> Warden configuration
|
256
|
-
# If you want to use other strategies, that are not supported by Devise, or
|
257
|
-
# change the failure app, you can configure them inside the config.warden block.
|
258
|
-
#
|
259
|
-
# config.warden do |manager|
|
260
|
-
# manager.intercept_401 = false
|
261
|
-
# manager.default_strategies(scope: :user).unshift :some_external_strategy
|
262
|
-
# end
|
263
|
-
|
264
|
-
# ==> Mountable engine configurations
|
265
|
-
# When using Devise inside an engine, let's call it `MyEngine`, and this engine
|
266
|
-
# is mountable, there are some extra configurations to be taken into account.
|
267
|
-
# The following options are available, assuming the engine is mounted as:
|
268
|
-
#
|
269
|
-
# mount MyEngine, at: '/my_engine'
|
270
|
-
#
|
271
|
-
# The router that invoked `devise_for`, in the example above, would be:
|
272
|
-
# config.router_name = :my_engine
|
273
|
-
#
|
274
|
-
# When using OmniAuth, Devise cannot automatically set OmniAuth path,
|
275
|
-
# so you need to do it manually. For the users scope, it would be:
|
276
|
-
# config.omniauth_path_prefix = '/my_engine/users/auth'
|
277
|
-
end
|