redis-spawn 0.0.6 → 0.1.0

Sign up to get free protection for your applications and to get access to all the features.
data/README.md CHANGED
@@ -48,7 +48,7 @@ When starting a server with default options, redis-spawn will create a Redis
48
48
  config file named `/tmp/redis-spawned.[pid of parent process].config`, and
49
49
  populate it with the default server options. For the most part, these
50
50
  defaults correspond to the defaults you expect to find in a vanilla
51
- `redis.conf`, with a few notable exceptions:
51
+ version 2.6 `redis.conf`, with a few notable exceptions:
52
52
 
53
53
  * `dir` defaults to `/tmp/redis-spawned.[ppid].data`
54
54
  * `logfile` defaults to `"/tmp/redis-spawned.[ppid].log`
@@ -60,6 +60,10 @@ defaults correspond to the defaults you expect to find in a vanilla
60
60
  In all cases, [ppid] corresponds to the PID of the Ruby process that spawns
61
61
  the server.
62
62
 
63
+ Note that the config defaults were changed in version 0.1.0 in line with
64
+ Redis 2.6. If you're using an earlier version of Redis, you may need to
65
+ override the defaults or use version 0.0.6 of the gem.
66
+
63
67
  ### Connecting
64
68
 
65
69
  By defaults, spawned servers use unix domain sockets, and don't bind to a
@@ -75,6 +79,12 @@ Or from the command line:
75
79
  $ redis-cli -s /tmp/redis-spawned.7457.sock
