Skip to content

Commit

Permalink
Merge pull request #231 from taichi-ishitani/separated_version_file
Browse files Browse the repository at this point in the history
Move declaration of VERSION to an individual file
  • Loading branch information
zdavatz authored Feb 28, 2019
2 parents 2a82287 + 99db364 commit abb0a98
Show file tree
Hide file tree
Showing 5 changed files with 11 additions and 6 deletions.
1 change: 1 addition & 0 deletions Manifest.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
5 changes: 1 addition & 4 deletions lib/spreadsheet.rb
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@
# 8006 Zürich
### Switzerland

require 'spreadsheet/version'
require 'spreadsheet/errors'

require 'spreadsheet/excel/workbook'
Expand All @@ -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:
Expand Down
7 changes: 7 additions & 0 deletions lib/spreadsheet/version.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
# frozen_string_literal: true

module Spreadsheet
##
# The version of Spreadsheet you are using.
VERSION = '1.2.0'
end
2 changes: 1 addition & 1 deletion spreadsheet.gemspec
Original file line number Diff line number Diff line change
@@ -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"
Expand Down
2 changes: 1 addition & 1 deletion test/integration.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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'
Expand Down

0 comments on commit abb0a98

Please sign in to comment.