activeadmin-nested-namespaces 0.1.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/.gitignore +18 -0
- data/.rspec +3 -0
- data/.travis.yml +7 -0
- data/Gemfile +6 -0
- data/Gemfile.lock +162 -0
- data/LICENSE.txt +21 -0
- data/README.md +140 -0
- data/Rakefile +6 -0
- data/activeadmin-nested-namespaces.gemspec +30 -0
- data/bin/bundle +105 -0
- data/bin/console +14 -0
- data/bin/htmldiff +29 -0
- data/bin/ldiff +29 -0
- data/bin/nokogiri +29 -0
- data/bin/rackup +29 -0
- data/bin/rails +29 -0
- data/bin/rake +29 -0
- data/bin/rspec +29 -0
- data/bin/sass +29 -0
- data/bin/sass-convert +29 -0
- data/bin/scss +29 -0
- data/bin/setup +8 -0
- data/bin/sprockets +29 -0
- data/bin/thor +29 -0
- data/dummy_app/.gitignore +23 -0
- data/dummy_app/Gemfile +57 -0
- data/dummy_app/Gemfile.lock +260 -0
- data/dummy_app/README.md +24 -0
- data/dummy_app/Rakefile +8 -0
- data/dummy_app/app/admin/admin_users.rb +28 -0
- data/dummy_app/app/admin/dashboard.rb +13 -0
- data/dummy_app/app/admin/site1/dashboard.rb +13 -0
- data/dummy_app/app/admin/site1/posts.rb +3 -0
- data/dummy_app/app/admin/site2/dashboard.rb +12 -0
- data/dummy_app/app/admin/site3/demo/dashboard.rb +13 -0
- data/dummy_app/app/admin/site3/demo/posts.rb +15 -0
- data/dummy_app/app/assets/config/manifest.js +3 -0
- data/dummy_app/app/assets/images/.keep +0 -0
- data/dummy_app/app/assets/javascripts/active_admin.js.coffee +1 -0
- data/dummy_app/app/assets/javascripts/application.js +15 -0
- data/dummy_app/app/assets/javascripts/cable.js +13 -0
- data/dummy_app/app/assets/javascripts/channels/.keep +0 -0
- data/dummy_app/app/assets/stylesheets/active_admin.scss +17 -0
- data/dummy_app/app/assets/stylesheets/application.css +15 -0
- data/dummy_app/app/channels/application_cable/channel.rb +4 -0
- data/dummy_app/app/channels/application_cable/connection.rb +4 -0
- data/dummy_app/app/controllers/application_controller.rb +3 -0
- data/dummy_app/app/controllers/concerns/.keep +0 -0
- data/dummy_app/app/helpers/application_helper.rb +2 -0
- data/dummy_app/app/jobs/application_job.rb +2 -0
- data/dummy_app/app/mailers/application_mailer.rb +4 -0
- data/dummy_app/app/models/admin_user.rb +10 -0
- data/dummy_app/app/models/application_record.rb +3 -0
- data/dummy_app/app/models/concerns/.keep +0 -0
- data/dummy_app/app/models/post.rb +2 -0
- data/dummy_app/app/views/layouts/application.html.erb +14 -0
- data/dummy_app/app/views/layouts/mailer.html.erb +13 -0
- data/dummy_app/app/views/layouts/mailer.text.erb +1 -0
- data/dummy_app/bin/bundle +3 -0
- data/dummy_app/bin/byebug +29 -0
- data/dummy_app/bin/listen +29 -0
- data/dummy_app/bin/nokogiri +29 -0
- data/dummy_app/bin/puma +29 -0
- data/dummy_app/bin/pumactl +29 -0
- data/dummy_app/bin/rackup +29 -0
- data/dummy_app/bin/rails +4 -0
- data/dummy_app/bin/rake +4 -0
- data/dummy_app/bin/sass +29 -0
- data/dummy_app/bin/sass-convert +29 -0
- data/dummy_app/bin/scss +29 -0
- data/dummy_app/bin/setup +38 -0
- data/dummy_app/bin/spring +29 -0
- data/dummy_app/bin/sprockets +29 -0
- data/dummy_app/bin/thor +29 -0
- data/dummy_app/bin/tilt +29 -0
- data/dummy_app/bin/update +29 -0
- data/dummy_app/bin/yarn +11 -0
- data/dummy_app/config.ru +5 -0
- data/dummy_app/config/application.rb +19 -0
- data/dummy_app/config/boot.rb +3 -0
- data/dummy_app/config/cable.yml +10 -0
- data/dummy_app/config/database.yml +25 -0
- data/dummy_app/config/environment.rb +5 -0
- data/dummy_app/config/environments/development.rb +54 -0
- data/dummy_app/config/environments/production.rb +91 -0
- data/dummy_app/config/environments/test.rb +42 -0
- data/dummy_app/config/initializers/active_admin.rb +313 -0
- data/dummy_app/config/initializers/active_admin_nested_namespace.rb +5 -0
- data/dummy_app/config/initializers/application_controller_renderer.rb +6 -0
- data/dummy_app/config/initializers/assets.rb +14 -0
- data/dummy_app/config/initializers/backtrace_silencers.rb +7 -0
- data/dummy_app/config/initializers/cookies_serializer.rb +5 -0
- data/dummy_app/config/initializers/devise.rb +290 -0
- data/dummy_app/config/initializers/filter_parameter_logging.rb +4 -0
- data/dummy_app/config/initializers/inflections.rb +16 -0
- data/dummy_app/config/initializers/mime_types.rb +4 -0
- data/dummy_app/config/initializers/wrap_parameters.rb +14 -0
- data/dummy_app/config/locales/devise.en.yml +64 -0
- data/dummy_app/config/locales/en.yml +33 -0
- data/dummy_app/config/puma.rb +56 -0
- data/dummy_app/config/routes.rb +20 -0
- data/dummy_app/config/secrets.yml +32 -0
- data/dummy_app/config/spring.rb +6 -0
- data/dummy_app/db/migrate/20180823051209_devise_create_admin_users.rb +44 -0
- data/dummy_app/db/migrate/20180823051213_create_active_admin_comments.rb +17 -0
- data/dummy_app/db/migrate/20180823051222_create_posts.rb +12 -0
- data/dummy_app/db/schema.rb +41 -0
- data/dummy_app/db/seeds.rb +8 -0
- data/dummy_app/lib/assets/.keep +0 -0
- data/dummy_app/lib/tasks/.keep +0 -0
- data/dummy_app/log/.keep +0 -0
- data/dummy_app/package.json +5 -0
- data/dummy_app/public/404.html +67 -0
- data/dummy_app/public/422.html +67 -0
- data/dummy_app/public/500.html +66 -0
- data/dummy_app/public/apple-touch-icon-precomposed.png +0 -0
- data/dummy_app/public/apple-touch-icon.png +0 -0
- data/dummy_app/public/favicon.ico +0 -0
- data/dummy_app/public/robots.txt +1 -0
- data/dummy_app/test/application_system_test_case.rb +5 -0
- data/dummy_app/test/controllers/.keep +0 -0
- data/dummy_app/test/fixtures/.keep +0 -0
- data/dummy_app/test/fixtures/admin_users.yml +11 -0
- data/dummy_app/test/fixtures/files/.keep +0 -0
- data/dummy_app/test/helpers/.keep +0 -0
- data/dummy_app/test/integration/.keep +0 -0
- data/dummy_app/test/mailers/.keep +0 -0
- data/dummy_app/test/models/.keep +0 -0
- data/dummy_app/test/models/admin_user_test.rb +7 -0
- data/dummy_app/test/system/.keep +0 -0
- data/dummy_app/test/test_helper.rb +9 -0
- data/dummy_app/tmp/.keep +0 -0
- data/dummy_app/vendor/.keep +0 -0
- data/lib/active_admin/nested_namespace.rb +270 -0
- data/lib/active_admin/nested_namespace/version.rb +5 -0
- metadata +236 -0
@@ -0,0 +1,17 @@
|
|
1
|
+
// SASS variable overrides must be declared before loading up Active Admin's styles.
|
2
|
+
//
|
3
|
+
// To view the variables that Active Admin provides, take a look at
|
4
|
+
// `app/assets/stylesheets/active_admin/mixins/_variables.scss` in the
|
5
|
+
// Active Admin source.
|
6
|
+
//
|
7
|
+
// For example, to change the sidebar width:
|
8
|
+
// $sidebar-width: 242px;
|
9
|
+
|
10
|
+
// Active Admin's got SASS!
|
11
|
+
@import "active_admin/mixins";
|
12
|
+
@import "active_admin/base";
|
13
|
+
|
14
|
+
// Overriding any non-variable SASS must be done after the fact.
|
15
|
+
// For example, to change the default status-tag color:
|
16
|
+
//
|
17
|
+
// .status_tag { background: #6090DB; }
|
@@ -0,0 +1,15 @@
|
|
1
|
+
/*
|
2
|
+
* This is a manifest file that'll be compiled into application.css, which will include all the files
|
3
|
+
* listed below.
|
4
|
+
*
|
5
|
+
* Any CSS and SCSS file within this directory, lib/assets/stylesheets, or any plugin's
|
6
|
+
* vendor/assets/stylesheets directory can be referenced here using a relative path.
|
7
|
+
*
|
8
|
+
* You're free to add application-wide styles to this file and they'll appear at the bottom of the
|
9
|
+
* compiled file so the styles you add here take precedence over styles defined in any other CSS/SCSS
|
10
|
+
* files in this directory. Styles in this file should be added after the last require_* statement.
|
11
|
+
* It is generally better to create a new file per style scope.
|
12
|
+
*
|
13
|
+
*= require_tree .
|
14
|
+
*= require_self
|
15
|
+
*/
|
File without changes
|
@@ -0,0 +1,10 @@
|
|
1
|
+
class AdminUser < ApplicationRecord
|
2
|
+
# Include default devise modules. Others available are:
|
3
|
+
# :confirmable, :lockable, :timeoutable, :trackable and :omniauthable
|
4
|
+
devise :database_authenticatable,
|
5
|
+
:recoverable, :rememberable, :validatable
|
6
|
+
# Include default devise modules. Others available are:
|
7
|
+
# :confirmable, :lockable, :timeoutable, :trackable and :omniauthable
|
8
|
+
devise :database_authenticatable,
|
9
|
+
:recoverable, :rememberable, :validatable
|
10
|
+
end
|
File without changes
|
@@ -0,0 +1,14 @@
|
|
1
|
+
<!DOCTYPE html>
|
2
|
+
<html>
|
3
|
+
<head>
|
4
|
+
<title>DummyApp</title>
|
5
|
+
<%= csrf_meta_tags %>
|
6
|
+
|
7
|
+
<%= stylesheet_link_tag 'application', media: 'all', 'data-turbolinks-track': 'reload' %>
|
8
|
+
<%= javascript_include_tag 'application', 'data-turbolinks-track': 'reload' %>
|
9
|
+
</head>
|
10
|
+
|
11
|
+
<body>
|
12
|
+
<%= yield %>
|
13
|
+
</body>
|
14
|
+
</html>
|
@@ -0,0 +1 @@
|
|
1
|
+
<%= yield %>
|
@@ -0,0 +1,29 @@
|
|
1
|
+
#!/usr/bin/env ruby
|
2
|
+
# frozen_string_literal: true
|
3
|
+
|
4
|
+
#
|
5
|
+
# This file was generated by Bundler.
|
6
|
+
#
|
7
|
+
# The application 'byebug' 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("byebug", "byebug")
|
@@ -0,0 +1,29 @@
|
|
1
|
+
#!/usr/bin/env ruby
|
2
|
+
# frozen_string_literal: true
|
3
|
+
|
4
|
+
#
|
5
|
+
# This file was generated by Bundler.
|
6
|
+
#
|
7
|
+
# The application 'listen' 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("listen", "listen")
|
@@ -0,0 +1,29 @@
|
|
1
|
+
#!/usr/bin/env ruby
|
2
|
+
# frozen_string_literal: true
|
3
|
+
|
4
|
+
#
|
5
|
+
# This file was generated by Bundler.
|
6
|
+
#
|
7
|
+
# The application 'nokogiri' 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("nokogiri", "nokogiri")
|
data/dummy_app/bin/puma
ADDED
@@ -0,0 +1,29 @@
|
|
1
|
+
#!/usr/bin/env ruby
|
2
|
+
# frozen_string_literal: true
|
3
|
+
|
4
|
+
#
|
5
|
+
# This file was generated by Bundler.
|
6
|
+
#
|
7
|
+
# The application 'puma' 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("puma", "puma")
|
@@ -0,0 +1,29 @@
|
|
1
|
+
#!/usr/bin/env ruby
|
2
|
+
# frozen_string_literal: true
|
3
|
+
|
4
|
+
#
|
5
|
+
# This file was generated by Bundler.
|
6
|
+
#
|
7
|
+
# The application 'pumactl' 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("puma", "pumactl")
|
@@ -0,0 +1,29 @@
|
|
1
|
+
#!/usr/bin/env ruby
|
2
|
+
# frozen_string_literal: true
|
3
|
+
|
4
|
+
#
|
5
|
+
# This file was generated by Bundler.
|
6
|
+
#
|
7
|
+
# The application 'rackup' 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("rack", "rackup")
|
data/dummy_app/bin/rails
ADDED
data/dummy_app/bin/rake
ADDED
data/dummy_app/bin/sass
ADDED
@@ -0,0 +1,29 @@
|
|
1
|
+
#!/usr/bin/env ruby
|
2
|
+
# frozen_string_literal: true
|
3
|
+
|
4
|
+
#
|
5
|
+
# This file was generated by Bundler.
|
6
|
+
#
|
7
|
+
# The application 'sass' 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("sass", "sass")
|
@@ -0,0 +1,29 @@
|
|
1
|
+
#!/usr/bin/env ruby
|
2
|
+
# frozen_string_literal: true
|
3
|
+
|
4
|
+
#
|
5
|
+
# This file was generated by Bundler.
|
6
|
+
#
|
7
|
+
# The application 'sass-convert' 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("sass", "sass-convert")
|
data/dummy_app/bin/scss
ADDED
@@ -0,0 +1,29 @@
|
|
1
|
+
#!/usr/bin/env ruby
|
2
|
+
# frozen_string_literal: true
|
3
|
+
|
4
|
+
#
|
5
|
+
# This file was generated by Bundler.
|
6
|
+
#
|
7
|
+
# The application 'scss' 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("sass", "scss")
|
data/dummy_app/bin/setup
ADDED
@@ -0,0 +1,38 @@
|
|
1
|
+
#!/usr/bin/env ruby
|
2
|
+
require 'pathname'
|
3
|
+
require 'fileutils'
|
4
|
+
include FileUtils
|
5
|
+
|
6
|
+
# path to your application root.
|
7
|
+
APP_ROOT = Pathname.new File.expand_path('../../', __FILE__)
|
8
|
+
|
9
|
+
def system!(*args)
|
10
|
+
system(*args) || abort("\n== Command #{args} failed ==")
|
11
|
+
end
|
12
|
+
|
13
|
+
chdir APP_ROOT do
|
14
|
+
# This script is a starting point to setup your application.
|
15
|
+
# Add necessary setup steps to this file.
|
16
|
+
|
17
|
+
puts '== Installing dependencies =='
|
18
|
+
system! 'gem install bundler --conservative'
|
19
|
+
system('bundle check') || system!('bundle install')
|
20
|
+
|
21
|
+
# Install JavaScript dependencies if using Yarn
|
22
|
+
# system('bin/yarn')
|
23
|
+
|
24
|
+
|
25
|
+
# puts "\n== Copying sample files =="
|
26
|
+
# unless File.exist?('config/database.yml')
|
27
|
+
# cp 'config/database.yml.sample', 'config/database.yml'
|
28
|
+
# end
|
29
|
+
|
30
|
+
puts "\n== Preparing database =="
|
31
|
+
system! 'bin/rails db:setup'
|
32
|
+
|
33
|
+
puts "\n== Removing old logs and tempfiles =="
|
34
|
+
system! 'bin/rails log:clear tmp:clear'
|
35
|
+
|
36
|
+
puts "\n== Restarting application server =="
|
37
|
+
system! 'bin/rails restart'
|
38
|
+
end
|