honey_format 0.17.0 → 0.18.0
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
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: ab1d4f7975362d7a1e5a63dc5d2709a8859fa8bc2563a616c42dbe181285de28
|
4
|
+
data.tar.gz: e582e7495778b83d6f1776bbc3048103b3df55ba79d6e6c0383a591e85d768c1
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 97a9841215e292ce71e2288ee2d54b01a9befd9ad81fda41e8a0bcc3a34e0b2a045fd4a5b782ea97f6d77820a207e8f3a962a5d8f7c5282db0bff7e37a98c615
|
7
|
+
data.tar.gz: 00f215cfbee51d5b9f075b32a5e321754753c0f7292f985fccab51983bee6f084eef6409b2d753af37a2a18fcdc9ef71c348063fb0756b36de0122621934addd
|
data/CHANGELOG.md
CHANGED
@@ -1,5 +1,10 @@
|
|
1
1
|
# HEAD
|
2
2
|
|
3
|
+
|
4
|
+
* Require `set` class in `ConvertBoolean` - fixes crash when set is already required in environment
|
5
|
+
* Allow symbols to be passed to `HeaderColumnConverter`
|
6
|
+
* Replace `.` and `,` with `_` in header column converter
|
7
|
+
|
3
8
|
## v0.17.0
|
4
9
|
|
5
10
|
:warning: This release contains some backwards compatible changes.
|
@@ -21,7 +21,8 @@ module HoneyFormat
|
|
21
21
|
[/\} /, '}'], # replace "} " with "}"
|
22
22
|
[BRACKETS, '_'], # replace (, [, {, ), ] and } with "_"
|
23
23
|
[/ +/, '_'], # replace one or more spaces with "_"
|
24
|
-
[/-/, '_'], # replace "-" with "
|
24
|
+
[/-/, '_'], # replace "-" with "_"
|
25
|
+
[/\.|,/, '_'], # replace "." and "," with "_"
|
25
26
|
[/::/, '_'], # replace "::" with "_"
|
26
27
|
[%r{/}, '_'], # replace "/" with "_"
|
27
28
|
[SEPS, '_'], # replace separator chars with "_"
|
@@ -32,7 +33,7 @@ module HoneyFormat
|
|
32
33
|
|
33
34
|
# Returns converted value and mutates the argument.
|
34
35
|
# @return [Symbol] the cleaned header column.
|
35
|
-
# @param [String] column the string to be cleaned.
|
36
|
+
# @param [String, Symbol] column the string to be cleaned.
|
36
37
|
# @param [Integer] index the column index.
|
37
38
|
# @example Convert simple header
|
38
39
|
# HeaderColumnConverter.call(" User name ") #=> "user_name"
|
@@ -44,7 +45,7 @@ module HoneyFormat
|
|
44
45
|
return :"column#{index}"
|
45
46
|
end
|
46
47
|
|
47
|
-
column = column.dup
|
48
|
+
column = column.to_s.dup
|
48
49
|
column.strip!
|
49
50
|
column.downcase!
|
50
51
|
REPLACE_MAP.each do |data|
|
data/lib/honey_format/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: honey_format
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.18.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Jacob Burenstam
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2018-07-
|
11
|
+
date: 2018-07-31 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: benchmark-ips
|