Sha256: b9ec331bd9aa49c7d10993e96054a5720fe2f4e59be016b52eb083052bc9139a

Contents?: true

Size: 635 Bytes

Versions: 14

Compression:

Stored size: 635 Bytes

Contents

class NavigationConfigGenerator < Rails::Generators::Base
  def self.source_root
    @source_root ||= begin
      tpl_dir = %w[.. .. .. .. generators navigation_config templates]
      tpl_dir_path = File.join(tpl_dir)
      File.expand_path(tpl_dir_path, __FILE__)
    end
  end

  desc 'Creates a template config file for the simple-navigation plugin. ' \
       'You will find the generated file in config/navigation.rb.'
  def navigation_config
    copy_file('config/navigation.rb', 'config/navigation.rb')
    readme_path = File.join(%w[.. .. .. .. README.md])
    say File.read(File.expand_path(readme_path, __FILE__))
  end
end

Version data entries

14 entries across 14 versions & 1 rubygems

Version Path
simple-navigation-4.4.0 lib/generators/navigation_config/navigation_config_generator.rb
simple-navigation-4.3.0 lib/generators/navigation_config/navigation_config_generator.rb
simple-navigation-4.2.0 lib/generators/navigation_config/navigation_config_generator.rb
simple-navigation-4.1.0 lib/generators/navigation_config/navigation_config_generator.rb
simple-navigation-4.0.5 lib/generators/navigation_config/navigation_config_generator.rb
simple-navigation-4.0.4 lib/generators/navigation_config/navigation_config_generator.rb
simple-navigation-4.0.3 lib/generators/navigation_config/navigation_config_generator.rb
simple-navigation-4.0.2 lib/generators/navigation_config/navigation_config_generator.rb
simple-navigation-4.0.1 lib/generators/navigation_config/navigation_config_generator.rb
simple-navigation-4.0.0 lib/generators/navigation_config/navigation_config_generator.rb
simple-navigation-3.14.0 lib/generators/navigation_config/navigation_config_generator.rb
simple-navigation-3.13.0 lib/generators/navigation_config/navigation_config_generator.rb
simple-navigation-3.12.2 lib/generators/navigation_config/navigation_config_generator.rb
simple-navigation-3.12.1 lib/generators/navigation_config/navigation_config_generator.rb