spyke 3.1.4 → 3.1.5
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/spyke/relation.rb +2 -2
- data/lib/spyke/version.rb +1 -1
- data/test/associations_test.rb +5 -0
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 0e75ef98287bd1196be3c4647e76fbb520cfff40
|
4
|
+
data.tar.gz: 3ad8efc200dc648c584a8ab15d9359d14890b039
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: d06077ba95eafba760c3ccdc3f89dc6b23466ab5dc5492b3d46f4be5f8ab12975d8dc14df01baed6207e2124b204265c83fcc4a0a155f78e10c78f8b23cce335
|
7
|
+
data.tar.gz: 62ae17285e13c889012c101b7ca901968de20f15ba51381faf2398038d2b227f1251dd79f757c3f55b36526e85268bca1f96e2f25b691f3637cfbf484e360d85
|
data/lib/spyke/relation.rb
CHANGED
data/lib/spyke/version.rb
CHANGED
data/test/associations_test.rb
CHANGED
@@ -9,6 +9,11 @@ module Spyke
|
|
9
9
|
end
|
10
10
|
end
|
11
11
|
|
12
|
+
def test_association_get_ingredients_with_index
|
13
|
+
group = Group.new(ingredients: [Ingredient.new(name: 'Water'), Ingredient.new(name: 'Flour')])
|
14
|
+
assert_equal [['Water', 0], ['Flour', 1]], group.ingredients.each.with_index.map {|ingredient, idx| [ingredient.name, idx]}
|
15
|
+
end
|
16
|
+
|
12
17
|
def test_initializing_with_has_many_association
|
13
18
|
group = Group.new(ingredients: [Ingredient.new(name: 'Water'), Ingredient.new(name: 'Flour')])
|
14
19
|
assert_equal %w{ Water Flour }, group.ingredients.map(&:name)
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: spyke
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 3.1.
|
4
|
+
version: 3.1.5
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Jens Balvig
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-
|
11
|
+
date: 2015-10-19 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activesupport
|