robust_excel_ole 1.19.3 → 1.19.9

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 708ee59b1de0837be9b9c43acfeafb381d40e4548394325d96f05f563db2b442
4
- data.tar.gz: 1c1aae5be7989a82c359e56afa298fc8757adf7d50dee937f8cd8b17d6281653
3
+ metadata.gz: 7148da566c7571df574a54fe8f1fe027f93bcf216e9060951e1ab9318aa68f2b
4
+ data.tar.gz: 3c859955ee4ef1a6b3bc71159173c9074388f6bba7a11f071fa253dd520d4521
5
5
  SHA512:
6
- metadata.gz: 7406dead8ea47a8ba23289266e70820257c3367e019f4715e151e760225534637a009cd436be2215264cd820392c3faa95d51463cfb319c372253815859d11b1
7
- data.tar.gz: b84d2f084ee989b10f870540e7bea9e111af45b72b9dc1263fa80ffa341c1b0991d5cc0fff971797ec94af43d1c0dbac5d8031a4b8f4e633966e69a9a7dfa00a
6
+ metadata.gz: 7030d95eb00cdc12f2b9d762fbf924422b7a6ffe2f098bbd9c03b8e7acad560c9828756e0cc09ca384af8bb625cf3efacb9ec51b56aa1479d7f383eade83baa8
7
+ data.tar.gz: c4c61ae7e2122e8ab98d77f32b188b28f7c230f60fd3be4287e55d35cb9966b30f7492aaa0c8af87e89c048280fbca3de44966e52c83ccc83a9884429e1eb40d
data/bin/jreo CHANGED
@@ -1,4 +1,3 @@
1
-
2
1
  @echo off
3
2
 
4
- jruby reo
3
+ jruby ../lib/reo_console.rb
data/bin/reo.rb CHANGED
@@ -1,16 +1,16 @@
1
1
  require 'pry'
2
- require 'robust_excel_ole'
2
+ require '../lib/robust_excel_ole'
3
+
3
4
  include REO
4
- # include RobustExcelOle
5
5
  include General
6
6
 
7
7
  puts 'REO console started'
8
8
  puts
9
9
 
10
-
11
10
  # some pry configuration
12
11
  Pry.config.windows_console_warning = false
13
12
  Pry.config.history.should_save = true
13
+ Pry.config.color = false
14
14
  #Pry.editor = 'notepad' # 'subl', 'vi'
15
15
  #Pry.config.prompt =
16
16
  # [
@@ -0,0 +1,3 @@
1
+ @echo off
2
+
3
+ ruby ../lib/reo_console.rb
@@ -1,62 +1,21 @@
1
- require '../robust_excel_ole/lib/robust_excel_ole'
1
+ require 'pry'
2
+ require 'robust_excel_ole'
3
+
2
4
  include REO
3
- # include RobustExcelOle
4
5
  include General
5
6
 
6
- require 'irb'
7
- require 'irb/completion'
8
- require 'irb/ext/save-history'
9
-
10
- ARGV.concat ['--readline',
11
- '--prompt-mode',
12
- 'simple']
13
-
14
- # 250 entries in the list
15
- IRB.conf[:SAVE_HISTORY] = 250
16
-
17
- # Store results in home directory with specified file name
18
- # IRB.conf[:HISTORY_FILE] = "#{ENV['HOME']}/.irb-history"
19
- IRB.conf[:HISTORY_FILE] = "#{ENV['HOME']}/.reo-history"
20
-
21
- IRB.conf[:PROMPT_MODE] = :SIMPLE
22
- #IRB.conf[:USE_READLINE] = true
23
- #IRB.conf[:AUTO_INDENT] = true
24
-
25
- # @private
26
- module Readline
27
- module Hist
28
- LOG = IRB.conf[:HISTORY_FILE]
29
- # LOG = "#{ENV['HOME']}/.irb-history"
30
-
31
- def self.write_log(line)
32
- File.open(LOG, 'ab') do |f|
33
- f << "#{line}
34
- "
35
- end
36
- end
37
-
38
- def self.start_session_log
39
- timestamp = proc { Time.now.strftime('%Y-%m-%d, %H:%M:%S') }
40
- # @private
41
- class <<timestamp
42
- alias_method :to_s, :call
43
- end
44
- write_log("###### session start: #{timestamp}")
45
- at_exit { write_log("###### session stop: #{timestamp}") }
46
- end
47
- end
48
-
49
- alias old_readline readline
50
- def readline(*args)
51
- ln = old_readline(*args)
52
- begin
53
- Hist.write_log(ln)
54
- rescue StandardError
55
- end
56
- ln
57
- end
58
- end
59
-
60
- Readline::Hist.start_session_log
61
- puts 'REO console started: the changed one'
62
- #IRB.start
7
+ puts 'REO console started'
8
+ puts
9
+
10
+ # some pry configuration
11
+ Pry.config.windows_console_warning = false
12
+ Pry.config.history.should_save = true
13
+ Pry.config.color = false
14
+ #Pry.editor = 'notepad' # 'subl', 'vi'
15
+ #Pry.config.prompt =
16
+ # [
17
+ # ->(_obj, _nest_level, _) { ">> " },
18
+ # ->(*) { " " }
19
+ # ]
20
+
21
+ pry
@@ -74,6 +74,8 @@ module RobustExcelOle
74
74
  end
75
75
  end
76
76
 
77
+ private
78
+
77
79
  def define_getting_setting_method(ole_cell,name_str)
78
80
  if name_str[-1] != '='
79
81
  self.class.define_method(name_str) do
