Readme.markdown in pizzazz-0.1.5 vs Readme.markdown in pizzazz-0.2.0
- old
+ new
@@ -1,12 +1,11 @@
# Pizzazz
-[](https://travis-ci.org/soffes/pizzazz) [](https://coveralls.io/r/soffes/pizzazz) [](https://codeclimate.com/github/soffes/pizzazz) [](https://gemnasium.com/soffes/pizzazz) [](http://badge.fury.io/rb/pizzazz)
+[](https://travis-ci.org/soffes/pizzazz) [](https://codeclimate.com/github/soffes/pizzazz/coverage) [](https://codeclimate.com/github/soffes/pizzazz) [](https://gemnasium.com/soffes/pizzazz) [](http://badge.fury.io/rb/pizzazz)
Pizzazz is a simple pure Ruby implementation of code coloring, but just for JSON. Basically, if you have a ruby object and want to show it converted to JSON and add HTML around it so you can color it.
-[Cheddar](http://cheddarapp.com) uses this to show example output of it's API calls. [Check it out](https://cheddarapp.com/developer/lists).
## Installation
Add this line to your application's Gemfile:
@@ -28,13 +27,13 @@
## Usage
Pizzazzifing an object is simple:
``` ruby
-object = { name: 'Sam Soffes', website: 'http://samsoff.es' }
+object = { name: 'Sam Soffes', website: 'http://soff.es' }
Pizzazz.ify(object)
-#=> "{\n <span class=\"string\">\"name\"</span>: <span class=\"string\">\"Sam Soffes\"</span>,\n <span class=\"string\">\"website\"</span>: <span class=\"string\">\"http://samsoff.es\"</span>\n}"
+#=> "{\n <span class=\"string key\">\"name\"</span>: <span class=\"string\">\"Sam Soffes\"</span>,\n <span class=\"string key\">\"website\"</span>: <span class=\"string\">\"http://soff.es\"</span>\n}"
```
You can optionally limit arrays or values as well:
``` ruby
@@ -45,11 +44,13 @@
``` ruby
Pizzazz.ify(all_of_the_things, array_limit: 'etc', value_omission: '... (continued)')
```
+You can also supply `omit_root_container` and `prefix`, a string that's added to the beginning of each line of the output, is really nice for doing custom things. Both options can be used independently as well.
+
### HTML
Spans are added around various elements. Here's the classes:
* `string`
@@ -70,10 +71,10 @@
If you're using the asset pipeline, you can simply require `pizzazz` to get my stylesheet. Be sure your `<pre>` has the `pizzazz` class. If you use `ify_html` it will automatically do this.
## Supported Ruby Versions
-Pizzazz is tested under 1.9.2, 1.9.3, 2.0.0, JRuby 1.7.2 (1.9 mode), and Rubinius 2.0.0 (1.9 mode).
+Pizzazz is tested under 1.9.2, 2.0.0, 2.2.4, JRuby 1.7.2 (1.9 mode), and Rubinius 2.0.0 (1.9 mode).
## Contributing
See the [contributing guide](Contributing.markdown).