ccsv_ext 0.1.2 → 0.1.3

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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: b6ecf36f3972b479d1accbac32aa5b7601e09189de26a61aaa49a8573dc5cbd9
4
- data.tar.gz: e100dee658a5894f0fe80b48cdc969f5cdcb824d4d04b21354ad2141e87146e4
3
+ metadata.gz: 566d2ae7b29d7e632dc01e473dc2f649b2c05314c161af8f2d8dd8fefabc9e52
4
+ data.tar.gz: 1517c203aa92e404249dc94d309a2493c34bd51462b87f4c156c06bd04548557
5
5
  SHA512:
6
- metadata.gz: fc5511efb546720d71ad0a0702ef46b4a32a321073ab4d03794dcce6eb47e4f935578d03fd5404a065cf121664cdbe1e36b77ec3567159a53596fa9bd7a30fae
7
- data.tar.gz: 2a50a21b1c7a45ad886188f548e11fedec8e6e00e225f3cf6d6e643c6242d82db82d4a440aba02bae32876c7b0af0e3e509f40541759aeb78f83a90907bc73f9
6
+ metadata.gz: 0f45d6da5d0258805c52e6e002f6275d9253eea12114cc47a25ad5ad0c3aaa04babec703ff10b941bfe65f20f8cc1be1882e54ddbf1abe5d132c1feb3fbc5171
7
+ data.tar.gz: da0a99e535bbca0d6b1810429bd5291d1faa613a95cdbd5d27151aff4ec29b4de2194d2bc3f23765c40145938c2254a314566b90a49f08bcc64aecd0070d1e26
data/Gemfile CHANGED
@@ -2,3 +2,7 @@ source "https://rubygems.org"
2
2
 
3
3
  # Specify your gem's dependencies in ccsv_ext.gemspec
4
4
  gemspec
5
+
6
+ group :test do
7
+ gem 'rake-compiler', '>= 1.0.0'
8
+ end
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
- TODO: Write usage instructions here
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
 
@@ -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, sizeof(token));
42
+ memset(token, 0, strlen(token));
43
43
  }
44
44
  if (line[i] == QUOTE && line[i + 1] != QUOTE) {
45
45
  pos--;
@@ -1,3 +1,7 @@
1
1
  require 'mkmf'
2
+
3
+ abort "missing malloc()" unless have_func "malloc"
4
+ abort "missing free()" unless have_func "free"
5
+
2
6
  create_header
3
7
  create_makefile('ccsv_ext/ccsv_ext')
Binary file
@@ -1,3 +1,3 @@
1
1
  class CcsvExt
2
- VERSION = "0.1.2"
2
+ VERSION = "0.1.3"
3
3
  end
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.2
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-05-21 00:00:00.000000000 Z
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