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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: adaa34fbf9013daff3c9f27b6100337ca8e38feb
4
- data.tar.gz: bd45e099bdfb924174f2f70f118655c828009d9a
3
+ metadata.gz: dee8484ce398189d1fe063d40a2e885f981fbda3
4
+ data.tar.gz: 9d924067aa9f3a298986883c108fee866b035de2
5
5
  SHA512:
6
- metadata.gz: 229aca3fa5864cdf82b40fdd2ed1d544ea95146ccdd465fb3c2b13dead651965bab35690612f5a53127dc6a76b1dce7efd30cb28e73611f4ddd794e0e2cdd7f4
7
- data.tar.gz: 2ad20a7d9ef6114328530a0ea0cfeb166d952c614b0e224ad336598d65ef1a187fca789db877bdd1d1992ae87a4b405e44dd835af2793626e77b50790bd5be5e
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)
@@ -1,3 +1,3 @@
1
1
  module ActiveRedis
2
- VERSION = "0.0.2"
2
+ VERSION = "0.0.3"
3
3
  end
@@ -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.2
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-06-30 00:00:00.000000000 Z
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