ccsv_ext 0.1.2 → 0.1.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile +4 -0
- data/Gemfile.lock +25 -0
- data/README.md +12 -1
- data/ext/ccsv_ext/ccsv_ext.c +1 -1
- data/ext/ccsv_ext/extconf.rb +4 -0
- data/lib/ccsv_ext/ccsv_ext.bundle +0 -0
- data/lib/ccsv_ext/version.rb +1 -1
- metadata +3 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 566d2ae7b29d7e632dc01e473dc2f649b2c05314c161af8f2d8dd8fefabc9e52
|
4
|
+
data.tar.gz: 1517c203aa92e404249dc94d309a2493c34bd51462b87f4c156c06bd04548557
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 0f45d6da5d0258805c52e6e002f6275d9253eea12114cc47a25ad5ad0c3aaa04babec703ff10b941bfe65f20f8cc1be1882e54ddbf1abe5d132c1feb3fbc5171
|
7
|
+
data.tar.gz: da0a99e535bbca0d6b1810429bd5291d1faa613a95cdbd5d27151aff4ec29b4de2194d2bc3f23765c40145938c2254a314566b90a49f08bcc64aecd0070d1e26
|
data/Gemfile
CHANGED
data/Gemfile.lock
ADDED
@@ -0,0 +1,25 @@
|
|
1
|
+
PATH
|
2
|
+
remote: .
|
3
|
+
specs:
|
4
|
+
ccsv_ext (0.1.2)
|
5
|
+
|
6
|
+
GEM
|
7
|
+
remote: https://rubygems.org/
|
8
|
+
specs:
|
9
|
+
minitest (5.12.2)
|
10
|
+
rake (10.5.0)
|
11
|
+
rake-compiler (1.0.8)
|
12
|
+
rake
|
13
|
+
|
14
|
+
PLATFORMS
|
15
|
+
ruby
|
16
|
+
|
17
|
+
DEPENDENCIES
|
18
|
+
bundler (~> 2.0)
|
19
|
+
ccsv_ext!
|
20
|
+
minitest (~> 5.0)
|
21
|
+
rake (~> 10.0)
|
22
|
+
rake-compiler (>= 1.0.0)
|
23
|
+
|
24
|
+
BUNDLED WITH
|
25
|
+
2.0.2
|
data/README.md
CHANGED
@@ -1,3 +1,5 @@
|
|
1
|
+
[![Build Status](https://travis-ci.com/portmare/ccsv_ext.svg?branch=master)](https://travis-ci.com/portmare/ccsv_ext)
|
2
|
+
|
1
3
|
# CcsvExt
|
2
4
|
|
3
5
|
Welcome to your new gem! In this directory, you'll find the files you need to be able to package up your Ruby library into a gem. Put your Ruby code in the file `lib/ccsv_ext`. To experiment with that code, run `bin/console` for an interactive prompt.
|
@@ -22,7 +24,16 @@ Or install it yourself as:
|
|
22
24
|
|
23
25
|
## Usage
|
24
26
|
|
25
|
-
|
27
|
+
```ruby
|
28
|
+
CcsvExt.parse_line('1;2;3;4;5', ';')
|
29
|
+
=> ["1", "2", "3", "4", "5"]
|
30
|
+
|
31
|
+
CcsvExt.parse_line('"1;2;3;4;5";6', ';')
|
32
|
+
=> ["1;2;3;4;5", "6"]
|
33
|
+
|
34
|
+
CcsvExt.parse_line('"1;2;3;4;5";6;"""7"""', ';')
|
35
|
+
=> ["1;2;3;4;5", "6", "\"7\""]
|
36
|
+
```
|
26
37
|
|
27
38
|
## Development
|
28
39
|
|
data/ext/ccsv_ext/ccsv_ext.c
CHANGED
@@ -39,7 +39,7 @@ static VALUE parse_line(VALUE self, VALUE str, VALUE delimiter) {
|
|
39
39
|
token[pos - 1] = 0;
|
40
40
|
rb_ary_push(ary, rb_enc_str_new(&token[0], strlen(&token[0]), rb_utf8_encoding()));
|
41
41
|
pos = 0;
|
42
|
-
memset(token, 0,
|
42
|
+
memset(token, 0, strlen(token));
|
43
43
|
}
|
44
44
|
if (line[i] == QUOTE && line[i + 1] != QUOTE) {
|
45
45
|
pos--;
|
data/ext/ccsv_ext/extconf.rb
CHANGED
Binary file
|
data/lib/ccsv_ext/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: ccsv_ext
|
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
|
- Sergey Golushko
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2019-
|
11
|
+
date: 2019-09-30 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -64,6 +64,7 @@ files:
|
|
64
64
|
- ".travis.yml"
|
65
65
|
- CODE_OF_CONDUCT.md
|
66
66
|
- Gemfile
|
67
|
+
- Gemfile.lock
|
67
68
|
- LICENSE.txt
|
68
69
|
- README.md
|
69
70
|
- Rakefile
|