From 31f5143c217b210db625ee6c54dfb89877162eb0 Mon Sep 17 00:00:00 2001 From: taichi Date: Thu, 28 Feb 2019 10:08:50 +0900 Subject: [PATCH 1/2] use FileUtils.rm_rf instead of FileUtils.rm_r to fix error below: "Error: test_bigfloat(Spreadsheet::TestIntegration): Errno::ENOTEMPTY: Directory not empty @ dir_s_rmdir" --- test/integration.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/integration.rb b/test/integration.rb index ba91b1f..7947a18 100644 --- a/test/integration.rb +++ b/test/integration.rb @@ -36,7 +36,7 @@ def setup end def teardown Spreadsheet.client_encoding = 'UTF-8' - FileUtils.rm_r @var + FileUtils.rm_rf @var end def test_copy__identical__file_paths path = File.join @data, 'test_copy.xls' From 99db3644b04c583add06a639cfc5cf0a28786d52 Mon Sep 17 00:00:00 2001 From: taichi Date: Thu, 28 Feb 2019 10:10:40 +0900 Subject: [PATCH 2/2] separated decratation of VERSION into an individual file to fix error below https://travis-ci.org/rggen/rggen-spreadsheet-loader/jobs/499367300 --- Manifest.txt | 1 + lib/spreadsheet.rb | 5 +---- lib/spreadsheet/version.rb | 7 +++++++ spreadsheet.gemspec | 2 +- 4 files changed, 10 insertions(+), 5 deletions(-) create mode 100644 lib/spreadsheet/version.rb diff --git a/Manifest.txt b/Manifest.txt index d1591a4..7e7418f 100644 --- a/Manifest.txt +++ b/Manifest.txt @@ -49,6 +49,7 @@ lib/spreadsheet/link.rb lib/spreadsheet/note.rb lib/spreadsheet/noteObject.rb lib/spreadsheet/row.rb +lib/spreadsheet/version.rb lib/spreadsheet/workbook.rb lib/spreadsheet/worksheet.rb lib/spreadsheet/writer.rb diff --git a/lib/spreadsheet.rb b/lib/spreadsheet.rb index 42c4e1b..2070c1f 100644 --- a/lib/spreadsheet.rb +++ b/lib/spreadsheet.rb @@ -25,6 +25,7 @@ # 8006 Zürich ### Switzerland +require 'spreadsheet/version' require 'spreadsheet/errors' require 'spreadsheet/excel/workbook' @@ -44,10 +45,6 @@ # sheet.each do |row| puts row[0] end module Spreadsheet - ## - # The version of Spreadsheet you are using. - VERSION = '1.2.0' - ## # Default client Encoding. Change this value if your application uses a # different Encoding: diff --git a/lib/spreadsheet/version.rb b/lib/spreadsheet/version.rb new file mode 100644 index 0000000..ee41102 --- /dev/null +++ b/lib/spreadsheet/version.rb @@ -0,0 +1,7 @@ +# frozen_string_literal: true + +module Spreadsheet + ## + # The version of Spreadsheet you are using. + VERSION = '1.2.0' +end diff --git a/spreadsheet.gemspec b/spreadsheet.gemspec index 0f7040d..0e26c20 100755 --- a/spreadsheet.gemspec +++ b/spreadsheet.gemspec @@ -1,7 +1,7 @@ # require File.join(File.dirname(__FILE__), 'lib', 'spreadsheet') lib = File.expand_path('../lib', __FILE__) $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib) -require 'spreadsheet' +require 'spreadsheet/version' Gem::Specification.new do |spec| spec.name = "spreadsheet"