spreadsheet 0.7.6 → 0.7.7

Sign up to get free protection for your applications and to get access to all the features.
data/Gemfile ADDED
@@ -0,0 +1,3 @@
1
+ source :rubygems
2
+
3
+ gemspec
@@ -0,0 +1,20 @@
1
+ PATH
2
+ remote: .
3
+ specs:
4
+ spreadsheet (0.7.3)
5
+ ruby-ole
6
+
7
+ GEM
8
+ remote: http://rubygems.org/
9
+ specs:
10
+ hoe (3.4.1)
11
+ rake (>= 0.8, < 11.0)
12
+ rake (10.0.3)
13
+ ruby-ole (1.2.11.6)
14
+
15
+ PLATFORMS
16
+ ruby
17
+
18
+ DEPENDENCIES
19
+ hoe
20
+ spreadsheet!
@@ -1,3 +1,17 @@
1
+ === 0.7.7 / 22.01.2013
2
+
3
+ Author: DeTeam <timur.deteam@gmail.com>
4
+ Date: Tue Jan 22 19:11:52 2013 +0400
5
+
6
+ * Make tests pass
7
+ * Readme updated
8
+ * RuntimeError when file is empty
9
+ * Hoe in dev deps
10
+ * Finish with bundler
11
+ * Add a Gemfile
12
+
13
+ also see: https://github.com/zdavatz/spreadsheet/pull/24
14
+
1
15
  === 0.7.6 / 15.01.2013
2
16
 
3
17
  Author: Kenichi Kamiya <kachick1@gmail.com>
@@ -1,5 +1,7 @@
1
1
  .gitignore
2
2
  GUIDE.txt
3
+ Gemfile
4
+ Gemfile.lock
3
5
  History.txt
4
6
  LICENSE.txt
5
7
  Manifest.txt
@@ -58,6 +60,7 @@ test/data/test_version_excel5.xls
58
60
  test/data/test_version_excel95.xls
59
61
  test/data/test_version_excel97.xls
60
62
  test/data/test_version_excel97_2010.xls
63
+ test/excel/reader.rb
61
64
  test/excel/row.rb
62
65
  test/excel/writer/workbook.rb
63
66
  test/excel/writer/worksheet.rb
data/README.txt CHANGED
@@ -88,6 +88,14 @@ build a gem package as follows:
88
88
 
89
89
  The gem package is built in pkg directory.
90
90
 
91
+ == Testing
92
+
93
+ Bundler support added.
94
+ Running tests:
95
+ * bundle install
96
+ * ./test/suite.rb
97
+
98
+
91
99
 
92
100
  == Authors
93
101
 
data/Rakefile CHANGED
@@ -3,6 +3,8 @@
3
3
  $: << File.expand_path("./lib", File.dirname(__FILE__))
4
4
 
5
5
  require 'rubygems'
6
+ require 'bundler'
7
+
6
8
  require 'hoe'
7
9
  require './lib/spreadsheet.rb'
8
10
 
@@ -42,7 +42,7 @@ module Spreadsheet
42
42
 
43
43
  ##
44
44
  # The version of Spreadsheet you are using.
45
- VERSION = '0.7.6'
45
+ VERSION = '0.7.7'
46
46
 
47
47
  ##
48
48
  # Default client Encoding. Change this value if your application uses a
@@ -1179,6 +1179,7 @@ class Reader
1179
1179
  %w{Book Workbook BOOK WORKBOOK book workbook}.any? do |name|
1180
1180
  @book = @ole.file.open(name) rescue false
1181
1181
  end
1182
+ raise RuntimeError, "could not locate a workbook, possibly an empty file passed" unless @book
1182
1183
  @data = @book.read
1183
1184
  read_bof
1184
1185
  @workbook.ole = @book
@@ -1,6 +1,6 @@
1
1
  spec = Gem::Specification.new do |s|
2
2
  s.name = "spreadsheet"
3
- s.version = "0.7.3"
3
+ s.version = "0.7.7"
4
4
  s.summary = "The Spreadsheet Library is designed to read and write Spreadsheet Documents"
5
5
  s.description = "As of version 0.6.0, only Microsoft Excel compatible spreadsheets are supported"
6
6
  s.author = "Masaomi Hatakeyama, Zeno R.R. Davatz"
@@ -8,8 +8,11 @@ spec = Gem::Specification.new do |s|
8
8
  s.platform = Gem::Platform::RUBY
9
9
  s.files = Dir.glob("{bin,lib,test}/**/*") + Dir.glob("*.txt")
