Skip to content

RailsInteractive::Templates - ActiveAdmin #43

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 19 commits into from
May 31, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 15 additions & 1 deletion lib/cli/config/commands.yml
Original file line number Diff line number Diff line change
Expand Up @@ -125,4 +125,18 @@
name: StandartRB
category: code_quality
description: " Ruby Style Guide, with linter & automatic code fixer. For details: https://github.com/testdouble/standard"
dependencies: null
dependencies: null
-
identifier: sassc_rails
name: Saasc Rails
category: development
description: "Integrate SassC-Ruby with Rails! For details: https://github.com/sass/sassc-rails"
dependencies: null
-
identifier: active_admin
name: ActiveAdmin
category: admin_panel
description: "The administration framework for Ruby on Rails applications. For details: https://github.com/activeadmin/activeadmin"
dependencies:
- sassc_rails
- devise
8 changes: 8 additions & 0 deletions lib/cli/templates/setup_active_admin.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
# frozen_string_literal: true

run "bundle add activeadmin"
run "bundle add bcrypt"
Bundler.with_unbundled_env { run "bundle" }

rails_command "generate active_admin:install"
rails_command "db:migrate"
2 changes: 1 addition & 1 deletion lib/cli/templates/setup_devise.rb
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,5 @@
rails_command "generate devise:install"

run "rails generate devise User"
run "rails db:create"
run "rails db:prepare"
run "rails db:migrate"
4 changes: 4 additions & 0 deletions lib/cli/templates/setup_sassc_rails.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
# frozen_string_literal: true

run "bundle add sassc-rails"
Bundler.with_unbundled_env { run "bundle" }
7 changes: 7 additions & 0 deletions lib/rails_interactive.rb
Original file line number Diff line number Diff line change
Expand Up @@ -126,5 +126,12 @@ def database

@inputs[:database] = Prompt.new("Database: ", "select", database_types, required: true).perform
end

def admin_panel
admin_panel = { "ActiveAdmin" => "active_admin" }

@inputs[:admin_panel] =
Prompt.new("Choose project admin panel: ", "select", admin_panel).perform
end
end
end