write_xlsx 1.15.0 → 1.15.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,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: e475548e954baadcd73499953c8a6a01a3e668ec2e023d3a98f382e633b0b460
4
- data.tar.gz: 57f95edde86df1b2a6d9d8bae225f0ad085a3d3f1f93e093c56d8f0be21897d4
3
+ metadata.gz: 600958adb2ae7054350d1fee678fb6080558102bc22a5779aaf20032454804a7
4
+ data.tar.gz: 0a71cff8a4b27df764cc9586034a780b1669448bf235e1f0d03cce83f6be6b38
5
5
  SHA512:
6
- metadata.gz: 4565dea924eb24aeae0297e3bc8c418815618ffaa24c4f92b8ecb642bf5b18d1dc47731caf944092caeb9974c6f659a919a744b46a5b674933816d8f496ec096
7
- data.tar.gz: a5b5094db8ce823dfb0fa773bf9f5e0c69a6fcc767cbbf2b1817ab5bc4735db9b02ebe5ab0d6c629cf3dc51cc29a8cd92735c4a03e595744974892334bf89f1d
6
+ metadata.gz: 18af7d5d3f690a685b2f7ffa34edd8bcaaff9254625db12f98489dbe25ca8516639d1f6e55228352e8e82df6ad721a3d32413f141383f19978cc302577476799
7
+ data.tar.gz: 5471a17dec3f7bdae1d2876581616757819c06376759bd84bf3089c68ef14654247ed58d03f4b462021a285cc7cf76599b8b170d72cd0b67024e355d1d160f58
data/.rubocop.yml CHANGED
@@ -45,8 +45,8 @@ Layout/MultilineMethodCallIndentation:
45
45
  Lint/DuplicateBranch:
46
46
  IgnoreLiteralBranches: true
47
47
  Exclude:
48
- - 'lib/write_xlsx/worksheet.rb'
49
- - 'lib/write_xlsx/worksheet/data_writing.rb'
48
+ - "lib/write_xlsx/worksheet.rb"
49
+ - "lib/write_xlsx/worksheet/data_writing.rb"
50
50
 
51
51
  Lint/DuplicateMethods:
52
52
  Enabled: false
@@ -57,9 +57,12 @@ Lint/FloatComparison:
57
57
  Lint/UnderscorePrefixedVariableName:
58
58
  Enabled: false
59
59
 
60
+ Lint/UselessNumericOperation:
61
+ Enabled: false
62
+
60
63
  Lint/UselessSetterCall:
61
64
  Exclude:
62
- - 'lib/write_xlsx/worksheet.rb'
65
+ - "lib/write_xlsx/worksheet.rb"
63
66
 
64
67
  Metrics/AbcSize:
65
68
  Max: 350
@@ -112,7 +115,7 @@ Style/AccessorGrouping:
112
115
 
113
116
  Style/ConditionalAssignment:
114
117
  Exclude:
115
- - 'lib/write_xlsx/worksheet.rb'
118
+ - "lib/write_xlsx/worksheet.rb"
116
119
 
117
120
  Style/Encoding:
118
121
  Enabled: false
@@ -136,6 +139,9 @@ Style/IfUnlessModifier:
136
139
  Style/NumericLiterals:
137
140
  MinDigits: 10
138
141
 
142
+ Style/OneClassPerFile:
143
+ Enabled: false
144
+
139
145
  Style/OptionalBooleanParameter:
140
146
  Enabled: false
141
147
 
@@ -161,5 +167,5 @@ Style/StringLiteralsInInterpolation:
161
167
  Enabled: true
162
168
  EnforcedStyle: double_quotes
163
169
 
164
- Styles/TrivialAccessors:
170
+ Style/TrivialAccessors:
165
171
  Enabled: false
data/Changes CHANGED
@@ -1,5 +1,8 @@
1
1
  Change history of write_xlsx rubygem.
2
2
 
3
+ 2026-09-16 v1.15.1
4
+ fix multiline string formula misdetection
5
+
3
6
  2026-03-20 v1.15.0
4
7
  Add the option to position custom data labels in the same way that the
5
8
  data labels can be positioned for the entire series.
@@ -1,3 +1,3 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- WriteXLSX_VERSION = "1.15.0"
3
+ WriteXLSX_VERSION = "1.15.1"
@@ -56,15 +56,15 @@ module Writexlsx
56
56
  write_number(_row, _col, _token, _format)
57
57
  elsif _token.respond_to?(:=~) # String
58
58
  # Match integer with leading zero(s)
59
- if @leading_zeros && _token =~ /^0\d*$/
59
+ if @leading_zeros && _token =~ /\A0\d*\Z/
60
60
  write_string(_row, _col, _token, _format)
61
61
  elsif _token =~ /\A([+-]?)(?=\d|\.\d)\d*(\.\d*)?([Ee]([+-]?\d+))?\Z/
62
62
  write_number(_row, _col, _token, _format)
63
63
  # Match formula
64
- elsif _token =~ /^=/
64
+ elsif _token =~ /\A=/
65
65
  write_formula(_row, _col, _token, _format, _value1)
66
66
  # Match array formula
67
- elsif _token =~ /^\{=.*\}$/
67
+ elsif _token =~ /\A\{=.*\}\Z/
68
68
  write_formula(_row, _col, _token, _format, _value1)
69
69
  # Match blank
70
70
  elsif _token == ''
@@ -312,7 +312,7 @@ module Writexlsx
312
312
  return given_formula unless ptrue?(given_formula)
313
313
 
314
314
  # Remove array formula braces and the leading =.
315
- formula = given_formula.sub(/^\{(.*)\}$/, '\1').sub(/^=/, '')
315
+ formula = given_formula.sub(/\A\{(.*)\}\Z/, '\1').sub(/\A=/, '')
316
316
 
317
317
  # # Don't expand formulas that the user has already expanded.
318
318
  return formula if formula =~ /_xlfn\./
@@ -512,7 +512,7 @@ module Writexlsx
512
512
  end
513
513
 
514
514
  # Hand off array formulas.
515
- if _formula =~ /^\{=.*\}$/
515
+ if _formula =~ /\A\{=.*\}\Z/
516
516
  write_array_formula(_row, _col, _row, _col, _formula, _format, _value)
517
517
  else
518
518
  check_dimensions(_row, _col)
@@ -159,7 +159,7 @@ module Writexlsx
159
159
  end
160
160
 
161
161
  if target.length > 255
162
- raise <<"EOS"
162
+ raise <<EOS
163
163
  Ignoring URL #{target} where link or anchor > 255 characters since it exceeds Excel's limit for URLS. See LIMITATIONS section of the WriteXLSX documentation.
164
164
  EOS
165
165
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: write_xlsx
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.15.0
4
+ version: 1.15.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Hideo NAKAMURA
@@ -377,7 +377,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
377
377
  - !ruby/object:Gem::Version
378
378
  version: '0'
379
379
  requirements: []
380
- rubygems_version: 4.0.3
380
+ rubygems_version: 4.0.16
381
381
  specification_version: 4
382
382
  summary: write_xlsx is a gem to create a new file in the Excel 2007+ XLSX format.
383
383
  test_files: []