superstore 1.0.11 → 1.0.12
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:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 2dbdeea44891e8279235f3499ffc43f2613024ca
|
4
|
+
data.tar.gz: 23d8acb6c14a91297b758df73ea54557d8ff353d
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 74c765f45c487870d43f97e6ffcf361a81c7e783476c2ad57d8764ce7e9abf54a11577a017e954272ac8900c019ce6e809bc8a750c87da445ce8c72bf48dd61c
|
7
|
+
data.tar.gz: e35465eeb0a7651c39e419789cee64e30872e27c8675a110b000b80bcf68f562dc08cafc3c9c1ab149e238b8c9607c325fe78410987b61b244ca136251d158e8
|
@@ -4,11 +4,7 @@ module Superstore
|
|
4
4
|
include ActiveModel::AttributeMethods
|
5
5
|
|
6
6
|
included do
|
7
|
-
|
8
|
-
attribute_method_suffix("", "=")
|
9
|
-
else
|
10
|
-
attribute_method_suffix("=")
|
11
|
-
end
|
7
|
+
attribute_method_suffix("=")
|
12
8
|
|
13
9
|
# (Alias for the protected read_attribute method).
|
14
10
|
def [](attr_name)
|
@@ -66,12 +62,10 @@ module Superstore
|
|
66
62
|
end
|
67
63
|
|
68
64
|
def method_missing(method_id, *args, &block)
|
69
|
-
|
70
|
-
|
71
|
-
|
72
|
-
|
73
|
-
super
|
74
|
-
end
|
65
|
+
self.class.define_attribute_methods unless self.class.attribute_methods_generated?
|
66
|
+
|
67
|
+
match = match_attribute_method?(method_id.to_s)
|
68
|
+
match ? attribute_missing(match, *args, &block) : super
|
75
69
|
end
|
76
70
|
|
77
71
|
def respond_to?(*args)
|
data/superstore.gemspec
CHANGED
@@ -42,6 +42,15 @@ class Superstore::AttributeMethodsTest < Superstore::TestCase
|
|
42
42
|
assert_equal 'hey lol', issue.title
|
43
43
|
end
|
44
44
|
|
45
|
+
class ReservedWord < Superstore::Base
|
46
|
+
string :system
|
47
|
+
end
|
48
|
+
|
49
|
+
test 'reserved words' do
|
50
|
+
r = ReservedWord.new(system: 'hello')
|
51
|
+
assert_equal 'hello', r.system
|
52
|
+
end
|
53
|
+
|
45
54
|
# test 'attribute_exists' do
|
46
55
|
# assert !Issue.new.attribute_exists?(:description)
|
47
56
|
# assert Issue.new(description: nil).attribute_exists?(:description)
|
@@ -21,7 +21,7 @@ class Superstore::Types::JsonTypeTest < Superstore::Types::TestCase
|
|
21
21
|
|
22
22
|
test 'typecast' do
|
23
23
|
assert_equal({'enabled' => false}, coder.typecast('enabled' => false))
|
24
|
-
assert_equal({'born_at' => "2004-12-24T00:00:
|
25
|
-
assert_equal(["2004-12-24T00:00:
|
24
|
+
assert_equal({'born_at' => "2004-12-24T00:00:00.000Z"}, coder.typecast('born_at' => Time.utc(2004, 12, 24)))
|
25
|
+
assert_equal(["2004-12-24T00:00:00.000Z"], coder.typecast([Time.utc(2004, 12, 24)]))
|
26
26
|
end
|
27
27
|
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: superstore
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0.
|
4
|
+
version: 1.0.12
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Michael Koziarski
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2014-
|
12
|
+
date: 2014-08-05 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: activemodel
|