redis-objects 0.6.0 → 0.7.0

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.
@@ -1,13 +1,7 @@
1
1
 
2
2
  require File.expand_path(File.dirname(__FILE__) + '/spec_helper')
3
3
 
4
- require 'redis/counter'
5
- require 'redis/list'
6
- require 'redis/value'
7
- require 'redis/lock'
8
- require 'redis/set'
9
- require 'redis/sorted_set'
10
- require 'redis/hash_key'
4
+ require 'redis/objects'
11
5
 
12
6
  describe Redis::Value do
13
7
  before do
@@ -27,6 +21,8 @@ describe Redis::Value do
27
21
  @value.get.should == 'Trevor Hoffman'
28
22
  @value.del.should == 1
29
23
  @value.should.be.nil
24
+ @value.value = 42
25
+ @value.value.should == '42'
30
26
  end
31
27
 
32
28
  it "should handle complex marshaled values" do
@@ -100,7 +96,6 @@ describe Redis::List do
100
96
  describe "as a bounded list" do
101
97
  before do
102
98
  @list = Redis::List.new('spec/bounded_list',
103
- $redis,
104
99
  :maxlength => 10)
105
100
  1.upto(10) do |i|
106
101
  @list << i
@@ -330,7 +325,7 @@ end
330
325
 
331
326
  describe Redis::Lock do
332
327
  before do
333
- $redis.flushall
328
+ REDIS_HANDLE.flushall
334
329
  end
335
330
 
336
331
  it "should set the value to the expiration" do
@@ -338,7 +333,7 @@ describe Redis::Lock do
338
333
  expiry = 15
339
334
  lock = Redis::Lock.new(:test_lock, :expiration => expiry)
340
335
  lock.lock do
341
- expiration = $redis.get("test_lock").to_f
336
+ expiration = REDIS_HANDLE.get("test_lock").to_f
342
337
 
343
338
  # The expiration stored in redis should be 15 seconds from when we started
344
339
  # or a little more
@@ -346,17 +341,17 @@ describe Redis::Lock do
346
341
  end
347
342
 
348
343
  # key should have been cleaned up
349
- $redis.get("test_lock").should.be.nil
344
+ REDIS_HANDLE.get("test_lock").should.be.nil
350
345
  end
351
346
 
352
347
  it "should set value to 1 when no expiration is set" do
353
348
  lock = Redis::Lock.new(:test_lock)
354
349
  lock.lock do
355
- $redis.get('test_lock').should == '1'
350
+ REDIS_HANDLE.get('test_lock').should == '1'
356
351
  end
357
352
 
358
353
  # key should have been cleaned up
359
- $redis.get("test_lock").should.be.nil
354
+ REDIS_HANDLE.get("test_lock").should.be.nil
360
355
  end
361
356
 
362
357
  it "should let lock be gettable when lock is expired" do
@@ -364,7 +359,7 @@ describe Redis::Lock do
364
359
  lock = Redis::Lock.new(:test_lock, :expiration => expiry, :timeout => 0.1)
365
360
 
366
361
  # create a fake lock in the past
367
- $redis.set("test_lock", Time.now-(expiry + 60))
362
+ REDIS_HANDLE.set("test_lock", Time.now-(expiry + 60))
368
363
 
369
364
  gotit = false
370
365
  lock.lock do
@@ -373,7 +368,7 @@ describe Redis::Lock do
373
368
 
374
369
  # should get the lock because it has expired
375
370
  gotit.should.be.true
376
- $redis.get("test_lock").should.be.nil
371
+ REDIS_HANDLE.get("test_lock").should.be.nil
377
372
  end
378
373
 
379
374
  it "should not let non-expired locks be gettable" do
@@ -381,7 +376,7 @@ describe Redis::Lock do
381
376
  lock = Redis::Lock.new(:test_lock, :expiration => expiry, :timeout => 0.1)
382
377
 
383
378
  # create a fake lock
384
- $redis.set("test_lock", (Time.now + expiry).to_f)
379
+ REDIS_HANDLE.set("test_lock", (Time.now + expiry).to_f)
385
380
 
386
381
  gotit = false
387
382
  error = nil
@@ -398,7 +393,7 @@ describe Redis::Lock do
398
393
  gotit.should.not.be.true
