Permalink
Browse files

Use yajl as possible JSON backend.

  • Loading branch information...
1 parent c2b5349 commit 07ed7738e2a3558936ce7e02b350421222fc277a @AlekSi AlekSi committed with voloko Jun 12, 2010
Showing with 15 additions and 12 deletions.
  1. +2 −9 lib/sdoc/generator/shtml.rb
  2. +12 −0 lib/sdoc/json_backend.rb
  3. +1 −3 lib/sdoc/merge.rb
@@ -1,17 +1,10 @@
-require 'rubygems'
-gem "rdoc", ">= 2.4.2"
-if Gem.available? "json"
- gem "json", ">= 1.1.3"
-else
- gem "json_pure", ">= 1.1.3"
-end
-
+require 'sdoc/json_backend'
require 'iconv'
-require 'json'
require 'pathname'
require 'fileutils'
require 'erb'
+gem 'rdoc', '>= 2.4.2'
require 'rdoc/rdoc'
require 'rdoc/generator'
require 'rdoc/generator/markup'
View
@@ -0,0 +1,12 @@
+require 'rubygems'
+if Gem.available? "yajl-ruby"
+ gem "yajl-ruby", ">= 0.7.6"
+ require "yajl"
+else
+ if Gem.available? "json"
+ gem "json", ">= 1.1.3"
+ else
+ gem "json_pure", ">= 1.1.3"
+ end
+ require "json"
+end
View
@@ -2,9 +2,7 @@
require 'pathname'
require 'fileutils'
-gem 'json_pure', '>= 1.1.3' if defined?(::JRUBY_VERSION)
-require 'json'
-
+require 'sdoc/json_backen'
require 'sdoc/templatable'
class SDoc::Merge

0 comments on commit 07ed773

Please sign in to comment.