csv_model 2.0.0 → 2.0.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
  SHA1:
3
- metadata.gz: c2951bdafbd4576f9f3a3d691288352c1d337a1c
4
- data.tar.gz: 83cbf05068f40d1edf98a5a6eaf30bd2af07e399
3
+ metadata.gz: 461a9d42151277f2f479a52e6b336255318a591b
4
+ data.tar.gz: e0e274082bf74b5fc20208cd51d96df8343002e4
5
5
  SHA512:
6
- metadata.gz: 24014d520b07ff26ecb246b1be916521291e00ef0dc7bad1fca34d59e7833e7f3533f19faf27625b234ac0cbd699cadd3001962007ff65b77b2b543ba58ad0e7
7
- data.tar.gz: d31f6560888bd285d8e134ac48763a9b9f72820099a4a306cf2903fa628df3690d2577666f22b0db13bccac2114527139bc09707cdd4f1eddf476a67faa85c1e
6
+ metadata.gz: 8b872def5fcc749908cfd66e7771e0b3d85f6aa4edc728d06516e748c3ef7d8d1571b9ad44aa050eda03dfae56267c99d894452926c3f0bd545e446050ba437e
7
+ data.tar.gz: acbcbb365a4a52fedd724085d923788680c09738629dcb87dc9af1b11a875ca8540276949324109085ad63759ca03fde52ccde3b894c97ca7722f6ba5d449148
@@ -0,0 +1 @@
1
+ ruby 2.4.1
@@ -2,7 +2,7 @@ rvm:
2
2
  - 2.1.10
3
3
  - 2.2.6
4
4
  - 2.3.3
5
- - 2.4.0
5
+ - 2.4.1
6
6
 
7
7
  install:
8
8
  - "travis_retry bundle install"
@@ -1,3 +1,8 @@
1
+ ## 2.0.1 (2019-05-14)
2
+
3
+ Other
4
+ - Fix handling of nil columns
5
+
1
6
  ## 2.0.0 (2018-08-23)
2
7
 
3
8
  Features:
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- csv_model (2.0.0)
4
+ csv_model (2.0.1)
5
5
 
6
6
  GEM
7
7
  remote: https://rubygems.org/
@@ -10,6 +10,10 @@ module CSVModel
10
10
  end
11
11
 
12
12
  refine NilClass do
13
+ def to_column_key
14
+ nil
15
+ end
16
+
13
17
  def try(*args)
14
18
  nil
15
19
  end
@@ -1,3 +1,3 @@
1
1
  module CSVModel
2
- VERSION = "2.0.0"
2
+ VERSION = "2.0.1"
3
3
  end
@@ -186,6 +186,11 @@ describe CSVModel::HeaderRow do
186
186
  expect(subject.valid?).to eq(true)
187
187
  end
188
188
 
189
+ it "returns true when the header is valid and contains a nil column" do
190
+ subject = described_class.new(["Column One", nil])
191
+ expect(subject.valid?).to eq(true)
192
+ end
193
+
189
194
  it "returns false when header has duplicate columns" do
190
195
  subject = described_class.new(data + data)
191
196
  expect(subject.valid?).to eq(false)
@@ -256,7 +261,7 @@ describe CSVModel::HeaderRow do
256
261
  expect(subject.respond_to?(:has_alternate_primary_key_columns?)).to eq(false)
257
262
  end
258
263
 
259
- it "returns true when no primary key columns specified" do
264
+ it "returns true when no primary key columns specified" do
260
265
  expect(subject.send(:has_alternate_primary_key_columns?)).to eq(true)
261
266
  end
262
267
 
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: csv_model
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.0.0
4
+ version: 2.0.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Matthew Chadwick
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2017-08-23 00:00:00.000000000 Z
11
+ date: 2019-05-14 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -60,6 +60,7 @@ extensions: []
60
60
  extra_rdoc_files: []
61
61
  files:
62
62
  - ".gitignore"
63
+ - ".tool-versions"
63
64
  - ".travis.yml"
64
65
  - CHANGELOG.md
65
66
  - Gemfile
@@ -106,7 +107,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
106
107
  version: '0'
107
108
  requirements: []
108
109
  rubyforge_project:
109
- rubygems_version: 2.4.8
110
+ rubygems_version: 2.6.11
110
111
  signing_key:
111
112
  specification_version: 4
112
113
  summary: Utility library for importing CSV data.