csv_sniffer 0.1.0 → 0.1.1

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.
Files changed (4) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +6 -7
  3. data/csv_sniffer.gemspec +3 -3
  4. metadata +6 -6
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: e14c6e37b6559305010247b4ba71c6d1b87d4f5a
4
- data.tar.gz: 909f073414ada386352ae1a7462d4b227681551f
3
+ metadata.gz: ad85431534479a065a967c635b40262075688649
4
+ data.tar.gz: 1bf4f25c6628a1a83c06f36319d9178517d2f6c5
5
5
  SHA512:
6
- metadata.gz: 045d74a5dc4c0a134e157f2b0c18bd713c5e85cfcdb696c77b74b0d33f78489db9d172936d25979bf1709a2f45dd662a32469df7da7059eefc5d511d26388dce
7
- data.tar.gz: 01f3db3f4953cbd489b4ef90f0c5771e4253da659dc9bb398e4fc2d1a9d421f560f03bb88dd35e6bbf30b3f23e92ec34994ed0563bd6bb891b4ab2454dda4645
6
+ metadata.gz: 75ab53bcd1b9db8a182ff93b09dbdbf59ac7a934fef724905248ead35b4fe3f2e0d07c88314a001d7145fa0ca29f3f65c22bcde5d88447e6fd7f34164711e892
7
+ data.tar.gz: ed4b9829deac6773b429d5217e5778df3581e8048b46e19170de1ad91b8c41b3bc5677d2f7548213c0c907dac90169e5fc9b22d6e4f754a2d93950517ab49092
data/README.md CHANGED
@@ -1,6 +1,6 @@
1
1
  # CSV Sniffer
2
2
 
3
- CSV Sniffer is intended to provide utilities that will allow a user heuristically detect the delimiter character in use, whether the values in the CSV file are quote enclosed, whether the file contains a header, and more. The library is intended to detect information to be used as configuration inputs for CSV parsers. For delimiter detection the following delimiters are currently supported `[",", "\t", "|", ";"]`
3
+ CSV Sniffer is a set of functions that allow a user heuristically detect the delimiter character in use, whether the values in the CSV file are quote enclosed, whether the file contains a header, and more. The library is intended to detect information to be used as configuration inputs for CSV parsers. For delimiter detection the following delimiters are currently supported `[",", "\t", "|", ";"]`
4
4
 
5
5
  To ensure high performance and a low memory footprint, the library uses as little information as needed to make accurate decisions. Contributors are welcome to
6
6
  improve the algorithms in use.
@@ -14,7 +14,7 @@ $ gem install csv_sniffer
14
14
 
15
15
  ## Usage
16
16
 
17
- Given a `some_data.csv` file:
17
+ Given a `some_file.csv` file:
18
18
 
19
19
  ```csv
20
20
  Name;Phone
@@ -27,8 +27,9 @@ Detection usage is as follows:
27
27
  ```rb
28
28
  require "csv_sniffer"
29
29
 
30
- delim = CsvSniffer.detect_delimiter("/path/to/some_data.csv") #=> ";"
31
- is_quote_enclosed = CsvSniffer.is_quote_enclosed?("/path/to/some_data.csv") #=> False
30
+ delim = CsvSniffer.detect_delimiter("/path/to/some_file.csv") #=> ";"
31
+ is_quote_enclosed = CsvSniffer.is_quote_enclosed?("/path/to/some_file.csv") #=> false
32
+ has_header = CsvSniffer.has_header?("/path/to/some_file.csv") #=> true
32
33
  ```
33
34
 
34
35
  See [`test_csv_sniffer.rb`](test/test_csv_sniffer.rb) for more examples.
@@ -37,11 +38,9 @@ See [`test_csv_sniffer.rb`](test/test_csv_sniffer.rb) for more examples.
37
38
  ## Tests
38
39
 
39
40
  ```
40
- $ ruby test.rb
41
+ $ rake test
41
42
  ```
42
43
 
43
- ## To Do
44
- - Header detection
45
44
 
46
45
  ## License
47
46
 
@@ -1,9 +1,9 @@
1
1
  Gem::Specification.new do |s|
2
2
  s.name = 'csv_sniffer'
3
- s.version = '0.1.0'
4
- s.date = '2015-10-15'
3
+ s.version = '0.1.1'
4
+ s.date = '2015-10-16'
5
5
  s.summary = "CSV library for heuristic detection of CSV properties"
6
- s.description = "CSV Sniffer is intended to provide utilities that will allow a user detect the delimiter character in use, whether the values in the CSV file are quote enclosed, whether the file contains a header, and more. The library is intended to detect information to be used as configuration inputs for CSV parsers."
6
+ s.description = "CSV Sniffer is a set of functions that allow a user detect the delimiter character in use, whether the values in the CSV file are quote enclosed, whether the file contains a header, and more. The library is intended to detect information to be used as configuration inputs for CSV parsers."
7
7
  s.authors = ["Tim Ojo"]
8
8
  s.email = 'ojo.tim@gmail.com'
9
9
  s.homepage = 'https://github.com/tim-ojo/csv_sniffer'
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: csv_sniffer
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.1.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Tim Ojo
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-10-15 00:00:00.000000000 Z
11
+ date: 2015-10-16 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: test-unit
@@ -24,10 +24,10 @@ dependencies:
24
24
  - - '>='
25
25
  - !ruby/object:Gem::Version
26
26
  version: '0'
27
- description: CSV Sniffer is intended to provide utilities that will allow a user detect
28
- the delimiter character in use, whether the values in the CSV file are quote enclosed,
29
- whether the file contains a header, and more. The library is intended to detect
30
- information to be used as configuration inputs for CSV parsers.
27
+ description: CSV Sniffer is a set of functions that allow a user detect the delimiter
28
+ character in use, whether the values in the CSV file are quote enclosed, whether
29
+ the file contains a header, and more. The library is intended to detect information
30
+ to be used as configuration inputs for CSV parsers.
31
31
  email: ojo.tim@gmail.com
32
32
  executables: []
33
33
  extensions: []