pathological 0.2.3 → 0.2.4
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/lib/pathological/base.rb +8 -2
- data/lib/pathological/version.rb +1 -1
- metadata +8 -8
data/lib/pathological/base.rb
CHANGED
@@ -162,9 +162,15 @@ module Pathological
|
|
162
162
|
# @return [String] name of file requiring pathological, or the currently executing file.
|
163
163
|
def self.requiring_filename
|
164
164
|
requiring_file = Kernel.caller.find do |stack_line|
|
165
|
-
|
165
|
+
if RUBY_VERSION.start_with?("1.9")
|
166
|
+
# In Ruby 1.9, top-level files will have the string "top (required)" included in the stack listing.
|
167
|
+
stack_line.include?("top (required)") && !stack_line.include?("pathological.rb")
|
168
|
+
else
|
169
|
+
# In Ruby 1.8, top-level files are listed with their relative path and without a line number.
|
170
|
+
!stack_line.match(/:\d+:in/) && !stack_line.include?("pathological.rb")
|
171
|
+
end
|
166
172
|
end
|
167
|
-
requiring_file ? requiring_file.match(/(.+):\d
|
173
|
+
requiring_file ? requiring_file.match(/(.+):\d+/)[1] : $0 rescue $0
|
168
174
|
end
|
169
175
|
|
170
176
|
private_class_method :debug, :real_path, :parse_pathfile
|
data/lib/pathological/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: pathological
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.2.
|
4
|
+
version: 0.2.4
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -10,11 +10,11 @@ authors:
|
|
10
10
|
autorequire:
|
11
11
|
bindir: bin
|
12
12
|
cert_chain: []
|
13
|
-
date: 2011-09-
|
13
|
+
date: 2011-09-29 00:00:00.000000000Z
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|
16
16
|
name: rr
|
17
|
-
requirement: &
|
17
|
+
requirement: &2153778480 !ruby/object:Gem::Requirement
|
18
18
|
none: false
|
19
19
|
requirements:
|
20
20
|
- - ! '>='
|
@@ -22,10 +22,10 @@ dependencies:
|
|
22
22
|
version: 1.0.3
|
23
23
|
type: :development
|
24
24
|
prerelease: false
|
25
|
-
version_requirements: *
|
25
|
+
version_requirements: *2153778480
|
26
26
|
- !ruby/object:Gem::Dependency
|
27
27
|
name: scope
|
28
|
-
requirement: &
|
28
|
+
requirement: &2153778020 !ruby/object:Gem::Requirement
|
29
29
|
none: false
|
30
30
|
requirements:
|
31
31
|
- - ! '>='
|
@@ -33,10 +33,10 @@ dependencies:
|
|
33
33
|
version: 0.2.3
|
34
34
|
type: :development
|
35
35
|
prerelease: false
|
36
|
-
version_requirements: *
|
36
|
+
version_requirements: *2153778020
|
37
37
|
- !ruby/object:Gem::Dependency
|
38
38
|
name: fakefs
|
39
|
-
requirement: &
|
39
|
+
requirement: &2153777640 !ruby/object:Gem::Requirement
|
40
40
|
none: false
|
41
41
|
requirements:
|
42
42
|
- - ! '>='
|
@@ -44,7 +44,7 @@ dependencies:
|
|
44
44
|
version: '0'
|
45
45
|
type: :development
|
46
46
|
prerelease: false
|
47
|
-
version_requirements: *
|
47
|
+
version_requirements: *2153777640
|
48
48
|
description: ! " Pathological provides a way to manage a project's require paths
|
49
49
|
by using a small config file that\n indicates all directories to include in the
|
50
50
|
load path.\n"
|