News
CodeRay: CodeRay 1.0, first preview
CodeRay 1.0.0.598.pre was just pushed to RubyGems. Don't use it for production mode - it might throw up :)
I won't go into detail about the new functions here. You can read the logs or the List of Changes.
The new version is neither feature-complete, nor even completely defined yet. But to highlight some of the already implemented changes, here's an overview of what's coming in the 1.0 release:
- New Direct Streaming tokens interface; actually, I rewrote most of CodeRay. It's slimmer and up to 50% faster now :)
diffhighlighting 2.0 with code highlighting and inline changes eye-catchers.- embracing HTML5, because I love it. Support for Internet Explorer has been officially dropped.
- Dozens of fixes, improvements, and cleanups.
- revamped [[New Command Line Interface|command line interface]] (the
coderayexecutable) - a Clojure scanner from Licenser
- HTML scanner with integrated JavaScript and CSS highlighting
1.0 will not be API-compatible with earlier versions. Especially, if you use a custom Scanner or Encoder, it will not work. They must be updated to the new API.
Have fun, and comment if you like. As usual, all feedback can be mailed to me (murphy rubychan de).
CodeRay: Downtime of Odd-Eyed Code
code.licenser.net and redmine.rubychan.de are currently struck by a series of downtimes. You will see a "Service temporarily unavailable" error message.
We are sorry for the inconveniences and are investigating the problem. If you experience such an outage, and it is not fixed after some minutes, please send a mail to <murphy rubychan de> with a short notice so that we can react.
Well, Shit Happens.

