Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: activeadmin-plugins/active_admin_import
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: master
Choose a base ref
...
head repository: Shelf-Life/active_admin_import
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: master
Choose a head ref
Can’t automatically merge. Don’t worry, you can still create the pull request.
  • 7 commits
  • 4 files changed
  • 1 contributor

Commits on May 10, 2021

  1. Verified

    This commit was signed with the committer’s verified signature.
    clinejj John Cline
    Copy the full SHA
    cf42029 View commit details
  2. Update CI env

    clinejj committed May 10, 2021

    Verified

    This commit was signed with the committer’s verified signature.
    clinejj John Cline
    Copy the full SHA
    dcdb7e2 View commit details
  3. Verified

    This commit was signed with the committer’s verified signature.
    clinejj John Cline
    Copy the full SHA
    8513ea0 View commit details
  4. Exclude correct job

    clinejj committed May 10, 2021

    Verified

    This commit was signed with the committer’s verified signature.
    clinejj John Cline
    Copy the full SHA
    5eb0fcc View commit details
  5. Merge pull request #1 from Shelf-Life/ruby-3-compat

    Add Ruby 3.0 compatibility
    clinejj authored May 10, 2021

    Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
    Copy the full SHA
    f1a0eb2 View commit details
  6. Update version.rb

    clinejj committed May 10, 2021

    Verified

    This commit was signed with the committer’s verified signature.
    clinejj John Cline
    Copy the full SHA
    526c36d View commit details
  7. Update version.rb

    clinejj committed May 10, 2021

    Verified

    This commit was signed with the committer’s verified signature.
    clinejj John Cline
    Copy the full SHA
    3997e99 View commit details
Showing with 15 additions and 12 deletions.
  1. +11 −9 .travis.yml
  2. +1 −0 Gemfile
  3. +2 −2 lib/active_admin_import/importer.rb
  4. +1 −1 lib/active_admin_import/version.rb
20 changes: 11 additions & 9 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,15 +1,17 @@
script: bundle exec rspec spec
env:
matrix:
- RAILS=5.2.4.3
- RAILS=6.0.3.2
- RAILS=5.2.4.6
- RAILS=6.0.3.7
rvm:
- 2.4.5
- 2.5.5
- 2.6.5
- 2.7.0
- 2.7.1
- 2.4.10
- 2.5.9
- 2.6.7
- 2.7.3
- 3.0.1
jobs:
exclude:
- rvm: 2.4.5
env: RAILS=6.0.3.2
- rvm: 2.4.10
env: RAILS=6.0.3.7
- rvm: 3.0.1
env: RAILS=5.2.4.6
1 change: 1 addition & 0 deletions Gemfile
Original file line number Diff line number Diff line change
@@ -8,6 +8,7 @@ gemspec
group :test do
default_rails_version = "~> 5.2.4"
rails_version = ENV['RAILS'] || default_rails_version
gem 'sassc-rails'
gem 'rails', rails_version
gem 'rspec-rails'
gem 'coveralls', require: false # Test coverage website. Go to https://coveralls.io
4 changes: 2 additions & 2 deletions lib/active_admin_import/importer.rb
Original file line number Diff line number Diff line change
@@ -37,7 +37,7 @@ def file
end

def cycle(lines)
@csv_lines = CSV.parse(lines.join, @csv_options)
@csv_lines = CSV.parse(lines.join, **@csv_options)
import_result.add(batch_import, lines.count)
end

@@ -115,7 +115,7 @@ def process_file
batch_size = options[:batch_size].to_i
File.open(file.path) do |f|
# capture headers if not exist
prepare_headers { CSV.parse(f.readline, @csv_options).first }
prepare_headers { CSV.parse(f.readline, **@csv_options).first }
f.each_line do |line|
lines << line if line.present?
if lines.size == batch_size || f.eof?
2 changes: 1 addition & 1 deletion lib/active_admin_import/version.rb
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# frozen_string_literal: true

module ActiveAdminImport
VERSION = '4.2.0'
VERSION = '4.2.1.ruby3'
end