csv_rw 0.1.2 → 0.1.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/Gemfile +4 -6
- data/Gemfile.lock +11 -11
- data/csv_rw.gemspec +1 -3
- data/lib/csv_rw/version.rb +1 -1
- data/lib/csv_rw.rb +3 -0
- metadata +4 -18
    
        checksums.yaml
    CHANGED
    
    | @@ -1,7 +1,7 @@ | |
| 1 1 | 
             
            ---
         | 
| 2 2 | 
             
            SHA256:
         | 
| 3 | 
            -
              metadata.gz:  | 
| 4 | 
            -
              data.tar.gz:  | 
| 3 | 
            +
              metadata.gz: 2f67da7b159b614f44fb33c9cfaa342ca001370b37118ffaef9af18154113cd4
         | 
| 4 | 
            +
              data.tar.gz: d11f35ad70f7b45202c15182981954ad95685ef975b420f0559dc2f9f9e79b64
         | 
| 5 5 | 
             
            SHA512:
         | 
| 6 | 
            -
              metadata.gz:  | 
| 7 | 
            -
              data.tar.gz:  | 
| 6 | 
            +
              metadata.gz: 7bd262b2072c4dd1064ed8d57e7e33ef7c0c2beb209f3592956ee3d149c39b2050040e5de5e568c18c526a6348e20ad81bc918a5d50984753aafec9c8aabe6f8
         | 
| 7 | 
            +
              data.tar.gz: 4b166e74650eedbcb4891e3d3e5e2a545f7ef5c948116b0db4686a3e5fa1a3784470a0c3e183df81ec189e9926ccdfb4aa68975753869378e20bb18f29b3f3ed
         | 
    
        data/Gemfile
    CHANGED
    
    
    
        data/Gemfile.lock
    CHANGED
    
    | @@ -1,7 +1,7 @@ | |
| 1 1 | 
             
            PATH
         | 
| 2 2 | 
             
              remote: .
         | 
| 3 3 | 
             
              specs:
         | 
