active_redis_orm 0.0.2 → 0.0.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/active_redis/attributes.rb +2 -2
- data/lib/active_redis/version.rb +1 -1
- data/spec/lib/attributes_spec.rb +12 -0
- metadata +4 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: dee8484ce398189d1fe063d40a2e885f981fbda3
|
4
|
+
data.tar.gz: 9d924067aa9f3a298986883c108fee866b035de2
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 347322720474ed9faaaeb1da27a2a1f93ec45a410918a01287ca77078d207bff33869133ce8805609f465f2f173a5ae55bfd7e3149f7479634c24cd842507c7d
|
7
|
+
data.tar.gz: e4e79c3c5369885c332c5ace88d4e3f97b1d48b67d54d31309f6491d57f322043d8fabcc65fec65dbe6052463b2a3f7e04bd7332d7ca187984ff0c1a1a050baa
|
@@ -31,11 +31,11 @@ module ActiveRedis
|
|
31
31
|
|
32
32
|
module Attributes
|
33
33
|
def attr_accessible(*attrs)
|
34
|
-
@attr_accessible = attrs
|
34
|
+
@attr_accessible = attrs.map(&:to_sym)
|
35
35
|
end
|
36
36
|
|
37
37
|
def attr_accessible?(attr)
|
38
|
-
@attr_accessible.nil? || @attr_accessible.include?(attr)
|
38
|
+
@attr_accessible.nil? || @attr_accessible.include?(attr.to_sym)
|
39
39
|
end
|
40
40
|
|
41
41
|
def define_field(field_name, options)
|
data/lib/active_redis/version.rb
CHANGED
@@ -0,0 +1,12 @@
|
|
1
|
+
require "active_redis_orm"
|
2
|
+
|
3
|
+
describe ActiveRedis do
|
4
|
+
class AttributesObject < ActiveRedis::Base
|
5
|
+
attr_accessible :foo, :bar, :list
|
6
|
+
end
|
7
|
+
|
8
|
+
it "deals with attributes in string or symbol implementation" do
|
9
|
+
AttributesObject.should be_attr_accessible("bar")
|
10
|
+
AttributesObject.should be_attr_accessible(:bar)
|
11
|
+
end
|
12
|
+
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: active_redis_orm
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Tom Caspy
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2014-
|
11
|
+
date: 2014-07-14 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -135,6 +135,7 @@ files:
|
|
135
135
|
- lib/active_redis_orm.rb
|
136
136
|
- spec/lib/active_redis/validation_spec.rb
|
137
137
|
- spec/lib/active_redis_spec.rb
|
138
|
+
- spec/lib/attributes_spec.rb
|
138
139
|
homepage: https://github.com/SpotIM/active_redis_orm
|
139
140
|
licenses:
|
140
141
|
- MIT
|
@@ -162,3 +163,4 @@ summary: ActiveRedis is an ORM for redis written in Ruby.
|
|
162
163
|
test_files:
|
163
164
|
- spec/lib/active_redis/validation_spec.rb
|
164
165
|
- spec/lib/active_redis_spec.rb
|
166
|
+
- spec/lib/attributes_spec.rb
|