Forums | Admin

Discussion Forums: help

Start New Thread Start New Thread

 

By: Alan Baird
RE: SaveAs HTML in Rasta [ reply ]  
2009-09-11 18:16
doh! sorry for the double post...my forum-foo skills are weak :)

AB

By: Alan Baird
RE: SaveAs HTML in Rasta [ reply ]  
2009-09-11 18:13
That will be interesting to see, but in the meantime, I need to get something working on my end that produces HTML. Unfortunately, we weren't able to work out a monkeypatch solution to add the new argument because the OPTIONS hash in Rasta::Configuration is a singleton. I guess we'll just need to create our own version.

Was there ever a point on Github where the code was equivalent to 0.1.10? I looked through the history and the first commit comment was "first commit from rasta 1.0 branch". Was that from 0.1.9? or .10?

Alan

By: Alan Baird
RE: SaveAs HTML in Rasta [ reply ]  
2009-09-11 18:02
That will be interesting to see, but in the meantime, I need to get something working on my end that produces HTML. Unfortunately, we weren't able to work out a monkeypatch solution to add the new argument because the OPTIONS hash in Rasta::Configuration is a singleton. I guess we'll just need to create our own version.

Was there ever a point on Github where the code was equivalent to 0.1.10? I looked through the history and the first commit comment was "first commit from rasta 1.0 branch". Was that from 0.1.9? or .10?

Alan

By: Hugh McGowan
RE: SaveAs HTML in Rasta [ reply ]  
2009-09-11 16:54
For Rasta 1.0 I'm moving to use Roo and replacing the spreadsheet output with full HTML output (tabbed output for the sheets where one of the sheets is the Rspec output). I'll see if I can pull together a self-contained example and post it to see what folks think. I'll see if I can get to that in the next few days...

By: Alan Baird
SaveAs HTML in Rasta [ reply ]  
2009-09-11 16:39
Hugh -

Janson and I have figured out a way to get Rasta to tell Excel to save the results as an HTML file. All we really needed to do was modify Rasta::Spreadsheet::Book#save to the following:

def save
@o.Save if @excel
if Rasta::Configuration.instance.save_as
@o.SaveAs(@filename + '.htm', 44) if @excel
end
end

..and then add
:save_as => false, # for SaveAs HTML

..to Rasta::Configuration::OPTIONS

..and
cli.on('-s','--save-as-html', 'Save Excel results as HTML') {config.save_as = true}

..to Rasta::Commandline.define_options.

This will cause Excel to produce an HTML format that in our opinion is superior to the Rspec HTML format (which you still get).

We would like for you to consider adding this to Rasta. I can send you a different format (like SVN diff or fork Rasta on Github), but I'm not sure if what's on Github is in a position to be forked or where an SVN repo might be.

What do you think?

Alan
abaird@bairdsnet.net />