flipper-redis 0.2.0 → 0.3.0

Sign up to get free protection for your applications and to get access to all the features.
data/.travis.yml ADDED
@@ -0,0 +1,11 @@
1
+ language: ruby
2
+ rvm:
3
+ - 1.8.7
4
+ - ree
5
+ - 1.9.3
6
+ notifications:
7
+ email: false
8
+ bundler_args: --without guard
9
+ before_script: sudo service redis-server status
10
+ services:
11
+ - redis-server
data/Gemfile CHANGED
@@ -2,16 +2,12 @@ source 'https://rubygems.org'
2
2
  gemspec
3
3
 
4
4
  gem 'rake'
5
+ gem 'rspec'
6
+ gem 'redis'
5
7
 
6
8
  group(:guard) do
7
9
  gem 'guard'
8
10
  gem 'guard-rspec'
9
11
  gem 'guard-bundler'
10
- gem 'growl'
12
+ gem 'rb-fsevent'
11
13
  end
12
-
13
- group(:test) do
14
- gem 'rspec'
15
- gem 'redis'
16
- end
17
-
@@ -14,5 +14,5 @@ Gem::Specification.new do |gem|
14
14
  gem.name = "flipper-redis"
15
15
  gem.require_paths = ["lib"]
16
16
  gem.version = Flipper::Adapters::Redis::VERSION
17
- gem.add_dependency 'flipper', '~> 0.2.0'
17
+ gem.add_dependency 'flipper', '~> 0.4'
18
18
  end
@@ -9,27 +9,27 @@ module Flipper
9
9
  end
10
10
 
11
11
  def read(key)
12
- @client.get key
12
+ @client.get key.to_s
13
13
  end
14
14
 
15
15
  def write(key, value)
16
- @client.set key, value
16
+ @client.set key.to_s, value.to_s
17
17
  end
18
18
 
19
19
  def delete(key)
20
- @client.del key
20
+ @client.del key.to_s
21
21
  end
22
22
 
23
23
  def set_add(key, value)
24
- @client.sadd(key, value)
24
+ @client.sadd(key.to_s, value.to_s)
25
25
  end
26
26
 
27
27
  def set_delete(key, value)
28
- @client.srem(key, value)
28
+ @client.srem(key.to_s, value.to_s)
29
29
  end
30
30
 
31
31
  def set_members(key)
32
- @client.smembers(key).map { |member| member.to_i }.to_set
32
+ @client.smembers(key.to_s).to_set
33
33
  end
34
34
  end
35
35
  end
@@ -1,7 +1,7 @@
1
1
  module Flipper
2
2
  module Adapters
3
3
  class Redis
4
- VERSION = "0.2.0"
4
+ VERSION = "0.3.0"
5
5
  end
6
6
  end
7
7
  end
@@ -12,10 +12,10 @@ describe Flipper::Adapters::Redis do
12
12
  end
13
13
 
14
14
  def read_key(key)
15
- client.get key
15
+ client.get key.to_s
16
16
  rescue RuntimeError => e
17
17
  if e.message =~ /wrong kind of value/
18
- client.smembers(key).map { |member| member.to_i }.to_set
18
+ client.smembers(key.to_s).to_set
19
19
  else
20
20
  raise
21
21
  end
@@ -25,10 +25,10 @@ describe Flipper::Adapters::Redis do
25
25
  case value
26
26
  when Array, Set
27
27
  value.each do |member|
28
- client.sadd key, member
28
+ client.sadd key.to_s, member.to_s
29
29
  end
30
30
  else
31
- client.set key, value
31
+ client.set key.to_s, value.to_s
32
32
  end
33
33
  end
34
34
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: flipper-redis
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.0
4
+ version: 0.3.0
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,19 +9,24 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2012-08-07 00:00:00.000000000 Z
12
+ date: 2013-02-06 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: flipper
16
- requirement: &70334848212040 !ruby/object:Gem::Requirement
16
+ requirement: !ruby/object:Gem::Requirement
17
17
  none: false
18
18
  requirements:
19
19
  - - ~>
20
20
  - !ruby/object:Gem::Version
21
- version: 0.2.0
21
+ version: '0.4'
22
22
  type: :runtime
23
23
  prerelease: false
24
- version_requirements: *70334848212040
24
+ version_requirements: !ruby/object:Gem::Requirement
25
+ none: false
26
+ requirements:
27
+ - - ~>
28
+ - !ruby/object:Gem::Version
29
+ version: '0.4'
25
30
  description: Redis adapter for Flipper
26
31
  email:
27
32
  - nunemaker@gmail.com
@@ -30,6 +35,7 @@ extensions: []
30
35
  extra_rdoc_files: []
31
36
  files:
32
37
  - .gitignore
38
+ - .travis.yml
33
39
  - Gemfile
34
40
  - Guardfile
35
41
  - LICENSE
@@ -55,7 +61,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
55
61
  version: '0'
56
62
  segments:
57
63
  - 0
58
- hash: -1803458113738418391
64
+ hash: 1698098931398913105
59
65
  required_rubygems_version: !ruby/object:Gem::Requirement
60
66
  none: false
61
67
  requirements:
@@ -64,10 +70,10 @@ required_rubygems_version: !ruby/object:Gem::Requirement
64
70
  version: '0'
65
71
  segments:
66
72
  - 0
67
- hash: -1803458113738418391
73
+ hash: 1698098931398913105
68
74
  requirements: []
69
75
  rubyforge_project:
70
- rubygems_version: 1.8.10
76
+ rubygems_version: 1.8.23
71
77
  signing_key:
72
78
  specification_version: 3
73
79
  summary: Redis adapter for Flipper