Sha256: 7c5424d1e451bd141b4793f0d4415af4bea8a82ac904feb97f3902d5fe069883
Contents?: true
Size: 1.04 KB
Versions: 2
Compression:
Stored size: 1.04 KB
Contents
require 'rails/generators' module MamaSearch module Generators class InstallGenerator < Rails::Generators::Base source_root File.join(File.dirname(__FILE__), './templates') def install say 'Installing elasticsearch...' source = File.join File.dirname(__FILE__), '/../../../vendor/elasticsearch-0.14.2' destination = 'elasticsearch/server' directory source, destination chmod "#{destination}/bin/", 0755 end def config say 'Installing config...' template 'elasticsearch.app.yml', 'config/elasticsearch.yml' #copy_file 'elasticsearch.in.sh', 'config/elasticsearch/elasticsearch.in.sh' #copy_file 'logging.yml', 'config/elasticsearch/logging.yml' #copy_file 'elasticsearch.yml', 'config/elasticsearch/elasticsearch.yml' copy_file 'elasticsearch.rb', 'config/initializers/elasticsearch.rb' end protected def application_name Rails.application.class.name.split('::').first.underscore end end end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
mama_search-0.0.2 | lib/mama_search/generators/install_generator.rb |
mama_search-0.0.1 | lib/mama_search/generators/install_generator.rb |