Sha256: 21af6360f40abf281ea6db94bde4116174d846df4a5f5e0da0daecfdf8900364

Contents?: true

Size: 579 Bytes

Versions: 14

Compression:

Stored size: 579 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

14 entries across 14 versions & 1 rubygems

Version Path
lolita-3.4.2 lib/generators/lolita/install_generator.rb
lolita-3.4.1 lib/generators/lolita/install_generator.rb
lolita-3.4.0 lib/generators/lolita/install_generator.rb
lolita-3.3.9 lib/generators/lolita/install_generator.rb
lolita-3.3.8 lib/generators/lolita/install_generator.rb
lolita-3.3.7 lib/generators/lolita/install_generator.rb
lolita-3.3.6 lib/generators/lolita/install_generator.rb
lolita-3.3.5 lib/generators/lolita/install_generator.rb
lolita-3.3.4 lib/generators/lolita/install_generator.rb
lolita-3.3.3 lib/generators/lolita/install_generator.rb
lolita-3.3.2 lib/generators/lolita/install_generator.rb
lolita-3.3.1 lib/generators/lolita/install_generator.rb
lolita-3.3.0 lib/generators/lolita/install_generator.rb
lolita-3.2.1 lib/generators/lolita/install_generator.rb