Sha256: 615156e94906d7d69423e1d37155b7b085257b5183c4f76ee4c61cfcc6647299
Contents?: true
Size: 1.32 KB
Versions: 2
Compression:
Stored size: 1.32 KB
Contents
require 'rails/generators/base' module FluxFlex module Generators class InstallGenerator < Rails::Generators::Base desc <<DESC Description: Add files to deploy for fluxflex DESC def self.source_root @_flx_tools_source_root ||= File.expand_path(File.join(File.dirname(__FILE__), 'templates')) end def copy_dot_flx template '.flx' end def copy_sh_files template 'fluxflex_deploy.sh' template 'fluxflex_rake.sh' template 'fluxflex_setup.sh' end def copy_dispatch_fcgi template 'flx_dispatch.fcgi', File.join('public', 'flx_dispatch.fcgi') end def copy_dot_htaccess template '.htaccess', File.join('public', '.htaccess') end def copy_config_database template 'database.yml', File.join('config', 'database.yml') end def insert_gems gemfile = 'Gemfile' if File.exists?(gemfile) body = File.read(gemfile) File.open(gemfile, 'a') do |f| f.puts "gem 'mysql2'" unless body.match(/mysql/) f.puts "gem 'fcgi'" unless body.match(/fcgi/) end else raise Rails::Generators::Error, "Gemfile not found." end end def application_name Rails.application.class.name end end end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
flx-tools-0.3.4 | lib/generators/flux_flex/install_generator.rb |
flx-tools-0.3.2 | lib/generators/flux_flex/install_generator.rb |