robust_excel_ole 0.3.7 → 0.3.8
Sign up to get free protection for your applications and to get access to all the features.
- data/Changelog +29 -0
- data/README.rdoc +12 -12
- data/README_detail.rdoc +3 -3
- data/examples/open_save_close/example_simple.rb +6 -1
- data/lib/robust_excel_ole.rb +69 -30
- data/lib/robust_excel_ole/book.rb +128 -64
- data/lib/robust_excel_ole/bookstore.rb +17 -10
- data/lib/robust_excel_ole/cygwin.rb +1 -1
- data/lib/robust_excel_ole/excel.rb +73 -33
- data/lib/robust_excel_ole/sheet.rb +41 -15
- data/lib/robust_excel_ole/utilities.rb +28 -0
- data/lib/robust_excel_ole/version.rb +1 -1
- data/spec/book_specs/book_open_spec.rb +0 -1
- data/spec/data/workbook.xls +0 -0
- metadata +5 -4
@@ -0,0 +1,28 @@
|
|
1
|
+
LOG_TO_STDOUT = false unless Object.const_defined?(:LOG_TO_STDOUT)
|
2
|
+
REO_LOG_DIR = "" unless Object.const_defined?(:REO_LOG_DIR)
|
3
|
+
REO_LOG_FILE = "reo.log" unless Object.const_defined?(:REO_LOG_FILE)
|
4
|
+
|
5
|
+
File.delete REO_LOG_FILE rescue nil
|
6
|
+
|
7
|
+
module Utilities # :nodoc: #
|
8
|
+
|
9
|
+
def trace(text)
|
10
|
+
if LOG_TO_STDOUT
|
11
|
+
puts text
|
12
|
+
else
|
13
|
+
if REO_LOG_DIR.empty?
|
14
|
+
homes = ["HOME", "HOMEPATH"]
|
15
|
+
home = homes.find {|h| ENV[h] != nil}
|
16
|
+
reo_log_dir = ENV[home]
|
17
|
+
else
|
18
|
+
reo_log_dir = REO_LOG_DIR
|
19
|
+
end
|
20
|
+
File.open(reo_log_dir + "/" + REO_LOG_FILE,"a") do | file |
|
21
|
+
file.puts text
|
22
|
+
end
|
23
|
+
end
|
24
|
+
end
|
25
|
+
|
26
|
+
module_function :trace
|
27
|
+
|
28
|
+
end
|
@@ -235,7 +235,6 @@ describe Book do
|
|
235
235
|
book5 = Book.open(@simple_file, :force_excel => book2.workbook)
|
236
236
|
book5.excel.should === book2.excel
|
237
237
|
win32ole_excel1 = WIN32OLE.connect(@book.workbook.Fullname).Application
|
238
|
-
puts "win32ole_excel1: #{win32ole_excel1}"
|
239
238
|
book6 = Book.open(@simple_file, :force_excel => win32ole_excel1)
|
240
239
|
book6.excel.should === @book.excel
|
241
240
|
end
|
data/spec/data/workbook.xls
CHANGED
Binary file
|
metadata
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: robust_excel_ole
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
4
|
+
hash: 3
|
5
5
|
prerelease: false
|
6
6
|
segments:
|
7
7
|
- 0
|
8
8
|
- 3
|
9
|
-
-
|
10
|
-
version: 0.3.
|
9
|
+
- 8
|
10
|
+
version: 0.3.8
|
11
11
|
platform: ruby
|
12
12
|
authors:
|
13
13
|
- traths
|
@@ -15,7 +15,7 @@ autorequire:
|
|
15
15
|
bindir: bin
|
16
16
|
cert_chain: []
|
17
17
|
|
18
|
-
date:
|
18
|
+
date: 2016-02-12 00:00:00 +01:00
|
19
19
|
default_executable:
|
20
20
|
dependencies:
|
21
21
|
- !ruby/object:Gem::Dependency
|
@@ -87,6 +87,7 @@ files:
|
|
87
87
|
- lib/robust_excel_ole/robustexcelole.sublime-project
|
88
88
|
- lib/robust_excel_ole/robustexcelole.sublime-workspace
|
89
89
|
- lib/robust_excel_ole/sheet.rb
|
90
|
+
- lib/robust_excel_ole/utilities.rb
|
90
91
|
- lib/robust_excel_ole/version.rb
|
91
92
|
- lib/spec_helper.rb
|
92
93
|
- reo.bat
|