Sha256: 613928c50f0caf052b86d9d935bf907aa1f15ff2bfad2ceb7258ccdaa58db518

Contents?: true

Size: 603 Bytes

Versions: 10

Compression:

Stored size: 603 Bytes

Contents

module Lolita
  module Generators
    class InstallGenerator < Rails::Generators::Base
      source_root File.expand_path("../../templates", __FILE__)
      desc "Create lolita initializer."

      
      def copy_initializer
        template "lolita.rb", "config/initializers/lolita.rb" unless File.exist?(Rails.root + "config/initializers/lolita.rb")
      end

      def install_modules
        Lolita.modules.each do |module_name|
          
          invoke "lolita:#{module_name.to_s.underscore.gsub("/","_").gsub(/^lolita_/,"")}:install"  rescue nil
        end
      end
     
    end
  end
end

Version data entries

10 entries across 10 versions & 1 rubygems

Version Path
lolita-3.2.0.rc.17 lib/generators/lolita/install_generator.rb
lolita-3.2.0.rc.16 lib/generators/lolita/install_generator.rb
lolita-3.2.0.rc.14 lib/generators/lolita/install_generator.rb
lolita-3.2.0.rc.13 lib/generators/lolita/install_generator.rb
lolita-3.2.0.rc.12 lib/generators/lolita/install_generator.rb
lolita-3.2.0.rc.11 lib/generators/lolita/install_generator.rb
lolita-3.2.0.rc.10 lib/generators/lolita/install_generator.rb
lolita-3.2.0.rc.9 lib/generators/lolita/install_generator.rb
lolita-3.2.0.rc.7 lib/generators/lolita/install_generator.rb
lolita-3.2.0.rc.6 lib/generators/lolita/install_generator.rb