Class: RedisRunner
- Inherits:
-
Object
show all
- Defined in:
- lib/redis-store/testing/runners.rb
Instance Attribute Summary collapse
Instance Method Summary
collapse
Constructor Details
Returns a new instance of RedisRunner.
6
7
8
|
# File 'lib/redis-store/testing/runners.rb', line 6
def initialize(dir)
@dir = dir
end
|
Instance Attribute Details
#dir ⇒ Object
Returns the value of attribute dir.
4
5
6
|
# File 'lib/redis-store/testing/runners.rb', line 4
def dir
@dir
end
|
Instance Method Details
#redisdir ⇒ Object
10
11
12
|
# File 'lib/redis-store/testing/runners.rb', line 10
def redisdir
dir.join 'vendor/redis'
end
|
#start ⇒ Object
14
15
16
|
# File 'lib/redis-store/testing/runners.rb', line 14
def start
system %(redis-server #{configuration})
end
|
#stop ⇒ Object
18
19
20
21
22
23
24
|
# File 'lib/redis-store/testing/runners.rb', line 18
def stop
begin
Process.kill('SIGTERM', pid)
rescue
end
end
|