write_xlsx 1.09.3 → 1.09.4

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: 7dea384f9a4a5af52b21f5a45abd5ae4a88b7448da7f9c9fd64e12a555536b90
4
- data.tar.gz: 7204b2a2fd050b4cf6a970e8bb9d9e83bc8d7162d71d59728253290e407baf37
3
+ metadata.gz: f5d16e1b446663bfe7c01e2d2fcf66d7150d08b51b9256e3bdfe531ed855e83b
4
+ data.tar.gz: 136aa05affaba6706517f4a0e69f8db0a960a235105f82232c9de5c168964009
5
5
  SHA512:
6
- metadata.gz: 941d4e9db310aabb6b7ef7a2695945c9d2919a17fa8640664fd55b3d8461d0a63223feaccaced2d9e6f2286a6423a2092adb2c337d01055706d4ff1d4c53fff8
7
- data.tar.gz: cf57ea36741b31fd1c25e82526d9a545179ec91266f92381b09d8d136502f72054196446ab4ead6e27a667d1eb6e656a6362c54a8aa116b5b95152354216c6ea
6
+ metadata.gz: eaed0ee8d0590a733194bce357731c6c6883885074552be5d4a1f8b4ecbe0eb24c7718ad4c7afac89cd42389c19dcfc1093525fb264e530d6b0063cec9e91eb5
7
+ data.tar.gz: 5d0f0e15102d3064256d30274040211a8c4b8877c6551ed6a2a415ffca944071bb7f3c14728db6fb2b3496de93410a6109104ef5a67ff2b02b28744819ccd86e
data/Changes CHANGED
@@ -1,5 +1,10 @@
1
1
  Change history of write_xlsx rubygem.
2
2
 
3
+ 2022-09-02 v1.09.4
4
+ Remove zip-zip dependency.
5
+
6
+ Fix: Object#=~ is called on Integer; it always returns nil
7
+
3
8
  2022-07-08 v1.09.3
4
9
  Fixed issue #47. Dealing with NAN
5
10
 
data/bin/extract_vba.rb CHANGED
@@ -1,7 +1,7 @@
1
1
  #!/usr/bin/env ruby
2
2
  # -*- encoding: utf-8 -*-
3
3
 
4
- require 'zip/zipfilesystem'
4
+ require 'zip/filesystem'
5
5
  require 'fileutils'
6
6
 
7
7
  # src zip filename
@@ -9,7 +9,7 @@ require 'fileutils'
9
9
  # options :fs_encoding=[UTF-8,Shift_JIS,EUC-JP]
10
10
  def extract_vba_project(src, dest, options = {})
11
11
  FileUtils.makedirs(dest)
12
- Zip::ZipInputStream.open(src) do |is|
12
+ Zip::InputStream.open(src) do |is|
13
13
  loop do
14
14
  entry = is.get_next_entry()
15
15
  break if entry.nil?()
@@ -347,7 +347,7 @@ module Writexlsx
347
347
  property = label.dup
348
348
 
349
349
  # Convert formula.
350
- if property[:value] && property[:value] =~ /^=[^!]+!\$/
350
+ if property[:value] && property[:value].to_s =~ /^=[^!]+!\$/
351
351
  property[:formula] = property[:value]
352
352
  end
353
353
 
@@ -1 +1 @@
1
- WriteXLSX_VERSION = "1.09.3"
1
+ WriteXLSX_VERSION = "1.09.4"
@@ -3545,7 +3545,7 @@ EOS
3545
3545
  # Write the <filters> element.
3546
3546
  #
3547
3547
  def write_filters(*filters) #:nodoc:
3548
- non_blanks = filters.reject { |filter| filter =~ /^blanks$/i }
3548
+ non_blanks = filters.reject { |filter| filter.to_s =~ /^blanks$/i }
3549
3549
  attributes = []
3550
3550
 
3551
3551
  if filters != non_blanks
@@ -3,7 +3,7 @@
3
3
  # from http://d.hatena.ne.jp/alunko/20071021
4
4
  #
5
5
  require 'kconv'
6
- require 'zip/zipfilesystem'
6
+ require 'zip/filesystem'
7
7
  require 'fileutils'
8
8
 
9
9
  module ZipFileUtils
@@ -15,7 +15,7 @@ module ZipFileUtils
15
15
  src = File.expand_path(src)
16
16
  dest = File.expand_path(dest)
17
17
  File.unlink(dest) if File.exist?(dest)
18
- Zip::ZipFile.open(dest, Zip::ZipFile::CREATE) {|zf|
18
+ Zip::File.open(dest, Zip::File::CREATE) {|zf|
19
19
  if(File.file?(src))
20
20
  zf.add(encode_path(File.basename(src), options[:fs_encoding]), src)
21
21
  break
@@ -37,7 +37,7 @@ module ZipFileUtils
37
37
  # options :fs_encoding=[UTF-8,Shift_JIS,EUC-JP]
38
38
  def self.unzip(src, dest, options = {})
39
39
  FileUtils.makedirs(dest)
40
- Zip::ZipInputStream.open(src) do |is|
40
+ Zip::InputStream.open(src) do |is|
41
41
  loop do
42
42
  entry = is.get_next_entry()
43
43
  break unless entry
data/test/helper.rb CHANGED
@@ -77,7 +77,7 @@ class Minitest::Test
77
77
 
78
78
  def entrys(xlsx)
79
79
  result = []
80
- Zip::ZipFile.foreach(xlsx) { |entry| result << entry }
80
+ Zip::File.foreach(xlsx) { |entry| result << entry }
81
81
  result
82
82
  end
83
83
 
data/write_xlsx.gemspec CHANGED
@@ -18,7 +18,6 @@ Gem::Specification.new do |gem|
18
18
  gem.test_files = gem.files.grep(%r{^(test|spec|features)/})
19
19
  gem.require_paths = ["lib"]
20
20
  gem.add_runtime_dependency 'rubyzip', '>= 1.0.0'
21
- gem.add_runtime_dependency 'zip-zip'
22
21
  gem.add_development_dependency 'minitest'
23
22
  gem.add_development_dependency 'byebug'
24
23
  gem.add_development_dependency 'rake'
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: write_xlsx
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.09.3
4
+ version: 1.09.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Hideo NAKAMURA
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2022-07-09 00:00:00.000000000 Z
11
+ date: 2022-09-02 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rubyzip
@@ -24,20 +24,6 @@ dependencies:
24
24
  - - ">="
25
25
  - !ruby/object:Gem::Version
26
26
  version: 1.0.0
27
- - !ruby/object:Gem::Dependency
28
- name: zip-zip
29
- requirement: !ruby/object:Gem::Requirement
30
- requirements:
31
- - - ">="
32
- - !ruby/object:Gem::Version
33
- version: '0'
34
- type: :runtime
35
- prerelease: false
36
- version_requirements: !ruby/object:Gem::Requirement
37
- requirements:
38
- - - ">="
39
- - !ruby/object:Gem::Version
40
- version: '0'
41
27
  - !ruby/object:Gem::Dependency
42
28
  name: minitest
43
29
  requirement: !ruby/object:Gem::Requirement