Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Replaced JSON parser with with YAJL JSON parser

  • Loading branch information...
commit 1f480a85925025aec1ac5c91cfb45b4e74e4c9c3 1 parent 52d52e0
@sferik authored
Showing with 37 additions and 37 deletions.
  1. +9 −9 Rakefile
  2. +2 −2 lib/twitter.rb
  3. +26 −26 twitter.gemspec
View
18 Rakefile
@@ -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
@@ -36,4 +36,4 @@ task :test => :check_dependencies
desc "Upload website files to rubyforge"
task :website do
sh %{rsync -av website/ jnunemaker@rubyforge.org:/var/www/gforge-projects/twitter}
-end
+end
View
4 lib/twitter.rb
@@ -2,7 +2,7 @@
require "oauth"
require "hashie"
require "httparty"
-require "json"
+require "yajl"
module Twitter
include HTTParty
@@ -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)
View
52 twitter.gemspec
@@ -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{nunemaker@gmail.com}
s.extra_rdoc_files = [
"README.rdoc"
@@ -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",
@@ -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
Please sign in to comment.
Something went wrong with that request. Please try again.