399
394
 
400
395
  # lock value should still be set
401
- $redis.get("test_lock").should.not.be.nil
396
+ REDIS_HANDLE.get("test_lock").should.not.be.nil
402
397
  end
403
398
 
404
399
  it "should not remove the key if lock is held past expiration" do
@@ -409,7 +404,7 @@ describe Redis::Lock do
409
404
  end
410
405
 
411
406
  # lock value should still be set since the lock was held for more than the expiry
412
- $redis.get("test_lock").should.not.be.nil
407
+ REDIS_HANDLE.get("test_lock").should.not.be.nil
413
408
  end
414
409
  end
415
410
 
@@ -417,8 +412,7 @@ end
417
412
  describe Redis::HashKey do
418
413
  describe "With Marshal" do
419
414
  before do
420
- @hash = Redis::HashKey.new('test_hash', $redis,
421
- {:marshal_keys=>{'created_at'=>true}})
415
+ @hash = Redis::HashKey.new('test_hash', {:marshal_keys=>{'created_at'=>true}})
422
416
  @hash.clear
423
417
  end
424
418
 
@@ -449,7 +443,7 @@ describe Redis::HashKey do
449
443
  end
450
444
 
451
445
  before do
452
- @hash = Redis::HashKey.new('test_hash')
446
+ @hash = Redis::HashKey.new('test_hash')
453
447
  @hash.clear
454
448
  end
455
449
 
@@ -2,7 +2,6 @@
2
2
  require File.expand_path(File.dirname(__FILE__) + '/spec_helper')
3
3
 
4
4
  require 'redis/objects'
5
- Redis::Objects.redis = $redis
6
5
 
7
6
  class Roster
8
7
  include Redis::Objects
@@ -20,7 +19,7 @@ class Roster
20
19
  counter :total_players_online, :global => true
21
20
  set :all_players_online, :global => true
22
21
  value :last_player, :global => true
23
-
22
+
24
23
  # custom keys
25
24
  counter :player_totals, :key => 'players/#{username}/total'
26
25
  list :all_player_stats, :key => 'players:all_stats', :global => true
@@ -52,14 +51,14 @@ class MethodRoster
52
51
  def increment(attribute, by=1)
53
52
  42
54
53
  end
55
-
54
+
56
55
  def initialize(id=1) @id = id end
57
56
  def id; @id; end
58
57
  end
59
58
 
60
59
  class CustomMethodRoster < MethodRoster
61
60
  include Redis::Objects
62
-
61
+
63
62
  attr_accessor :counter
64
63
  counter :basic
65
64
  end
@@ -68,7 +67,7 @@ describe Redis::Objects do
68
67
  before do
69
68
  @roster = Roster.new
70
69
  @roster2 = Roster.new
71
-
70
+
72
71
  @roster_1 = Roster.new(1)
73
72
  @roster_2 = Roster.new(2)
74
73
  @roster_3 = Roster.new(3)
@@ -96,7 +95,7 @@ describe Redis::Objects do
96
95
  Roster.all_players_online.clear
97
96
  Roster.last_player.delete
98
97
  Roster.weird_key.clear
99
-
98
+
100
99
  @roster.player_totals.clear
101
100
  @roster.all_player_stats.clear
102
101
  @roster.total_wins.clear
@@ -173,11 +172,11 @@ describe Redis::Objects do
173
172
  @roster.respond_to?(m).should == true
174
173
  end
175
174
  end
176
-
175
+
177
176
  it "should support increment/decrement of counters" do
178
177
  @roster.available_slots.key.should == 'roster:1:available_slots'
179
178
  @roster.available_slots.should == 10
180
-
179
+
181
180
  # math proxy ops
182
181
  (@roster.available_slots == 10).should.be.true
183
182
  (@roster.available_slots <= 10).should.be.true
@@ -204,7 +203,7 @@ describe Redis::Objects do
204
203
  @roster2.basic.decrement.should == 0
205
204
  @roster.basic.get.should == 0
206
205
  end
207
-
206
+
208
207
  it "should support class-level increment/decrement of counters" do
209
208
  Roster.get_counter(:available_slots, @roster.id).should == 10
