class Gaku::DockerGenerator
Public Class Methods
source_paths()
click to toggle source
# File lib/generators/gaku/docker/docker_generator.rb, line 13 def self.source_paths paths = superclass.source_paths paths << File.expand_path('../templates', "../../#{__FILE__}") paths << File.expand_path('../templates', "../#{__FILE__}") paths << File.expand_path('../templates', __FILE__) paths.flatten end
Public Instance Methods
add_route()
click to toggle source
# File lib/generators/gaku/docker/docker_generator.rb, line 30 def add_route route "mount Gaku::Core::Engine, at: '/'" end
copy_database_yml()
click to toggle source
# File lib/generators/gaku/docker/docker_generator.rb, line 21 def copy_database_yml copy_file 'config/database.yml', 'config/database.yml' end
copy_wait_bin()
click to toggle source
# File lib/generators/gaku/docker/docker_generator.rb, line 25 def copy_wait_bin copy_file 'bin/check_postgres.sh', 'bin/check_postgres.sh' chmod "bin/check_postgres.sh", 0755 end
install_migrations()
click to toggle source
# File lib/generators/gaku/docker/docker_generator.rb, line 34 def install_migrations say_status :copying, 'migrations' rake 'gaku:install:migrations' end
setup_assets()
click to toggle source
# File lib/generators/gaku/docker/docker_generator.rb, line 39 def setup_assets @lib_name = 'gaku' %w( javascripts stylesheets images ).each do |path| empty_directory "app/assets/#{path}/gaku/frontend" if defined? Gaku::Frontend || Rails.env.test? empty_directory "app/assets/#{path}/gaku/admin" if defined? Gaku::Admin || Rails.env.test? end if defined? Gaku::Frontend || Rails.env.test? template 'app/assets/javascripts/gaku/frontend/all.js' template 'app/assets/stylesheets/gaku/frontend/all.css' end if defined? Gaku::Admin || Rails.env.test? template 'app/assets/javascripts/gaku/admin/all.js' template 'app/assets/stylesheets/gaku/admin/all.css' end end