superstore 2.0.0 → 2.0.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +1 -1
- data/lib/superstore/associations/has_many.rb +7 -3
- data/superstore.gemspec +3 -3
- data/test/unit/associations/has_many_test.rb +9 -0
- metadata +5 -5
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 520a74498d7f283f4f017694aec4df86a722599a
|
4
|
+
data.tar.gz: 3609a0c05c75b783d80a2f0b18aa97befa26278d
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: f9978f4c88be6d13cdd5f89c054657a255a2f7584fd93bd13c3fc58c0bc69f12d80933f0af9d2059cd8bf1a75d4f17e1b4df6f1493f827061a5c26fc79b95267
|
7
|
+
data.tar.gz: 0d9bc3f395451d5d6d5aac5c4af148775ca66e09b9c933fcc75eb186414a899e305ff74a804a4dd1ae187667bbd8a2324ed6354d6d9c916b061a5d20eb7b9363
|
data/CHANGELOG.md
CHANGED
@@ -10,9 +10,13 @@ module Superstore
|
|
10
10
|
end
|
11
11
|
|
12
12
|
def writer(records)
|
13
|
-
|
14
|
-
|
15
|
-
|
13
|
+
relation = load_collection
|
14
|
+
|
15
|
+
# TODO: Use relation.load_records with Rails 5
|
16
|
+
relation.instance_variable_set :@records, records
|
17
|
+
relation.instance_variable_set :@loaded, true
|
18
|
+
|
19
|
+
self.target = load_collection
|
16
20
|
end
|
17
21
|
|
18
22
|
private
|
data/superstore.gemspec
CHANGED
@@ -2,10 +2,10 @@
|
|
2
2
|
|
3
3
|
Gem::Specification.new do |s|
|
4
4
|
s.name = 'superstore'
|
5
|
-
s.version = '2.0.
|
5
|
+
s.version = '2.0.1'
|
6
6
|
s.description = 'ActiveModel for many attributes'
|
7
|
-
s.summary = '
|
8
|
-
s.authors = ["Michael Koziarski", "
|
7
|
+
s.summary = 'JSONB ActiveModel'
|
8
|
+
s.authors = ["Michael Koziarski", "Infogroup"]
|
9
9
|
s.email = 'developer@matthewhiggins.com'
|
10
10
|
s.homepage = 'http://github.com/data-axle/superstore'
|
11
11
|
|
@@ -10,4 +10,13 @@ class Superstore::Associations::HasManyTest < Superstore::TestCase
|
|
10
10
|
|
11
11
|
assert_equal [label], issue.labels
|
12
12
|
end
|
13
|
+
|
14
|
+
test 'create supports preloaded records' do
|
15
|
+
issue = TestObject.create!
|
16
|
+
issue.labels = Label.all.to_a
|
17
|
+
|
18
|
+
issue.labels.create! name: 'blue'
|
19
|
+
|
20
|
+
assert_equal 1, issue.labels.size
|
21
|
+
end
|
13
22
|
end
|
metadata
CHANGED
@@ -1,15 +1,15 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: superstore
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.0.
|
4
|
+
version: 2.0.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Michael Koziarski
|
8
|
-
-
|
8
|
+
- Infogroup
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date:
|
12
|
+
date: 2016-02-12 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: activemodel
|
@@ -190,8 +190,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
190
190
|
version: 1.3.5
|
191
191
|
requirements: []
|
192
192
|
rubyforge_project:
|
193
|
-
rubygems_version: 2.
|
193
|
+
rubygems_version: 2.5.1
|
194
194
|
signing_key:
|
195
195
|
specification_version: 4
|
196
|
-
summary:
|
196
|
+
summary: JSONB ActiveModel
|
197
197
|
test_files: []
|