210
209
  Roster.increment_counter(:available_slots, @roster.id).should == 11
@@ -225,7 +224,7 @@ describe Redis::Objects do
225
224
  Roster.total_players_online.decrement(2).should == 1
226
225
  Roster.total_players_online.reset.should.be.true
227
226
  Roster.total_players_online.should == 0
228
-
227
+
229
228
  Roster.get_counter(:total_players_online).should == 0
230
229
  Roster.increment_counter(:total_players_online).should == 1
231
230
  Roster.increment_counter(:total_players_online, nil, 3).should == 4
@@ -247,21 +246,28 @@ describe Redis::Objects do
247
246
  end
248
247
  @roster.available_slots.should == 9
249
248
  a.should.be.true
250
-
249
+
251
250
  @roster.available_slots.should == 9
252
251
  @roster.available_slots.decr do |cnt|
253
252
  @roster.available_slots.should == 8
254
253
  false
255
254
  end
256
255
  @roster.available_slots.should == 8
257
-
256
+
258
257
  @roster.available_slots.should == 8
259
258
  @roster.available_slots.decr do |cnt|
260
259
  @roster.available_slots.should == 7
261
260
  nil # should rewind
262
261
  end
263
262
  @roster.available_slots.should == 8
264
-
263
+
264
+ @roster.available_slots.should == 8
265
+ @roster.available_slots.decr(4) do |cnt|
266
+ @roster.available_slots.should == 4
267
+ nil # should rewind
268
+ end
269
+ @roster.available_slots.should == 8
270
+
265
271
  @roster.available_slots.should == 8
266
272
  @roster.available_slots.incr do |cnt|
267
273
  if 1 == 2 # should rewind
@@ -270,6 +276,14 @@ describe Redis::Objects do
270
276
  end
271
277
  @roster.available_slots.should == 8
272
278
 
279
+ @roster.available_slots.should == 8
280
+ @roster.available_slots.incr(5) do |cnt|
281
+ if 1 == 2 # should rewind
282
+ true
283
+ end
284
+ end
285
+ @roster.available_slots.should == 8
286
+
273
287
  @roster.available_slots.should == 8
274
288
  @roster.available_slots.incr do |cnt|
275
289
  @roster.available_slots.should == 9
@@ -286,7 +300,7 @@ describe Redis::Objects do
286
300
  rescue
287
301
  end
288
302
  @roster.available_slots.should == 9
289
-
303
+
290
304
  # check return value from the block
291
305
  value =
292
306
  @roster.available_slots.decr do |cnt|
@@ -322,6 +336,13 @@ describe Redis::Objects do
322
336
  end
323
337
  Roster.get_counter(:available_slots, @roster.id).should == 8
324
338
 
339
+ Roster.get_counter(:available_slots, @roster.id).should == 8
340
+ Roster.decrement_counter(:available_slots, @roster.id, 4) do |cnt|
341
+ Roster.get_counter(:available_slots, @roster.id).should == 4
342
+ nil # should rewind
343
+ end
344
+ Roster.get_counter(:available_slots, @roster.id).should == 8
345
+
325
346
  Roster.get_counter(:available_slots, @roster.id).should == 8
326
347
  Roster.increment_counter(:available_slots, @roster.id) do |cnt|
327
348
  if 1 == 2 # should rewind
@@ -330,6 +351,14 @@ describe Redis::Objects do
330
351
  end
331
352
  Roster.get_counter(:available_slots, @roster.id).should == 8
332
353
 
354
+ Roster.get_counter(:available_slots, @roster.id).should == 8
355
+ Roster.increment_counter(:available_slots, @roster.id, 4) do |cnt|
356
+ if 1 == 2 # should rewind
357
+ true
358
+ end
359
+ end
360
+ Roster.get_counter(:available_slots, @roster.id).should == 8
361
+
333
362
  Roster.get_counter(:available_slots, @roster.id).should == 8
334
363
  Roster.increment_counter(:available_slots, @roster.id) do |cnt|
335
364
  Roster.get_counter(:available_slots, @roster.id).should == 9
@@ -406,7 +435,7 @@ describe Redis::Objects do
406
435
  error.should.be.nil
407
436
  Roster.redis.get("roster:2:resort_lock").should.be.nil
