faster_require 0.5.0 → 0.5.1

Sign up to get free protection for your applications and to get access to all the features.
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.5.0
1
+ 0.5.1
@@ -1,5 +1,5 @@
1
1
  module FastRequire
2
- $FAST_REQUIRE_DEBUG ||= false
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
@@ -1,5 +1,4 @@
1
1
  require 'rubygems'
2
- require 'ruby-debug'
3
2
  require File.dirname(File.expand_path(__FILE__)) + '/../../lib/faster_require.rb'
4
3
  require 'stringio'
5
4
  require 'redparse'
@@ -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
- cached = '.cached_spec_locs' + RUBY_VERSION
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.0
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-01-29 00:00:00 -07:00
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