-
Notifications
You must be signed in to change notification settings - Fork 10
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
KBP-119 #time 3h - Welcome controller and views created
- Loading branch information
Showing
111 changed files
with
1,864 additions
and
130 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
# frozen_string_literal: true | ||
|
||
module Cybele | ||
module Helpers | ||
module AppFiles | ||
module ControllerFiles | ||
def customize_controller_files | ||
# HQ controller files | ||
directory 'app_files/app/controllers/hq', 'app/controllers/hq' | ||
|
||
# Welcome controller | ||
copy_file 'app_files/app/controllers/welcome_controller.rb', 'app/controllers/welcome_controller.rb' | ||
end | ||
end | ||
end | ||
end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
# frozen_string_literal: true | ||
|
||
module Cybele | ||
module Helpers | ||
module AppFiles | ||
module HelperFiles | ||
def customize_helper_files | ||
# Helper files | ||
remove_file 'app/helpers/application_helper.rb', force: true | ||
template 'app_files/app/helpers/application_helper.rb.erb', 'app/helpers/application_helper.rb' | ||
end | ||
end | ||
end | ||
end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
# frozen_string_literal: true | ||
|
||
module Cybele | ||
module Helpers | ||
module AppFiles | ||
module MailerFiles | ||
def customize_mailer_files | ||
# Model files | ||
remove_file 'app/mailers/application_mailer.rb', force: true | ||
directory 'app_files/app/mailers', 'app/mailers' | ||
end | ||
end | ||
end | ||
end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
# frozen_string_literal: true | ||
|
||
module Cybele | ||
module Helpers | ||
module AppFiles | ||
module ModelFiles | ||
def customize_model_files | ||
# Model files | ||
remove_file 'app/models/admin.rb', force: true | ||
directory 'app_files/app/models', 'app/models' | ||
end | ||
end | ||
end | ||
end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
# frozen_string_literal: true | ||
|
||
module Cybele | ||
module Helpers | ||
module AppFiles | ||
module ViewFiles | ||
def customize_view_files_with_option | ||
# View files with option | ||
directory 'app_files/app/views/hq', 'app/views/hq' | ||
directory 'app_files/app/views/layouts/hq', 'app/views/layouts/hq' | ||
directory 'app_files/app/views/layouts/partials', 'app/views/layouts/partials' | ||
directory 'app_files/app/views/welcome', 'app/views/welcome' | ||
template 'app_files/app/views/layouts/application.html.haml.erb', | ||
'app/views/layouts/application.html.haml', force: true | ||
end | ||
|
||
def customize_default_view_files | ||
# Default view files | ||
directory 'app_files/app/views/admin_mailer', 'app/views/admin_mailer' | ||
end | ||
end | ||
end | ||
end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
# frozen_string_literal: true | ||
|
||
module Cybele | ||
module Helpers | ||
module AppFiles | ||
module ViewGems | ||
def add_required_view_gems | ||
# Add bootstrap gem | ||
append_file('Gemfile', template_content('app_files/bootstrap_Gemfile.erb')) | ||
|
||
# Add blankable gem | ||
append_file('Gemfile', template_content('app_files/blankable_Gemfile.erb')) | ||
|
||
# Add breadcrumb gem | ||
append_file('Gemfile', template_content('app_files/breadcrumb_Gemfile.erb')) | ||
|
||
# Add fontawesome gem | ||
append_file('Gemfile', template_content('app_files/fontawesome_Gemfile.erb')) | ||
end | ||
end | ||
end | ||
end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
# frozen_string_literal: true | ||
|
||
module Cybele | ||
module Helpers | ||
module Audited | ||
def configure_audited | ||
# Generate Audited | ||
generate 'audited:install' | ||
end | ||
end | ||
end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
# frozen_string_literal: true | ||
|
||
module Cybele | ||
module Helpers | ||
module Routes | ||
def configure_routes | ||
# HQ routes | ||
replace_in_file 'config/routes.rb', | ||
'devise_for :admins', | ||
'' | ||
|
||
inject_into_file 'config/routes.rb', template_content('config/routes.rb.erb'), | ||
before: 'if Rails.env.production? || Rails.env.staging?' | ||
|
||
end | ||
end | ||
end | ||
end |
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.