408
437
  end
409
-
438
+
410
439
  it "should handle simple values" do
411
440
  @roster.starting_pitcher.should == nil
412
441
  @roster.starting_pitcher = 'Trevor Hoffman'
@@ -515,7 +544,7 @@ describe Redis::Objects do
515
544
  @roster.outfielders.get.sort.should == ['a','b']
516
545
  @roster.outfielders.length.should == 2
517
546
  @roster.outfielders.size.should == 2
518
-
547
+
519
548
  i = 0
520
549
  @roster.outfielders.each do |st|
521
550
  i += 1
@@ -535,7 +564,7 @@ describe Redis::Objects do
535
564
  coll.should == ['c']
536
565
  @roster.outfielders.sort.should == ['a','b','c']
537
566
  end
538
-
567
+
539
568
  it "should handle set intersections and unions" do
540
569
  @roster_1.outfielders << 'a' << 'b' << 'c' << 'd' << 'e'
541
570
  @roster_2.outfielders << 'c' << 'd' << 'e' << 'f' << 'g'
@@ -651,7 +680,7 @@ describe Redis::Objects do
651
680
  Roster.all_players_online.get.sort.should == ['a','b']
652
681
  Roster.all_players_online.length.should == 2
653
682
  Roster.all_players_online.size.should == 2
654
-
683
+
655
684
  i = 0
656
685
  Roster.all_players_online.each do |st|
657
686
  i += 1
@@ -671,7 +700,7 @@ describe Redis::Objects do
671
700
  coll.should == ['c']
672
701
  Roster.all_players_online.sort.should == ['a','b','c']
673
702
  end
674
-
703
+
675
704
  it "should handle class-level global values" do
676
705
  Roster.last_player.should == nil
677
706
  Roster.last_player = 'Trevor Hoffman'
@@ -705,7 +734,7 @@ describe Redis::Objects do
705
734
  @roster2.all_player_stats.should == ['b','a']
706
735
  @roster2.all_player_stats << 'b'
707
736
  @roster.all_player_stats.should == ['b','a','b']
708
-
737
+
709
738
  @roster.last_player.should == nil
710
739
  @roster.class.last_player = 'Trevor Hoffman'
711
740
  @roster.last_player.should == 'Trevor Hoffman'
@@ -727,7 +756,7 @@ describe Redis::Objects do
727
756
  @roster.player_stats.last.should == [1,2,3,[4,5]]
728
757
  @roster.player_stats.shift.should == {:json => 'data'}
729
758
  end
730
-
759
+
731
760
  it "should handle sets of complex data types" do
732
761
  @roster.outfielders << {:a => 1}
733
762
  @roster.outfielders.members.should == [{:a => 1}]
@@ -747,7 +776,7 @@ describe Redis::Objects do
747
776
  end
748
777
  a.should.be.true
749
778
  end
750
-
779
+
751
780
  it "should raise an exception if the timeout is exceeded" do
752
781
  @roster.redis.set(@roster.resort_lock.key, 1)
753
782
  error = nil
@@ -799,7 +828,7 @@ describe Redis::Objects do
799
828
  it "should handle new subclass objects" do
800
829
  @custom_roster.special.increment.should == 1
801
830
  end
802
-
831
+
803
832
  it "should allow passing of increment/decrement to super class" do
804
833
  @custom_method_roster = CustomMethodRoster.new
805
834
  @custom_method_roster.counter.should.be.nil
@@ -814,4 +843,55 @@ describe Redis::Objects do
814
843
  @custom_method_roster.basic.should == 0
815
844
  @custom_method_roster.basic.should.be.kind_of(Redis::Counter)
816
845
  end
846
+
847
+ it "should pick up class methods from superclass automatically" do
848
+ CounterRoster = Class.new(Roster)
849
+ CounterRoster.counter :extended_counter
850
+ extended_roster = CounterRoster.new
851
+ extended_roster.basic.should.be.kind_of(Redis::Counter)
852
+ extended_roster.extended_counter.should.be.kind_of(Redis::Counter)
853
+ @roster.respond_to?(:extended_counter).should == false
854
+
855
+ HashKeyRoster = Class.new(Roster)
856
+ HashKeyRoster.hash_key :extended_hash_key
857
+ extended_roster = HashKeyRoster.new
858
+ extended_roster.contact_information.should.be.kind_of(Redis::HashKey)
859
+ extended_roster.extended_hash_key.should.be.kind_of(Redis::HashKey)
860
+ @roster.respond_to?(:extended_hash_key).should == false
861
+
862
+ LockRoster = Class.new(Roster)
863
+ LockRoster.lock :extended
864
+ extended_roster = LockRoster.new
865
+ extended_roster.resort_lock.should.be.kind_of(Redis::Lock)
866
+ extended_roster.extended_lock.should.be.kind_of(Redis::Lock)
867
+ @roster.respond_to?(:extended_lock).should == false
868
+
869
+ ValueRoster = Class.new(Roster)
870
+ ValueRoster.value :extended_value
871
+ extended_roster = ValueRoster.new
872
+ extended_roster.starting_pitcher.should.be.kind_of(Redis::Value)
873
+ extended_roster.extended_value.should.be.kind_of(Redis::Value)
874
+ @roster.respond_to?(:extended_value).should == false
875
+
876
+ ListRoster = Class.new(Roster)
877
+ ListRoster.list :extended_list
878
+ extended_roster = ListRoster.new
879
+ extended_roster.player_stats.should.be.kind_of(Redis::List)
880
+ extended_roster.extended_list.should.be.kind_of(Redis::List)
881
+ @roster.respond_to?(:extended_list).should == false
882
+
883
+ SetRoster = Class.new(Roster)
884
+ SetRoster.set :extended_set
885
+ extended_roster = SetRoster.new
886
+ extended_roster.outfielders.should.be.kind_of(Redis::Set)
887
+ extended_roster.extended_set.should.be.kind_of(Redis::Set)
888
+ @roster.respond_to?(:extended_set).should == false
889
+
890
+ SortedSetRoster = Class.new(Roster)
891
+ SortedSetRoster.sorted_set :extended_sorted_set
892
+ extended_roster = SortedSetRoster.new
893
+ extended_roster.rank.should.be.kind_of(Redis::SortedSet)
894
+ extended_roster.extended_sorted_set.should.be.kind_of(Redis::SortedSet)
895
+ @roster.respond_to?(:extended_sorted_set).should == false
896
+ end
817
897
  end
data/spec/spec_helper.rb CHANGED
@@ -9,6 +9,8 @@ if $0 =~ /\brspec$/
9
9
  raise "\n===\nThese tests are in bacon, not rspec. Try: bacon #{ARGV * ' '}\n===\n"
10
10
  end
11
11
 
12
+ REDIS_CLASS_NAMES = [:Counter, :HashKey, :List, :Lock, :Set, :SortedSet, :Value]
13
+
12
14
  UNIONSTORE_KEY = 'test:unionstore'
13
15
  INTERSTORE_KEY = 'test:interstore'
14
16
  DIFFSTORE_KEY = 'test:diffstore'
@@ -19,10 +21,17 @@ REDIS_PORT = ENV['REDIS_PORT'] || 9212
19
21
  REDIS_HOST = ENV['REDIS_HOST'] || 'localhost'
20
22
  REDIS_PID = File.expand_path 'redis.pid', File.dirname(__FILE__)
21
23
  REDIS_DUMP = File.expand_path 'redis.rdb', File.dirname(__FILE__)
22
- puts "=> Starting redis-server on #{REDIS_HOST}:#{REDIS_PORT}"
23
- fork_pid = fork do
24
- system "(echo port #{REDIS_PORT}; echo logfile /dev/null; echo daemonize yes; echo pidfile #{REDIS_PID}; echo dbfilename #{REDIS_DUMP}) | #{REDIS_BIN} -"
24
+
25
+ describe 'redis-server' do
26
+ it "starting redis-server on #{REDIS_HOST}:#{REDIS_PORT}" do
27
+ fork_pid = fork do
28
+ system "(echo port #{REDIS_PORT}; echo logfile /dev/null; echo daemonize yes; echo pidfile #{REDIS_PID}; echo dbfilename #{REDIS_DUMP}) | #{REDIS_BIN} -"
29
+ end
30
+ fork_pid.should > 0
31
+ sleep 2
32
+ end
25
33
  end
