deferring 0.6.0 → 0.6.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 4dd96a712c36ebb6563f98259ca15337214a40350e7c279a9d24e8ae72a7e9a2
4
- data.tar.gz: 1502990f19005c0cbf991aafe134a6271fd80aa0054439c7cbbf6213f63a5a1d
3
+ metadata.gz: 20c1b96db02679041590bd4fb7a68c2eb3528835c658e010b84f81adc508cddf
4
+ data.tar.gz: b8c4f6f2ca883c6e86a773e7540e89e423ed717013f4ef5d1cf9c32f6099bc8a
5
5
  SHA512:
6
- metadata.gz: 0bfab516b2bb5e426ef86c2c203d0ea9e6410e907dee1666a1cdb0f43a81111828be88f870474b9c6afff951cddd6a882234778e57fcc414fb61c7b429d5041f
7
- data.tar.gz: cd62db4682aa3868ba840aa45db068a047337852d2f414a56d0bed4ce3eb58176f310457034444eb7a041171fa7184e48243b70d43409aa6a417436b0979bb0f
6
+ metadata.gz: 68fbcfa58e42dc2544d76151903f1dadf4f792bdfbf8f76c0c1aacec2ebf7522cf6e9dc0af78f454a91410eb8009f96cb54ff15ea08cab27a597f273d5e2a89a
7
+ data.tar.gz: aba58381e1bed9dcdd90177c0e6820df8de418d980623ad0df2bd2dfa89543c5dceff01966b64e6f2f01162478a5d4d65c38ea9a05661d1382922a4947f35ab0
@@ -1,4 +1,4 @@
1
- Copyright (c) 2018 Robin Roestenburg
1
+ Copyright (c) 2019 Robin Roestenburg
2
2
 
3
3
  MIT License
4
4
 
@@ -4,4 +4,4 @@ source "https://rubygems.org"
4
4
 
5
5
  gem "activerecord", "4.2.10"
6
6
 
7
- gemspec :path => "../"
7
+ gemspec path: "../"
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: ..
3
3
  specs:
4
- deferring (0.5.0)
4
+ deferring (0.6.1)
5
5
  activerecord (>= 4.2)
6
6
 
7
7
  GEM
@@ -4,4 +4,4 @@ source "https://rubygems.org"
4
4
 
5
5
  gem "activerecord", "5.0.7"
6
6
 
7
- gemspec :path => "../"
7
+ gemspec path: "../"
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: ..
3
3
  specs:
4
- deferring (0.5.0)
4
+ deferring (0.6.1)
5
5
  activerecord (>= 4.2)
6
6
 
7
7
  GEM
@@ -4,4 +4,4 @@ source "https://rubygems.org"
4
4
 
5
5
  gem "activerecord", "5.1.6"
6
6
 
7
- gemspec :path => "../"
7
+ gemspec path: "../"
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: ..
3
3
  specs:
4
- deferring (0.5.0)
4
+ deferring (0.6.1)
5
5
  activerecord (>= 4.2)
6
6
 
7
7
  GEM
@@ -4,4 +4,4 @@ source "https://rubygems.org"
4
4
 
5
5
  gem "activerecord", "5.2.0"
6
6
 
7
- gemspec :path => "../"
7
+ gemspec path: "../"
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: ..
3
3
  specs:
4
- deferring (0.5.0)
4
+ deferring (0.6.1)
5
5
  activerecord (>= 4.2)
6
6
 
7
7
  GEM
@@ -4,4 +4,4 @@ source "https://rubygems.org"
4
4
 
5
5
  gem "activerecord", "6.0.0rc1"
6
6
 
7
- gemspec :path => "../"
7
+ gemspec path: "../"
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: ..
3
3
  specs:
4
- deferring (0.5.0)
4
+ deferring (0.6.1)
5
5
  activerecord (>= 4.2)
6
6
 
7
7
  GEM
@@ -47,6 +47,7 @@ module Deferring
47
47
  # association.
48
48
  delegate :[]=, :[], :clear, :select!, :reject!, :flatten, :flatten!, :sort!,
49
49
  :keep_if, :delete_if, :sort_by!, :empty?, :size, :length,
50
+ :each_index,
50
51
  to: :objects
51
52
 
52
53
  # Delegates Ruby's Enumerable#find method to the original association.
@@ -1,3 +1,3 @@
1
1
  module Deferring
2
- VERSION = '0.6.0'
2
+ VERSION = '0.6.1'
3
3
  end
@@ -377,6 +377,19 @@ RSpec.describe 'deferred has_and_belongs_to_many associations' do
377
377
  end
378
378
  end
379
379
 
380
+ describe 'supports methods from Ruby Array' do
381
+ describe '#each_index' do
382
+ it 'returns the index of each element in the association' do
383
+ bob.teams << dba << support
384
+ bob.save!
385
+
386
+ result = []
387
+ bob.teams.each_index { |i| result << i }
388
+ expect(result).to eq([0, 1])
389
+ end
390
+ end
391
+ end
392
+
380
393
  describe 'enumerable methods that conflict with ActiveRecord' do
381
394
  describe '#select' do
382
395
  before do
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: deferring
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.6.0
4
+ version: 0.6.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Robin Roestenburg
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2019-04-30 00:00:00.000000000 Z
11
+ date: 2019-09-13 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activerecord