activerecord_bulkoperation 0.1.0 → 0.2.0

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: 12fc174b11b0a39fa81778b9c0d0b66d7f698956777c747390aa14873521d91c
4
- data.tar.gz: 89dd91a3338c3057fb91ba2d54e2ffe95a60b8d2764bd90427ce79e9e63c50c8
3
+ metadata.gz: 2820ff19963204787d8de587378d314ff507bacac18496e04042f6d289109b89
4
+ data.tar.gz: 6dbb29d24697e3f1e08facc2dc91c243ab34bacbb1f59e1cb5a8e298bb6e5bf9
5
5
  SHA512:
6
- metadata.gz: f8db1e56b50b1e5e1a58f779bbfe93df7c2f7d9055a08c29b6bee5a13a193476b36813d023d0e8155a8d3a3aa1feb8065e7dd7e3e34d6884ec8b84a7fc7a500f
7
- data.tar.gz: f4450aaf3303b8fc9b4ba7f0c5704b9fef2fd1e170d574bec83b5c52f7be3057c53ec628c7cc749a827a96a6bd403f9723fb3778a2034ec975660b15bdbc46bf
6
+ metadata.gz: 12b2ce79daba44f89ff3cd55a398a305bd37a6be9fb92701f4798f23a09ebc4a47c396fc3d55cada3ec4e7cbafcefb100270b8dcf4904f4e1d75a6aeae13848f
7
+ data.tar.gz: 8f5cf8c0dec25d8140f97e3c51bb1c9c0e2eabc3e953a6d6186876f5b36bc9581d250de65ac527e972b85f390edfeb99fb1e16656028a4642bb9d63ba6fec6da
@@ -18,7 +18,7 @@ Gem::Specification.new do |gem|
18
18
 
19
19
  gem.required_ruby_version = ">=2.3"
20
20
 
21
- gem.add_runtime_dependency "activerecord", ">=4.2", "<6"
21
+ gem.add_runtime_dependency "activerecord", ">=4.2"
22
22
  gem.add_development_dependency "rake"
23
23
  gem.add_development_dependency "mocha"
24
24
  gem.add_development_dependency "minitest"
@@ -12,6 +12,14 @@ module ActiveRecord
12
12
  record.save_original
13
13
  record
14
14
  end
15
+
16
+ alias_method :instantiate_instant_of_without_save_original, :instantiate_instance_of
17
+
18
+ def instantiate_instance_of(klass, attributes, column_types = {}, &block)
19
+ record = instantiate_instant_of_without_save_original(klass, attributes, column_types)
20
+ record.save_original
21
+ record
22
+ end
15
23
  end
16
24
  end
17
25
 
@@ -1,5 +1,5 @@
1
1
  module ActiveRecord
2
2
  module Bulkoperation
3
- VERSION = '0.1.0'
3
+ VERSION = '0.2.0'
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: activerecord_bulkoperation
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.2.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - OSP
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2019-11-04 00:00:00.000000000 Z
11
+ date: 2020-05-06 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activerecord
@@ -17,9 +17,6 @@ dependencies:
17
17
  - - ">="
18
18
  - !ruby/object:Gem::Version
19
19
  version: '4.2'
20
- - - "<"
21
- - !ruby/object:Gem::Version
22
- version: '6'
23
20
  type: :runtime
24
21
  prerelease: false
25
22
  version_requirements: !ruby/object:Gem::Requirement
@@ -27,9 +24,6 @@ dependencies:
27
24
  - - ">="
28
25
  - !ruby/object:Gem::Version
29
26
  version: '4.2'
30
- - - "<"
31
- - !ruby/object:Gem::Version
32
- version: '6'
33
27
  - !ruby/object:Gem::Dependency
34
28
  name: rake
35
29
  requirement: !ruby/object:Gem::Requirement
@@ -149,7 +143,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
149
143
  - !ruby/object:Gem::Version
150
144
  version: '0'
151
145
  requirements: []
152
- rubygems_version: 3.0.4
146
+ rubygems_version: 3.0.6
153
147
  signing_key:
154
148
  specification_version: 4
155
149
  summary: ''