34
+
26
35
  at_exit do
27
36
  pid = File.read(REDIS_PID).to_i
28
37
  puts "=> Killing #{REDIS_BIN} with pid #{pid}"
@@ -32,11 +41,22 @@ at_exit do
32
41
  File.unlink REDIS_DUMP if File.exists? REDIS_DUMP
33
42
  end
34
43
 
44
+ def raises_exception(&block)
45
+ e = nil
46
+ begin
47
+ block.call
48
+ rescue => e
49
+ end
50
+ e.should.be.is_a?(StandardError)
51
+ end
52
+
35
53
  # Grab a global handle
36
- $redis = Redis.new(:host => REDIS_HOST, :port => REDIS_PORT)
54
+ REDIS_HANDLE = Redis.new(:host => REDIS_HOST, :port => REDIS_PORT)
55
+ #$redis = REDIS_HANDLE
56
+ Redis.current = REDIS_HANDLE
37
57
 
38
58
  SORT_ORDER = {:order => 'desc alpha'}
39
59
  SORT_LIMIT = {:limit => [2, 2]}
40
- SORT_BY = {:by => 'm_*'}
41
- SORT_GET = {:get => 'spec/*/sorted'}.merge!(SORT_LIMIT)
60
+ SORT_BY = {:by => 'm_*'}
61
+ SORT_GET = {:get => 'spec/*/sorted'}.merge!(SORT_LIMIT)
42
62
  SORT_STORE = {:store => "spec/aftersort"}.merge!(SORT_GET)
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: redis-objects
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.6.0
4
+ version: 0.7.0
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2012-10-24 00:00:00.000000000 Z
12
+ date: 2013-02-27 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: redis
@@ -27,70 +27,6 @@ dependencies:
27
27
  - - ! '>='
28
28
  - !ruby/object:Gem::Version
29
29
  version: 3.0.2
30
- - !ruby/object:Gem::Dependency
31
- name: redis-namespace
32
- requirement: !ruby/object:Gem::Requirement
33
- none: false
34
- requirements:
35
- - - ! '>='
36
- - !ruby/object:Gem::Version
37
- version: '0'
38
- type: :runtime
39
- prerelease: false
40
- version_requirements: !ruby/object:Gem::Requirement
41
- none: false
42
- requirements:
43
- - - ! '>='
44
- - !ruby/object:Gem::Version
45
- version: '0'
46
- - !ruby/object:Gem::Dependency
47
- name: bacon
48
- requirement: !ruby/object:Gem::Requirement
49
- none: false
50
- requirements:
51
- - - ! '>='
52
- - !ruby/object:Gem::Version
53
- version: '0'
54
- type: :runtime
55
- prerelease: false
56
- version_requirements: !ruby/object:Gem::Requirement
57
- none: false
58
- requirements:
59
- - - ! '>='
60
- - !ruby/object:Gem::Version
61
- version: '0'
62
- - !ruby/object:Gem::Dependency
63
- name: jeweler
64
- requirement: !ruby/object:Gem::Requirement
65
- none: false
66
- requirements:
67
- - - ! '>='
68
- - !ruby/object:Gem::Version
69
- version: '0'
70
- type: :runtime
71
- prerelease: false
72
- version_requirements: !ruby/object:Gem::Requirement
73
- none: false
74
- requirements:
75
- - - ! '>='
76
- - !ruby/object:Gem::Version
77
- version: '0'
78
- - !ruby/object:Gem::Dependency
79
- name: activerecord
80
- requirement: !ruby/object:Gem::Requirement
81
- none: false
82
- requirements:
83
- - - ! '>='
84
- - !ruby/object:Gem::Version
85
- version: '0'
86
- type: :runtime
87
- prerelease: false
88
- version_requirements: !ruby/object:Gem::Requirement
89
- none: false
90
- requirements:
91
- - - ! '>='
92
- - !ruby/object:Gem::Version
93
- version: '0'
94
30
  - !ruby/object:Gem::Dependency
95
31
  name: bacon
96
32
  requirement: !ruby/object:Gem::Requirement
@@ -123,36 +59,20 @@ dependencies:
123
59
  - - ! '>='
