mneme 0.5.1 → 0.5.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (4) hide show
  1. data/Gemfile +1 -4
  2. data/lib/mneme.rb +6 -8
  3. data/mneme.gemspec +1 -1
  4. metadata +2 -2
data/Gemfile CHANGED
@@ -1,6 +1,3 @@
1
1
  source "http://rubygems.org"
2
2
 
3
- # Specify your gem's dependencies in mneme.gemspec
4
- gemspec
5
-
6
- gem 'redis', :git => 'git://github.com/ezmobius/redis-rb.git'
3
+ gemspec
@@ -75,8 +75,8 @@ class Mneme < Goliath::API
75
75
  def filter(n)
76
76
  period = epoch_name(config['namespace'], n, config['length'])
77
77
 
78
- filter = if env.key? period
79
- env[period]
78
+ filter = if env[Goliath::Constants::CONFIG].key? period
79
+ env[Goliath::Constants::CONFIG][period]
80
80
  else
81
81
  opts = {
82
82
  namespace: config['namespace'],
@@ -85,13 +85,11 @@ class Mneme < Goliath::API
85
85
  hashes: config['hashes']
86
86
  }
87
87
 
88
- # env[period] = EventMachine::Synchrony::ConnectionPool.new(size: 10) do
89
- env[period] = BloomFilter::Redis.new(opts)
90
- # end
91
-
92
- env[period]
88
+ env[Goliath::Constants::CONFIG][period] = EventMachine::Synchrony::ConnectionPool.new(size: 1) do
89
+ BloomFilter::Redis.new(opts)
90
+ end
93
91
  end
94
92
 
95
93
  filter
96
94
  end
97
- end
95
+ end
@@ -3,7 +3,7 @@ $:.push File.expand_path("../lib", __FILE__)
3
3
 
4
4
  Gem::Specification.new do |s|
5
5
  s.name = "mneme"
6
- s.version = "0.5.1"
6
+ s.version = "0.5.2"
7
7
  s.platform = Gem::Platform::RUBY
8
8
  s.authors = ["Ilya Grigorik"]
9
9
  s.email = ["ilya@igvita.com"]
metadata CHANGED
@@ -2,7 +2,7 @@
2
2
  name: mneme
3
3
  version: !ruby/object:Gem::Version
4
4
  prerelease:
5
- version: 0.5.1
5
+ version: 0.5.2
6
6
  platform: ruby
7
7
  authors:
8
8
  - Ilya Grigorik
@@ -10,7 +10,7 @@ autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
12
 
13
- date: 2011-03-29 00:00:00 -04:00
13
+ date: 2011-03-30 00:00:00 -04:00
14
14
  default_executable:
15
15
  dependencies:
16
16
  - !ruby/object:Gem::Dependency