Sha256: 5d9315405fb7df591410d778ad5aeb7b8dfd8dfa441c3e8b0efefa088965d62d

Contents?: true

Size: 656 Bytes

Versions: 8

Compression:

Stored size: 656 Bytes

Contents

require 'rails/generators'

module Enjoy::Cms
  class ScriptsGenerator < Rails::Generators::Base
    source_root File.expand_path('../templates/scripts', __FILE__)

    argument :app_name,   type: :string

    desc 'Enjoy CMS scripts generator'
    def install
      %w( assets_precompile.sh
          bundle_production.sh
          full_assets_precompile.sh
          restart_thru_kill.sh
          send_usr2.sh
          send_hup.sh
          db_dump.sh.erb
          db_restore.sh
      ).each do |template_name|
        script_name = template_name.match(/.+\.sh/)[0]
        template template_name, "scripts/#{script_name}"
      end
    end
  end
end

Version data entries

8 entries across 8 versions & 1 rubygems

Version Path
enjoy_cms-0.4.1 lib/generators/enjoy/cms/scripts_generator.rb
enjoy_cms-0.4.0.5 lib/generators/enjoy/cms/scripts_generator.rb
enjoy_cms-0.4.0.4 lib/generators/enjoy/cms/scripts_generator.rb
enjoy_cms-0.4.0.3 lib/generators/enjoy/cms/scripts_generator.rb
enjoy_cms-0.4.0.2 lib/generators/enjoy/cms/scripts_generator.rb
enjoy_cms-0.4.0.1 lib/generators/enjoy/cms/scripts_generator.rb
enjoy_cms-0.4.0 lib/generators/enjoy/cms/scripts_generator.rb
enjoy_cms-0.4.0.beta3 lib/generators/enjoy/cms/scripts_generator.rb