honey_format 0.2.0 → 0.2.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: 4a3591ebdea8bbde84b5cd4cef7915917ec9b929
4
- data.tar.gz: f8ae5d74d90fe3742c322e94f2f5881c879d85bb
3
+ metadata.gz: 976b0f358d1577605a7cf6774c0bfa0d8cc417dc
4
+ data.tar.gz: 692ee6e558f64ff7cded7e1e3d2b0b3fe33e3d73
5
5
  SHA512:
6
- metadata.gz: 2821d59e1072042093d590f0a31883dd0403fc552b5ee8f7a5d16f2849afb37a5003dbb37c6054a620ff99b4b97eca1ea69f751118c7f156af96c2849b634367
7
- data.tar.gz: 17b3aa8e0f0fc46391395ef602cff94753fbd5e6fe96cd28bf19cce859626ebefbf99b1b54460b72ac3d4698c7b71cfe7a459a02ab93d5e89548c058068ba411
6
+ metadata.gz: e7da999d1c8b1b938111752b87c6174bc8d5119c0d8acd46100fd6d6add24ef48a03153a4df8f6d5153ade514bc40dfbcd6e121b9a9fb4da102b60d6eef9eb81
7
+ data.tar.gz: cdf05e13e33c42d7942becd58f4db7a9ffac59e7b05a86a793ae97861f18a9f72064605fc2de331aa46384b80f1c28878534452ca6d6cc7e5e89456cd979de42
data/README.md CHANGED
@@ -55,7 +55,7 @@ Validate CSV header
55
55
  csv_string = "Id, Username\n 1, buren"
56
56
  # Invalid
57
57
  HoneyCSV.new(csv_string, valid_columns: [:something, :username])
58
- # => #<HoneyFormat::CSVHeaderColumnError: key :id ("Id") not in [:something, :username]>
58
+ # => #<HoneyFormat::MissingCSVHeaderColumnError: key :id ("Id") not in [:something, :username]>
59
59
 
60
60
  # Valid
61
61
  csv = HoneyCSV.new(csv_string, valid_columns: [:id, :username])
@@ -1,10 +1,12 @@
1
1
  module HoneyFormat
2
2
  # Raised when header is missing
3
3
  class MissingCSVHeaderError < StandardError; end
4
+ # Raised when there is a CSV header column error
5
+ class CSVHeaderColumnError < StandardError; end
4
6
  # Raised when header column is missing
5
- class MissingCSVHeaderColumnError < StandardError; end
7
+ class MissingCSVHeaderColumnError < CSVHeaderColumnError; end
6
8
  # Raised when a column is not in passed valid columns
7
- class UnknownCSVHeaderColumnError < StandardError; end
9
+ class UnknownCSVHeaderColumnError < CSVHeaderColumnError; end
8
10
  # Raised when columns are empty
9
11
  class EmptyColumnsError < ArgumentError; end
10
12
  # Raised when row has more columns than columns
@@ -1,4 +1,4 @@
1
1
  module HoneyFormat
2
2
  # Gem version
3
- VERSION = '0.2.0'
3
+ VERSION = '0.2.1'
4
4
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: honey_format
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.0
4
+ version: 0.2.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jacob Burenstam