Skip to content

Commit 83d3182

Browse files
committed
rename to activerecord_batch_update
1 parent 4fb4c8c commit 83d3182

5 files changed

+14
-14
lines changed

Gemfile.lock

+5-5
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
PATH
22
remote: .
33
specs:
4-
batch_update (0.0.2)
4+
activerecord_batch_update (0.0.2)
55
activerecord (~> 7.0)
66
activesupport (~> 7.0)
77

@@ -28,15 +28,15 @@ GEM
2828
base64 (0.2.0)
2929
bigdecimal (3.1.8)
3030
byebug (11.1.3)
31-
concurrent-ruby (1.3.3)
31+
concurrent-ruby (1.3.4)
3232
connection_pool (2.4.1)
3333
diff-lcs (1.5.1)
3434
drb (2.2.1)
35-
i18n (1.14.5)
35+
i18n (1.14.6)
3636
concurrent-ruby (~> 1.0)
3737
json (2.7.2)
3838
language_server-protocol (3.17.0.3)
39-
minitest (5.24.1)
39+
minitest (5.25.1)
4040
mutex_m (0.2.0)
4141
parallel (1.26.3)
4242
parser (3.3.5.0)
@@ -87,7 +87,7 @@ PLATFORMS
8787
x86_64-linux
8888

8989
DEPENDENCIES
90-
batch_update!
90+
activerecord_batch_update!
9191
byebug
9292
rake-release
9393
rspec

README.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
1-
# Batch Update
1+
# ActiveRecord Batch Update
22

33
Update multiple records with different values in an optimized number of queries.
44

55
This differs from [activerecord-import](https://github.com/zdennis/activerecord-import) because the latter issues a `INSERT ... ON DUPLICATE KEY UPDATE` statement which re-inserts the record if it happens to have been deleted in a other thread.
66

77
## Usage
8-
Include in your Gemfile: `gem 'batch_update'`
8+
Include in your Gemfile: `gem 'activerecord_batch_update'`
99

1010
```ruby
1111
cat1 = Cat.create!(name: 'Felix', birthday: '1990-03-13')

batch_update.gemspec activerecord_batch_update.gemspec

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,15 @@
11
# frozen_string_literal: true
22

33
Gem::Specification.new do |s|
4-
s.name = 'batch_update'
4+
s.name = 'activerecord_batch_update'
55
s.version = '0.0.2'
66
s.summary = 'Update multiple records with different values in a small number of queries'
7-
s.description = 'A simple hello world gem'
7+
s.description = ''
88
s.authors = ['Quentin de Metz']
99
s.email = 'quentin@pennylane.com'
1010
s.files = Dir['{lib}/**/*.rb']
1111
s.homepage =
12-
'https://rubygems.org/gems/batch_update'
12+
'https://rubygems.org/gems/activerecord_batch_update'
1313
s.license = 'MIT'
1414

1515
s.required_ruby_version = '>= 3.3.4'

lib/batch_update.rb lib/activerecord_batch_update.rb

+2-2
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
require 'active_support'
44

5-
module BatchUpdate
5+
module ActiveRecordBatchUpdate
66
extend ::ActiveSupport::Concern
77

88
# Given an array of records with changes,
@@ -114,5 +114,5 @@ def where_statement(primary_keys)
114114
end
115115

116116
ActiveSupport.on_load(:active_record) do
117-
include(BatchUpdate)
117+
include(ActiveRecordBatchUpdate)
118118
end

spec/batch_update_spec.rb spec/activerecord_batch_update_spec.rb

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
# frozen_string_literal: true
22

3-
require 'batch_update'
3+
require 'activerecord_batch_update'
44

5-
describe BatchUpdate do
5+
describe ActiveRecordBatchUpdate do # rubocop:disable RSpec/SpecFilePathFormat
66
describe '#batch_update_statements' do
77
subject(:sql_queries) { Cat.batch_update_statements(cats, **kwargs) }
88

0 commit comments

Comments
 (0)