76
80
  ```
77
81
 
82
+ Ohm users can connect like this:
83
+
84
+ ```ruby
85
+ Ohm.connect(:path => my_server_instance.socket)
86
+ ```
87
+
78
88
  ### Shutdown and Cleanup
79
89
 
80
90
  Spawned servers will automatically shutdown when your program exits. You can
data/Rakefile CHANGED
@@ -1,6 +1,4 @@
1
1
  require 'rubygems'
2
- require 'rake/gempackagetask'
3
- require 'rake/testtask'
4
2
 
5
3
  $:.unshift File.join(File.dirname(__FILE__), 'lib')
6
4
  require 'redis/spawn'
@@ -1,5 +1,5 @@
1
1
  class Redis
2
2
  class SpawnServer
3
- VERSION = "0.0.6"
3
+ VERSION = "0.1.0"
4
4
  end
5
5
  end
data/lib/redis/spawn.rb CHANGED
@@ -3,25 +3,34 @@ require "redis"
3
3
  class Redis
4
4
  class SpawnServer
5
5
  @_default_server_opts = {
6
- port: "0",
7
- bind: "127.0.0.1",
8
- unixsocket: "/tmp/redis-spawned.#{Process.pid}.sock",
9
- loglevel: "notice",
10
- logfile: "/tmp/redis-spawned.#{Process.pid}.log",
11
- databases: "16",
12
- save: ["900 1", "300 10", "60 10000"],
13
- rdbcompression: "yes",
14
- dbfilename: "dump.rdb",
15
- dir: "/tmp/redis-spawned.#{Process.pid}.data",
16
- appendonly: "no",
17
- appendfsync: "everysec",
18
- vm_enabled: "no",
19
- hash_max_zipmap_entries: "512",
20
- hash_max_zipmap_value: "64",
21
- list_max_ziplist_entries: "512",
22
- list_max_ziplist_value: "64",
23
- set_max_intset_entries: "512",
24
- activerehashing: "yes"
6
+ port: "0",
7
+ bind: "127.0.0.1",
8
+ unixsocket: "/tmp/redis-spawned.#{Process.pid}.sock",
9
+ loglevel: "notice",
10
+ logfile: "/tmp/redis-spawned.#{Process.pid}.log",
11
+ timeout: "0",
12
+ databases: "16",
13
+ save: ["900 1", "300 10", "60 10000"],
14
+ stop_writes_on_bgsave_error: "yes",
15
+ rdbcompression: "yes",
16
+ rdbchecksum: "yes",
17
+ dbfilename: "dump.rdb",
18
+ dir: "/tmp/redis-spawned.#{Process.pid}.data",
19
+ appendonly: "no",
20
+ appendfsync: "everysec",
21
+ no_appendfsync_on_rewrite: "no",
22
+ lua_time_limit: "5000",
23
+ slowlog_log_slower_than: "10000",
24
+ slowlog_max_len: "128",
25
+ hash_max_ziplist_entries: "512",
26
+ hash_max_ziplist_value: "64",
27
+ list_max_ziplist_entries: "512",
28
+ list_max_ziplist_value: "64",
29
+ set_max_intset_entries: "512",
30
+ zset_max_ziplist_entries: "128",
31
+ zset_max_ziplist_value: "64",
32
+ activerehashing: "yes",
33
+ client_output_buffer_limit: ["normal 0 0 0", "slave 256mb 64mb 60", "pubsub 32mb 8mb 60"]
25
34
  }
26
35
 
27
36
  @_running_servers = {}
metadata CHANGED
@@ -1,60 +1,56 @@
1
- --- !ruby/object:Gem::Specification
1
+ --- !ruby/object:Gem::Specification
2
2
  name: redis-spawn
3
- version: !ruby/object:Gem::Version
4
- prerelease: false
5
- segments:
6
- - 0
7
- - 0
8
- - 6
9
- version: 0.0.6
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.1.0
5
+ prerelease:
10
6
  platform: ruby
11
- authors:
7
+ authors:
12
8
  - Phil Stewart
13
9
  autorequire:
14
10
  bindir: bin
15
11
  cert_chain: []
16
-
17
- date: 2012-07-25 00:00:00 +01:00
18
- default_executable:
19
- dependencies:
20
- - !ruby/object:Gem::Dependency
12
+ date: 2013-06-15 00:00:00.000000000 Z
13
+ dependencies:
14
+ - !ruby/object:Gem::Dependency
21
15
  name: redis
22
- prerelease: false
23
- requirement: &id001 !ruby/object:Gem::Requirement
16
+ requirement: !ruby/object:Gem::Requirement
24
17
  none: false
25
- requirements:
26
- - - ">"
27
- - !ruby/object:Gem::Version
28
- segments:
29
- - 2
30
- - 0
31
- version: "2.0"
18
+ requirements:
19
+ - - ! '>'
20
+ - !ruby/object:Gem::Version
21
+ version: '2.0'
32
22
  type: :runtime
33
- version_requirements: *id001
34
- - !ruby/object:Gem::Dependency
35
- name: cutest
36
23
  prerelease: false
37
- requirement: &id002 !ruby/object:Gem::Requirement
24
+ version_requirements: !ruby/object:Gem::Requirement
25
+ none: false
26
+ requirements:
27
+ - - ! '>'
28
+ - !ruby/object:Gem::Version
29
+ version: '2.0'
30
+ - !ruby/object:Gem::Dependency
31
+ name: cutest
32
+ requirement: !ruby/object:Gem::Requirement
38
33
  none: false
39
- requirements:
34
+ requirements:
40
35
  - - ~>
41
- - !ruby/object:Gem::Version
42
- segments:
43
- - 0
44
- - 1
45
- version: "0.1"
36
+ - !ruby/object:Gem::Version
37
+ version: '0.1'
46
38
  type: :development
47
- version_requirements: *id002
48
- description: redis-spawn allows you to manage your own redis-server instances from within your Ruby application.
49
- email:
39
+ prerelease: false
40
+ version_requirements: !ruby/object:Gem::Requirement
41
+ none: false
42
+ requirements:
43
+ - - ~>
44
+ - !ruby/object:Gem::Version
45
+ version: '0.1'
46
+ description: redis-spawn allows you to manage your own redis-server instances from
47
+ within your Ruby application.
48
+ email:
50
49
  - phil.stewart@lichp.co.uk
51
50
  executables: []
52
-
53
51
  extensions: []
54
-
55
52
  extra_rdoc_files: []
56
-
57
- files:
53
+ files:
58
54
  - lib/redis/spawn/version.rb
59
55
  - lib/redis/spawn.rb
60
56
  - README.md
@@ -65,37 +61,30 @@ files:
65
61
  - test/spawn_test.rb
66
62
  - test/build_config_helper.rb
67
63
  - test/build_config_test.rb
68
- has_rdoc: true
69
64
  homepage: http://github.com/lichp/redis-spawn
70
65
  licenses: []
71
-
72
66
  post_install_message:
73
67
  rdoc_options: []
74
-
75
- require_paths:
68
+ require_paths:
76
69
  - lib
77
- required_ruby_version: !ruby/object:Gem::Requirement
70
+ required_ruby_version: !ruby/object:Gem::Requirement
78
71
  none: false
79
- requirements:
80
- - - ">="
81
- - !ruby/object:Gem::Version
82
- segments:
83
- - 0
84
- version: "0"
85
- required_rubygems_version: !ruby/object:Gem::Requirement
72
+ requirements:
73
+ - - ! '>='
74
+ - !ruby/object:Gem::Version
75
+ version: '0'
76
+ required_rubygems_version: !ruby/object:Gem::Requirement
86
77
  none: false
87
- requirements:
88
- - - ">="
89
- - !ruby/object:Gem::Version
90
- segments:
91
- - 0
92
- version: "0"
78
+ requirements:
79
+ - - ! '>='
80
+ - !ruby/object:Gem::Version
81
+ version: '0'
93
82
  requirements: []
94
-
95
83
  rubyforge_project:
96
- rubygems_version: 1.3.7
84
+ rubygems_version: 1.8.23
97
85
  signing_key:
98
86
  specification_version: 3
99
- summary: An extension to redis-rb to facilitate spawning a redis-server specifically for your app.
87
+ summary: An extension to redis-rb to facilitate spawning a redis-server specifically
88
+ for your app.
100
89
  test_files: []
101
-
90
+ has_rdoc: