csv2hash 0.7.5 → 0.7.6

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
  SHA1:
3
- metadata.gz: 98a1f20cad762675329d3eeb1a4c916200dd3b66
4
- data.tar.gz: e4f8835e3204827e081fe07a99ad5c98bfdc6e93
3
+ metadata.gz: 8f858ab2434cafd62ee63820a15ee7ae6b371865
4
+ data.tar.gz: 908cdc6d2de35b99eb8339e715c5b0adc9e121c1
5
5
  SHA512:
6
- metadata.gz: ba40bdb3783b76f10791df8e6de5f20461097ef966b4e4eb7a73dab030b6265e32125e0ed502de97080dd8be98f4714e214d7717f463b411f7730b92dc03b9a0
7
- data.tar.gz: 7c9b7c83c2982fa6fbd73ba8d4e56f6386f7b23ffb1216a90e9fae64c6947a38ba2cc3639c303023b938f5b019623c89c58bd680560d048937b7598eb6549459
6
+ metadata.gz: c2b5cb6d2967d2cdc8bb72b416404154272ed326f4240c36dd4ac36b556d7ba2feb7542cb6da2b800ae0b8b0d31825aaeae526504588db11c46a6eb1cf059dbd
7
+ data.tar.gz: ea9f8f336c1f6c5d111fef3728e18f4370cee7ea58075bd66e31c029f4630aeb9b072e3b4d3e18fd52a34b13dbcb00213bb2abcdddf913e70acdbc0aef80dfd4
data/CHANGELOG.md CHANGED
@@ -1,3 +1,11 @@
1
+ ### VERSION 0.7.6
2
+
3
+ * bug fix
4
+ * avoid verification of field blabk and allow to do with Extra Validator
5
+
6
+ * [fullchanges](https://github.com/FinalCAD/csv2hash/pull/26)
7
+ * [Author Joel AZEMAR](https://github.com/joel)
8
+
1
9
  ### VERSION 0.7.5
2
10
 
3
11
  Add extra feature on Autodiscover Regex field.
data/Gemfile.lock CHANGED
@@ -1,81 +1,101 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- csv2hash (0.7.5)
4
+ csv2hash (0.7.6)
5
5
  activesupport (~> 4.1)
6
6
 
7
7
  GEM
8
8
  remote: http://rubygems.org/
9
9
  specs:
10
- actionpack (4.1.8)
11
- actionview (= 4.1.8)
12
- activesupport (= 4.1.8)
13
- rack (~> 1.5.2)
10
+ actionpack (4.2.0)
11
+ actionview (= 4.2.0)
12
+ activesupport (= 4.2.0)
13
+ rack (~> 1.6.0)
14
14
  rack-test (~> 0.6.2)
15
- actionview (4.1.8)
16
- activesupport (= 4.1.8)
15
+ rails-dom-testing (~> 1.0, >= 1.0.5)
16
+ rails-html-sanitizer (~> 1.0, >= 1.0.1)
17
+ actionview (4.2.0)
18
+ activesupport (= 4.2.0)
17
19
  builder (~> 3.1)
18
20
  erubis (~> 2.7.0)
19
- activesupport (4.1.8)
20
- i18n (~> 0.6, >= 0.6.9)
21
+ rails-dom-testing (~> 1.0, >= 1.0.5)
22
+ rails-html-sanitizer (~> 1.0, >= 1.0.1)
23
+ activesupport (4.2.0)
24
+ i18n (~> 0.7)
21
25
  json (~> 1.7, >= 1.7.7)
22
26
  minitest (~> 5.1)
23
- thread_safe (~> 0.1)
27
+ thread_safe (~> 0.3, >= 0.3.4)
24
28
  tzinfo (~> 1.1)
25
29
  builder (3.2.2)
26
30
  coderay (1.1.0)
27
- coveralls (0.7.2)
28
- multi_json (~> 1.3)
29
- rest-client (= 1.6.7)
30
- simplecov (>= 0.7)
31
- term-ansicolor (= 1.2.2)
32
- thor (= 0.18.1)
31
+ coveralls (0.7.9)
32
+ multi_json (~> 1.10)
33
+ rest-client (~> 1.7)
34
+ simplecov (~> 0.9.1)
35
+ term-ansicolor (~> 1.3)
36
+ thor (~> 0.19.1)
33
37
  diff-lcs (1.2.5)
34
38
  docile (1.1.5)
35
39
  erubis (2.7.0)
36
- generator_spec (0.9.2)
40
+ generator_spec (0.9.3)
37
41
  activesupport (>= 3.0.0)
38
42
  railties (>= 3.0.0)
39
- i18n (0.6.11)
40
- inch (0.5.7)
43
+ i18n (0.7.0)
44
+ inch (0.5.10)
41
45
  pry
42
46
  sparkr (>= 0.2.0)
43
47
  term-ansicolor
44
48
  yard (~> 0.8.7.5)
45
49
  its (0.2.0)
46
50
  rspec-core
47
- json (1.8.1)
51
+ json (1.8.2)
52
+ loofah (2.0.1)
53
+ nokogiri (>= 1.5.9)
48
54
  method_source (0.8.2)
49
55
  mime-types (2.4.3)
50
- minitest (5.4.3)
56
+ mini_portile (0.6.2)
57
+ minitest (5.5.1)
51
58
  multi_json (1.10.1)
59
+ netrc (0.10.2)
60
+ nokogiri (1.6.6.2)
61
+ mini_portile (~> 0.6.0)
52
62
  pry (0.10.1)
53
63
  coderay (~> 1.1.0)
54
64
  method_source (~> 0.8.1)
55
65
  slop (~> 3.4)
56
- rack (1.5.2)
57
- rack-test (0.6.2)
66
+ rack (1.6.0)
67
+ rack-test (0.6.3)
58
68
  rack (>= 1.0)
59
- railties (4.1.8)
60
- actionpack (= 4.1.8)
61
- activesupport (= 4.1.8)
69
+ rails-deprecated_sanitizer (1.0.3)
70
+ activesupport (>= 4.2.0.alpha)
71
+ rails-dom-testing (1.0.5)
72
+ activesupport (>= 4.2.0.beta, < 5.0)
73
+ nokogiri (~> 1.6.0)
74
+ rails-deprecated_sanitizer (>= 1.0.1)
75
+ rails-html-sanitizer (1.0.1)
76
+ loofah (~> 2.0)
77
+ railties (4.2.0)
78
+ actionpack (= 4.2.0)
79
+ activesupport (= 4.2.0)
62
80
  rake (>= 0.8.7)
63
81
  thor (>= 0.18.1, < 2.0)
64
- rake (10.4.0)
65
- rest-client (1.6.7)
66
- mime-types (>= 1.16)
67
- rspec (3.1.0)
68
- rspec-core (~> 3.1.0)
69
- rspec-expectations (~> 3.1.0)
70
- rspec-mocks (~> 3.1.0)
71
- rspec-core (3.1.7)
72
- rspec-support (~> 3.1.0)
73
- rspec-expectations (3.1.2)
82
+ rake (10.4.2)
83
+ rest-client (1.7.2)
84
+ mime-types (>= 1.16, < 3.0)
85
+ netrc (~> 0.7)
86
+ rspec (3.2.0)
87
+ rspec-core (~> 3.2.0)
88
+ rspec-expectations (~> 3.2.0)
89
+ rspec-mocks (~> 3.2.0)
90
+ rspec-core (3.2.0)
91
+ rspec-support (~> 3.2.0)
92
+ rspec-expectations (3.2.0)
93
+ diff-lcs (>= 1.2.0, < 2.0)
94
+ rspec-support (~> 3.2.0)
95
+ rspec-mocks (3.2.0)
74
96
  diff-lcs (>= 1.2.0, < 2.0)
75
- rspec-support (~> 3.1.0)
76
- rspec-mocks (3.1.3)
77
- rspec-support (~> 3.1.0)
78
- rspec-support (3.1.2)
97
+ rspec-support (~> 3.2.0)
98
+ rspec-support (3.2.1)
79
99
  simplecov (0.9.1)
80
100
  docile (~> 1.1.0)
81
101
  multi_json (~> 1.0)
@@ -83,11 +103,11 @@ GEM
83
103
  simplecov-html (0.8.0)
84
104
  slop (3.6.0)
85
105
  sparkr (0.4.1)
86
- term-ansicolor (1.2.2)
87
- tins (~> 0.8)
88
- thor (0.18.1)
106
+ term-ansicolor (1.3.0)
107
+ tins (~> 1.0)
108
+ thor (0.19.1)
89
109
  thread_safe (0.3.4)
90
- tins (0.13.2)
110
+ tins (1.3.4)
91
111
  tomparse (0.4.2)
92
112
  tzinfo (1.2.2)
93
113
  thread_safe (~> 0.1)
@@ -1,4 +1,4 @@
1
- require 'active_support/core_ext'
1
+ require 'active_support'
2
2
 
3
3
  require_relative 'structure_validator/deprecation'
4
4
 
@@ -54,9 +54,10 @@ module Csv2hash
54
54
  end
55
55
 
56
56
  def verify_extra_validator! cell, value
57
+ return :no_extra_validation_with_empty_value unless value.present?
57
58
  raise unless cell.rules.fetch(:extra_validator).valid? cell.rules, value
58
59
  end
59
-
60
+
60
61
  def verify_blank! cell, value
61
62
  raise unless value.present? || cell.rules.fetch(:allow_blank)
62
63
  end
@@ -77,7 +78,7 @@ module Csv2hash
77
78
 
78
79
  def valid_values_include? values, value, case_sensitive
79
80
  case_sensitive ? values.include?(value) : values.any?{ |v| v.casecmp(value)==0 }
80
- end
81
+ end
81
82
 
82
83
  def find_or_remove_dynamic_fields_on_mapping!
83
84
  cells = definition.cells.dup
@@ -1,3 +1,3 @@
1
1
  module Csv2hash
2
- VERSION = '0.7.5'
2
+ VERSION = '0.7.6'
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: csv2hash
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.7.5
4
+ version: 0.7.6
5
5
  platform: ruby
6
6
  authors:
7
7
  - Joel AZEMAR
@@ -14,70 +14,70 @@ dependencies:
14
14
  name: activesupport
15
15
  requirement: !ruby/object:Gem::Requirement
16
16
  requirements:
17
- - - ~>
17
+ - - "~>"
18
18
  - !ruby/object:Gem::Version
19
19
  version: '4.1'
20
20
  type: :runtime
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: '4.1'
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: bundler
29
29
  requirement: !ruby/object:Gem::Requirement
30
30
  requirements:
31
- - - '>'
31
+ - - ">"
32
32
  - !ruby/object:Gem::Version
33
33
  version: '1.3'
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: '1.3'
41
41
  - !ruby/object:Gem::Dependency
42
42
  name: rake
43
43
  requirement: !ruby/object:Gem::Requirement
44
44
  requirements:
45
- - - ~>
45
+ - - "~>"
46
46
  - !ruby/object:Gem::Version
47
47
  version: '10.3'
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: '10.3'
55
55
  - !ruby/object:Gem::Dependency
56
56
  name: rspec
57
57
  requirement: !ruby/object:Gem::Requirement
58
58
  requirements:
59
- - - ~>
59
+ - - "~>"
60
60
  - !ruby/object:Gem::Version
61
61
  version: '3.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: '3.0'
69
69
  - !ruby/object:Gem::Dependency
70
70
  name: its
71
71
  requirement: !ruby/object:Gem::Requirement
72
72
  requirements:
73
- - - ~>
73
+ - - "~>"
74
74
  - !ruby/object:Gem::Version
75
75
  version: '0.2'
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
82
  version: '0.2'
83
83
  description: DSL to map a CSV to a Ruby Hash
@@ -89,14 +89,14 @@ executables:
89
89
  extensions: []
90
90
  extra_rdoc_files: []
91
91
  files:
92
- - .coveralls.yml
93
- - .gitignore
94
- - .rspec
95
- - .travis.yml
96
- - .yardoc/checksums
97
- - .yardoc/object_types
98
- - .yardoc/objects/root.dat
99
- - .yardoc/proxy_types
92
+ - ".coveralls.yml"
93
+ - ".gitignore"
94
+ - ".rspec"
95
+ - ".travis.yml"
96
+ - ".yardoc/checksums"
97
+ - ".yardoc/object_types"
98
+ - ".yardoc/objects/root.dat"
99
+ - ".yardoc/proxy_types"
100
100
  - CHANGELOG.md
101
101
  - Gemfile
102
102
  - Gemfile.lock
@@ -172,17 +172,17 @@ require_paths:
172
172
  - lib
173
173
  required_ruby_version: !ruby/object:Gem::Requirement
174
174
  requirements:
175
- - - '>='
175
+ - - ">="
176
176
  - !ruby/object:Gem::Version
177
177
  version: '0'
178
178
  required_rubygems_version: !ruby/object:Gem::Requirement
179
179
  requirements:
180
- - - '>='
180
+ - - ">="
181
181
  - !ruby/object:Gem::Version
182
182
  version: '0'
183
183
  requirements: []
184
184
  rubyforge_project:
185
- rubygems_version: 2.0.14
185
+ rubygems_version: 2.4.1
186
186
  signing_key:
187
187
  specification_version: 4
188
188
  summary: Mapping a CSV to a Ruby Hash