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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: ac6e37e780a90131b1d28465f423c7a3ac678e70
4
- data.tar.gz: a42c6fc152260a29c6e0adf5aab18c38fba19c62
3
+ metadata.gz: 0e75ef98287bd1196be3c4647e76fbb520cfff40
4
+ data.tar.gz: 3ad8efc200dc648c584a8ab15d9359d14890b039
5
5
  SHA512:
6
- metadata.gz: eaf1d09c38f66920273837ef4c17aefee880bd7860e2ae21c0714c35fa46f2c241602b86173aa1779d6c15eef70be7b050c5fba26a05e49394f54a885e9154ad
7
- data.tar.gz: 4808dcb80692fc19024d352d0c9dc0c6cecaf6ef00b366c94d3c19fbeff16ac1512391c0592809617e630f9da85c975d209c848a9ad40a5fd6d35adb4c519d3d
6
+ metadata.gz: d06077ba95eafba760c3ccdc3f89dc6b23466ab5dc5492b3d46f4be5f8ab12975d8dc14df01baed6207e2124b204265c83fcc4a0a155f78e10c78f8b23cce335
7
+ data.tar.gz: 62ae17285e13c889012c101b7ca901968de20f15ba51381faf2398038d2b227f1251dd79f757c3f55b36526e85268bca1f96e2f25b691f3637cfbf484e360d85
@@ -40,8 +40,8 @@ module Spyke
40
40
  @find_some ||= klass.new_collection_from_result(fetch)
41
41
  end
42
42
 
43
- def each
44
- find_some.each { |record| yield record }
43
+ def each(&block)
44
+ find_some.each(&block)
45
45
  end
46
46
 
47
47
  def uri
data/lib/spyke/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module Spyke
2
- VERSION = '3.1.4'
2
+ VERSION = '3.1.5'
3
3
  end
@@ -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
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-08-09 00:00:00.000000000 Z
11
+ date: 2015-10-19 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activesupport