workbook 0.8.0 → 0.8.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.ruby-version +1 -1
- data/CHANGELOG.md +9 -0
- data/Gemfile +3 -1
- data/Rakefile +3 -1
- data/lib/workbook.rb +2 -0
- data/lib/workbook/book.rb +2 -0
- data/lib/workbook/cell.rb +2 -0
- data/lib/workbook/column.rb +4 -3
- data/lib/workbook/format.rb +2 -0
- data/lib/workbook/generatetypes.rb +2 -1
- data/lib/workbook/modules/cache.rb +3 -1
- data/lib/workbook/modules/cell.rb +2 -0
- data/lib/workbook/modules/diff_sort.rb +2 -0
- data/lib/workbook/modules/raw_objects_storage.rb +2 -0
- data/lib/workbook/modules/type_parser.rb +2 -0
- data/lib/workbook/nil_value.rb +1 -0
- data/lib/workbook/readers/csv_reader.rb +1 -0
- data/lib/workbook/readers/ods_reader.rb +2 -0
- data/lib/workbook/readers/txt_reader.rb +2 -0
- data/lib/workbook/readers/xls_reader.rb +2 -0
- data/lib/workbook/readers/xls_shared.rb +2 -0
- data/lib/workbook/readers/xlsx_reader.rb +3 -1
- data/lib/workbook/row.rb +2 -0
- data/lib/workbook/sheet.rb +2 -0
- data/lib/workbook/table.rb +2 -0
- data/lib/workbook/template.rb +2 -0
- data/lib/workbook/types/date.rb +2 -1
- data/lib/workbook/types/false.rb +2 -1
- data/lib/workbook/types/false_class.rb +2 -1
- data/lib/workbook/types/nil.rb +2 -1
- data/lib/workbook/types/nil_class.rb +2 -1
- data/lib/workbook/types/numeric.rb +2 -1
- data/lib/workbook/types/string.rb +2 -1
- data/lib/workbook/types/time.rb +2 -1
- data/lib/workbook/types/true.rb +2 -1
- data/lib/workbook/types/true_class.rb +2 -1
- data/lib/workbook/version.rb +3 -1
- data/lib/workbook/writers/csv_table_writer.rb +2 -0
- data/lib/workbook/writers/html_writer.rb +2 -0
- data/lib/workbook/writers/json_table_writer.rb +2 -0
- data/lib/workbook/writers/xls_writer.rb +2 -0
- data/lib/workbook/writers/xlsx_writer.rb +2 -0
- data/test/helper.rb +2 -0
- data/test/test_book.rb +2 -0
- data/test/test_column.rb +3 -1
- data/test/test_format.rb +2 -0
- data/test/test_functional.rb +2 -0
- data/test/test_modules_cache.rb +2 -0
- data/test/test_modules_cell.rb +2 -0
- data/test/test_modules_table_diff_sort.rb +2 -0
- data/test/test_modules_type_parser.rb +2 -0
- data/test/test_readers_csv_reader.rb +2 -0
- data/test/test_readers_ods_reader.rb +2 -0
- data/test/test_readers_txt_reader.rb +2 -0
- data/test/test_readers_xls_reader.rb +2 -0
- data/test/test_readers_xls_shared.rb +3 -1
- data/test/test_readers_xlsx_reader.rb +2 -0
- data/test/test_row.rb +2 -0
- data/test/test_sheet.rb +2 -0
- data/test/test_table.rb +2 -0
- data/test/test_template.rb +2 -0
- data/test/test_types_date.rb +3 -1
- data/test/test_writers_html_writer.rb +2 -0
- data/test/test_writers_json_writer.rb +2 -0
- data/test/test_writers_xls_writer.rb +2 -0
- data/test/test_writers_xlsx_writer.rb +2 -0
- metadata +4 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 87ff9d1b27ed349f1b788ec37cf0ca3e743353abf6281badaebd2a9a5efa4355
|
4
|
+
data.tar.gz: 52f399ec0e3ea2acead3f918cf9b43b942dc158ee321e19239eff71563f4f6ba
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 151d666f60f1edcb99ba8dfaa35d4cb8e6bebe33bcb3e15543f80f22b62593fa02dd8a45e74fd680260296f2a398008a07fc227dddaafa21958eb0a0a65f8cfb
|
7
|
+
data.tar.gz: eb0fcf133fe88aed80b42c91e9c3cec2f94820c7fb33eda606b0f5c97f1d7cf1368f6de52508655790af0ebd03a5952e6099d8293b1a3329ffd13d156c20fb76
|
data/.ruby-version
CHANGED
@@ -1 +1 @@
|
|
1
|
-
2.6.
|
1
|
+
2.6.2
|
data/CHANGELOG.md
ADDED
data/Gemfile
CHANGED
data/Rakefile
CHANGED
@@ -1,3 +1,5 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
1
3
|
require 'rake'
|
2
4
|
require 'rake/testtask'
|
3
5
|
require 'bundler'
|
@@ -11,4 +13,4 @@ Rake::TestTask.new do |t|
|
|
11
13
|
t.libs << "test"
|
12
14
|
t.test_files = FileList['test/test*.rb','test/writers/test*.rb']
|
13
15
|
t.verbose = false
|
14
|
-
end
|
16
|
+
end
|
data/lib/workbook.rb
CHANGED
data/lib/workbook/book.rb
CHANGED
data/lib/workbook/cell.rb
CHANGED
data/lib/workbook/column.rb
CHANGED
@@ -1,3 +1,5 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
1
3
|
# -*- encoding : utf-8 -*-
|
2
4
|
# frozen_string_literal: true
|
3
5
|
module Workbook
|
@@ -84,13 +86,12 @@ module Workbook
|
|
84
86
|
# @param [String] string that typically identifies a column
|
85
87
|
# @return [Integer]
|
86
88
|
def alpha_index_to_number_index string
|
87
|
-
string.upcase!
|
88
89
|
sum = 0
|
89
|
-
string.chars.each_with_index do | char, char_index|
|
90
|
+
string.upcase.chars.each_with_index do | char, char_index|
|
90
91
|
sum = sum * 26 + char.unpack('U')[0]-64
|
91
92
|
end
|
92
93
|
return sum-1
|
93
94
|
end
|
94
95
|
end
|
95
96
|
end
|
96
|
-
end
|
97
|
+
end
|
data/lib/workbook/format.rb
CHANGED
@@ -1,4 +1,5 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
|
+
|
2
3
|
["Numeric","String","Time","Date","TrueClass","FalseClass","NilClass"].each do |type|
|
3
4
|
f = File.open(File.join(File.dirname(__FILE__),"types","#{type}.rb"),'w+')
|
4
5
|
puts f.inspect
|
@@ -12,4 +13,4 @@ module Workbook
|
|
12
13
|
end
|
13
14
|
end"
|
14
15
|
f.write(doc)
|
15
|
-
end
|
16
|
+
end
|
data/lib/workbook/nil_value.rb
CHANGED
data/lib/workbook/row.rb
CHANGED
data/lib/workbook/sheet.rb
CHANGED
data/lib/workbook/table.rb
CHANGED
data/lib/workbook/template.rb
CHANGED
data/lib/workbook/types/date.rb
CHANGED
data/lib/workbook/types/false.rb
CHANGED
@@ -1 +1,2 @@
|
|
1
|
-
# frozen_string_literal: true
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
data/lib/workbook/types/nil.rb
CHANGED
@@ -1 +1,2 @@
|
|
1
|
-
# frozen_string_literal: true
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
data/lib/workbook/types/time.rb
CHANGED
data/lib/workbook/types/true.rb
CHANGED
@@ -1 +1,2 @@
|
|
1
|
-
# frozen_string_literal: true
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
data/lib/workbook/version.rb
CHANGED
data/test/helper.rb
CHANGED
data/test/test_book.rb
CHANGED
data/test/test_column.rb
CHANGED
@@ -1,3 +1,5 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
1
3
|
# -*- encoding : utf-8 -*-
|
2
4
|
require File.join(File.dirname(__FILE__), 'helper')
|
3
5
|
|
@@ -62,4 +64,4 @@ class TestColumn < Minitest::Test
|
|
62
64
|
assert_equal(52,Workbook::Column.alpha_index_to_number_index("BA"))
|
63
65
|
assert_equal((27*26)-1,Workbook::Column.alpha_index_to_number_index("ZZ"))
|
64
66
|
end
|
65
|
-
end
|
67
|
+
end
|
data/test/test_format.rb
CHANGED
data/test/test_functional.rb
CHANGED
data/test/test_modules_cache.rb
CHANGED
data/test/test_modules_cell.rb
CHANGED
data/test/test_row.rb
CHANGED
data/test/test_sheet.rb
CHANGED
data/test/test_table.rb
CHANGED
data/test/test_template.rb
CHANGED
data/test/test_types_date.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: workbook
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.8.
|
4
|
+
version: 0.8.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Maarten Brouwers
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2019-
|
11
|
+
date: 2019-03-27 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: ruby-prof
|
@@ -140,6 +140,7 @@ files:
|
|
140
140
|
- ".yardoc/objects/root.dat"
|
141
141
|
- ".yardoc/proxy_types"
|
142
142
|
- ".yardopts"
|
143
|
+
- CHANGELOG.md
|
143
144
|
- Gemfile
|
144
145
|
- LICENSE.txt
|
145
146
|
- README.md
|
@@ -258,7 +259,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
258
259
|
- !ruby/object:Gem::Version
|
259
260
|
version: '0'
|
260
261
|
requirements: []
|
261
|
-
rubygems_version: 3.0.
|
262
|
+
rubygems_version: 3.0.3
|
262
263
|
signing_key:
|
263
264
|
specification_version: 4
|
264
265
|
summary: Workbook is a datastructure to contain books of tables (an anlogy used in
|