Re: template, markaby question

2012-08-14 Thread Trevor Johns
Well, the elegant (and perhaps philosophically correct) way is to use Markaby.

In general, I try to avoid placing raw HTML into my Ruby code. If you don't 
want to rewrite your HTML, you can use ERB templates. Without being redundant, 
more info on how to make this work can be found here:

http://rubyforge.org/pipermail/camping-list/2010-August/001413.html

Disclaimer: I haven't tried it myself.

-- 
Trevor Johns
http://tjohns.net


-- 
Trevor Johns
http://tjohns.net


On Monday, August 13, 2012 at 8:44 PM, gurugeek wrote:

 hello,
 I am trying to have some simple HTML to be used as a placeholder page for new 
 servers users in a small camping application (basically with using the main 
 site layout plus the current date and time :) )and I was wondering if the 
 correct way is to rewrite the whole html using markaby or I should use the 
 hack 
 
 def layout
 text '
 
  html inside
 where the only ruby code would be Today is  '+Time.now.asctime+' '
 
 or if there is any way that I don't know to have inline templates/use erb ? 
 
 thanks a lot !
 Best Regards
 David
 
 ___
 Camping-list mailing list
 Camping-list@rubyforge.org (mailto:Camping-list@rubyforge.org)
 http://rubyforge.org/mailman/listinfo/camping-list
 
 


___
Camping-list mailing list
Camping-list@rubyforge.org
http://rubyforge.org/mailman/listinfo/camping-list

Re: Is this message getting through?

2012-08-14 Thread Trevor Johns
Yup, seems to be working for me.

--  
Trevor Johns
http://tjohns.net


On Tuesday, August 14, 2012 at 12:59 AM, Jenna Fox wrote:

 testing. list seems to be ignoring my messages  
  
 —
 Jenna
  
 ___
 Camping-list mailing list
 Camping-list@rubyforge.org (mailto:Camping-list@rubyforge.org)
 http://rubyforge.org/mailman/listinfo/camping-list
  
  


___
Camping-list mailing list
Camping-list@rubyforge.org
http://rubyforge.org/mailman/listinfo/camping-list

ChillDB License

2012-05-02 Thread Trevor Johns
My personal favorites are the MIT and BSD licneses -- both are similar, and
basically grant people the right to do whatever they want provided that
they preserve attribution in source code (so called permissive licenses).

MIT is marginally simpler to read and is unambiguous, since there's only
one version. For this reason, it's my personal favorite.

There's actually 3 versions of the BSD license: 4-clause, 3-clause, and
2-clause:

   - 2-clause is functionally identical to the MIT license. If you want to
   go with this, just use the MIT license to prevent confusion. :)
   - 3-clause adds the restriction that the original author's name can't be
   used in advertising.
   - Avoid the 4-clause version -- it has an annoying advertising clause
   that I've never heard anything good about.

There's also the Apache license, which is similar to BSD. However, it's a
much stronger document from a legal perspective, and adds a patent grant.
This comes at the expense of readability. (Roughly 3 paragraphs vs 25
paragraphs)

Avoid public domain -- as has been mentioned, some jurisdictions don't
recognize an author's right to place a work into the public domain before
copyright expires. For this reason, it's legally ambiguous, which is bad
for the people using your code. There's also no warranty disclaimer, so
somebody could (theoretically) take you to court if your code has bugs and
something breaks.

I recommend reading this PDF, which goes into a lot of detail on these
three licenses: http://oreilly.com/openbook/osfreesoft/book/ch02.pdf

-- Trevor

On Wednesday, May 2, 2012, Jenna Fox wrote:

  A few of you sounded interested in using it. I haven't explicitly put a
 software license on it, so I guess it's not technically FOSS yet. What
 licenses are good? BSD? Public Domain?


 —
 Jenna


___
Camping-list mailing list
Camping-list@rubyforge.org
http://rubyforge.org/mailman/listinfo/camping-list

Camping-Omnibus Doesn't Work With Ruby v1.8.6

2008-05-10 Thread Trevor Johns
I've noticed that the copy of Mongrel installed by the camping-omnibus  
gem doesn't work with Ruby 1.8.6. Or to be more specific,  
cgi_multipart_eof_fix (which Mongrel is dependent upon) doesn't work:



$ sudo gem install mongrel --source http://code.whytheluckystiff.net

ERROR:  Error installing mongrel:
cgi_multipart_eof_fix requires Ruby version = 1.8.5


It looks like the copy of Mongrel mirrored on  
code.whytheluckystiff.net is v1.0.1. The latest public release is  
v1.1.4.


Working around this is easy (just download the component parts  
individually from gems.rubyforge.org), but it might scare away some  
newbies who are following the directions on the wiki. Time to update  
the Gems hosted on code.whytheluckystiff.net?


On a related note, how come camping-omnibus doesn't exist on  
gems.rubyforge.org?


--
Trevor Johns
http://tjohns.net

___
Camping-list mailing list
Camping-list@rubyforge.org
http://rubyforge.org/mailman/listinfo/camping-list