class RenoteDac::Generators::InstallGenerator
Public Instance Methods
create_clock_file()
click to toggle source
# File lib/generators/renote_dac/install_generator.rb, line 13 def create_clock_file template "clock.rb", "config/clock.rb" end
create_database_yml()
click to toggle source
# File lib/generators/renote_dac/install_generator.rb, line 28 def create_database_yml database_name = Rails.application.class.parent_name.underscore.gsub("_","-") create_file('config/database.yml', %{default: &default adapter: 'postgresql' encoding: unicode pool: <%= ENV['RAILS_MAX_THREADS'] || 5 %> prepared_statements: false development: <<: *default database: #{database_name}_dev production: <<: *default } ) end
create_gemfile_file()
click to toggle source
# File lib/generators/renote_dac/install_generator.rb, line 23 def create_gemfile_file FileUtils.remove_file(Rails.root.join('Gemfile').to_s) template "gemfile.rb", "Gemfile" end
create_initializer_file()
click to toggle source
# File lib/generators/renote_dac/install_generator.rb, line 8 def create_initializer_file template "initializer.rb", "config/initializers/renote_dac.rb" end
create_routes_file()
click to toggle source
# File lib/generators/renote_dac/install_generator.rb, line 18 def create_routes_file template "routes.rb", "config/routes.rb" end