view · edit · sidebar · attach · print · history

20130724-update-spreadsheet-gem-ruby-2-0-0

<< | Index | >>


Summary

  • Update spreadsheet.

Commits / Patches

Index / Status


Remove warnings with ruby 2.0.0

  • spreadsheeet 0.7.7 works with ruby 2.0.0
  • latest code has some problem with ruby 2.0.0

Diff

There are changes from 0.7.7 to HEAD

A       .travis.yml
M       GUIDE.txt
M       History.txt
M       Manifest.txt
M       README.txt
M       lib/spreadsheet.rb
M       lib/spreadsheet/excel/reader/biff8.rb
A       lib/spreadsheet/excel/rgb.rb
M       lib/spreadsheet/excel/row.rb
M       lib/spreadsheet/excel/worksheet.rb
M       lib/spreadsheet/excel/writer/workbook.rb
M       lib/spreadsheet/excel/writer/worksheet.rb
M       lib/spreadsheet/workbook.rb
M       spreadsheet.gemspec
A       test/data/test_adding_data_to_existing_file.xls
A       test/excel/writer/n_worksheet.rb
M       test/integration.rb
M       test/suite.rb

try test

At first, I try to remove many warnings about code style.

  • warning: mismatched indentations at 'end' with 'class' at xxx
  • warning: method redefined; discarding old xxx
  • warning: assigned but unused variable xxx
  • warning: previous definition of xxx was here
  • The source :rubygems is deprecated because HTTP requests are insecure.

with ruby 2.0.0

% bundle exec ./test/suite.rb 
The source :rubygems is deprecated because HTTP requests are insecure.
Please change your source to 'https://rubygems.org' if possible, or 'http://rubygems.org' if not.
/home/yasuhiro/.work/usr/ywesee/src/spreadsheet/lib/spreadsheet/excel/rgb.rb:120: warning: mismatched indentations at 'end' with 'class' at 13
/home/yasuhiro/.work/usr/ywesee/src/spreadsheet/test/excel/writer/worksheet.rb:78: warning: mismatched indentations at 'end' with 'class' at 10
/home/yasuhiro/.work/usr/ywesee/src/spreadsheet/test/excel/writer/worksheet.rb:11: warning: method redefined; discarding old test_need_number
/home/yasuhiro/.work/usr/ywesee/src/spreadsheet/test/excel/writer/n_worksheet.rb:11: warning: previous definition of test_need_number was here
test/unit warning: method Spreadsheet::Excel::Writer::TestWorksheet#test_need_number is redefined
/home/yasuhiro/.work/usr/ywesee/src/spreadsheet/test/excel/writer/worksheet.rb:23: warning: method redefined; discarding old idx
/home/yasuhiro/.work/usr/ywesee/src/spreadsheet/test/excel/writer/worksheet.rb:23: warning: method redefined; discarding old idx=
/home/yasuhiro/.work/usr/ywesee/src/spreadsheet/test/excel/writer/worksheet.rb:23: warning: method redefined; discarding old first_used
/home/yasuhiro/.work/usr/ywesee/src/spreadsheet/test/excel/writer/worksheet.rb:23: warning: method redefined; discarding old first_used=
/home/yasuhiro/.work/usr/ywesee/src/spreadsheet/test/excel/writer/worksheet.rb:23: warning: method redefined; discarding old first_unused
/home/yasuhiro/.work/usr/ywesee/src/spreadsheet/test/excel/writer/worksheet.rb:23: warning: method redefined; discarding old first_unused=
/home/yasuhiro/.work/usr/ywesee/src/spreadsheet/test/excel/writer/worksheet.rb:23: warning: method redefined; discarding old height
/home/yasuhiro/.work/usr/ywesee/src/spreadsheet/test/excel/writer/worksheet.rb:23: warning: method redefined; discarding old height=
/home/yasuhiro/.work/usr/ywesee/src/spreadsheet/test/excel/writer/worksheet.rb:23: warning: method redefined; discarding old outline_level
/home/yasuhiro/.work/usr/ywesee/src/spreadsheet/test/excel/writer/worksheet.rb:23: warning: method redefined; discarding old outline_level=
/home/yasuhiro/.work/usr/ywesee/src/spreadsheet/test/excel/writer/worksheet.rb:25: warning: method redefined; discarding old initialize
/home/yasuhiro/.work/usr/ywesee/src/spreadsheet/test/excel/writer/n_worksheet.rb:25: warning: previous definition of initialize was here
/home/yasuhiro/.work/usr/ywesee/src/spreadsheet/test/excel/writer/worksheet.rb:29: warning: method redefined; discarding old method_missing
/home/yasuhiro/.work/usr/ywesee/src/spreadsheet/test/excel/writer/n_worksheet.rb:29: warning: previous definition of method_missing was here
/home/yasuhiro/.work/usr/ywesee/src/spreadsheet/test/excel/writer/worksheet.rb:34: warning: method redefined; discarding old test_write_row_should_not_write_if_the_row_has_no_used_columns
/home/yasuhiro/.work/usr/ywesee/src/spreadsheet/test/excel/writer/n_worksheet.rb:34: warning: previous definition of test_write_row_should_not_write_if_the_row_has_no_used_columns was here
test/unit warning: method Spreadsheet::Excel::Writer::TestWorksheet#test_write_row_should_not_write_if_the_row_has_no_used_columns is redefined
/home/yasuhiro/.work/usr/ywesee/src/spreadsheet/test/excel/writer/worksheet.rb:44: warning: method redefined; discarding old test_write_row_should_write_if_any_column_is_used
/home/yasuhiro/.work/usr/ywesee/src/spreadsheet/test/excel/writer/n_worksheet.rb:44: warning: previous definition of test_write_row_should_write_if_any_column_is_used was here
test/unit warning: method Spreadsheet::Excel::Writer::TestWorksheet#test_write_row_should_write_if_any_column_is_used is redefined
/home/yasuhiro/.work/usr/ywesee/src/spreadsheet/test/integration.rb:1277: warning: assigned but unused variable - open_temp_book
Run options: 

