jsontableschema 0.2.0 → 0.2.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.
checksums.yaml CHANGED
@@ -1,15 +1,7 @@
1
1
  ---
2
- !binary "U0hBMQ==":
3
- metadata.gz: !binary |-
4
- OWU5YWEyM2JmOTY3ZTY0ZGJmN2I5Mjc1ODQzN2M4ZjA2YTZhOTcxNw==
5
- data.tar.gz: !binary |-
6
- NWIyNWRjNGQzMjU0NmM2MjkzNmMwZGE0ZDJhMzg1YjQxNWMyYTUzOQ==
2
+ SHA1:
3
+ metadata.gz: a9cfce31eb8a8c94aed10dc962794fc85859849e
4
+ data.tar.gz: 08eb6c6fb11b423b221d6c561d4137971d36aa7f
7
5
  SHA512:
8
- metadata.gz: !binary |-
9
- NDMyNzcwNzQ0ZjRiYjdhZDgzMjczNzYxMDY0ZWQ2OTI5MGEyZGFlMmYxMTI5
10
- ZTEzMjE5MGQzMGE0NWFhY2E5OWU5NTJmYWRjMmI5MTExMjIxNTRlNzM5MGE5
11
- NDcxMjE1MDhlZmI3YTgwMGNiMGNkZTc3N2FmZmUyMWY3M2VhZDM=
12
- data.tar.gz: !binary |-
13
- OWI5ZWY5ZDNmZDQ2MzY3N2RmNjVkMTQyNTZiODI4MDg1YTkwOTBhNzc1OWNj
14
- MDZiYmU2YjU0NGQ4OTE2YTNiMTFiZjFjN2NkODNlMThiZDM3NGE0OTU5MTA0
15
- YTA2ZmJkNmM2MDlkYmFmNTIyNTY0NmE5Y2E1NGFmN2ZmMDEwZTg=
6
+ metadata.gz: d245744f24281f01d450c920471ebf61840117a145c2d26ec4609053b66db1158b09197497f73f640bed2aa2a1544bce71d0a731f034fa21eab3840585448bbf
7
+ data.tar.gz: 2dc374fc5e6b45a35572a7e0911549885691a593d5ce603a44ec88c3bee0f77e00a8af6dee3c74ef21131743f5ff01b04e303711502cbc86d63bc0a158bf1ff3
data/.travis.yml CHANGED
@@ -2,12 +2,12 @@
2
2
  language: ruby
3
3
  rvm:
4
4
  - 2.3.1
5
+ - 2.4.1
5
6
  before_install: gem install bundler -v 1.11.2
6
7
  deploy:
7
8
  provider: rubygems
8
9
  api_key:
9
10
  secure: wH1kuoIanHWL0ohGKyFtcXDusgR5T5qD2QnaQS9vjIG6a//ClpYpDZ3iSxHG9CkkrbaKJDVhcGsKJOECcQRnLQ2/g9PC84c4tMzfgp3q5w7FdWfxe86diS3sXN4gw6+Xb+KhueOhO6RaghG1BJPBd2kj2G8uw6f/KT+8qOMaS+IRpuW8FkO7x8CZvUSLbzai21kYaneDglb5j/AY/sF2s+jGO/3VPmMjaJCJ7pU84Wqby6PixPMiP2EKVyhx1fD8m8CcPTAfPhiwxq1AkxxFJIkty730ECzwDVfrF9Ph5dcoR57jPliCSctNVREele2Q4ItBxi5Da5U3PiqHYu6AZR4pARoPMaO8m/ZwfvRftzwNDd7jnnkxLgWRRKDofU6wuxB+Jg8V7CbThTXyPFgn8RXYsL4tshOCCmicT8fbKO/f+S21gSQtQI1fZc6dc0WZqRCCY50NLnRH0eAJzXKfQxQ7iuKsF/nfGmZiAmVCZRKWVlGjQ+v5q5erXr+nS9prWotg/CrWiGhPkhHuEj8izBXxclzAuQHGE0H+IRwZFT/7Ym1KUKKhMx5mFRpf4EqLQ+mzIe8+4Ogn8YQclVP/3j14FtGCFiRegqy8SSfsKxTunF6i76Nbdj8v5Pkb0NZzvRjaBkbhvYKIAmLK1GaYC0lQS7gaqXqCRS64XjvAOGQ=
10
11
  gem: jsontableschema
11
- true:
12
+ on:
12
13
  tags: true
13
- repo: theodi/jsontableschema.rb
data/CHANGELOG.md CHANGED
@@ -1,5 +1,19 @@
1
1
  # Change Log
2
2
 
3
+ ## [v0.2.0](https://github.com/theodi/jsontableschema.rb/tree/v0.2.0) (2016-10-12)
4
+ [Full Changelog](https://github.com/theodi/jsontableschema.rb/compare/v0.1.0...v0.2.0)
5
+
6
+ **Closed issues:**
7
+
8
+ - Ability to stream data? [\#10](https://github.com/theodi/jsontableschema.rb/issues/10)
9
+ - Replace the types public API with the Field public API [\#9](https://github.com/theodi/jsontableschema.rb/issues/9)
10
+
11
+ **Merged pull requests:**
12
+
13
+ - Make sure streaming works [\#13](https://github.com/theodi/jsontableschema.rb/pull/13) ([pezholio](https://github.com/pezholio))
14
+ - Stream CSV [\#12](https://github.com/theodi/jsontableschema.rb/pull/12) ([pezholio](https://github.com/pezholio))
15
+ - Add `Field` class [\#11](https://github.com/theodi/jsontableschema.rb/pull/11) ([pezholio](https://github.com/pezholio))
16
+
3
17
  ## [v0.1.0](https://github.com/theodi/jsontableschema.rb/tree/v0.1.0) (2016-09-19)
4
18
  **Merged pull requests:**
5
19
 
data/README.md CHANGED
@@ -1,12 +1,11 @@
1
- [![Build Status](http://img.shields.io/travis/theodi/jsontableschema.rb.svg?style=flat-square)](https://travis-ci.org/theodi/jsontableschema.rb)
2
- [![Dependency Status](http://img.shields.io/gemnasium/theodi/jsontableschema.rb.svg?style=flat-square)](https://gemnasium.com/theodi/jsontableschema.rb)
3
- [![Coverage Status](https://coveralls.io/repos/github/theodi/jsontableschema.rb/badge.svg)](https://coveralls.io/github/theodi/jsontableschema.rb)
4
- [![Code Climate](http://img.shields.io/codeclimate/github/theodi/jsontableschema.rb.svg?style=flat-square)](https://codeclimate.com/github/theodi/jsontableschema.rb)
5
- [![Gem Version](http://img.shields.io/gem/v/jsontableschema.svg?style=flat-square)](https://rubygems.org/gems/jsontableschema)
6
- [![License](http://img.shields.io/:license-mit-blue.svg?style=flat-square)](http://theodi.mit-license.org)
7
-
8
1
  # JSON Table Schema
9
2
 
3
+ [![Travis](https://travis-ci.org/frictionlessdata/jsontableschema-rb.svg?branch=master)](https://travis-ci.org/frictionlessdata/jsontableschema-rb)
4
+ [![Coveralls](http://img.shields.io/coveralls/frictionlessdata/jsontableschema-rb.svg?branch=master)](https://coveralls.io/r/frictionlessdata/jsontableschema-rb?branch=master)
5
+ [![Gem Version](http://img.shields.io/gem/v/jsontableschema.svg)](https://rubygems.org/gems/jsontableschema)
6
+ [![SemVer](https://img.shields.io/badge/versions-SemVer-brightgreen.svg)](http://semver.org/)
7
+ [![Gitter](https://img.shields.io/gitter/room/frictionlessdata/chat.svg)](https://gitter.im/frictionlessdata/chat)
8
+
10
9
  A utility library for working with [JSON Table Schema](http://dataprotocols.org/json-table-schema/) in Ruby.
11
10
 
12
11
  ## Installation
@@ -22,7 +22,7 @@ Gem::Specification.new do |spec|
22
22
  spec.add_development_dependency "rake", "~> 10.0"
23
23
  spec.add_development_dependency "rspec", "~> 3.0"
24
24
  spec.add_development_dependency "pry", "~> 0.10.0"
25
- spec.add_development_dependency "webmock", "~> 2.1.0"
25
+ spec.add_development_dependency "webmock", "~> 2.3.0"
26
26
  spec.add_development_dependency "coveralls", "~> 0.8.13"
27
27
 
28
28
  spec.add_dependency "json-schema", "~> 2.6.0"
@@ -67,13 +67,15 @@ module JsonTableSchema
67
67
  guessed_type = 'string'
68
68
  guessed_format = 'default'
69
69
 
70
- available_types.reverse_each do |type|
71
- klass = get_class_for_type(type)
72
- converter = Kernel.const_get(klass).new(@schema['fields'][index])
73
- if converter.test(col) === true
74
- guessed_type = type
75
- guessed_format = guess_format(converter, col)
76
- break
70
+ unless col.nil? || col == ""
71
+ available_types.reverse_each do |type|
72
+ klass = get_class_for_type(type)
73
+ converter = Kernel.const_get(klass).new(@schema['fields'][index])
74
+ if converter.test(col) === true
75
+ guessed_type = type
76
+ guessed_format = guess_format(converter, col)
77
+ break
78
+ end
77
79
  end
78
80
  end
79
81
 
@@ -1,3 +1,3 @@
1
1
  module JsonTableSchema
2
- VERSION = "0.2.0"
2
+ VERSION = "0.2.1"
3
3
  end
metadata CHANGED
@@ -1,153 +1,153 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: jsontableschema
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
  - pezholio
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2016-10-12 00:00:00.000000000 Z
11
+ date: 2017-06-19 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
15
15
  requirement: !ruby/object:Gem::Requirement
16
16
  requirements:
17
- - - ~>
17
+ - - "~>"
18
18
  - !ruby/object:Gem::Version
19
19
  version: '1.11'
20
20
  type: :development
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
- - - ~>
24
+ - - "~>"
25
25
  - !ruby/object:Gem::Version
26
26
  version: '1.11'
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: rake
29
29
  requirement: !ruby/object:Gem::Requirement
30
30
  requirements:
31
- - - ~>
31
+ - - "~>"
32
32
  - !ruby/object:Gem::Version
33
33
  version: '10.0'
34
34
  type: :development
35
35
  prerelease: false
36
36
  version_requirements: !ruby/object:Gem::Requirement
37
37
  requirements:
38
- - - ~>
38
+ - - "~>"
39
39
  - !ruby/object:Gem::Version
40
40
  version: '10.0'
41
41
  - !ruby/object:Gem::Dependency
42
42
  name: rspec
43
43
  requirement: !ruby/object:Gem::Requirement
44
44
  requirements:
45
- - - ~>
45
+ - - "~>"
46
46
  - !ruby/object:Gem::Version
47
47
  version: '3.0'
48
48
  type: :development
49
49
  prerelease: false
50
50
  version_requirements: !ruby/object:Gem::Requirement
51
51
  requirements:
52
- - - ~>
52
+ - - "~>"
53
53
  - !ruby/object:Gem::Version
54
54
  version: '3.0'
55
55
  - !ruby/object:Gem::Dependency
56
56
  name: pry
57
57
  requirement: !ruby/object:Gem::Requirement
58
58
  requirements:
59
- - - ~>
59
+ - - "~>"
60
60
  - !ruby/object:Gem::Version
61
61
  version: 0.10.0
62
62
  type: :development
63
63
  prerelease: false
64
64
  version_requirements: !ruby/object:Gem::Requirement
65
65
  requirements:
66
- - - ~>
66
+ - - "~>"
67
67
  - !ruby/object:Gem::Version
68
68
  version: 0.10.0
69
69
  - !ruby/object:Gem::Dependency
70
70
  name: webmock
71
71
  requirement: !ruby/object:Gem::Requirement
72
72
  requirements:
73
- - - ~>
73
+ - - "~>"
74
74
  - !ruby/object:Gem::Version
75
- version: 2.1.0
75
+ version: 2.3.0
76
76
  type: :development
77
77
  prerelease: false
78
78
  version_requirements: !ruby/object:Gem::Requirement
79
79
  requirements:
80
- - - ~>
80
+ - - "~>"
81
81
  - !ruby/object:Gem::Version
82
- version: 2.1.0
82
+ version: 2.3.0
83
83
  - !ruby/object:Gem::Dependency
84
84
  name: coveralls
85
85
  requirement: !ruby/object:Gem::Requirement
86
86
  requirements:
87
- - - ~>
87
+ - - "~>"
88
88
  - !ruby/object:Gem::Version
89
89
  version: 0.8.13
90
90
  type: :development
91
91
  prerelease: false
92
92
  version_requirements: !ruby/object:Gem::Requirement
93
93
  requirements:
94
- - - ~>
94
+ - - "~>"
95
95
  - !ruby/object:Gem::Version
96
96
  version: 0.8.13
97
97
  - !ruby/object:Gem::Dependency
98
98
  name: json-schema
99
99
  requirement: !ruby/object:Gem::Requirement
100
100
  requirements:
101
- - - ~>
101
+ - - "~>"
102
102
  - !ruby/object:Gem::Version
103
103
  version: 2.6.0
104
104
  type: :runtime
105
105
  prerelease: false
106
106
  version_requirements: !ruby/object:Gem::Requirement
107
107
  requirements:
108
- - - ~>
108
+ - - "~>"
109
109
  - !ruby/object:Gem::Version
110
110
  version: 2.6.0
111
111
  - !ruby/object:Gem::Dependency
112
112
  name: uuid
113
113
  requirement: !ruby/object:Gem::Requirement
114
114
  requirements:
115
- - - ~>
115
+ - - "~>"
116
116
  - !ruby/object:Gem::Version
117
117
  version: 2.3.8
118
118
  type: :runtime
119
119
  prerelease: false
120
120
  version_requirements: !ruby/object:Gem::Requirement
121
121
  requirements:
122
- - - ~>
122
+ - - "~>"
123
123
  - !ruby/object:Gem::Version
124
124
  version: 2.3.8
125
125
  - !ruby/object:Gem::Dependency
126
126
  name: currencies
127
127
  requirement: !ruby/object:Gem::Requirement
128
128
  requirements:
129
- - - ~>
129
+ - - "~>"
130
130
  - !ruby/object:Gem::Version
131
131
  version: 0.4.2
132
132
  type: :runtime
133
133
  prerelease: false
134
134
  version_requirements: !ruby/object:Gem::Requirement
135
135
  requirements:
136
- - - ~>
136
+ - - "~>"
137
137
  - !ruby/object:Gem::Version
138
138
  version: 0.4.2
139
139
  - !ruby/object:Gem::Dependency
140
140
  name: tod
141
141
  requirement: !ruby/object:Gem::Requirement
142
142
  requirements:
143
- - - ~>
143
+ - - "~>"
144
144
  - !ruby/object:Gem::Version
145
145
  version: 2.1.0
146
146
  type: :runtime
147
147
  prerelease: false
148
148
  version_requirements: !ruby/object:Gem::Requirement
149
149
  requirements:
150
- - - ~>
150
+ - - "~>"
151
151
  - !ruby/object:Gem::Version
152
152
  version: 2.1.0
153
153
  description:
@@ -157,9 +157,9 @@ executables: []
157
157
  extensions: []
158
158
  extra_rdoc_files: []
159
159
  files:
160
- - .gitignore
161
- - .rspec
162
- - .travis.yml
160
+ - ".gitignore"
161
+ - ".rspec"
162
+ - ".travis.yml"
163
163
  - CHANGELOG.md
164
164
  - CODE_OF_CONDUCT.md
165
165
  - Gemfile
@@ -214,12 +214,12 @@ require_paths:
214
214
  - lib
215
215
  required_ruby_version: !ruby/object:Gem::Requirement
216
216
  requirements:
217
- - - ! '>='
217
+ - - ">="
218
218
  - !ruby/object:Gem::Version
219
219
  version: '0'
220
220
  required_rubygems_version: !ruby/object:Gem::Requirement
221
221
  requirements:
222
- - - ! '>='
222
+ - - ">="
223
223
  - !ruby/object:Gem::Version
224
224
  version: '0'
225
225
  requirements: []