zombie_record 1.5.0 → 1.5.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
2
  SHA256:
3
- metadata.gz: 91ed49648bae95bb6a4161ab05bad01147c4be33bfef1ed4088a581588194942
4
- data.tar.gz: 28e55007206dd1faf809bb7f7bdd325242961207eedb6a0da678783473c9a917
3
+ metadata.gz: 77c2b09a1e5552f5f0c1a1a2b0beba87267c3342057439b606f37422c3ae65ba
4
+ data.tar.gz: 3904f6d838bccee4355a73eb97b2eb17e56d6469f82ffc83d1f31fb5e8d9b4df
5
5
  SHA512:
6
- metadata.gz: aa39de754f5be4286e20f82a8d6e2bac2b7145f688ba02f6d506ee27e8d02e6e2338bf05511764610267ebd4d46868183358f71a69e1b60517e1e8398825de76
7
- data.tar.gz: 2dedb8380345395471c552719164080e6d8a970619a27d5ac7642a0f898536160fa5b5883c88ebdf222cf0dfd9b21affe396919344b4f5820512e920e21509be
6
+ metadata.gz: bc8cba4a7b46ca10c9933ac19d9e5c5eeec7309eb5894f76b6fc76a3b1c9f7ee109c4f49a30ecd60297b74ff219efc52867e8d81c7f4601e7ebcbd5da2d18917
7
+ data.tar.gz: e43f02c6dd634541f4bf6cfffbe7df5c6adfe09b9c9ae094510cf73595e087f6d129add06b707a539cdc3a8673ffd3d74623f6500e5de7c5d0929ae6adc14f70
@@ -0,0 +1,12 @@
1
+ name: Publish Gem
2
+
3
+ on:
4
+ push:
5
+ tags: v*
6
+
7
+ jobs:
8
+ call-workflow:
9
+ uses: zendesk/gw/.github/workflows/ruby-gem-publication.yml@main
10
+ secrets:
11
+ RUBY_GEMS_API_KEY: ${{ secrets.RUBY_GEMS_API_KEY }}
12
+ RUBY_GEMS_TOTP_DEVICE: ${{ secrets.RUBY_GEMS_TOTP_DEVICE }}
data/CHANGELOG.md CHANGED
@@ -1,5 +1,9 @@
1
1
  ###### Unreleased
2
2
 
3
+ ###### v1.5.1
4
+
5
+ * Fix keyword arguments error for `method_missing`.
6
+
3
7
  ###### v1.5.0
4
8
 
5
9
  * Add support for Rails 7.0
@@ -96,6 +96,8 @@ module ZombieRecord
96
96
  delegate_to_record(name) { @record.public_send(name, *args, &block) }
97
97
  end
98
98
 
99
+ ruby2_keywords :method_missing if respond_to?(:ruby2_keywords, true)
100
+
99
101
  # We want *all* methods to be delegated.
100
102
  BasicObject.instance_methods.each do |name|
101
103
  define_method(name) do |*args, &block|
@@ -1,3 +1,3 @@
1
1
  module ZombieRecord
2
- VERSION = "1.5.0"
2
+ VERSION = "1.5.1"
3
3
  end
@@ -62,6 +62,15 @@ RSpec.describe ZombieRecord::Restorable do
62
62
  # #flatten will implicitly call #to_ary
63
63
  expect([[[book]]].flatten).to eq([book])
64
64
  end
65
+
66
+ it "doesn't re-save duplicated record" do
67
+ book = Book.create!(title: "The Odyssey")
68
+ book.destroy
69
+ book_dup = Book.with_deleted.first.save(validate: true)
70
+
71
+ expect(Book.count).to eq(0)
72
+ expect(Book.with_deleted.size).to eq(1)
73
+ end
65
74
  end
66
75
 
67
76
  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.5.0
4
+ version: 1.5.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Daniel Schierbeck
8
- autorequire:
8
+ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2022-11-18 00:00:00.000000000 Z
11
+ date: 2023-01-23 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activerecord
@@ -136,6 +136,7 @@ extensions: []
136
136
  extra_rdoc_files: []
137
137
  files:
138
138
  - ".github/workflows/ci.yml"
139
+ - ".github/workflows/publish.yml"
139
140
  - ".gitignore"
140
141
  - ".rspec"
141
142
  - CHANGELOG.md
@@ -159,7 +160,7 @@ homepage: https://github.com/zendesk/zombie_record
159
160
  licenses:
160
161
  - MIT
161
162
  metadata: {}
162
- post_install_message:
163
+ post_install_message:
163
164
  rdoc_options: []
164
165
  require_paths:
165
166
  - lib
@@ -174,8 +175,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
174
175
  - !ruby/object:Gem::Version
175
176
  version: '0'
176
177
  requirements: []
177
- rubygems_version: 3.1.6
178
- signing_key:
178
+ rubygems_version: 3.0.3.1
179
+ signing_key:
179
180
  specification_version: 4
180
181
  summary: Allows restoring your Active Records from the dead!
181
182
  test_files: