Skip to content

Commit

Permalink
Replaced JSON parser with with YAJL JSON parser
Browse files Browse the repository at this point in the history
  • Loading branch information
sferik committed Apr 21, 2010
1 parent 52d52e0 commit 1f480a8
Show file tree
Hide file tree
Showing 3 changed files with 37 additions and 37 deletions.
18 changes: 9 additions & 9 deletions Rakefile
Original file line number Diff line number Diff line change
Expand Up @@ -9,15 +9,15 @@ Jeweler::Tasks.new do |gem|
gem.authors = ["John Nunemaker", "Wynn Netherland"]
gem.files = FileList["[A-Z]*", "{examples,lib,test}/**/*"]

gem.add_dependency("oauth", "~> 0.3.6")
gem.add_dependency("hashie", "~> 0.2.0")
gem.add_dependency("httparty", "~> 0.5.2")
gem.add_dependency("json", "~> 1.2.3")
gem.add_dependency("oauth", "~> 0.3")
gem.add_dependency("hashie", "~> 0.2")
gem.add_dependency("httparty", "~> 0.5")
gem.add_dependency("yajl-ruby", "~> 0.7")

gem.add_development_dependency("shoulda", "~> 2.10.1")
gem.add_development_dependency("jnunemaker-matchy", "~> 0.4.0")
gem.add_development_dependency("mocha", "~> 0.9.4")
gem.add_development_dependency("fakeweb", "~> 1.2.5")
gem.add_development_dependency("shoulda", "~> 2.10")
gem.add_development_dependency("jnunemaker-matchy", "~> 0.4")
gem.add_development_dependency("mocha", "~> 0.9")
gem.add_development_dependency("fakeweb", "~> 1.2")
end

Jeweler::GemcutterTasks.new
Expand All @@ -36,4 +36,4 @@ task :test => :check_dependencies
desc "Upload website files to rubyforge"
task :website do
sh %{rsync -av website/ [email protected]:/var/www/gforge-projects/twitter}
end
end
4 changes: 2 additions & 2 deletions lib/twitter.rb
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
require "oauth"
require "hashie"
require "httparty"
require "json"
require "yajl"

module Twitter
include HTTParty
Expand Down Expand Up @@ -96,7 +96,7 @@ def self.raise_errors(response)

def self.parse(response)
return '' if response.body == ''
JSON.parse(response.body)
Yajl::Parser.new.parse(response.body)
end

def self.mash(obj)
Expand Down
52 changes: 26 additions & 26 deletions twitter.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ Gem::Specification.new do |s|

s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
s.authors = ["John Nunemaker", "Wynn Netherland"]
s.date = %q{2010-03-30}
s.date = %q{2010-04-21}
s.email = %q{[email protected]}
s.extra_rdoc_files = [
"README.rdoc"
Expand Down Expand Up @@ -102,7 +102,7 @@ Gem::Specification.new do |s|
s.homepage = %q{http://github.com/jnunemaker/twitter}
s.rdoc_options = ["--charset=UTF-8"]
s.require_paths = ["lib"]
s.rubygems_version = %q{1.3.5}
s.rubygems_version = %q{1.3.6}
s.summary = %q{wrapper for the twitter api}
s.test_files = [
"test/test_helper.rb",
Expand Down Expand Up @@ -133,33 +133,33 @@ Gem::Specification.new do |s|
s.specification_version = 3

if Gem::Version.new(Gem::RubyGemsVersion) >= Gem::Version.new('1.2.0') then
s.add_runtime_dependency(%q<oauth>, ["~> 0.3.6"])
s.add_runtime_dependency(%q<hashie>, ["~> 0.2.0"])
s.add_runtime_dependency(%q<httparty>, ["~> 0.5.2"])
s.add_runtime_dependency(%q<json>, ["~> 1.2.3"])
s.add_development_dependency(%q<shoulda>, ["~> 2.10.1"])
s.add_development_dependency(%q<jnunemaker-matchy>, ["~> 0.4.0"])
s.add_development_dependency(%q<mocha>, ["~> 0.9.4"])
s.add_development_dependency(%q<fakeweb>, ["~> 1.2.5"])
s.add_runtime_dependency(%q<oauth>, ["~> 0.3"])
s.add_runtime_dependency(%q<hashie>, ["~> 0.2"])
s.add_runtime_dependency(%q<httparty>, ["~> 0.5"])
s.add_runtime_dependency(%q<yajl-ruby>, ["~> 0.7"])
s.add_development_dependency(%q<shoulda>, ["~> 2.10"])
s.add_development_dependency(%q<jnunemaker-matchy>, ["~> 0.4"])
s.add_development_dependency(%q<mocha>, ["~> 0.9"])
s.add_development_dependency(%q<fakeweb>, ["~> 1.2"])
else
s.add_dependency(%q<oauth>, ["~> 0.3.6"])
s.add_dependency(%q<hashie>, ["~> 0.2.0"])
s.add_dependency(%q<httparty>, ["~> 0.5.2"])
s.add_dependency(%q<json>, ["~> 1.2.3"])
s.add_dependency(%q<shoulda>, ["~> 2.10.1"])
s.add_dependency(%q<jnunemaker-matchy>, ["~> 0.4.0"])
s.add_dependency(%q<mocha>, ["~> 0.9.4"])
s.add_dependency(%q<fakeweb>, ["~> 1.2.5"])
s.add_dependency(%q<oauth>, ["~> 0.3"])
s.add_dependency(%q<hashie>, ["~> 0.2"])
s.add_dependency(%q<httparty>, ["~> 0.5"])
s.add_dependency(%q<yajl-ruby>, ["~> 0.7"])
s.add_dependency(%q<shoulda>, ["~> 2.10"])
s.add_dependency(%q<jnunemaker-matchy>, ["~> 0.4"])
s.add_dependency(%q<mocha>, ["~> 0.9"])
s.add_dependency(%q<fakeweb>, ["~> 1.2"])
end
else
s.add_dependency(%q<oauth>, ["~> 0.3.6"])
s.add_dependency(%q<hashie>, ["~> 0.2.0"])
s.add_dependency(%q<httparty>, ["~> 0.5.2"])
s.add_dependency(%q<json>, ["~> 1.2.3"])
s.add_dependency(%q<shoulda>, ["~> 2.10.1"])
s.add_dependency(%q<jnunemaker-matchy>, ["~> 0.4.0"])
s.add_dependency(%q<mocha>, ["~> 0.9.4"])
s.add_dependency(%q<fakeweb>, ["~> 1.2.5"])
s.add_dependency(%q<oauth>, ["~> 0.3"])
s.add_dependency(%q<hashie>, ["~> 0.2"])
s.add_dependency(%q<httparty>, ["~> 0.5"])
s.add_dependency(%q<yajl-ruby>, ["~> 0.7"])
s.add_dependency(%q<shoulda>, ["~> 2.10"])
s.add_dependency(%q<jnunemaker-matchy>, ["~> 0.4"])
s.add_dependency(%q<mocha>, ["~> 0.9"])
s.add_dependency(%q<fakeweb>, ["~> 1.2"])
end
end

0 comments on commit 1f480a8

Please sign in to comment.