storext 0.0.2 → 0.1.0

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: 22c7d4f570b492d0b65ab410d07666166d5f7000
4
- data.tar.gz: bb7d5731d7bac0767f0d9f2d507d3797c362cf5e
3
+ metadata.gz: f75672c4e98e57d8b37ab4bda5442b7defce708f
4
+ data.tar.gz: 646b070e850bb86161ff70f574fffc5f92ec9113
5
5
  SHA512:
6
- metadata.gz: cf6a0cc7a094a5618171ca25e2fd6615cbafcb949eab5e6f5e0692b8dbc91edd77c47b7fe2ec0423f145149f6d680122495995122e2c9abf884bdfe71801adec
7
- data.tar.gz: 4c6186c3626901832e5f212cbb048ca9193fc22b6dbab4c995559d4ff8e64c37050945a3f55fc93ab543d7e1ffa53ab93d721de0d210dc89e047ee895570abd2
6
+ metadata.gz: 8be8170eab75249c49086e6c02ae34b358f55b879f34bd02d5f2c4f09faa8821fe1fcb5b2aa68d2c4a163a5161a7749d41b0e593645c609a011d582d344500b8
7
+ data.tar.gz: 14c0fea128a4e321f42e02a1067e0392f5b6858e21b410d392bec5ccfba67bf0fd00c1db4e9194df799cdc1b004a9fcb2cdbe785b44556fae2371346ee2d32fe
@@ -23,6 +23,9 @@ module Storext
23
23
  track_store_attribute(column, attr)
24
24
 
25
25
  storext_cast_proxy_class.attribute "_casted_#{attr}", type, opts
26
+ unless storext_cast_proxy_class.instance_methods.include? :"_casted_#{attr}"
27
+ raise ArgumentError, "problem defining `#{attr}`. `#{type}` may not be a valid type."
28
+ end
26
29
 
27
30
  storext_define_writer(column, attr)
28
31
  storext_define_reader(column, attr)
@@ -1,3 +1,3 @@
1
1
  module Storext
2
- VERSION = "0.0.2"
2
+ VERSION = "0.1.0"
3
3
  end
data/lib/storext.rb CHANGED
@@ -10,12 +10,18 @@ module Storext
10
10
  included do
11
11
  class_attribute :store_attribute_defs
12
12
  self.store_attribute_defs = {}
13
+
14
+ unless defined?(self::Boolean)
15
+ self::Boolean = ::Axiom::Types::Boolean
16
+ end
13
17
  end
14
18
 
15
19
  private
16
20
 
17
21
  def storext_cast_proxy
18
- return @storext_cast_proxy if @storext_cast_proxy
22
+ if @storext_cast_proxy
23
+ return @storext_cast_proxy
24
+ end
19
25
  @storext_cast_proxy ||= self.class.storext_cast_proxy_class.new
20
26
  end
21
27
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: storext
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.2
4
+ version: 0.1.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - G5