Sha256: 72f02f503f1669a8d87666655d26d90c086e357730ee919b8b513c10c6b0b723
Contents?: true
Size: 1.32 KB
Versions: 3
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.yaml') 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
3 entries across 3 versions & 1 rubygems
Version | Path |
---|---|
flx-tools-0.3.3 | lib/generators/flux_flex/install_generator.rb |
flx-tools-0.3.1 | lib/generators/flux_flex/install_generator.rb |
flx-tools-0.3.0 | lib/generators/flux_flex/install_generator.rb |