Class: Recipes::Redis

Inherits:
Rails::AppBuilder
  • Object
show all
Defined in:
lib/potassium/recipes/redis.rb

Instance Method Summary collapse

Instance Method Details

#add_redisObject



17
18
19
20
21
22
# File 'lib/potassium/recipes/redis.rb', line 17

def add_redis
  run_action(:install_redis) do
    gather_gem("redis-actionpack")
    copy_file("../assets/redis.yml", "config/redis.yml", force: true)
  end
end

#createObject



2
3
4
5
6
7
# File 'lib/potassium/recipes/redis.rb', line 2

def create
  add_redis
  add_docker_compose_redis_config
  set_redis_dot_env
  add_session_store_config
end

#installObject



9
10
11
# File 'lib/potassium/recipes/redis.rb', line 9

def install
  create
end

#installed?Boolean

Returns:

  • (Boolean)


13
14
15
# File 'lib/potassium/recipes/redis.rb', line 13

def installed?
  gem_exists?(/redis-actionpack/)
end