zombie_record 1.4.0 → 1.4.1

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
- SHA1:
3
- metadata.gz: c1960fadad22365102abfdc9b5f4e759d9190072
4
- data.tar.gz: 6d2cef516af15fe77ca4e14f909583bb384ce788
2
+ SHA256:
3
+ metadata.gz: e9956c30436345b8b024e60fff41d60b10473a1cc11f8f9d03de9c0a26bde53e
4
+ data.tar.gz: f8b34b025125955ea68916b3e510e8d321a5e159f4359aed347fda471de97c33
5
5
  SHA512:
6
- metadata.gz: 7d2d001bde1137fa0cf7e817419de2cb327015ccea5b4eb0e2178a6893834b026ca925f251874b2fc8e216a69deb7073f92894a347477d6bd5f38c13976133bf
7
- data.tar.gz: c2f8e9ac8619adbf9888674d5fe7652cf3f9135b8457ee38f308047d63f3e793088a24288783c75ff5c0979b1e177102ca2a642564843ee38b4194f563d6849f
6
+ metadata.gz: 5048ab29652b31b6385d472a9e9bd707580d8a9e5a6594a748bf8b98dba4776b6151c17b3f0791c06b7abb29df5668de6cf66a75f38e2a2ba75afe92f6bc3ddd
7
+ data.tar.gz: d0c969d7875f43e578d339672f8a2c2c574f434f5f0cce2850879494a3e13c5c340f59c6d00d818818d1ae24a57dfc3077158370181a9483805b627c45d6a6bb
data/.travis.yml CHANGED
@@ -1,21 +1,20 @@
1
1
  language: ruby
2
2
  rvm:
3
- - 2.1.8
4
- - 2.2.4
5
- - 2.3.3
6
- - 2.4.1
3
+ - 2.2
4
+ - 2.3
5
+ - 2.4
6
+ - 2.5
7
7
  gemfile:
8
8
  - gemfiles/rails4.1.gemfile
9
9
  - gemfiles/rails4.2.gemfile
10
10
  - gemfiles/rails5.0.gemfile
11
11
  - gemfiles/rails5.1.gemfile
12
+ - gemfiles/rails5.2.gemfile
12
13
  bundler_args: ""
13
14
  script: "bundle exec rake spec"
14
15
  matrix:
15
16
  exclude:
16
- - rvm: 2.1.8
17
- gemfile: gemfiles/rails5.0.gemfile
18
- - rvm: 2.1.8
19
- gemfile: gemfiles/rails5.1.gemfile
20
- - rvm: 2.4.1
17
+ - rvm: 2.4
18
+ gemfile: gemfiles/rails4.1.gemfile
19
+ - rvm: 2.5
21
20
  gemfile: gemfiles/rails4.1.gemfile
data/CHANGELOG.md CHANGED
@@ -1,5 +1,16 @@
1
1
  ###### Unreleased
2
2
 
3
+ ###### v1.4.1
4
+
5
+ * Test against Rails 5.2.
6
+ * Test against Ruby 2.5.
7
+ * Don't implement `respond_to_missing?` when implementing `method_missing` or it
8
+ won't work on Ruby 2.5.0. Truly confusing.
9
+
10
+ ###### v1.4.0
11
+
12
+ * Test against Rails 5.1.
13
+
3
14
  ###### v1.3.2
4
15
 
5
16
  * Implement `respond_to_missing?` when implementing `method_missing` or it
@@ -0,0 +1,5 @@
1
+ source 'https://rubygems.org'
2
+
3
+ gemspec path: "../"
4
+
5
+ gem "activerecord", "~> 5.2.0.beta2"
@@ -96,8 +96,10 @@ module ZombieRecord
96
96
  delegate_to_record(name) { @record.public_send(name, *args, &block) }
97
97
  end
98
98
 
99
- def respond_to_missing?(method, include_all = false)
100
- @record.respond_to?(method, include_all)
99
+ if ::RUBY_VERSION.start_with?('2.3.')
100
+ def respond_to_missing?(method, include_all = false)
101
+ @record.respond_to?(method, include_all)
102
+ end
101
103
  end
102
104
 
103
105
  # We want *all* methods to be delegated.
@@ -1,3 +1,3 @@
1
1
  module ZombieRecord
2
- VERSION = "1.4.0"
2
+ VERSION = "1.4.1"
3
3
  end
@@ -53,6 +53,15 @@ RSpec.describe ZombieRecord::Restorable do
53
53
 
54
54
  expect(book.title).to eq("The Odyssey")
55
55
  end
56
+
57
+ it "forwards to_ary" do
58
+ book = Book.create!(title: "The Odyssey")
59
+ book.destroy
60
+ book = Book.with_deleted.first
61
+
62
+ # #flatten will implicitly call #to_ary
63
+ expect([[[book]]].flatten).to eq([book])
64
+ end
56
65
  end
57
66
 
58
67
  describe ".deleted" do
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: zombie_record
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.4.0
4
+ version: 1.4.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Daniel Schierbeck
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2017-04-28 00:00:00.000000000 Z
11
+ date: 2018-03-19 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activerecord
@@ -161,6 +161,7 @@ files:
161
161
  - gemfiles/rails4.2.gemfile
162
162
  - gemfiles/rails5.0.gemfile
163
163
  - gemfiles/rails5.1.gemfile
164
+ - gemfiles/rails5.2.gemfile
164
165
  - lib/zombie_record.rb
165
166
  - lib/zombie_record/restorable.rb
166
167
  - lib/zombie_record/version.rb
@@ -187,7 +188,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
187
188
  version: '0'
188
189
  requirements: []
189
190
  rubyforge_project:
190
- rubygems_version: 2.6.11
191
+ rubygems_version: 2.7.6
191
192
  signing_key:
192
193
  specification_version: 4
193
194
  summary: Allows restoring your Active Records from the dead!