faster_require 0.5.0 → 0.5.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/VERSION +1 -1
- data/lib/faster_require.rb +2 -1
- data/spec/files/large.rb +0 -1
- data/spec/spec.fast_require.rb +12 -2
- metadata +2 -2
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.5.
|
1
|
+
0.5.1
|
data/lib/faster_require.rb
CHANGED
@@ -1,5 +1,5 @@
|
|
1
1
|
module FastRequire
|
2
|
-
$FAST_REQUIRE_DEBUG ||=
|
2
|
+
$FAST_REQUIRE_DEBUG ||= $DEBUG # can set it via $DEBUG, or by itself
|
3
3
|
|
4
4
|
def self.setup
|
5
5
|
@@dir = File.expand_path('~/.ruby_faster_require_cache')
|
@@ -152,6 +152,7 @@ module FastRequire
|
|
152
152
|
if !File.file?(found)
|
153
153
|
# discover the full path.
|
154
154
|
dir = $:.find{|path| File.file?(path + '/' + found)}
|
155
|
+
return true unless dir # give up, case jruby socket.jar "mysterious"
|
155
156
|
found = dir + '/' + found
|
156
157
|
end
|
157
158
|
found = File.expand_path(found);
|
data/spec/files/large.rb
CHANGED
data/spec/spec.fast_require.rb
CHANGED
@@ -3,14 +3,24 @@ if RUBY_VERSION < '1.9'
|
|
3
3
|
require 'faster_rubygems'
|
4
4
|
end
|
5
5
|
require 'sane'
|
6
|
+
require 'benchmark'
|
6
7
|
|
7
|
-
|
8
|
+
|
9
|
+
unless RUBY_PLATFORM =~ /java/
|
8
10
|
require_relative '../lib/faster_require'
|
11
|
+
cached = '.cached_spec_locs' + RUBY_VERSION
|
9
12
|
# use it for our own local test specs
|
10
13
|
FastRequire.load cached if File.exist? cached
|
11
14
|
require 'spec/autorun'
|
12
|
-
require 'benchmark'
|
13
15
|
FastRequire.save cached
|
16
|
+
else
|
17
|
+
|
18
|
+
require 'spec/autorun'
|
19
|
+
|
20
|
+
require_relative '../lib/faster_require'
|
21
|
+
|
22
|
+
end
|
23
|
+
|
14
24
|
|
15
25
|
describe "faster requires" do
|
16
26
|
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: faster_require
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.5.
|
4
|
+
version: 0.5.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Roger Pack
|
@@ -9,7 +9,7 @@ autorequire:
|
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
11
|
|
12
|
-
date: 2010-
|
12
|
+
date: 2010-02-02 00:00:00 -07:00
|
13
13
|
default_executable: fast_require
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|