csv-probe 0.1.1 → 0.1.2

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: 83d63f020bf4ed1e557518b78820b440cc24da36a7d93f6ded23b604aa7161ed
4
- data.tar.gz: df4e094f0f0451c9578ac5f02c34eb967d851a4782926dc64f0b96bdcd1eb9f8
3
+ metadata.gz: 441ebf45d96b8a4dd857fb07accc96117d38557e89697bfb7bda9f3552dfab0b
4
+ data.tar.gz: 629343b0c775afa3777c1087862b1ed1116a6c7a71c074fae386a4091d4fa0fa
5
5
  SHA512:
6
- metadata.gz: 9b3be13578b537577b62fd1efa51ec00f2d0a5a38755b2e8399dfeacf9f3ceaa1f30a65381336af5464cb4d08c32797bb0de5199f34f4e437041db9ec70ab681
7
- data.tar.gz: 2eb6bfdeb32a7d3f819cf52b412b311984d7e45366426ed81a788ccf2f9a83504733cbe348c8da34421f23855eab2f8e5efe40e3fd4086a94a656758cdef3e4b
6
+ metadata.gz: d38d085bb5cdf931e0b28bb392e74fda65cdd0fb5e6a48237fce7416b5c5defc67e1aa311dc3c301fff9a2c86f75fc6ce2be42c5a1ee971c1684086565175f2d
7
+ data.tar.gz: d50453598bbbd185db46d2d01ab62d72487540d30b24d60cdbcd99bf29a2ba7a44f13e36661837c6cc12dd12d1d1576f88dfe9f65561733b05adf016b233078d
data/CHANGELOG.md CHANGED
@@ -1,5 +1,12 @@
1
1
  ## [Unreleased]
2
2
 
3
+ ## [0.1.2] - 2022-01-03
4
+ - Fix readme
5
+
6
+ ## [0.1.1] - 2022-01-02
7
+ - Fix rubocop warnings
8
+ - Improve readme
9
+
3
10
  ## [0.1.0] - 2022-01-02
4
11
 
5
12
  - Initial release
data/README.md CHANGED
@@ -31,13 +31,17 @@ Example how to use Probe
31
31
  0,PA,customer,2,03-12-2021,SHA;AN;RU,badger|ant
32
32
  0,TE,guest,1000,06-11-2021,RU,spider|racoon|ant
33
33
  ROWS
34
+
35
+ # define linting rules
34
36
  checks = [Probe::ColumnIsEqualTo.new("col1", "0"),
35
37
  Probe::ColumnMatchesRegEx.new("col2", /^(NU|PA|TE)$/),
36
- Probe::ColumnIsOneOf.new("col3", ["customer","guest"]),
37
- Probe::ColumnMeetsCondition.new("col4", ->(val, _opts) { Integer(val, exception: false) != nil }, "Not an Integer"),
38
+ Probe::ColumnIsOneOf.new("col3", %w[customer guest]),
39
+ Probe::ColumnMeetsCondition.new("col4", lambda { |val, _opts|
40
+ !Integer(val, exception: false).nil?
41
+ }, "Not an Integer"),
38
42
  Probe::ColumnIsDate.new("col5", "%d-%m-%Y"),
39
- Probe::ColumnIsListWithDomain.new("col6", ["FO", "RU", "SHA", "AN"], ";"),
40
- Probe::ColumnIsSetWithDomain.new("col7", ["eagle", "hawk", "badger", "spider", "racoon", "ant"], "|")]
43
+ Probe::ColumnIsListWithDomain.new("col6", %w[FO RU SHA AN], ";"),
44
+ Probe::ColumnIsSetWithDomain.new("col7", %w[eagle hawk badger spider racoon ant], "|")]
41
45
 
42
46
  # lint table
43
47
  csv_table.lint(checks)
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Probe
4
- VERSION = "0.1.1"
4
+ VERSION = "0.1.2"
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: csv-probe
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.1
4
+ version: 0.1.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - homebase.dev