124
60
  - !ruby/object:Gem::Version
125
61
  version: 1.2.0
126
- - !ruby/object:Gem::Dependency
127
- name: redis
128
- requirement: !ruby/object:Gem::Requirement
129
- none: false
130
- requirements:
131
- - - ! '>='
132
- - !ruby/object:Gem::Version
133
- version: 3.0.2
134
- type: :runtime
135
- prerelease: false
136
- version_requirements: !ruby/object:Gem::Requirement
137
- none: false
138
- requirements:
139
- - - ! '>='
140
- - !ruby/object:Gem::Version
141
- version: 3.0.2
142
62
  description: Map Redis types directly to Ruby objects. Works with any class or ORM.
143
- email: nate@wiger.org
63
+ email: nwiger@gmail.com
144
64
  executables: []
145
65
  extensions: []
146
66
  extra_rdoc_files:
147
- - README.rdoc
67
+ - README.md
148
68
  files:
149
69
  - ATOMICITY.rdoc
150
70
  - CHANGELOG.rdoc
151
71
  - Gemfile
152
- - Gemfile.lock
153
- - README.rdoc
72
+ - README.md
154
73
  - Rakefile
155
74
  - VERSION
75
+ - lib/redis-objects.rb
156
76
  - lib/redis/base_object.rb
157
77
  - lib/redis/counter.rb
158
78
  - lib/redis/hash_key.rb
@@ -172,8 +92,10 @@ files:
172
92
  - lib/redis/sorted_set.rb
173
93
  - lib/redis/value.rb
174
94
  - redis-objects.gemspec
95
+ - spec/redis_autoload_objects_spec.rb
175
96
  - spec/redis_namespace_compat_spec.rb
176
97
  - spec/redis_objects_active_record_spec.rb
98
+ - spec/redis_objects_conn_spec.rb
177
99
  - spec/redis_objects_instance_spec.rb
178
100
  - spec/redis_objects_model_spec.rb
179
101
  - spec/spec_helper.rb
@@ -189,17 +111,13 @@ required_ruby_version: !ruby/object:Gem::Requirement
189
111
  - - ! '>='
190
112
  - !ruby/object:Gem::Version
191
113
  version: '0'
192
- segments:
193
- - 0
194
- hash: 4220055926051714921
195
114
  required_rubygems_version: !ruby/object:Gem::Requirement
196
115
  none: false
197
116
  requirements:
198
117
  - - ! '>='
199
118
  - !ruby/object:Gem::Version
200
119
  version: '0'
201
- requirements:
202
- - redis, v3.0.2 or greater
120
+ requirements: []
203
121
  rubyforge_project:
204
122
  rubygems_version: 1.8.24
205
123
  signing_key:
data/Gemfile.lock DELETED
@@ -1,43 +0,0 @@
1
- GEM
2
- remote: https://rubygems.org/
3
- specs:
4
- activemodel (3.2.8)
5
- activesupport (= 3.2.8)
6
- builder (~> 3.0.0)
7
- activerecord (3.2.8)
8
- activemodel (= 3.2.8)
9
- activesupport (= 3.2.8)
10
- arel (~> 3.0.2)
11
- tzinfo (~> 0.3.29)
12
- activesupport (3.2.8)
13
- i18n (~> 0.6)
14
- multi_json (~> 1.0)
15
- arel (3.0.2)
16
- bacon (1.1.0)
17
- builder (3.0.4)
18
- git (1.2.5)
19
- i18n (0.6.1)
20
- jeweler (1.8.4)
21
- bundler (~> 1.0)
22
- git (>= 1.2.5)
23
- rake
24
- rdoc
25
- json (1.7.5)
26
- multi_json (1.3.6)
27
- rake (0.9.2.2)
28
- rdoc (3.12)
29
- json (~> 1.4)
30
- redis (3.0.2)
31
- redis-namespace (1.2.1)
32
- redis (~> 3.0.0)
33
- tzinfo (0.3.33)
34
-
35
- PLATFORMS
36
- ruby
37
-
38
- DEPENDENCIES
39
- activerecord
40
- bacon
41
- jeweler
42
- redis (>= 3.0.2)
43
- redis-namespace