redisable 0.1.0 → 0.1.1

Sign up to get free protection for your applications and to get access to all the features.
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA1:
3
+ metadata.gz: 1c60132614f45c100a6eb6e9f4d26f7b06511763
4
+ data.tar.gz: 869ef874389194e1ce8d350d101ffc6d2a945e76
5
+ SHA512:
6
+ metadata.gz: 9da320a96cfe8a94ce11218ace6397b6bedb9444dc43a6eebd57c6ff49f9d0211808b1078c52d605d66efe1355918b658c59f962c5e7c4026116cef12d1ae544
7
+ data.tar.gz: de26ac62726a5750f90411353b3051355e73387ebde62ea6ea5565f10de1c68559ffcc9a356f02b6687f67889d848634177b5b6e902857c21a01e72ea55e51ad
@@ -12,13 +12,18 @@ module Redisable
12
12
  define_method(name) do |id_=nil|
13
13
  id_ ||= if options[:id]
14
14
  options[:id].call(self)
15
- else
15
+ elsif defined?(self.id)
16
16
  self.id
17
17
  end
18
18
  Key.join_key(klass_name, id_, name, options[:blank_field])
19
19
  end
20
+
20
21
  define_singleton_method(name) do |id_=nil|
21
- id_ ||= options[:id].call(self)
22
+ id_ ||= if options[:id]
23
+ options[:id].call(self)
24
+ elsif defined?(self.id)
25
+ self.id
26
+ end
22
27
  Key.join_key(klass_name, id_, name, options[:blank_field])
23
28
  end
24
29
  end
@@ -1,3 +1,3 @@
1
1
  module Redisable
2
- VERSION = "0.1.0"
2
+ VERSION = "0.1.1"
3
3
  end
metadata CHANGED
@@ -1,36 +1,32 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: redisable
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
5
- prerelease:
4
+ version: 0.1.1
6
5
  platform: ruby
7
6
  authors:
8
7
  - yoppi
9
8
  autorequire:
10
9
  bindir: bin
11
10
  cert_chain: []
12
- date: 2013-06-04 00:00:00.000000000 Z
11
+ date: 2013-06-15 00:00:00.000000000 Z
13
12
  dependencies:
14
13
  - !ruby/object:Gem::Dependency
15
14
  name: redis
16
15
  requirement: !ruby/object:Gem::Requirement
17
- none: false
18
16
  requirements:
19
- - - ! '>='
17
+ - - '>='
20
18
  - !ruby/object:Gem::Version
21
19
  version: '0'
22
20
  type: :runtime
23
21
  prerelease: false
24
22
  version_requirements: !ruby/object:Gem::Requirement
25
- none: false
26
23
  requirements:
27
- - - ! '>='
24
+ - - '>='
28
25
  - !ruby/object:Gem::Version
29
26
  version: '0'
30
27
  - !ruby/object:Gem::Dependency
31
28
  name: bundler
32
29
  requirement: !ruby/object:Gem::Requirement
33
- none: false
34
30
  requirements:
35
31
  - - ~>
36
32
  - !ruby/object:Gem::Version
@@ -38,7 +34,6 @@ dependencies:
38
34
  type: :development
39
35
  prerelease: false
40
36
  version_requirements: !ruby/object:Gem::Requirement
41
- none: false
42
37
  requirements:
43
38
  - - ~>
44
39
  - !ruby/object:Gem::Version
@@ -46,33 +41,29 @@ dependencies:
46
41
  - !ruby/object:Gem::Dependency
47
42
  name: rake
48
43
  requirement: !ruby/object:Gem::Requirement
49
- none: false
50
44
  requirements:
51
- - - ! '>='
45
+ - - '>='
52
46
  - !ruby/object:Gem::Version
53
47
  version: '0'
54
48
  type: :development
55
49
  prerelease: false
56
50
  version_requirements: !ruby/object:Gem::Requirement
57
- none: false
58
51
  requirements:
59
- - - ! '>='
52
+ - - '>='
60
53
  - !ruby/object:Gem::Version
61
54
  version: '0'
62
55
  - !ruby/object:Gem::Dependency
63
56
  name: rspec
64
57
  requirement: !ruby/object:Gem::Requirement
65
- none: false
66
58
  requirements:
67
- - - ! '>='
59
+ - - '>='
68
60
  - !ruby/object:Gem::Version
69
61
  version: '0'
70
62
  type: :development
71
63
  prerelease: false
72
64
  version_requirements: !ruby/object:Gem::Requirement
73
- none: false
74
65
  requirements:
75
- - - ! '>='
66
+ - - '>='
76
67
  - !ruby/object:Gem::Version
77
68
  version: '0'
78
69
  description: Thin wrapper library for Redis, enable any Ruby class to access Redis.
@@ -102,27 +93,26 @@ files:
102
93
  homepage: http://github.com/yoppi/redisable
103
94
  licenses:
104
95
  - MIT
96
+ metadata: {}
105
97
  post_install_message:
106
98
  rdoc_options: []
107
99
  require_paths:
108
100
  - lib
109
101
  required_ruby_version: !ruby/object:Gem::Requirement
110
- none: false
111
102
  requirements:
112
- - - ! '>='
103
+ - - '>='
113
104
  - !ruby/object:Gem::Version
114
105
  version: '0'
115
106
  required_rubygems_version: !ruby/object:Gem::Requirement
116
- none: false
117
107
  requirements:
118
- - - ! '>='
108
+ - - '>='
119
109
  - !ruby/object:Gem::Version
120
110
  version: '0'
121
111
  requirements: []
122
112
  rubyforge_project:
123
- rubygems_version: 1.8.23
113
+ rubygems_version: 2.0.3
124
114
  signing_key:
125
- specification_version: 3
115
+ specification_version: 4
126
116
  summary: Thin wrapper library for Redis.
127
117
  test_files:
128
118
  - spec/config_spec.rb