redis_test 0.0.2 → 0.0.5
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +4 -4
- data/lib/redis_test/version.rb +1 -1
- data/lib/redis_test.rb +3 -1
- metadata +10 -10
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 20aa171e65e5aa189dd5774fd930936b0fdaeb90
|
4
|
+
data.tar.gz: 642207c46d059fca89022cac15e836742ce366d2
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 7b9e692204dcee42416043c3d5cdc8d11e6cb642c72b3867ac686205a7fa732141157859cc6749475146e2d8f0aa7bfce9c847b75f41442c2690cc94c07820ac
|
7
|
+
data.tar.gz: 9358af1445cef6ab5d10edb06a5374895683bedc0205d1679b85c3d296ee0d24d3fe9a7880098b19cbbf4510fe6d47b2b4d2fddae17803256fad972e18a3ece2
|
data/README.md
CHANGED
@@ -38,9 +38,9 @@ You can use it with RSpec by putting this block under your spec/support:
|
|
38
38
|
RSpec.configure do |config|
|
39
39
|
config.before(:suite) do
|
40
40
|
RedisTest.start
|
41
|
-
RedisTest.configure(:default, :sidekiq
|
41
|
+
RedisTest.configure(:default, :sidekiq)
|
42
42
|
# RedisTest provide common configuration for :default (set
|
43
|
-
# Redis.current), :sidekiq, :ohm and :resque.
|
43
|
+
# Redis.current), :sidekiq, :ohm (set Ohm.redis) and :resque.
|
44
44
|
end
|
45
45
|
|
46
46
|
config.after(:each) do
|
@@ -60,7 +60,7 @@ Or with Cucumber by putting this block under your features/support:
|
|
60
60
|
|
61
61
|
```ruby
|
62
62
|
RedisTest.start # start this when cucumber load
|
63
|
-
RedisTest.configure(:default, :sidekiq
|
63
|
+
RedisTest.configure(:default, :sidekiq)
|
64
64
|
# available option: :default, :sidekiq, :ohm, :resque
|
65
65
|
|
66
66
|
After do
|
@@ -75,7 +75,7 @@ end
|
|
75
75
|
```
|
76
76
|
|
77
77
|
There is a `RedisTest.server_url` (which by default return
|
78
|
-
`"redis://localhost:
|
78
|
+
`"redis://localhost:9736"`) that you can use to configure your custom tool
|
79
79
|
that use Redis
|
80
80
|
|
81
81
|
## For Parallel Testing
|
data/lib/redis_test/version.rb
CHANGED
data/lib/redis_test.rb
CHANGED
@@ -25,6 +25,7 @@ module RedisTest
|
|
25
25
|
def start
|
26
26
|
FileUtils.mkdir_p cache_path
|
27
27
|
FileUtils.mkdir_p pids_path
|
28
|
+
|
28
29
|
redis_options = {
|
29
30
|
"daemonize" => 'yes',
|
30
31
|
"pidfile" => pidfile,
|
@@ -39,7 +40,8 @@ module RedisTest
|
|
39
40
|
|
40
41
|
wait_time_remaining = 5
|
41
42
|
begin
|
42
|
-
TCPSocket.open("localhost", port)
|
43
|
+
socket = TCPSocket.open("localhost", port)
|
44
|
+
socket.puts "flushall"
|
43
45
|
success = true
|
44
46
|
rescue Exception => e
|
45
47
|
if wait_time_remaining > 0
|
metadata
CHANGED
@@ -1,41 +1,41 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: redis_test
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.5
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Phuong Nguyen
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2014-
|
11
|
+
date: 2014-12-14 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
15
15
|
requirement: !ruby/object:Gem::Requirement
|
16
16
|
requirements:
|
17
|
-
- - ~>
|
17
|
+
- - "~>"
|
18
18
|
- !ruby/object:Gem::Version
|
19
19
|
version: '1.3'
|
20
20
|
type: :development
|
21
21
|
prerelease: false
|
22
22
|
version_requirements: !ruby/object:Gem::Requirement
|
23
23
|
requirements:
|
24
|
-
- - ~>
|
24
|
+
- - "~>"
|
25
25
|
- !ruby/object:Gem::Version
|
26
26
|
version: '1.3'
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
28
|
name: rake
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
30
30
|
requirements:
|
31
|
-
- -
|
31
|
+
- - ">="
|
32
32
|
- !ruby/object:Gem::Version
|
33
33
|
version: '0'
|
34
34
|
type: :development
|
35
35
|
prerelease: false
|
36
36
|
version_requirements: !ruby/object:Gem::Requirement
|
37
37
|
requirements:
|
38
|
-
- -
|
38
|
+
- - ">="
|
39
39
|
- !ruby/object:Gem::Version
|
40
40
|
version: '0'
|
41
41
|
description: A helper to launch redis server during test
|
@@ -45,7 +45,7 @@ executables: []
|
|
45
45
|
extensions: []
|
46
46
|
extra_rdoc_files: []
|
47
47
|
files:
|
48
|
-
- .gitignore
|
48
|
+
- ".gitignore"
|
49
49
|
- Gemfile
|
50
50
|
- LICENSE.txt
|
51
51
|
- README.md
|
@@ -63,17 +63,17 @@ require_paths:
|
|
63
63
|
- lib
|
64
64
|
required_ruby_version: !ruby/object:Gem::Requirement
|
65
65
|
requirements:
|
66
|
-
- -
|
66
|
+
- - ">="
|
67
67
|
- !ruby/object:Gem::Version
|
68
68
|
version: '0'
|
69
69
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
70
70
|
requirements:
|
71
|
-
- -
|
71
|
+
- - ">="
|
72
72
|
- !ruby/object:Gem::Version
|
73
73
|
version: '0'
|
74
74
|
requirements: []
|
75
75
|
rubyforge_project:
|
76
|
-
rubygems_version: 2.
|
76
|
+
rubygems_version: 2.2.2
|
77
77
|
signing_key:
|
78
78
|
specification_version: 4
|
79
79
|
summary: A helper to launch redis server during test
|