write_xlsx 0.76.1 → 0.76.2

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
  SHA1:
3
- metadata.gz: 50ba1d56f0cd30c6747b137108d02434ae6fdf84
4
- data.tar.gz: d02196b910a6f24fbbdd580fd00b7bb3f368c6e8
3
+ metadata.gz: e7aabc5b9b76521cb33ca17c3629ca680d6ca136
4
+ data.tar.gz: c60ba8d9f38b048ef457c1b976ade92c5233056e
5
5
  SHA512:
6
- metadata.gz: a834e0b9894e75fddb5e2ba2c07c624f8fb46fbadff053cc4d67e6eae59d7b397b57db4662f5cfb2a92d0f2f6fe178864227935fd985c988827b5e1133df97d4
7
- data.tar.gz: c22ff45ba70aa8d207e77994737b1ecde714c69fafe02d32de6580aaeafa3b72e84ccc4baac3b74dc90a2e12c01c941a63f089bd113b595c50c07cd8400f1319
6
+ metadata.gz: 577e6314798672d271d5f76c199f30659f879269d551892d6bf2c6de216ca9fd68e7d496bf7056ada2c153066402920c475285cbea8924eb9fe2cc44b7bf0083
7
+ data.tar.gz: 92dd97c1be7dd8a4a89422c23edcde232538a784bd04cccfdb7df4eca5d0756f4b8bcc3f35de2d18b3ece8b183ec7c73f6a21bb07b88e8a97a23b165253a33a7
data/Changes CHANGED
@@ -1,4 +1,8 @@
1
1
  Change history of write_xlsx rubygem.
2
+ 2014-04-10 v0.76.2
3
+ Fix for issue #8
4
+ use same rubyzip routine both in ruby-2+, 1.9+ and 1.8
5
+
2
6
  2014-03-21 v0.76.1
3
7
  Fix for issue #7
4
8
 
data/Gemfile CHANGED
@@ -1,10 +1,4 @@
1
1
  source 'https://rubygems.org'
2
2
 
3
- if RUBY_VERSION >= "1.9"
4
- gem 'rubyzip'
5
- group :development do
6
- gem 'simplecov'
7
- end
8
- else
9
- gem 'rubyzip', '0.9.9'
10
- end
3
+ gem 'rubyzip', '>= 1.0.0'
4
+ gem 'zip-zip'
@@ -17,7 +17,7 @@ def col_str(col)
17
17
 
18
18
  def col_str_build(col)
19
19
  # Change from 0-indexed to 1 indexed.
20
- col += 1
20
+ col = col.to_i + 1
21
21
  col_str = ''
22
22
 
23
23
  while col > 0
@@ -1,5 +1,5 @@
1
1
  require 'write_xlsx/workbook'
2
2
 
3
3
  class WriteXLSX < Writexlsx::Workbook
4
- VERSION = "0.76.1"
4
+ VERSION = "0.76.2"
5
5
  end
@@ -9,8 +9,7 @@
9
9
  require 'write_xlsx/shape'
10
10
  require 'write_xlsx/utility'
11
11
  require 'write_xlsx/chart'
12
- ruby_18 { require 'write_xlsx/zip_file_utils' }
13
- ruby_19 { require 'zip' }
12
+ require 'write_xlsx/zip_file_utils'
14
13
  require 'tmpdir'
15
14
  require 'tempfile'
16
15
  require 'digest/md5'
@@ -1232,13 +1231,7 @@ def store_workbook #:nodoc:
1232
1231
  packager = nil
1233
1232
 
1234
1233
  # Store the xlsx component files with the temp dir name removed.
1235
- ruby_19 do
1236
- # See https://github.com/randym/axlsx
1237
- Zip::OutputStream.open(@filename) do |zip|
1238
- write_parts(zip)
1239
- end
1240
- end ||
1241
- ruby_18 { ZipFileUtils.zip("#{@tempdir}", @filename) }
1234
+ ZipFileUtils.zip("#{@tempdir}", @filename)
1242
1235
 
1243
1236
  IO.copy_stream(@filename, @fileobj) if @fileobj
1244
1237
  Writexlsx::Utility.delete_files(@tempdir)
data/test/helper.rb CHANGED
@@ -1,10 +1,7 @@
1
1
  # -*- coding: utf-8 -*-
2
2
  require 'rubygems'
3
- require 'simplecov' if RUBY_VERSION >= "1.9"
4
3
  require 'bundler'
5
4
 
6
- SimpleCov.start if RUBY_VERSION >= "1.9"
7
-
8
5
  begin
9
6
  Bundler.setup(:default, :development)
10
7
  rescue Bundler::BundlerError => e
@@ -68,8 +65,7 @@ def vml_str_to_array(vml_str)
68
65
 
69
66
  def entrys(xlsx)
70
67
  result = []
71
- ruby_19 { Zip::File.foreach(xlsx) { |entry| result << entry } } ||
72
- ruby_18 { Zip::ZipFile.foreach(xlsx) { |entry| result << entry } }
68
+ Zip::ZipFile.foreach(xlsx) { |entry| result << entry }
73
69
  result
74
70
  end
75
71
 
@@ -0,0 +1,13 @@
1
+ # -*- coding: utf-8 -*-
2
+ require 'helper'
3
+ require 'write_xlsx'
4
+
5
+ class TestColName < Test::Unit::TestCase
6
+ def test_col_str_with_rational
7
+ obj = ColName.instance
8
+ col = Rational(10, 3)
9
+ assert_nothing_raised do
10
+ obj.col_str(col)
11
+ end
12
+ end
13
+ end
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: 0.76.1
4
+ version: 0.76.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Hideo NAKAMURA
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-03-21 00:00:00.000000000 Z
11
+ date: 2014-04-10 00:00:00.000000000 Z
12
12
  dependencies: []
13
13
  description: write_xlsx is a gem to create a new file in the Excel 2007+ XLSX format.
14
14
  email:
@@ -1223,6 +1223,7 @@ files:
1223
1223
  - test/regression/xlsx_files/vml03.xlsx
1224
1224
  - test/regression/xlsx_files/vml04.xlsx
1225
1225
  - test/republic.png
1226
+ - test/test_col_name.rb
1226
1227
  - test/test_delete_files.rb
1227
1228
  - test/test_example_match.rb
1228
1229
  - test/test_xml_writer_simple.rb
@@ -2439,6 +2440,7 @@ test_files:
2439
2440
  - test/regression/xlsx_files/vml03.xlsx
2440
2441
  - test/regression/xlsx_files/vml04.xlsx
2441
2442
  - test/republic.png
2443
+ - test/test_col_name.rb
2442
2444
  - test/test_delete_files.rb
2443
2445
  - test/test_example_match.rb
2444
2446
  - test/test_xml_writer_simple.rb