# Running tests:

Finished tests in 0.981149s, 76.4410 tests/s, 1086.4812 assertions/s.                                                            
75 tests, 1066 assertions, 0 failures, 0 errors, 0 skips

ruby -v: ruby 2.0.0p247 (2013-06-27 revision 41674) [x86_64-linux]

There are multiple test_need_number methods.

% grep -r test_need_number test 
test/excel/writer/n_worksheet.rb:        def test_need_number
test/excel/writer/worksheet.rb:        def test_need_number

And checked with git blame.
n_worksheet.rb is same file.

commit

Then

ruby-2.0.0-p247
% bundle exec ruby ./test/suite.rb
Run options: 

# Running tests:

Finished tests in 0.960819s, 78.0584 tests/s, 1109.4701 assertions/s.                                                            
75 tests, 1066 assertions, 0 failures, 0 errors, 0 skips

ruby -v: ruby 2.0.0p247 (2013-06-27 revision 41674) [x86_64-linux]
ruby-1.9.3-p448
% bundle exec ruby ./test/suite.rb 
Run options: 

# Running tests:

...........................................................................

Finished tests in 0.863500s, 86.8559 tests/s, 1234.5114 assertions/s.

75 tests, 1066 assertions, 0 failures, 0 errors, 0 skips
ruby-1.8.7-p374
% bundle exec ruby ./test/suite.rb                        
Loaded suite ./test/suite
Started
...........................................................................
Finished in 1.165891 seconds.

75 tests, 1066 assertions, 0 failures, 0 errors

Check spreadsheet with ruby 2.0.0

Checked some example on mailing-list with ruby 2.0.0

view · edit · sidebar · attach · print · history
Page last modified on July 24, 2013, at 10:54 AM