Permalink
Browse files

remove simplejson dependency (use yajl-ruby instead)

  • Loading branch information...
1 parent 3e653b1 commit d807756c0e24e0db4663b899030fcdc65254bbc2 @defunkt defunkt committed Mar 20, 2011
Showing with 4 additions and 12 deletions.
  1. +1 −1 README.md
  2. +2 −1 app/helpers/pretty_printing.rb
  3. +1 −10 app/views/install.rb
View
@@ -35,7 +35,7 @@ Then install xmllint:
Next install the Python eggs:
- easy_install simplejson Pygments
+ easy_install Pygments
Then the RubyGems (you may need to `gem install bundler`):
@@ -19,7 +19,8 @@ def pretty_print(type, content)
end
def pretty_print_json(content)
- pretty_print_js shell("python -msimplejson.tool", :stdin => content)
+ json = Yajl::Parser.parse(content)
+ pretty_print_js Yajl::Encoder.new(:pretty => true).encode(json)
end
def pretty_print_js(content)
View
@@ -2,18 +2,13 @@ module Views
class Install < Layout
def everything_installed?
@everything_installed ||=
- xmllint_installed? && simplejson_installed? && pygments_installed?
+ xmllint_installed? && pygments_installed?
end
def xmllint_installed?
command? "which xmllint"
end
- def simplejson_installed?
- command?("python -msimplejson.tool 0 2> /dev/null") ||
- $?.exitstatus == 255
- end
-
def pygments_installed?
command? "which #{Albino.bin}"
end
@@ -34,10 +29,6 @@ def xmllint_install
"#{xmllint_install_command} libxml2"
end
- def simplejson_install
- "easy_install simplejson"
- end
-
def pygments_install
"easy_install pygments"
end

0 comments on commit d807756

Please sign in to comment.