CodeRay: CodeRay 0.9.3 "Eyjafjallajökull" released
See Gemcutter or run gem install coderay.
After Ryan Bates covered CodeRay in the 207th Railscast, the CodeRay website got a lot of visitors :) I'm very happy about the growing interest on syntax highlighting.
Changes¶
- Maintainance: Documentation fixes (see #218).
- Improvements to the
coderayexecutable:- The
Termencoder is used when printing the output to a terminal. - A new optional 3rd parameter allows to specify a filename.
- Minor improvements and fixes.
- The
- Small fixes to the Java, JavaScript, and JSON scanners.
Upgrading from 0.9.2 should be no problem. Read the full list of changes in the Wiki.
This release was tested with Ruby 1.8.6, 1.8.7, 1.9.1, 1.9.2, Ruby Enterprise Edition, and JRuby 1.4.
Beware: JRuby 1.5.0.RC1 doesn't play well together with CodeRay at the moment.
Nicknamed "Eyjafjallajökull"¶
That's the name of the Icelandic volcano that broke out lately. Since nobody helped me this time, I've just chosen an arbitrary nickname :)
Distributions¶
- Rubygem:
[sudo] gem update coderay - Tarball release: RubyForge
- Subversion access: http://svn.rubychan.de/coderay/tags/0.9.3
Future¶
I'm working on the next major release 1.0 which will bring
- more speed with a simpler Scanner/Encoder API
- HTML 5 compatibility
- an improved CLI
- line number links for the HTML encoder and
- an intelligent Diff highlighter.
In addition, the bulky scanner tests have been moved into a separate repository.
There's no release date set, but I think we will see something this year.
As always, any comments and feedback are welcome!
CodeRay: Redmine updates to CodeRay 0.9.2
Yesterday, Jean-Phillipe Lang himself updated the Redmine version of CodeRay to the latest 0.9.2 released earlier.
I think this is a great step forward. Redmine is used by a lot of people, and while they now have a plugin solution for alternatives like Ultraviolet, Pygments, and Prettify, CodeRay will be the default highlighter (and the only one pre-installed) for now.
With this change, Redmine's CodeRay has merged with the official gem, and I can now work on features specifically designed to improve it for Redmine. Also, bug reports from their site (so far, there was only one) can be translated directly into CodeRay issues.
There are still some issues with the integration; for example, the file view seems to highlight each line separately. So I have to implement Tokens#split_into_lines.
Thanks to the Redmine team! I'm looking forward to see version 1.0 which is scheduled for July.
CodeRay: CodeRay 0.9.2 "Flameeyes" released
See Gemcutter or run gem install coderay.
The last version has been downloaded 4398 times since its release, and I've been getting email feedback almost daily. Bug reports were sparse, but very helpful. I welcome every feedback, bug reports, suggestions, and enhancement requests. Mail me (murphy rubychan de) or file a ticket here.
A bugfix release¶
- Maintainance: Removed the
Term::Ansicolorlibrary, added basictestanddoctasks in the Gem release (thanks to Diego Elio "Flameeyes" Pettenò for reporting). - Now, CodeRay also doesn't print junk in
$DEBUGmode any more. - The new
Terminalencoder by Rob Aldred was tweaked a little bit, but it's still beta. Try it out withcoderay -ruby -term < Rakefileor something. - The
GroovyandPHPscanners got minor fixes.
So, all changes were minor bugfixes and enhancements, and upgrading from 0.9.1 should be no problem. Read the full list of changes in the Wiki.
This release was tested with JRuby under SunOS 5.10 on a heavily multicore Sun Fire V440 by Licenser. It's so enterprise! Of course, it should also run with Ruby 1.8.6 and up, Ruby 1.9.1 and up (including the latest trunk), and JRuby. MacRuby and Rubinius are not up to it yet.
Nicknamed "Flameeyes"¶
After 0.8 was nicknamed "fiat lux", I didn't choose another such release nickname. My idea now is that for bugfix releases, the name of the top contributer (I decide who that is) to the release will also be the nickname of the release.
I hope Diego doesn't mind :) He's one of the Gentoo developers who work to package Ruby gems for their platform, and he asked me to add basic maintainance Rake tasks to the Gem release, and reminded me that the term/ansicolor library was obsolete (the Terminal encoder doesn't use it, but the tests do, so I moved it into the scanner tests.)
Distributions¶
So, CodeRay will appear in Gentoo, and it's also available for Debian.
And most importantly, Jean-Philippe Lang from the Redmine team wants to update to this release. I can see from our server statistics that most interest in CodeRay comes from their site, and I'm so happy that they integrated it into their project management software (the best there is, in my opinion). So, Redmine uses CodeRay, CodeRay development uses Redmine - what a nice community.
Future¶
Maybe there will be 0.9.3, but I want to put my efforts into the mystical 1.0, which will be faster, better, slimmer, and more colorful. It will also use some great ideas from Pygments. However, new scanners and encoders (I know, that is all you care about ;) are scheduled for 1.1 - so please be patient.
CodeRay: 1,000 Downloads after 14 Days!
Says Gemcutter.
I'm happy that the new version seems to get adopted by a lot of people :D
CodeRay: Supported Languages

CodeRay: Updated Documentation
I cleaned up a lot of Rdoc1 code for the latest CodeRay documentation.
It contains fewer garbage and more complete descriptions of the API. Also, the image links have been fixed:

It's not uploaded into the repo yet, and won't be included in the 0.9 series.
1 Rdoc is such a pain in the ass :(
CodeRay: CodeRay 0.9.1
New features¶
- new languages:
- C++
- Groovy (beta)
- PHP (based on the work of Stefan Walk)
- Python
- SQL (based on Josh Goebel's SQL scanner)
- a new JSON encoder
- an experimental Terminal encoder (
term) by Rob Aldred - a Lines of Code counter
- a comment filter (strips comment tokens out of the code)
- new
:titleoption for thePageencoder FileType::[]andCodeRay::scan_filework with Pathname objects
There are many more bugfixes and improvements, and some API changes as well, like plugin titles (r345). There's also a [[Changes|complete list of changes]].
Notes¶
This version is compatible with Ruby 1.8.6, 1.8.7, JRuby 1.4.0, Ruby 1.9.1 and Ruby 1.9.2.
Migration¶
If you're having trouble to get your library or application to work with this release, please mail me (murphy rubychan de) or file a ticket here.
Download¶
Just gem install coderay or get it from Gemcutter.
CodeRay: Another release candidate
A lot of polishing today, resulting in a fourth release candidate of the 0.9 series.
Also, I have prepared a comprehensive List of changes since CodeRay 0.8.
Download¶
http://redmine.rubychan.de/attachments/119/coderay-0.9.0.424.gem
Also available in: Atom
