Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

updated Rakefile for better generation of gem via Jeweler

renamed native.rb to stream.rb in benchmark folder
some minor doc updates
  • Loading branch information...
commit c17f28fbe38db58caa3801fc42855550f4c7cfa9 1 parent df71026
@brianmario authored
View
16 Rakefile
@@ -7,19 +7,9 @@ begin
gem.email = "seniorlopez@gmail.com"
gem.homepage = "http://github.com/brianmario/yajl-ruby"
gem.authors = ["Brian Lopez"]
- gem.require_paths = ["ext"]
- gem.extra_rdoc_files = [
- "README.rdoc",
- "CHANGELOG.rdoc"
- ]
- gem.files = [
- "CHANGELOG.rdoc",
- "README.rdoc",
- "Rakefile",
- "VERSION.yml",
- "ext/yajl.c",
- "ext/yajl.h"
- ]
+ gem.require_paths = ["ext", "lib"]
+ gem.extra_rdoc_files = `git ls-files *.rdoc`.split("\n")
+ gem.files = `git ls-files`.split("\n")
gem.extensions = ["ext/extconf.rb"]
gem.files.include %w(lib/jeweler/templates/.document lib/jeweler/templates/.gitignore)
# gem.rubyforge_project = "yajl-ruby"
View
7 benchmark/http.rb
@@ -1,8 +1,8 @@
# encoding: UTF-8
require 'rubygems'
require 'benchmark'
-require '../yajl.bundle'
-require '../lib/yajl/http_stream'
+require 'yajl'
+require 'yajl/http_stream'
require 'json'
require 'activesupport'
require 'uri'
@@ -22,8 +22,7 @@
x.report {
puts "JSON.parser"
times.times {
- resp = Net::HTTP.get_response(uri)
- JSON.parse(resp.body, :max_nesting => false)
+ JSON.parse(Net::HTTP.get_response(uri).body, :max_nesting => false)
}
}
}
View
2  benchmark/native.rb → benchmark/stream.rb
@@ -1,7 +1,7 @@
# encoding: UTF-8
require 'rubygems'
require 'benchmark'
-require '../yajl.bundle'
+require 'yajl'
require 'json'
require 'activesupport'
View
4 lib/yajl.rb
@@ -7,7 +7,7 @@
module Yajl
VERSION = "0.3.4"
- # == Chunked
+ # == Yajl::Chunked
#
# This module contains methods for parsing JSON in chunks.
# The use case here is that the caller may not be able to get access to the IO to which
@@ -21,7 +21,7 @@ module Yajl
# it respond to #call and accept a single parameter (the object that was created from parsing).
module Chunked; end
- # == Stream
+ # == Yajl::Stream
#
# This module contains methods for parsing JSON directly from an IO object.
#
View
4 lib/yajl/http_stream.rb
@@ -4,12 +4,12 @@
require 'yajl' unless defined?(Yajl)
module Yajl
- # == HttpStream
+ # == Yajl::HttpStream
#
# This module is for making HTTP requests to which the response bodies (and possibly requests in the near future)
# are streamed directly into Yajl.
class HttpStream
- # === InvalidContentType
+ # === Yajl::HttpStream::InvalidContentType
#
# This Exception is thrown when an HTTP response isn't application/json
# and therefore cannot be parsed.
View
82 yajl-ruby.gemspec
@@ -6,7 +6,7 @@ Gem::Specification.new do |s|
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
s.authors = ["Brian Lopez"]
- s.date = %q{2009-04-24}
+ s.date = %q{2009-04-29}
s.email = %q{seniorlopez@gmail.com}
s.extensions = ["ext/extconf.rb"]
s.extra_rdoc_files = [
@@ -14,16 +14,92 @@ Gem::Specification.new do |s|
"README.rdoc"
]
s.files = [
+ ".gitignore",
"CHANGELOG.rdoc",
+ "MIT-LICENSE",
"README.rdoc",
"Rakefile",
"VERSION.yml",
- "ext/yajl.c"
+ "benchmark/http.rb",
+ "benchmark/native.rb",
+ "benchmark/subjects/contacts.json",
+ "benchmark/subjects/item.json",
+ "benchmark/subjects/ohai.json",
+ "benchmark/subjects/twitter_search.json",
+ "benchmark/subjects/unicode.json",
+ "benchmark/subjects/yelp.json",
+ "ext/extconf.rb",
+ "ext/yajl.c",
+ "ext/yajl.h",
+ "lib/yajl.rb",
+ "lib/yajl/http_stream.rb",
+ "specs/active_support_spec.rb",
+ "specs/fixtures/fail.15.json",
+ "specs/fixtures/fail.16.json",
+ "specs/fixtures/fail.17.json",
+ "specs/fixtures/fail.26.json",
+ "specs/fixtures/fail11.json",
+ "specs/fixtures/fail12.json",
+ "specs/fixtures/fail13.json",
+ "specs/fixtures/fail14.json",
+ "specs/fixtures/fail19.json",
+ "specs/fixtures/fail20.json",
+ "specs/fixtures/fail21.json",
+ "specs/fixtures/fail22.json",
+ "specs/fixtures/fail23.json",
+ "specs/fixtures/fail24.json",
+ "specs/fixtures/fail25.json",
+ "specs/fixtures/fail27.json",
+ "specs/fixtures/fail28.json",
+ "specs/fixtures/fail3.json",
+ "specs/fixtures/fail4.json",
+ "specs/fixtures/fail5.json",
+ "specs/fixtures/fail6.json",
+ "specs/fixtures/fail9.json",
+ "specs/fixtures/pass.array.json",
+ "specs/fixtures/pass.codepoints_from_unicode_org.json",
+ "specs/fixtures/pass.contacts.json",
+ "specs/fixtures/pass.db100.xml.json",
+ "specs/fixtures/pass.db1000.xml.json",
+ "specs/fixtures/pass.dc_simple_with_comments.json",
+ "specs/fixtures/pass.deep_arrays.json",
+ "specs/fixtures/pass.difficult_json_c_test_case.json",
+ "specs/fixtures/pass.difficult_json_c_test_case_with_comments.json",
+ "specs/fixtures/pass.doubles.json",
+ "specs/fixtures/pass.empty_array.json",
+ "specs/fixtures/pass.empty_string.json",
+ "specs/fixtures/pass.escaped_bulgarian.json",
+ "specs/fixtures/pass.escaped_foobar.json",
+ "specs/fixtures/pass.item.json",
+ "specs/fixtures/pass.json-org-sample1.json",
+ "specs/fixtures/pass.json-org-sample2.json",
+ "specs/fixtures/pass.json-org-sample3.json",
+ "specs/fixtures/pass.json-org-sample4-nows.json",
+ "specs/fixtures/pass.json-org-sample4.json",
+ "specs/fixtures/pass.json-org-sample5.json",
+ "specs/fixtures/pass.map-spain.xml.json",
+ "specs/fixtures/pass.ns-invoice100.xml.json",
+ "specs/fixtures/pass.ns-soap.xml.json",
+ "specs/fixtures/pass.numbers-fp-4k.json",
+ "specs/fixtures/pass.numbers-fp-64k.json",
+ "specs/fixtures/pass.numbers-int-4k.json",
+ "specs/fixtures/pass.numbers-int-64k.json",
+ "specs/fixtures/pass.twitter-search.json",
+ "specs/fixtures/pass.twitter-search2.json",
+ "specs/fixtures/pass.unicode.json",
+ "specs/fixtures/pass.yelp.json",
+ "specs/fixtures/pass1.json",
+ "specs/fixtures/pass2.json",
+ "specs/fixtures/pass3.json",
+ "specs/fixtures_spec.rb",
+ "specs/one_off_spec.rb",
+ "specs/spec_helper.rb",
+ "yajl-ruby.gemspec"
]
s.has_rdoc = true
s.homepage = %q{http://github.com/brianmario/yajl-ruby}
s.rdoc_options = ["--charset=UTF-8"]
- s.require_paths = ["ext"]
+ s.require_paths = ["ext", "lib"]
s.rubygems_version = %q{1.3.2}
s.summary = %q{Ruby C bindings to the excellent Yajl JSON stream-based parser library.}
Please sign in to comment.
Something went wrong with that request. Please try again.