@@ -85,7 +87,7 @@ module RobustExcelOle
85
87
  end
86
88
  end
87
89
  end
88
- end
90
+ end
89
91
 
90
92
  # accesses a table row object
91
93
  # @param [Integer] a row number (>= 1)
@@ -96,6 +98,22 @@ module RobustExcelOle
96
98
 
97
99
  end
98
100
 
101
+ def column_names
102
+ @ole_table.HeaderRowRange.Value.first
103
+ end
104
+
105
+ # @private
106
+ def to_s
107
+ @ole_table.Name.to_s
108
+ end
109
+
110
+ # @private
111
+ def inspect
112
+ "#<ListObject:" + "#{@ole_table.Name}" +
113
+ " size:#{@ole_table.ListRows.Count}x#{@ole_table.ListColumns.Count}" +
114
+ " worksheet:#{@ole_table.Parent.Name}" + " workbook:#{@ole_table.Parent.Parent.Name}" + ">"
115
+ end
116
+
99
117
  private
100
118
 
101
119
  def method_missing(name, *args)
@@ -1,3 +1,3 @@
1
1
  module RobustExcelOle
2
- VERSION = "1.19.3"
2
+ VERSION = "1.19.9"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: robust_excel_ole
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.19.3
4
+ version: 1.19.9
5
5
  platform: ruby
6
6
  authors:
7
7
  - traths
@@ -49,8 +49,8 @@ email:
49
49
  - Thomas.Raths@gmx.net
50
50
  executables:
51
51
  - jreo
52
- - reo
53
52
  - reo.rb
53
+ - reo_old
54
54
  extensions: []
55
55
  extra_rdoc_files:
56
56
  - README.rdoc
@@ -80,8 +80,8 @@ files:
80
80
  - benchmarking/simple_xlsx_reader_example.rb
81
81
  - benchmarking/spreadsheet_example.rb
82
82
  - bin/jreo
83
- - bin/reo
84
83
  - bin/reo.rb
84
+ - bin/reo_old
85
85
  - docs/README_excel.rdoc
86
86
  - docs/README_open.rdoc
87
87
  - docs/README_ranges.rdoc
@@ -115,7 +115,6 @@ files:
115
115
  - examples/open_save_close/example_simple.rb
116
116
  - examples/open_save_close/example_unobtrusively.rb
117
117
  - jreo.bat
118
- - lib/jreo_console.rb
119
118
  - lib/reo_console.rb
120
119
  - lib/robust_excel_ole.rb
121
120
  - lib/robust_excel_ole/address_tool.rb
@@ -135,7 +134,6 @@ files:
135
134
  - lib/robust_excel_ole/workbook.rb
136
135
  - lib/robust_excel_ole/worksheet.rb
137
136
  - lib/spec_helper.rb
138
- - reo.bat
139
137
  - robust_excel_ole.gemspec
140
138
  - spec/address_tool_spec.rb
141
139
  - spec/base_spec.rb
data/bin/reo DELETED
@@ -1,4 +0,0 @@
1
-
2
- @echo off
3
-
4
- ruby reo
@@ -1,67 +0,0 @@
1
- # require '../robust_excel_ole/lib/robust_excel_ole'
2
- include REO
3
- # include RobustExcelOle
4
- include General
5
-
6
- require 'irb/completion'
7
- require 'irb/ext/save-history'
8
- gem 'jruby-readline'
9
-
10
- ARGV.concat ['--readline',
11
- '--prompt-mode',
12
- 'simple',
13
- '-rjruby-readline']
14
-
15
- #IRB.conf[:PROMPT_MODE] = :SIMPLE
16
- #IRB.conf[:USE_READLINE] = true
17
- #IRB.conf[:AUTO_INDENT] = true
18
-
19
-
20
-
21
-
22
- # 250 entries in the list
23
- IRB.conf[:SAVE_HISTORY] = 250
24
-
25
- # Store results in home directory with specified file name
26
- # IRB.conf[:HISTORY_FILE] = "#{ENV['HOME']}/.irb-history"
27
- #IRB.conf[:HISTORY_FILE] = "#{ENV['HOME']}/.irb-save-history"
28
-
29
- IRB.conf[:HISTORY_FILE] = "#{ENV['HOME']}/.reo-history"
30
-
31
- # @private
32
- module Readline
33
- module Hist
34
- LOG = IRB.conf[:HISTORY_FILE]
35
- # LOG = "#{ENV['HOME']}/.irb-history"
36
-
37
- def self.write_log(line)
38
- File.open(LOG, 'ab') do |f|
39
- f << "#{line}
40
- "
41
- end
42
- end
43
-
44
- def self.start_session_log
45
- timestamp = proc { Time.now.strftime('%Y-%m-%d, %H:%M:%S') }
46
- # @private
47
- class <<timestamp
48
- alias_method :to_s, :call
49
- end
50
- write_log("###### session start: #{timestamp}")
51
- at_exit { write_log("###### session stop: #{timestamp}") }
52
- end
53
- end
54
-
55
- alias old_readline readline
56
- def readline(*args)
57
- ln = old_readline(*args)
58
- begin
59
- Hist.write_log(ln)
60
- rescue StandardError
61
- end
62
- ln
63
- end
64
- end
65
-
66
- Readline::Hist.start_session_log
67
- puts 'JREO console started'
data/reo.bat DELETED
@@ -1,5 +0,0 @@
1
- @echo off
2
-
3
- irb -f -r ./lib/reo_console.rb
4
-
5
- #irb -f -r ./lib/robust_excel_ole -r ./lib/reo_console.rb