# Johnson 1.2.0 Released

**URL:** <https://www.ruby-forum.com/t/johnson-1-2-0-released/182275>\
**Category:** Ruby\
**Created:** [January 25, 2010, 10:29pm UTC](https://www.ruby-forum.com/t/johnson-1-2-0-released/182275 "2010-01-25T22:29:19Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![johnnybutler7](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/j/8491ac/32.png) [@johnnybutler7](https://www.ruby-forum.com/u/johnnybutler7)\
**Post date:** [January 25, 2010, 10:29pm UTC](https://www.ruby-forum.com/t/johnson-1-2-0-released/182275/1 "2010-01-25T22:29:19Z")

</div>

johnson version 1.2.0 has been released!

- [http://github.com/jbarnette/johnson](http://github.com/jbarnette/johnson)
- [http://groups.google.com/group/johnson-talk](http://groups.google.com/group/johnson-talk)

Johnson wraps JavaScript in a loving Ruby embrace. It embeds the  
Mozilla SpiderMonkey JavaScript runtime as a C extension. This release  
squashes many, many bugs and segfaults.

Changes:

### 1.2.0 / 2010-01-25

- Add an API for registering custom conversions.
- Subclass Runtime, don’t delegate.
- Make builds a bit more robust, especially on Snow Leopard.
- Handle UTF-8 conversion better. Also, treat JS strings as UTF-16.
- Add small bits of API doco.
- Plug tons of root leaks.
- Make Function.prototype.apply handle Ruby arrays.
- Remove Rails EJS support, it was a joke to begin with.
- Whitespace, formatting, and organization cleanups.

---

<div class="post-metadata">

**Author:** ![johnnybutler7](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/j/8491ac/32.png) [@johnnybutler7](https://www.ruby-forum.com/u/johnnybutler7)\
**Post date:** [January 26, 2010, 1:53pm UTC](https://www.ruby-forum.com/t/johnson-1-2-0-released/182275/2 "2010-01-26T13:53:32Z")

</div>

On Tue, Jan 26, 2010 at 2:58 AM, John B. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)  
wrote:

> johnson version 1.2.0 has been released!
> 
> - [http://github.com/jbarnette/johnson](http://github.com/jbarnette/johnson)
> - [http://groups.google.com/group/johnson-talk](http://groups.google.com/group/johnson-talk)
> 
> Johnson wraps JavaScript in a loving Ruby embrace. It embeds the  
> Mozilla SpiderMonkey JavaScript runtime as a C extension. This release  
> squashes many, many bugs and segfaults.

Could you talk about some of the potential use cases for this?

martin

---

<div class="post-metadata">

**Author:** ![johnnybutler7](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/j/8491ac/32.png) [@johnnybutler7](https://www.ruby-forum.com/u/johnnybutler7)\
**Post date:** [January 26, 2010, 4:09pm UTC](https://www.ruby-forum.com/t/johnson-1-2-0-released/182275/3 "2010-01-26T16:09:23Z")

</div>

Automated JavaScript testing through existing Ruby interfaces, e.g.  
RSpec.

James

---

<div class="post-metadata">

**Author:** ![johnnybutler7](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/j/8491ac/32.png) [@johnnybutler7](https://www.ruby-forum.com/u/johnnybutler7)\
**Post date:** [January 26, 2010, 5:24pm UTC](https://www.ruby-forum.com/t/johnson-1-2-0-released/182275/4 "2010-01-26T17:24:18Z")

</div>

> > > - [http://github.com/jbarnette/johnson](http://github.com/jbarnette/johnson)
> > > - [http://groups.google.com/group/johnson-talk](http://groups.google.com/group/johnson-talk)
> > > 
> > > Johnson wraps JavaScript in a loving Ruby embrace. It embeds the  
> > > Mozilla SpiderMonkey JavaScript runtime as a C extension. This release  
> > > squashes many, many bugs and segfaults.
> > 
> > Could you talk about some of the potential use cases for this?
> > 
> > martin

blue-ridge is an example. It’s a packing of a several projects that  
provides an rspec-like environment for JS. It currently uses Rhino, the  
Java JS interpreter, but there are efforts underway to make it work with  
Johnson/SpiderMoneky. That will require the next version of Johnson,  
tentatively, 2.0.0, but that’s been under development for quite some  
time so there should be a prereleases of it before too long.

I do a lot of JS testing, using Johnson and other dependent gems.  
There’s the env-js project and the envjs gem that provide a browser  
environment, e.g., a window object, based on Johnson. Then there’s jazrb  
which combines the Jasmine (rspec-like) BDD framework with envjs.  
jslintrb is a Johnson-based ruby driver for Crockford’s jslint. And I  
have a bastardized version of watchr that provides autotest-like  
environment for jazrb and jslint … (and haml and sass …)

FWIW, none of this is integrated with Rails at this point …
