csvbuilder-importer 0.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: b630db32ac5aff6725cbdb9f66414aed575f0b7e5529dd982af31f2002c0ca88
4
- data.tar.gz: d474369caa5696069c0273ca414e27e7f4aeb281e20312682fd99ec96d5880cc
3
+ metadata.gz: 4b7ef3908dc9244684d9332fba0f25089b39abc5ac9757c6754431597162166d
4
+ data.tar.gz: de8ae2d006614ee45e139a077ffdc5458472afa702a5d1c7a9048cf8bb55f889
5
5
  SHA512:
6
- metadata.gz: d188fde51bb5aafa126c10b0493f49ea085141d752cce03a4ed34c33ecbbc21712d3a06a3cb3232d2c56f9c40bd3b400224015ac42139e502844bdca497b1c06
7
- data.tar.gz: c58f400d80291c30e4b9198381240b7a7ecfa4ddb0db4266b4fcd6eb0a744a0d7a7902a3f448ba8b73f8438a0c913c7195794750d2388aecee868fdccf8a3ba6
6
+ metadata.gz: 40530fa7d450630ecfaef9892ee13119d03042d12e61fb86922bbd7bb02cfe91476d417fcb420aa8f7462506fcb5f107adc1877567b989765623c6e86d6a1f35
7
+ data.tar.gz: 365319e0776682a6ff9d2317a0ee73f0a084ea99289d14465346fb58cb8e0bdf29d3c212a9dabd55a2801a115b39df30532c663e397a700738b4f62e1c07f75a
data/CHANGELOG.md CHANGED
@@ -2,6 +2,10 @@
2
2
 
3
3
  ## [Released]
4
4
 
5
+ ## [0.1.5.1] - 2023-07-26
6
+
7
+ - Revert: Using Less Memory And Quicker Line Counter https://github.com/joel/csvbuilder-importer/pull/11
8
+
5
9
  ## [0.1.5] - 2023-07-26
6
10
 
7
11
  - Add a way to abort at the importer level, handy to handle wrong headers check https://github.com/joel/csvbuilder-importer/pull/12
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- csvbuilder-importer (0.1.5)
4
+ csvbuilder-importer (0.1.5.1)
5
5
  activemodel (>= 5.2)
6
6
  activesupport (>= 5.2)
7
7
  csvbuilder-core
@@ -20,10 +20,10 @@ module Csvbuilder
20
20
  reset
21
21
  end
22
22
 
23
- # https://gist.github.com/guilhermesimoes/d69e547884e556c3dc95?permalink_comment_id=4502636#gistcomment-4502636
23
+ # http://stackoverflow.com/questions/2650517/count-the-number-of-lines-in-a-file-without-reading-entire-file-into-memory
24
24
  # @return [Integer] the number of rows in the file, including empty new lines
25
25
  def size
26
- @size ||= ::File.read(file_path).count($/)
26
+ @size ||= ::File.readlines(file_path).length
27
27
  end
28
28
 
29
29
  # If the current position is at the headers, skip it and return it. Otherwise, only return false.
@@ -2,6 +2,6 @@
2
2
 
3
3
  module Csvbuilder
4
4
  module Importer
5
- VERSION = "0.1.5"
5
+ VERSION = "0.1.5.1"
6
6
  end
7
7
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: csvbuilder-importer
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.5
4
+ version: 0.1.5.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Joel Azemar