Skip to content
Browse files

Don't alter $LOAD_PATH for require statements.

  • Loading branch information...
1 parent d2ce667 commit bb33ca8c793b782241b651e5556a76faadbfed7f @dgraham committed Apr 21, 2011
Showing with 14 additions and 18 deletions.
  1. +1 −1 LICENSE
  2. +9 −10 Rakefile
  3. +4 −7 lib/json/stream.rb
View
2 LICENSE
@@ -1,4 +1,4 @@
-Copyright (c) 2010 David Graham
+Copyright (c) 2010-2011 David Graham
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
View
19 Rakefile
@@ -2,33 +2,32 @@ require 'rake'
require 'rake/clean'
require 'rake/gempackagetask'
require 'rake/testtask'
-require File.join(File.expand_path(File.dirname(__FILE__)), 'lib', 'json', 'stream')
+require_relative 'lib/json/stream'
-spec = Gem::Specification.new do |s|
+spec = Gem::Specification.new do |s|
s.name = "json-stream"
s.version = JSON::Stream::VERSION
s.date = Time.now.strftime("%Y-%m-%d")
s.summary = "A streaming JSON parser that generates SAX-like events."
s.description = "A finite state machine based JSON parser that generates events
for each state change. This allows us to stream both the JSON document into
-memory and the parsed object graph out of memory to some other process. This
-is much like an XML SAX parser that generates events during parsing. There is
+memory and the parsed object graph out of memory to some other process. This
+is much like an XML SAX parser that generates events during parsing. There is
no requirement for the document nor the object graph to be fully buffered in
-memory. This is best suited for huge JSON documents that won't fit in memory.
+memory. This is best suited for huge JSON documents that won't fit in memory.
For example, streaming and processing large map/reduce views from Apache CouchDB."
s.email = "david.malcom.graham@gmail.com"
s.homepage = "http://github.com/dgraham/json-stream"
s.authors = ["David Graham"]
- s.files = FileList['LICENSE', 'README', 'Rakefile', "{lib}/**/*"].to_a
+ s.files = FileList['[A-Z]*', "{lib}/**/*"]
s.require_path = "lib"
- s.test_files = FileList["{test}/**/*test.rb"].to_a
- s.has_rdoc = true
+ s.test_files = FileList["{test}/**/*test.rb"]
s.required_ruby_version = '>= 1.9.1'
end
-
+
Rake::GemPackageTask.new(spec) do |pkg|
pkg.need_tar = true
-end
+end
Rake::TestTask.new(:test) do |test|
test.pattern = 'test/**/*_test.rb'
View
11 lib/json/stream.rb
@@ -1,15 +1,12 @@
# encoding: UTF-8
-$:.unshift File.dirname(__FILE__) unless
- $:.include?(File.dirname(__FILE__))
-
require 'stringio'
-require 'stream/buffer'
-require 'stream/builder'
-require 'stream/parser'
+require 'json/stream/buffer'
+require 'json/stream/builder'
+require 'json/stream/parser'
module JSON
module Stream
- VERSION = "0.1.0"
+ VERSION = "0.1.1"
end
end

0 comments on commit bb33ca8

Please sign in to comment.
Something went wrong with that request. Please try again.