portable-writers-spreadsheet 1.0.0.pre.alpha.2 → 1.0.0

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: 5da665259695da14b440a6c037fc942f06620d6ec07856cde36c7f7fc4fb3d2e
4
- data.tar.gz: 128300b9b431fdc00b27d36d2aaf84514fdae5f7d9c532ff3ed3f5a941dadec9
3
+ metadata.gz: 8d66fdb595173e470ede73c7be2143cfc149bce05ea9fc325c7309da3cb601eb
4
+ data.tar.gz: 2a0759aa9409ef571bea33c1d32eaa967d7e185cd723e6f1f5b608da1f98aaae
5
5
  SHA512:
6
- metadata.gz: f38d70d03d38a559d6d1518be85dd9ce2c03a5aa06fed2316367d5be9ca8489e1477464d28a44191f1d59cf4fe290e43658b5ad5c3be0c28a7e4df65a08d4fe7
7
- data.tar.gz: 6f98550ac8be9dd8e4851022b59152afff80912abd02a560ef5f2680e576da94d97415d3f759979e1dfcbf6737c89eefa70206a1725f920440c5c3e471ff489f
6
+ metadata.gz: d7da04ea5089d27b54e8490d23a77ba884753a1899edd037a5655221f57b69a805540cdc7043f9d59d2463b9dd1ca7561fb5fc0f0fe170ed4c76caad10039381
7
+ data.tar.gz: ea701347bde39493b665b0095916873501c3502becf343dfbb0937ea6df63a9497a40f461cf008b1ee71f41f22d607f2dda3cfac17052a635fbe323d38579fe6
@@ -1,3 +1,3 @@
1
- # 1.0.0 (TBD)
1
+ # 1.0.0 (August 27th, 2020)
2
2
 
3
3
  Initial implementation.
@@ -7,6 +7,7 @@
7
7
  # LICENSE file in the root directory of this source tree.
8
8
  #
9
9
 
10
+ require 'benchmark'
10
11
  require 'fast_excel'
11
12
  require 'portable'
12
13
 
@@ -17,8 +18,18 @@ module Portable
17
18
  def write!(filename:, data_provider: Data::Provider.new, time: Time.now.utc)
18
19
  raise ArgumentError, 'filename is required' if filename.to_s.empty?
19
20
 
20
- ensure_directory_exists(filename)
21
+ time_in_seconds = Benchmark.measure do
22
+ ensure_directory_exists(filename)
21
23
 
24
+ write_file(filename, data_provider, time)
25
+ end.real
26
+
27
+ [Result.new(filename, time_in_seconds)]
28
+ end
29
+
30
+ private
31
+
32
+ def write_file(filename, data_provider, time)
22
33
  workbook = FastExcel.open(filename, constant_memory: true)
23
34
 
24
35
  document.sheets.map do |sheet|
@@ -31,14 +42,8 @@ module Portable
31
42
  end
32
43
 
33
44
  workbook.close
34
-
35
- time_in_seconds = 1.0
36
-
37
- [Result.new(filename, time_in_seconds)]
38
45
  end
39
46
 
40
- private
41
-
42
47
  def write_head(worksheet, sheet, data_source)
43
48
  sheet.header_rows.each { |row| worksheet.append_row(row) }
44
49
 
@@ -12,7 +12,7 @@ require 'portable'
12
12
  module Portable
13
13
  module Writers
14
14
  class Spreadsheet < Base
15
- VERSION = '1.0.0-alpha.2'
15
+ VERSION = '1.0.0'
16
16
  end
17
17
  end
18
18
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: portable-writers-spreadsheet
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.0.pre.alpha.2
4
+ version: 1.0.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Matthew Ruggio
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2020-08-10 00:00:00.000000000 Z
11
+ date: 2020-08-27 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: fast_excel
@@ -195,9 +195,9 @@ required_ruby_version: !ruby/object:Gem::Requirement
195
195
  version: '2.5'
196
196
  required_rubygems_version: !ruby/object:Gem::Requirement
197
197
  requirements:
198
- - - ">"
198
+ - - ">="
199
199
  - !ruby/object:Gem::Version
200
- version: 1.3.1
200
+ version: '0'
201
201
  requirements: []
202
202
  rubygems_version: 3.0.3
203
203
  signing_key: