class Onotole::AppBuilder
Attributes
active_admin_theme_selected[RW]
app_file_css[RW]
app_file_scss[RW]
devise_model[RW]
file_storage_name[RW]
js_file[RW]
quiet[RW]
use_asset_pipelline[RW]
user_choice[RW]
Public Instance Methods
add_bullet_gem_configuration()
click to toggle source
# File lib/onotole/app_builder.rb, line 53 def add_bullet_gem_configuration config = <<-RUBY config.after_initialize do Bullet.enable = true Bullet.bullet_logger = true Bullet.rails_logger = true end RUBY inject_into_file( 'config/environments/development.rb', config, after: "config.action_mailer.raise_delivery_errors = true\n" ) end
configure_active_job()
click to toggle source
# File lib/onotole/app_builder.rb, line 90 def configure_active_job configure_application_file( 'config.active_job.queue_adapter = :delayed_job' ) configure_environment 'test', 'config.active_job.queue_adapter = :inline' end
configure_ci()
click to toggle source
# File lib/onotole/app_builder.rb, line 78 def configure_ci template 'circle.yml.erb', 'circle.yml' end
configure_newrelic()
click to toggle source
# File lib/onotole/app_builder.rb, line 74 def configure_newrelic template 'newrelic.yml.erb', 'config/newrelic.yml' end
configure_puma()
click to toggle source
# File lib/onotole/app_builder.rb, line 97 def configure_puma remove_file 'config/puma.rb' template 'puma.rb.erb', 'config/puma.rb' end
configure_simple_form()
click to toggle source
# File lib/onotole/app_builder.rb, line 82 def configure_simple_form if user_choose?(:bootstrap3_sass) || user_choose?(:bootstrap3) rails_generator 'simple_form:install --bootstrap' else rails_generator 'simple_form:install' end end
delete_comments()
click to toggle source
def rvm_bundler_stubs_install
if system "rvm -v | grep 'rvm.io'" run 'chmod +x $rvm_path/hooks/after_cd_bundler' run 'bundle install --binstubs=./bundler_stubs' end
end
# File lib/onotole/app_builder.rb, line 109 def delete_comments return unless options[:clean_comments] || user_choose?(:clean_comments) cleanup_comments 'Gemfile' remove_config_comment_lines remove_routes_comment_lines end
prevent_double_usage()
click to toggle source
# File lib/onotole/app_builder.rb, line 116 def prevent_double_usage unless !pgsql_db_exist?("#{app_name}_development") || !pgsql_db_exist?("#{app_name}_test") say_color RED, " YOU HAVE EXISTING DB WITH #{app_name.upcase}!!!" say_color RED, " WRITE 'Y' TO CONTINUE WITH DELETION OF ALL DATA" say_color RED, ' ANY OTHER INPUT FOR EXIT' exit 0 unless STDIN.gets.chomp == 'Y' end end
set_up_hound()
click to toggle source
# File lib/onotole/app_builder.rb, line 70 def set_up_hound copy_file 'hound.yml', '.hound.yml' end