Skip to content
Browse files

Replace yajl with oj in docs and tests #365

  • Loading branch information...
1 parent 113067d commit 58bfbc95093bef8c56072ccae6e1ba482e3e31e4 @nesquena committed Nov 26, 2012
Showing with 11 additions and 9 deletions.
  1. +2 −0 CHANGELOG.md
  2. +6 −6 README.md
  3. +1 −1 rabl.gemspec
  4. +2 −2 test/configuration_test.rb
View
2 CHANGELOG.md
@@ -2,6 +2,8 @@
## 0.7.9 (unreleased)
+ * Replace yajl with oj in docs and tests
+
## 0.7.8
* Additional fix for attribute conditional support
View
12 README.md
@@ -37,8 +37,8 @@ or add to your Gemfile:
```ruby
# Gemfile
gem 'rabl'
-# Also add either `json` or `yajl-ruby` as the JSON parser
-gem 'yajl-ruby'
+# Also add either `oj` or `yajl-ruby` as the JSON parser
+gem 'oj'
```
and run `bundle install` to install the dependency.
@@ -152,12 +152,12 @@ If `view_paths` is set to a path, this view path will be checked for every rabl
Add to this path especially when including Rabl in an engine and using view paths within a another Rails app.
Note that the `json_engine` option uses [multi_json](http://intridea.com/2010/6/14/multi-json-the-swappable-json-handler) engine
-defaults so that in most cases you **don't need to configure this** directly. For example, if you wish to use yajl as
+defaults so that in most cases you **don't need to configure this** directly. For example, if you wish to use [oj](https://github.com/ohler55/oj) as
the primary JSON encoding engine simply add that to your Gemfile:
```ruby
# Gemfile
-gem 'yajl-ruby', :require => "yajl"
+gem 'oj'
```
and RABL will automatically start using that engine for encoding your JSON responses!
@@ -503,7 +503,7 @@ Rails and Padrino. I recommend a before_filter on that controller or directly sp
## Resources ##
There are many resources available relating to RABL including the [RABL Wiki](https://github.com/nesquena/rabl/wiki),
-and many tutorials and guides detailed below.
+and many tutorials and guides detailed below.
You can check out the [RABL Site](http://nesquena.github.com/rabl) as well.
### Advanced Usage ###
@@ -542,7 +542,7 @@ Let me know if there's any other useful resources not listed here.
There are other libraries that can either complement or extend the functionality of RABL:
* [gon](https://github.com/gazay/gon) - Exposes your Rails variables in JS with RABL support integrated.
- * [rabl-rails](https://github.com/ccocchi/rabl-rails) - Reimplementation for RABL and Rails
+ * [rabl-rails](https://github.com/ccocchi/rabl-rails) - Reimplementation for RABL and Rails
[focused on speed](https://github.com/ccocchi/rabl-benchmark/blob/master/BENCHMARK).
Let me know if there's any other related libraries not listed here.
View
2 rabl.gemspec
@@ -26,7 +26,7 @@ Gem::Specification.new do |s|
s.add_development_dependency 'rr', '~> 1.0.2'
s.add_development_dependency 'rake'
s.add_development_dependency 'tilt'
- s.add_development_dependency 'yajl-ruby'
+ s.add_development_dependency 'oj'
s.add_development_dependency 'msgpack', '~> 0.4.5'
s.add_development_dependency 'bson', '~> 1.7.0'
s.add_development_dependency 'plist'
View
4 test/configuration_test.rb
@@ -18,11 +18,11 @@
context 'custom JSON engine configured as Symbol' do
setup do
Rabl.configure do |c|
- c.json_engine = :yajl
+ c.json_engine = :oj
end
end
- asserts('uses a custom JSON engine') { topic.json_engine.to_s =~ /yajl/i }
+ asserts('uses a custom JSON engine') { topic.json_engine.to_s =~ /oj/i }
end # custom json, symbol
context 'custom JSON engine configured as Class' do

0 comments on commit 58bfbc9

Please sign in to comment.
Something went wrong with that request. Please try again.