10
10
  s.test_file = "test/suite.rb"
11
- s.executables << 'xlsopcodes'
12
- s.add_dependency('ruby-ole')
11
+ s.executables << "xlsopcodes"
12
+
13
+ s.add_dependency "ruby-ole"
14
+ s.add_development_dependency "hoe"
15
+
13
16
  s.homepage = "http://scm.ywesee.com/?p=spreadsheet/.git;a=summary"
14
17
  end
15
18
 
@@ -0,0 +1,30 @@
1
+ #!/usr/bin/env ruby
2
+ # Excel::TestReader -- Spreadsheet -- 22.01.2013
3
+
4
+ $: << File.expand_path('../../../lib', File.dirname(__FILE__))
5
+
6
+ require 'test/unit'
7
+
8
+ module Spreadsheet
9
+ module Excel
10
+ class TestReader < Test::Unit::TestCase
11
+ def test_empty_file_error_on_setup
12
+ reader = Spreadsheet::Excel::Reader.new
13
+ empty_io = StringIO.new
14
+ assert_raise RuntimeError do
15
+ reader.setup empty_io
16
+ end
17
+ end
18
+
19
+ def test_not_empty_file_error_on_setup
20
+ reader = Spreadsheet::Excel::Reader.new
21
+ data = File.expand_path File.join('test', 'data')
22
+ path = File.join data, 'test_empty.xls'
23
+ not_empty_io = File.open(path, "rb")
24
+ assert_nothing_thrown do
25
+ reader.setup not_empty_io
26
+ end
27
+ end
28
+ end
29
+ end
30
+ end
@@ -1,6 +1,7 @@
1
1
  #!/usr/bin/env ruby
2
2
  # suite.rb -- spreadsheet -- 22.12.2011 -- jsaak@napalm.hu
3
-
3
+ require 'rubygems'
4
+ require 'bundler'
4
5
  require 'find'
5
6
 
6
7
  here = File.dirname(__FILE__)
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: spreadsheet
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.7.6
4
+ version: 0.7.7
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,11 +9,11 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2013-01-15 00:00:00.000000000 Z
12
+ date: 2013-01-22 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: ruby-ole
16
- requirement: &5739340 !ruby/object:Gem::Requirement
16
+ requirement: &8325540 !ruby/object:Gem::Requirement
17
17
  none: false
18
18
  requirements:
19
19
  - - ! '>='
@@ -21,10 +21,10 @@ dependencies:
21
21
  version: '1.0'
22
22
  type: :runtime
23
23
  prerelease: false
24
- version_requirements: *5739340
24
+ version_requirements: *8325540
25
25
  - !ruby/object:Gem::Dependency
26
26
  name: rdoc
27
- requirement: &5732180 !ruby/object:Gem::Requirement
27
+ requirement: &8338840 !ruby/object:Gem::Requirement
28
28
  none: false
29
29
  requirements:
30
30
  - - ~>
@@ -32,10 +32,10 @@ dependencies:
32
32
  version: '3.10'
33
33
  type: :development
34
34
  prerelease: false
35
- version_requirements: *5732180
35
+ version_requirements: *8338840
36
36
  - !ruby/object:Gem::Dependency
37
37
  name: hoe
38
- requirement: &5726660 !ruby/object:Gem::Requirement
38
+ requirement: &8336040 !ruby/object:Gem::Requirement
39
39
  none: false
40
40
  requirements:
41
41
  - - ~>
@@ -43,7 +43,7 @@ dependencies:
43
43
  version: '2.13'
44
44
  type: :development
45
45
  prerelease: false
46
- version_requirements: *5726660
46
+ version_requirements: *8336040
47
47
  description: ! 'The Spreadsheet Library is designed to read and write Spreadsheet
48
48
  Documents.
49
49
 
@@ -68,6 +68,8 @@ extra_rdoc_files:
68
68
  files:
69
69
  - .gitignore
70
70
  - GUIDE.txt
71
+ - Gemfile
72
+ - Gemfile.lock
71
73
  - History.txt
72
74
  - LICENSE.txt
73
75
  - Manifest.txt
@@ -126,6 +128,7 @@ files:
126
128
  - test/data/test_version_excel95.xls
127
129
  - test/data/test_version_excel97.xls
128
130
  - test/data/test_version_excel97_2010.xls
131
+ - test/excel/reader.rb
129
132
  - test/excel/row.rb
130
133
  - test/excel/writer/workbook.rb
131
134
  - test/excel/writer/worksheet.rb