Skip to content

Commit bb33ca8

Browse files
committed
Don't alter $LOAD_PATH for require statements.
1 parent d2ce667 commit bb33ca8

File tree

3 files changed

+14
-18
lines changed

3 files changed

+14
-18
lines changed

LICENSE

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
Copyright (c) 2010 David Graham
1+
Copyright (c) 2010-2011 David Graham
22

33
Permission is hereby granted, free of charge, to any person obtaining a copy
44
of this software and associated documentation files (the "Software"), to deal

Rakefile

Lines changed: 9 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -2,33 +2,32 @@ require 'rake'
22
require 'rake/clean'
33
require 'rake/gempackagetask'
44
require 'rake/testtask'
5-
require File.join(File.expand_path(File.dirname(__FILE__)), 'lib', 'json', 'stream')
5+
require_relative 'lib/json/stream'
66

7-
spec = Gem::Specification.new do |s|
7+
spec = Gem::Specification.new do |s|
88
s.name = "json-stream"
99
s.version = JSON::Stream::VERSION
1010
s.date = Time.now.strftime("%Y-%m-%d")
1111
s.summary = "A streaming JSON parser that generates SAX-like events."
1212
s.description = "A finite state machine based JSON parser that generates events
1313
for each state change. This allows us to stream both the JSON document into
14-
memory and the parsed object graph out of memory to some other process. This
15-
is much like an XML SAX parser that generates events during parsing. There is
14+
memory and the parsed object graph out of memory to some other process. This
15+
is much like an XML SAX parser that generates events during parsing. There is
1616
no requirement for the document nor the object graph to be fully buffered in
17-
memory. This is best suited for huge JSON documents that won't fit in memory.
17+
memory. This is best suited for huge JSON documents that won't fit in memory.
1818
For example, streaming and processing large map/reduce views from Apache CouchDB."
1919
s.email = "[email protected]"
2020
s.homepage = "http://github.com/dgraham/json-stream"
2121
s.authors = ["David Graham"]
22-
s.files = FileList['LICENSE', 'README', 'Rakefile', "{lib}/**/*"].to_a
22+
s.files = FileList['[A-Z]*', "{lib}/**/*"]
2323
s.require_path = "lib"
24-
s.test_files = FileList["{test}/**/*test.rb"].to_a
25-
s.has_rdoc = true
24+
s.test_files = FileList["{test}/**/*test.rb"]
2625
s.required_ruby_version = '>= 1.9.1'
2726
end
28-
27+
2928
Rake::GemPackageTask.new(spec) do |pkg|
3029
pkg.need_tar = true
31-
end
30+
end
3231

3332
Rake::TestTask.new(:test) do |test|
3433
test.pattern = 'test/**/*_test.rb'

lib/json/stream.rb

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,12 @@
11
# encoding: UTF-8
22

3-
$:.unshift File.dirname(__FILE__) unless
4-
$:.include?(File.dirname(__FILE__))
5-
63
require 'stringio'
7-
require 'stream/buffer'
8-
require 'stream/builder'
9-
require 'stream/parser'
4+
require 'json/stream/buffer'
5+
require 'json/stream/builder'
6+
require 'json/stream/parser'
107

118
module JSON
129
module Stream
13-
VERSION = "0.1.0"
10+
VERSION = "0.1.1"
1411
end
1512
end

0 commit comments

Comments
 (0)