| 4 | 
            -
                csv_rw (0.1. | 
| 4 | 
            +
                csv_rw (0.1.3)
         | 
| 5 5 |  | 
| 6 6 | 
             
            GEM
         | 
| 7 7 | 
             
              remote: https://rubygems.org/
         | 
| @@ -9,7 +9,7 @@ GEM | |
| 9 9 | 
             
                ast (2.4.2)
         | 
| 10 10 | 
             
                diff-lcs (1.5.0)
         | 
| 11 11 | 
             
                docile (1.4.0)
         | 
| 12 | 
            -
                json (2.6. | 
| 12 | 
            +
                json (2.6.3)
         | 
| 13 13 | 
             
                parallel (1.22.1)
         | 
| 14 14 | 
             
                parser (3.1.3.0)
         | 
| 15 15 | 
             
                  ast (~> 2.4.1)
         | 
| @@ -23,27 +23,27 @@ GEM | |
| 23 23 | 
             
                  rspec-mocks (~> 3.12.0)
         | 
| 24 24 | 
             
                rspec-core (3.12.0)
         | 
| 25 25 | 
             
                  rspec-support (~> 3.12.0)
         | 
| 26 | 
            -
                rspec-expectations (3.12. | 
| 26 | 
            +
                rspec-expectations (3.12.1)
         | 
| 27 27 | 
             
                  diff-lcs (>= 1.2.0, < 2.0)
         | 
| 28 28 | 
             
                  rspec-support (~> 3.12.0)
         | 
| 29 | 
            -
                rspec-mocks (3.12. | 
| 29 | 
            +
                rspec-mocks (3.12.1)
         | 
| 30 30 | 
             
                  diff-lcs (>= 1.2.0, < 2.0)
         | 
| 31 31 | 
             
                  rspec-support (~> 3.12.0)
         | 
| 32 32 | 
             
                rspec-support (3.12.0)
         | 
| 33 | 
            -
                rubocop (1. | 
| 33 | 
            +
                rubocop (1.41.1)
         | 
| 34 34 | 
             
                  json (~> 2.3)
         | 
| 35 35 | 
             
                  parallel (~> 1.10)
         | 
| 36 36 | 
             
                  parser (>= 3.1.2.1)
         | 
| 37 37 | 
             
                  rainbow (>= 2.2.2, < 4.0)
         | 
| 38 38 | 
             
                  regexp_parser (>= 1.8, < 3.0)
         | 
| 39 39 | 
             
                  rexml (>= 3.2.5, < 4.0)
         | 
| 40 | 
            -
                  rubocop-ast (>= 1. | 
| 40 | 
            +
                  rubocop-ast (>= 1.23.0, < 2.0)
         | 
| 41 41 | 
             
                  ruby-progressbar (~> 1.7)
         | 
| 42 42 | 
             
                  unicode-display_width (>= 1.4.0, < 3.0)
         | 
| 43 | 
            -
                rubocop-ast (1. | 
| 43 | 
            +
                rubocop-ast (1.24.1)
         | 
| 44 44 | 
             
                  parser (>= 3.1.1.0)
         | 
| 45 45 | 
             
                ruby-progressbar (1.11.0)
         | 
| 46 | 
            -
                simplecov (0. | 
| 46 | 
            +
                simplecov (0.22.0)
         | 
| 47 47 | 
             
                  docile (~> 1.1)
         | 
| 48 48 | 
             
                  simplecov-html (~> 0.11)
         | 
| 49 49 | 
             
                  simplecov_json_formatter (~> 0.1)
         | 
| @@ -57,9 +57,9 @@ PLATFORMS | |
| 57 57 |  | 
| 58 58 | 
             
            DEPENDENCIES
         | 
| 59 59 | 
             
              csv_rw!
         | 
| 60 | 
            -
              rake | 
| 61 | 
            -
              rspec | 
| 62 | 
            -
              rubocop | 
| 60 | 
            +
              rake
         | 
| 61 | 
            +
              rspec
         | 
| 62 | 
            +
              rubocop
         | 
| 63 63 | 
             
              simplecov
         | 
| 64 64 |  | 
| 65 65 | 
             
            BUNDLED WITH
         | 
    
        data/csv_rw.gemspec
    CHANGED
    
    | @@ -28,9 +28,7 @@ Gem::Specification.new do |spec| | |
| 28 28 | 
             
                  (f == __FILE__) || f.match(%r{\A(?:(?:bin|test|spec|features)/|\.(?:git|travis|circleci)|appveyor)})
         | 
| 29 29 | 
             
                end
         | 
| 30 30 | 
             
              end
         | 
| 31 | 
            -
             | 
| 31 | 
            +
             | 
| 32 32 | 
             
              spec.executables = spec.files.grep(%r{\Aexe/}) { |f| File.basename(f) }
         | 
| 33 33 | 
             
              spec.require_paths = ["lib"]
         | 
| 34 | 
            -
             | 
| 35 | 
            -
              spec.add_development_dependency "simplecov"
         | 
| 36 34 | 
             
            end
         | 
    
        data/lib/csv_rw/version.rb
    CHANGED
    
    
    
        data/lib/csv_rw.rb
    CHANGED
    
    | @@ -9,6 +9,9 @@ module CsvRw | |
| 9 9 | 
             
                result = []
         | 
| 10 10 | 
             
                CSV.foreach(csv_filepath, headers: true, converters: :all) do |row|
         | 
| 11 11 | 
             
                  result << row.to_h.transform_keys(&:to_sym)
         | 
| 12 | 
            +
                rescue => e
         | 
| 13 | 
            +
                  $stderr.puts({error_class: e.class, error_message: e.message, row: row.to_h}.to_json)
         | 
| 14 | 
            +
                  raise e
         | 
| 12 15 | 
             
                end
         | 
| 13 16 |  | 
| 14 17 | 
             
                result.reject { |e| e.compact.empty? }
         | 
    
        metadata
    CHANGED
    
    | @@ -1,29 +1,15 @@ | |
| 1 1 | 
             
            --- !ruby/object:Gem::Specification
         | 
| 2 2 | 
             
            name: csv_rw
         | 
| 3 3 | 
             
            version: !ruby/object:Gem::Version
         | 
| 4 | 
            -
              version: 0.1. | 
| 4 | 
            +
              version: 0.1.3
         | 
| 5 5 | 
             
            platform: ruby
         | 
| 6 6 | 
             
            authors:
         | 
| 7 7 | 
             
            - lijunwei
         | 
| 8 8 | 
             
            autorequire:
         | 
| 9 | 
            -
            bindir:  | 
| 9 | 
            +
            bindir: bin
         | 
| 10 10 | 
             
            cert_chain: []
         | 
| 11 | 
            -
            date:  | 
| 12 | 
            -
            dependencies:
         | 
| 13 | 
            -
            - !ruby/object:Gem::Dependency
         | 
| 14 | 
            -
              name: simplecov
         | 
| 15 | 
            -
              requirement: !ruby/object:Gem::Requirement
         | 
| 16 | 
            -
                requirements:
         | 
| 17 | 
            -
                - - ">="
         | 
| 18 | 
            -
                  - !ruby/object:Gem::Version
         | 
| 19 | 
            -
                    version: '0'
         | 
| 20 | 
            -
              type: :development
         | 
| 21 | 
            -
              prerelease: false
         | 
| 22 | 
            -
              version_requirements: !ruby/object:Gem::Requirement
         | 
| 23 | 
            -
                requirements:
         | 
| 24 | 
            -
                - - ">="
         | 
| 25 | 
            -
                  - !ruby/object:Gem::Version
         | 
| 26 | 
            -
                    version: '0'
         | 
| 11 | 
            +
            date: 2023-01-31 00:00:00.000000000 Z
         | 
| 12 | 
            +
            dependencies: []
         | 
| 27 13 | 
             
            description: Personally frequently used csv file reader and writer
         | 
| 28 14 | 
             
            email:
         | 
| 29 15 | 
             
            - ljw532344863@sina.com
         |