redis_object 1.2.5 → 1.2.6

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,15 +1,15 @@
1
1
  ---
2
2
  !binary "U0hBMQ==":
3
3
  metadata.gz: !binary |-
4
- ZDA3ZWZiYjJkZWZjMWRmMTRkN2YwOGI1YzU3ZmRhNjc1MGRhZjcyZQ==
4
+ ZGI0NTJhZWFiNDUyMTQ2NDYzOGJhNmI1ZWE1MjZhOGVkZGVkNjM0NQ==
5
5
  data.tar.gz: !binary |-
6
- ZDc3ZmExMjMxYjNkYjMxZTAwYWY0ODA2YTYxMTE3NDA5ZWJkNDUyZQ==
6
+ OWQ5NzIzMjEzOTlkN2VlNTE2MDBlZTQzMDE2ZjdiOWJhYjIxMTg4MA==
7
7
  !binary "U0hBNTEy":
8
8
  metadata.gz: !binary |-
9
- NWY3ZjBkY2UxNGNlMTllMWVhNzYxNmMzNTI0MWJkZDRjMzQwZGY0ZDc3MmEx
10
- Mzk3YWMyY2M3ZDM4ZDg2Yjk5M2JlNjMwNWEwMWUwYTI0ZTBmMTY0NGIxMWMz
11
- NGEyYWMxODI5ZWFiYmJmOGMwNzJlMzkzZTQ0MzVlMTI3YzViZjc=
9
+ MjNlMGJmNDc3NTgxYjlkNDkyYjUwMjQ2NWQ3ZGNhOWJhMDY1MTJmZjA5MzAw
10
+ YzhlZWZhNWE0MWY4OGZmNjM4ODUzZDE3YTE3NzQ3MDUxMjg4MmQ0NDRmNjg5
11
+ NGRjYTU2MzI4NmZjMjk2YzNmNDlhYWU0NzRkZWViMmJiZmJhNzU=
12
12
  data.tar.gz: !binary |-
13
- YzRmMmI4MzQ2NGFkMGQyOGZhOThhMTJlZGU0ZTEyMjM0MjFmNzE5OGY0NDYz
14
- OGY1MzJmYjI4NzM4NmZjZmQzYjk2NjQ2ODAwMWM0MmI2NWQ3NzU3NjEyNmYw
15
- ZWYwOTFjYTAzMDA2N2U5MmZiYWQzOWMyZjQ1OWEzMzY0NDIxODg=
13
+ OTAwYTc3OTgyZWMwMzY2NDQyNDI3ZWE5YTc5M2U3MWVkYzhlN2NiOTliMTky
14
+ M2ExOWYyYTZhYmViY2Q1OTI1NmQ5OGRmOWRhMDhkNWFkMWE1ODBhM2M1N2Y0
15
+ MWU2YTc3ZTQ3MTYzZjFiZGQ1YmM3OTYwM2UyMWU0OWExMDk0ZWI=
@@ -394,22 +394,18 @@ module Seabright
394
394
 
395
395
  def find_by_key(k)
396
396
  if store.exists(k) && (cls = store.hget(k,:class))
397
- return deep_const_get(cls.to_sym).new(store.hget(k,id_sym(cls)))
397
+ return deep_const_get(cls.to_sym,Object).new(store.hget(k,id_sym(cls)))
398
398
  end
399
399
  nil
400
400
  end
401
401
 
402
- def deep_const_get(const)
402
+ def deep_const_get(const,base=nil)
403
403
  if Symbol === const
404
404
  const = const.to_s
405
405
  else
406
406
  const = const.to_str.dup
407
407
  end
408
- if const.sub!(/^::/, '')
409
- base = Object
410
- else
411
- base = self
412
- end
408
+ base ||= const.sub!(/^::/, '') ? Object : self
413
409
  const.split(/::/).inject(base) { |mod, name| mod.const_get(name) }
414
410
  end
415
411
 
@@ -1,5 +1,5 @@
1
1
  module Seabright
2
2
  class RedisObject
3
- VERSION = "1.2.5"
3
+ VERSION = "1.2.6"
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: redis_object
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.2.5
4
+ version: 1.2.6
5
5
  platform: ruby
6
6
  authors:
7
7
  - John Bragg