[ANN] bluecloth 2.0.5

Version 2.0.5 of bluecloth has been released.

BlueCloth is a Ruby implementation of [Markdown][1], a text-to-HTML
conversion tool for web writers. To quote from the project page:
Markdown allows you to write using an easy-to-read, easy-to-write plain
text format, then convert it to structurally valid XHTML (or HTML).

== Project Page

  http://deveiate.org/projects/BlueCloth/

== Installation

Via gems:

  $ sudo gem install bluecloth

or from source:

  $ wget http://deveiate.org/code/bluecloth-2.0.5.tar.gz
  $ tar -xzvf bluecloth-2.0.5.tar.gz
  $ cd bluecloth-2.0.5
  $ sudo rake install

== Changes
* Sets the ::Markdown constant to ::BlueCloth if it hasn't yet been
   defined by something else (rails-security).

ged@FaerieMUD.org wrote:

Version 2.0.5 of bluecloth has been released.

[Asked before for the 2.0.4 release, but maybe you didn't see it]

Any plans to support some of the extensions that maruku supports, like tables and footnotes? Or does it already?

http://maruku.rubyforge.org/maruku.html#extra

···

--
       vjoel : Joel VanderWerf : path berkeley edu : 510 665 3407

I plan to support any of the extensions that the author of Discount (on which BlueCloth 2 is based) supports (http://www.pell.portland.or.us/~orc/Code/markdown/#Language+extensions\), which don't (currently) include those two, but do include a few other "Markdown Extra" features.

I personally agree with the author of Markdown that anything more than basic Markdown is diverging from the whole point of it: that you shouldn't have to remember to do anything different than you'd do when writing an email to generate HTML that looks okay and is valid. If I want tables and element IDs and definition lists, I use Textile.

That said, if anyone is motivated enough to send me a patch that adds any of the Markdown Extra stuff, provided it (a) isn't enabled if :strict_mode is true, (b) includes tests, and (c) doesn't make keeping up with Discount updates a pain in the ass, I'll apply it.

···

On Jul 15, 2009, at 6:29 PM, Joel VanderWerf wrote:

Any plans to support some of the extensions that maruku supports, like tables and footnotes? Or does it already?

--
Michael Granger <ged@FaerieMUD.org>
Rubymage, Architect, Believer
The FaerieMUD Consortium <http://www.FaerieMUD.org/&gt;

There is a non-standard function bzero() in generate.c, line 671
it stops VC from compiling bluecloth.
why not replace bzero() with standard memset()?

···

--
Posted via http://www.ruby-forum.com/.

Good question; generate.c is code from Discount, so I'm loathe to change it directly, but I'll add a test for bzero() to the extconf, and substitute the equivalent memset() if it's not defined. That fix will be in the next release. I don't (currently) have a Windows license to test with, so would you mind testing it out before I release?

···

On Jul 15, 2009, at 11:32 PM, Lui Core wrote:

There is a non-standard function bzero() in generate.c, line 671
it stops VC from compiling bluecloth.
why not replace bzero() with standard memset()?

--
Michael Granger <ged@FaerieMUD.org>
Rubymage, Architect, Believer
The FaerieMUD Consortium <http://www.FaerieMUD.org/&gt;

Michael Granger wrote:

···

On Jul 15, 2009, at 11:32 PM, Lui Core wrote:

There is a non-standard function bzero() in generate.c, line 671
it stops VC from compiling bluecloth.
why not replace bzero() with standard memset()?

Good question; generate.c is code from Discount, so I'm loathe to
change it directly, but I'll add a test for bzero() to the extconf,
and substitute the equivalent memset() if it's not defined. That fix
will be in the next release. I don't (currently) have a Windows
license to test with, so would you mind testing it out before I release?

I'd be glad to :slight_smile:
--
Posted via http://www.ruby-forum.com/\.

Hi,

I am trying to install bluecloth on Windows XP, but got the following
errors when I issue the "gem install bluecloth" command:

C:\jerry>gem install bluecloth
Building native extensions. This could take a while...
ERROR: Error installing bluecloth:
        ERROR: Failed to build gem native extension.

c:/ruby/bin/ruby.exe extconf.rb
checking for srand()... no
checking for srandom()... no
checking for random()... no
checking for rand()... no
checking for strcasecmp()... no
checking for stricmp()... no
This extension requires either strcasecmp() or stricmp()
*** extconf.rb failed ***
Could not create Makefile due to some reason, probably lack of
necessary libraries and/or headers. Check the mkmf.log file for more
details. You may need configuration options.

···

--
Posted via http://www.ruby-forum.com/.

IF YOU ARE USING VC2005 or VC2008, there maybe a problem of strcasecmp()
and stricmp().
stricmp() is deprecated since VC 2005 (use _stricmp() instead), but
ruby's header win32.h doesn't know it.

a quick hack fix:
in include/ruby-1.x.x/ruby/win32.h, change definitions of strcasecmp and
strncasecmp as follows:

  #define strcasecmp _stricmp
  #define strncasecmp _strnicmp

For other compilers, maybe there is a similar issue ? i don't know ...

···

--
Posted via http://www.ruby-forum.com/.

... you need a C compiler to build native extensions ...

Li Cheng wrote:

···

Hi,

I am trying to install bluecloth on Windows XP, but got the following
errors when I issue the "gem install bluecloth" command:

C:\jerry>gem install bluecloth
Building native extensions. This could take a while...
ERROR: Error installing bluecloth:
......

--
Posted via http://www.ruby-forum.com/\.

Is there another way to get bluecloth on to Windows without gem or C
compiler?

Thank you.

···

--
Posted via http://www.ruby-forum.com/.

Please ask the gem author to use rake-compiler to generate native
Windows gems during the release process:

http://github.com/luislavena/rake-compiler/tree/master

There are several examples of other gem authors using rake-compiler to
release gems:

http://wiki.github.com/luislavena/rake-compiler/projects-using-rake-compiler

Using that tool they will be able to generate binaries for Windows
without you needed to fight and resolve the obsolete VC6/Compiling
extensions war.

···

On Jul 31, 8:23 am, Li Cheng <qweru...@gmail.com> wrote:

Is there another way to get bluecloth on to Windows without gem or C
compiler?

Thank you.

--
Luis Lavena

Sorry, I do actually have build targets for binary Windows-compatible gems, but I've been neglecting to build them. I've built one for the 2.0.5 release and put it on RubyForge, and I'll be hooking the win32 build into my release tasks so they'll be distributed for future releases, too.

You can also fetch the binary gem from:

   http://deveiate.org/code/bluecloth-2.0.5-x86-mingw32.gem

···

On Jul 31, 2009, at 4:23 AM, Li Cheng wrote:

Is there another way to get bluecloth on to Windows without gem or C
compiler?

--
Michael Granger <ged@FaerieMUD.org>
Rubymage, Architect, Believer
The FaerieMUD Consortium <http://www.FaerieMUD.org/&gt;

Michael.

If you switch to rake-compiler you can deliver Windows native gems
from the convenience of Linux or OSX.

···

On Aug 7, 9:37 am, Michael Granger <g...@faeriemud.org> wrote:

On Jul 31, 2009, at 4:23 AM, Li Cheng wrote:

> Is there another way to get bluecloth on to Windows without gem or C
> compiler?

Sorry, I do actually have build targets for binary Windows-compatible
gems, but I've been neglecting to build them. I've built one for the
2.0.5 release and put it on RubyForge, and I'll be hooking the win32
build into my release tasks so they'll be distributed for future
releases, too.

You can also fetch the binary gem from:

http://deveiate.org/code/bluecloth-2.0.5-x86-mingw32.gem

--
Luis Lavena

Hi Michael,

I'm trying to use the bluecloth-2.0.5-x86-mingw32.gem gem on Windows
XP, and the install went beautifully, but I get errors on use. Using
this test:
* * * *
require 'bluecloth'
BlueCloth.new('*testing*').to_html
* * * *

I get the following:
* * * *
C:/Ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in
`gem_original_require': no such file
to load -- bluecloth_ext (LoadError)
        from C:/Ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:
31:in `require'
        from C:/Ruby/lib/ruby/gems/1.8/gems/bluecloth-2.0.5-x86-
mingw32/lib/bluecloth.rb:156
        from C:/Ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:
36:in `gem_original_require'
        from C:/Ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:
36:in `require'
        from C:/Ruby/temp.rb:1
* * * *

Am I missing a dependency somewhere? Apologies if this is an obvious
issue, I'm not a Ruby person, I'm just trying to help the Prototype
project with its documentation, and naturally they're trying to use
BlueCloth2 for markdown stuff.

Thanks in advance,

···

On Aug 7, 1:37 pm, Michael Granger <g...@faeriemud.org> wrote:

On Jul 31, 2009, at 4:23 AM, Li Cheng wrote:

> Is there another way to getblueclothon to Windows without gem or C
> compiler?

Sorry, I do actually have build targets for binary Windows-compatible
gems, but I've been neglecting to build them. I've built one for the
2.0.5 release and put it on RubyForge, and I'll be hooking the win32
build into my release tasks so they'll be distributed for future
releases, too.

You can also fetch the binary gem from:

http://deveiate.org/code/bluecloth-2.0.5-x86-mingw32.gem

--
Michael Granger <g...@FaerieMUD.org>
Rubymage, Architect, Believer
The FaerieMUD Consortium <http://www.FaerieMUD.org/&gt;

--
T.J. Crowder
tj / crowder software / com

But I'm already delivering them from the convenience of OSX! :slight_smile:

I tested it using a friend's Windows box, but the gem above was built on my Mac Pro. I wrote Rake tasks to build a cross-compiling Ruby, and then cross-compile gems before I'd even heard of rake-compiler. I think rake-compiler is an awesome bit of software, don't get me wrong, but I'm loathe to convert 20+ projects to use it now when I already have something that works pretty well.

···

On Aug 7, 2009, at 4:00 PM, Luis Lavena wrote:

On Aug 7, 9:37 am, Michael Granger <g...@faeriemud.org> wrote:

You can also fetch the binary gem from:

   http://deveiate.org/code/bluecloth-2.0.5-x86-mingw32.gem

If you switch to rake-compiler you can deliver Windows native gems
from the convenience of Linux or OSX.

--
Michael Granger <ged@FaerieMUD.org>
Rubymage, Architect, Believer
The FaerieMUD Consortium <http://www.FaerieMUD.org/&gt;

*ANY* library installed with RubyGems must require rubygems.

require 'rubygems'
require 'bluecloth'
BlueCloth.new('*testing*').to_html

Unless, of course, you're requiring it inside Rails, which already
requires rubygems and you should be indicating the gem dependency
inside environment.rb

HTH,

···

On Sep 7, 2:50 pm, "T.J. Crowder" <t...@crowdersoftware.com> wrote:

On Aug 7, 1:37 pm, Michael Granger <g...@faeriemud.org> wrote:

> On Jul 31, 2009, at 4:23 AM, Li Cheng wrote:

> > Is there another way to getblueclothon to Windows without gem or C
> > compiler?

> Sorry, I do actually have build targets for binary Windows-compatible
> gems, but I've been neglecting to build them. I've built one for the
> 2.0.5 release and put it on RubyForge, and I'll be hooking the win32
> build into my release tasks so they'll be distributed for future
> releases, too.

> You can also fetch the binary gem from:

> http://deveiate.org/code/bluecloth-2.0.5-x86-mingw32.gem

> --
> Michael Granger <g...@FaerieMUD.org>
> Rubymage, Architect, Believer
> The FaerieMUD Consortium <http://www.FaerieMUD.org/&gt;

Hi Michael,

I'm trying to use the bluecloth-2.0.5-x86-mingw32.gem gem on Windows
XP, and the install went beautifully, but I get errors on use. Using
this test:
* * * *
require 'bluecloth'
BlueCloth.new('*testing*').to_html
* * * *

I get the following:
* * * *
C:/Ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in
`gem_original_require': no such file
to load -- bluecloth_ext (LoadError)
from C:/Ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:
31:in `require'
from C:/Ruby/lib/ruby/gems/1.8/gems/bluecloth-2.0.5-x86-
mingw32/lib/bluecloth.rb:156
from C:/Ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:
36:in `gem_original_require'
from C:/Ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:
36:in `require'
from C:/Ruby/temp.rb:1
* * * *

Am I missing a dependency somewhere? Apologies if this is an obvious
issue, I'm not a Ruby person, I'm just trying to help the Prototype
project with its documentation, and naturally they're trying to use
BlueCloth2 for markdown stuff.

--
Luis Lavena

>> You can also fetch the binary gem from:

>> http://deveiate.org/code/bluecloth-2.0.5-x86-mingw32.gem

> If you switch to rake-compiler you can deliver Windows native gems
> from the convenience of Linux or OSX.

But I'm already delivering them from the convenience of OSX! :slight_smile:

Glad to hear that!

I tested it using a friend's Windows box, but the gem above was built
on my Mac Pro. I wrote Rake tasks to build a cross-compiling Ruby, and
then cross-compile gems before I'd even heard of rake-compiler. I
think rake-compiler is an awesome bit of software, don't get me wrong,
but I'm loathe to convert 20+ projects to use it now when I already
have something that works pretty well.

Then perhaps I was looking at the wrong code, since couldn't find over
the repository:

Any indication of cross compilation tasks.

I'm not wanting to force you use another tool or transform your
projects, just wanted to ease the burden on helping others.

Cheers,

···

On Aug 7, 9:04 pm, Michael Granger <g...@FaerieMUD.org> wrote:

On Aug 7, 2009, at 4:00 PM, Luis Lavena wrote:
> On Aug 7, 9:37 am, Michael Granger <g...@faeriemud.org> wrote:

--
Luis Lavena

Hi Luis,

Thanks for that. Unfortunately, that doesn't seem to be it, adding
the rubygems require didn't change anything. I'm not a Ruby person,
but I guess that means they must be enabled by default in (as you say)
the configuration; this is just a fairly basic One-Click Ruby Install.

Thanks anyway, though,

···

On Sep 7, 7:07 pm, Luis Lavena <luislav...@gmail.com> wrote:

On Sep 7, 2:50 pm, "T.J. Crowder" <t...@crowdersoftware.com> wrote:

> On Aug 7, 1:37 pm, Michael Granger <g...@faeriemud.org> wrote:

> > On Jul 31, 2009, at 4:23 AM, Li Cheng wrote:

> > > Is there another way to getblueclothon to Windows without gem or C
> > > compiler?

> > Sorry, I do actually have build targets for binary Windows-compatible
> > gems, but I've been neglecting to build them. I've built one for the
> > 2.0.5 release and put it on RubyForge, and I'll be hooking the win32
> > build into my release tasks so they'll be distributed for future
> > releases, too.

> > You can also fetch the binary gem from:

> > http://deveiate.org/code/bluecloth-2.0.5-x86-mingw32.gem

> > --
> > Michael Granger <g...@FaerieMUD.org>
> > Rubymage, Architect, Believer
> > The FaerieMUD Consortium <http://www.FaerieMUD.org/&gt;

> Hi Michael,

> I'm trying to use the bluecloth-2.0.5-x86-mingw32.gem gem on Windows
> XP, and the install went beautifully, but I get errors on use. Using
> this test:
> * * * *
> require 'bluecloth'
> BlueCloth.new('*testing*').to_html
> * * * *

> I get the following:
> * * * *
> C:/Ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in
> `gem_original_require': no such file
> to load -- bluecloth_ext (LoadError)
> from C:/Ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:
> 31:in `require'
> from C:/Ruby/lib/ruby/gems/1.8/gems/bluecloth-2.0.5-x86-
> mingw32/lib/bluecloth.rb:156
> from C:/Ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:
> 36:in `gem_original_require'
> from C:/Ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:
> 36:in `require'
> from C:/Ruby/temp.rb:1
> * * * *

> Am I missing a dependency somewhere? Apologies if this is an obvious
> issue, I'm not a Ruby person, I'm just trying to help the Prototype
> project with its documentation, and naturally they're trying to use
> BlueCloth2 for markdown stuff.

*ANY* library installed with RubyGems must require rubygems.

require 'rubygems'
require 'bluecloth'
BlueCloth.new('*testing*').to_html

Unless, of course, you're requiring it inside Rails, which already
requires rubygems and you should be indicating the gem dependency
inside environment.rb

HTH,
--
Luis Lavena

--
T.J. Crowder
tj / crowder software / com
www.crowdersoftware.com

Check here:

   http://repo.deveiate.org/rake-tasklibs/file/bc0c72d95663/win32.rb

I have a single directory of rake tasks for all my other projects that gets checked out under the top-level directory.

I'd appreciate any suggestions you might have for me if you see something glaringly wrong. I stitched the tasks together out of a couple of blog posts on the subject I found, and I know very little about Win32 or binary gems. They seem to work when I test them, but I might be doing something horrible.

···

On Aug 8, 2009, at 4:35 PM, Luis Lavena wrote:

I wrote Rake tasks to build a cross-compiling Ruby, and
then cross-compile gems before I'd even heard of rake-compiler. I
think rake-compiler is an awesome bit of software, don't get me wrong,
but I'm loathe to convert 20+ projects to use it now when I already
have something that works pretty well.

Then perhaps I was looking at the wrong code, since couldn't find over
the repository:

dev(E)iate

Any indication of cross compilation tasks.

--
Michael Granger <ged@FaerieMUD.org>
Rubymage, Architect, Believer
The FaerieMUD Consortium <http://www.FaerieMUD.org/&gt;

Seems you using the old One-Click Installer.

Please follow some guides from our homepage:

I can tell you lot of these gems works on the new version of Ruby
Installer :slight_smile:

···

On Sep 10, 11:04 am, "T.J. Crowder" <t...@crowdersoftware.com> wrote:

On Sep 7, 7:07 pm, Luis Lavena <luislav...@gmail.com> wrote:

> On Sep 7, 2:50 pm, "T.J. Crowder" <t...@crowdersoftware.com> wrote:

> > On Aug 7, 1:37 pm, Michael Granger <g...@faeriemud.org> wrote:

> > > On Jul 31, 2009, at 4:23 AM, Li Cheng wrote:

> > > > Is there another way to getblueclothon to Windows without gem or C
> > > > compiler?

> > > Sorry, I do actually have build targets for binary Windows-compatible
> > > gems, but I've been neglecting to build them. I've built one for the
> > > 2.0.5 release and put it on RubyForge, and I'll be hooking the win32
> > > build into my release tasks so they'll be distributed for future
> > > releases, too.

> > > You can also fetch the binary gem from:

> > > http://deveiate.org/code/bluecloth-2.0.5-x86-mingw32.gem

> > > --
> > > Michael Granger <g...@FaerieMUD.org>
> > > Rubymage, Architect, Believer
> > > The FaerieMUD Consortium <http://www.FaerieMUD.org/&gt;

> > Hi Michael,

> > I'm trying to use the bluecloth-2.0.5-x86-mingw32.gem gem on Windows
> > XP, and the install went beautifully, but I get errors on use. Using
> > this test:
> > * * * *
> > require 'bluecloth'
> > BlueCloth.new('*testing*').to_html
> > * * * *

> > I get the following:
> > * * * *
> > C:/Ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in
> > `gem_original_require': no such file
> > to load -- bluecloth_ext (LoadError)
> > from C:/Ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:
> > 31:in `require'
> > from C:/Ruby/lib/ruby/gems/1.8/gems/bluecloth-2.0.5-x86-
> > mingw32/lib/bluecloth.rb:156
> > from C:/Ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:
> > 36:in `gem_original_require'
> > from C:/Ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:
> > 36:in `require'
> > from C:/Ruby/temp.rb:1
> > * * * *

> > Am I missing a dependency somewhere? Apologies if this is an obvious
> > issue, I'm not a Ruby person, I'm just trying to help the Prototype
> > project with its documentation, and naturally they're trying to use
> > BlueCloth2 for markdown stuff.

> *ANY* library installed with RubyGems must require rubygems.

> require 'rubygems'
> require 'bluecloth'
> BlueCloth.new('*testing*').to_html

> Unless, of course, you're requiring it inside Rails, which already
> requires rubygems and you should be indicating the gem dependency
> inside environment.rb

> HTH,
> --
> Luis Lavena

Hi Luis,

Thanks for that. Unfortunately, that doesn't seem to be it, adding
the rubygems require didn't change anything. I'm not a Ruby person,
but I guess that means they must be enabled by default in (as you say)
the configuration; this is just a fairly basic One-Click Ruby Install.

Thanks anyway, though,

--
Luis Lavena