Skip to content

Commit acf8871

Browse files
authored
Merge pull request #1 from Trim/wip-allow-choose-redis-server
Allow to configure redis server host and port
2 parents 370e8df + 4f99a9a commit acf8871

File tree

3 files changed

+4
-2
lines changed

3 files changed

+4
-2
lines changed

board-linuxfr.gemspec

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
11
# encoding: utf-8
2+
lib = File.expand_path('../lib', __FILE__)
3+
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
24
require './lib/board-linuxfr'
35

46
Gem::Specification.new do |s|

lib/board-linuxfr/redis_plugin.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ def initialize(address, port, config, status, logger)
1212
@logger = logger
1313
@chans = status[:channels] = Hash.new { |h,k| h[k] = EM::Channel.new }
1414
@cache = status[:cache] = Cache.new
15-
@redis = Redis.new
15+
@redis = Redis.new(host: ENV['REDIS_HOST'] || "localhost", port: ENV['REDIS_PORT'] || 6379)
1616
end
1717

1818
def run

lib/board-linuxfr/version.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
class BoardLinuxfr
2-
VERSION = "0.1.2"
2+
VERSION = "0.1.3"
33
end

0 commit comments

Comments
 (0)