csv 3.1.0 → 3.1.1

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: 9e3a871d4d1958c763228c4b8d702c3cb272017934a37927e87b6ef7a86959bc
4
- data.tar.gz: 39effdc25704e1e1f312c55d8461b3f5cce0eac7c2262ba21302783527004aae
3
+ metadata.gz: 9a4c5f1f8831a27754b3d84471e1d7f5813b516316d3c627f9ca341d469d9482
4
+ data.tar.gz: 378c9f6b09fd19bc144431023b49ef16b4b476e710b297874b3ad5f2c2f2ed95
5
5
  SHA512:
6
- metadata.gz: 83fa32fa7ceccb2a9287e3de846df483ae13088edbc5bb1dcaf9a27b74bbfb7da151334c85c8a146baa325cc4f39dbcc87c32f954ee0fbc41786816ab9a80716
7
- data.tar.gz: 2a054323b17fa11a6febecb0060613f5b5bc339e4014fd6d1dd95ebcbb88bb72a85c8a3201d06b02c7cbb5134852838676de7b15525e6a261e1f7d6a7927cfa4
6
+ metadata.gz: ccced857c713eb59805cbc39d4fff7598caacd2ad0d1b2e5bd5d9f9011ee45348453309aaf0f768cd9d5bb7074649dd103a5f7422551e0f87cb9c306f8bcac6d
7
+ data.tar.gz: 22d05da4348513414bee277ebb4739f66507278077a05dc60526362cb5c91ded284f24a4f1f01644935b525c6a6fcd728fad278a7e3d397d4ff724249663d550
data/NEWS.md CHANGED
@@ -1,5 +1,31 @@
1
1
  # News
2
2
 
3
+ ## 3.1.1 - 2019-04-26
4
+
5
+ ### Improvements
6
+
7
+ * Added documentation for `strip` option.
8
+ [GitHub#88][Patch by hayashiyoshino]
9
+
10
+ * Added documentation for `write_converters`, `write_nil_value` and
11
+ `write_empty_value` options.
12
+ [GitHub#87][Patch by Masafumi Koba]
13
+
14
+ * Added documentation for `quote_empty` option.
15
+ [GitHub#89][Patch by kawa\_tech]
16
+
17
+ ### Fixes
18
+
19
+ * Fixed a bug that `strip; true` removes a newline.
20
+
21
+ ### Thanks
22
+
23
+ * hayashiyoshino
24
+
25
+ * Masafumi Koba
26
+
27
+ * kawa\_tech
28
+
3
29
  ## 3.1.0 - 2019-04-17
4
30
 
5
31
  ### Fixes
data/lib/csv.rb CHANGED
@@ -884,11 +884,28 @@ class CSV
884
884
  # <b><tt>:empty_value</tt></b>:: When set an object, any values of a
885
885
  # blank string field is replaced by
886
886
  # the set object.
887
- # <b><tt>:quote_empty</tt></b>:: TODO
888
- # <b><tt>:write_converters</tt></b>:: TODO
889
- # <b><tt>:write_nil_value</tt></b>:: TODO
890
- # <b><tt>:write_empty_value</tt></b>:: TODO
891
- # <b><tt>:strip</tt></b>:: TODO
887
+ # <b><tt>:quote_empty</tt></b>:: When set to a +true+ value, CSV will
888
+ # quote empty values with double quotes.
889
+ # When +false+, CSV will emit an
890
+ # empty string for an empty field value.
891
+ # <b><tt>:write_converters</tt></b>:: Converts values on each line with the
892
+ # specified <tt>Proc</tt> object(s),
893
+ # which receive a <tt>String</tt> value
894
+ # and return a <tt>String</tt> or +nil+
895
+ # value.
896
+ # When an array is specified, each
897
+ # converter will be applied in order.
898
+ # <b><tt>:write_nil_value</tt></b>:: When a <tt>String</tt> value, +nil+
899
+ # value(s) on each line will be replaced
900
+ # with the specified value.
901
+ # <b><tt>:write_empty_value</tt></b>:: When a <tt>String</tt> or +nil+ value,
902
+ # empty value(s) on each line will be
903
+ # replaced with the specified value.
904
+ # <b><tt>:strip</tt></b>:: When set to a +true+ value, CSV will
905
+ # strip "\t\r\n\f\v" around the values.
906
+ # If you specify a string instead of
907
+ # +true+, CSV will strip string. The
908
+ # length of string must be 1.
892
909
  #
893
910
  # See CSV::DEFAULT_OPTIONS for the default settings.
894
911
  #
@@ -429,7 +429,7 @@ class CSV
429
429
  end
430
430
  @need_robust_parsing = true
431
431
  elsif @strip
432
- strip_values = " \t\r\n\f\v"
432
+ strip_values = " \t\f\v"
433
433
  @escaped_strip = strip_values.encode(@encoding)
434
434
  if @quote_character
435
435
  @strip_value = Regexp.new("[#{strip_values}]+".encode(@encoding))
@@ -2,5 +2,5 @@
2
2
 
3
3
  class CSV
4
4
  # The version of the installed library.
5
- VERSION = "3.1.0"
5
+ VERSION = "3.1.1"
6
6
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: csv
3
3
  version: !ruby/object:Gem::Version
4
- version: 3.1.0
4
+ version: 3.1.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - James Edward Gray II
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2019-04-17 00:00:00.000000000 Z
12
+ date: 2019-04-25 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: bundler
@@ -111,7 +111,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
111
111
  version: '0'
112
112
  requirements: []
113
113
  rubyforge_project:
114
- rubygems_version: 2.7.6
114
+ rubygems_version: 2.7.6.2
115
115
  signing_key:
116
116
  specification_version: 4
117
117
  summary: CSV Reading and Writing