Class: Redis::Generators::InstallGenerator

Inherits:
Rails::Generators::Base
  • Object
show all
Defined in:
lib/redis/generators/install/install_generator.rb

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.source_rootObject



7
8
9
# File 'lib/redis/generators/install/install_generator.rb', line 7

def self.source_root
  @_redis_source_root ||= File.expand_path(File.join("../templates"), __FILE__)
end

Instance Method Details

#create_filesObject



13
14
15
16
17
18
# File 'lib/redis/generators/install/install_generator.rb', line 13

def create_files
  options[:host] ||= 'localhost'
  template 'redis.yml.tt', "config/redis.yml"
  say "Please ensure Gemfile contains: gem 'redis', '>= 2.0'"
  say "For production environment Redis configuration, set environment variables as indicated in config/redis.yml"
end