pathological 0.2.1 → 0.2.2

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/README.md CHANGED
@@ -40,7 +40,7 @@ Now require the gem at the start of any executable ruby file:
40
40
 
41
41
  Now your project root will be in your load path. If your project has, for example, `lib/foo.rb`, then `require
42
42
  lib/foo` will work in any of your ruby files. This works because when Pathological is required it will search
43
- up the directory tree until it finds a `Pathfile`. (It will raise an error if there this cannot be found).
43
+ up the directory tree until it finds a `Pathfile`. (It will raise an error if one cannot be found).
44
44
 
45
45
  `Pathfile`s should be kept in version control.
46
46
 
@@ -153,13 +153,20 @@ Pathological was written by the following Ooyala engineers:
153
153
  Credits
154
154
  -------
155
155
 
156
- * Harry Robertson for the idea to *not* use a dot-prefixed configuration file
156
+ * Harry Robertson for the idea to *not* use a dot-prefixed configuration file
157
+
158
+ Metadata
159
+ --------
160
+
161
+ * [Hosted on Github](https://github.com/ooyala/pathological)
162
+ * [Rubygems page](https://rubygems.org/gems/pathological)
163
+ * [Documentation](http://rubydoc.info/github/ooyala/pathological/master/frames)
157
164
 
158
165
  Contributing
159
166
  ------------
160
167
 
161
168
  If you would like to commit a patch, great! Just do the usual github pull request stuff and we'll check it
162
- out.
169
+ out[.](http://www.randomkittengenerator.com/)
163
170
 
164
171
  License
165
172
  -------
data/TODO.md CHANGED
@@ -4,11 +4,7 @@ TODO
4
4
  Tasks
5
5
  -----
6
6
 
7
- * Bundler compatibility.
8
- * Push to the Ooyala github account; release on rubygems.org
9
- * Mode for adding one directory above given paths to the current.
10
- * Public API:
11
- * Get all loaded files that come from Pathological directories
7
+ * Get all loaded files that come from Pathological directories (probably only in 1.9)
12
8
 
13
9
  Design decisions
14
10
  ----------------
@@ -76,18 +76,6 @@ module Pathological
76
76
  end
77
77
  end
78
78
 
79
- # Find all loaded ruby files that come from directories added to the load path by Pathological. This is only
80
- # available in Ruby 1.9 due to the behavior of +$"+. This method works in a "best guess" fashion by
81
- # determining the +$LOAD_PATH+ entry to which loaded file corresponds.
82
- #
83
- # @return [Array<String>] the array of paths
84
- def self.find_loaded_files
85
- unless RUBY_VERSION =~ /^1\.9/
86
- raise PathologicalException, "#find_loaded_files is only available in Ruby 1.9."
87
- end
88
- $".select { |file| @@loaded_paths.any? { ... } }
89
- end
90
-
91
79
  # Convenience functions for the various modes in which Pathological may run.
92
80
 
93
81
  def self.debug_mode; @@debug = true; end
@@ -167,24 +155,6 @@ module Pathological
167
155
  @@exclude_root ? paths.reject { |path| File.expand_path(path) == File.expand_path(root) } : paths
168
156
  end
169
157
 
170
- # Determine whether a path is a (strict) descendent of another path
171
- #
172
- # @private
173
- # @param [String] ancestor_path the path of the prospective ancestor
174
- # @param [String] descendent_path the path of the prospective descendent
175
- # @return [Boolean] whether descendent_path is some strict descendent of ancestor_path
176
- def self.is_descendent?(ancestor_path, descendent_path)
177
- # Delete trailing slash to match File#dirname
178
- ancestor_path = ancestor_path[0..-2] if ancestor_path.size > 1 && ancestor_path.end_with? "/"
179
- current_path = File.dirname(descendent_path)
180
- previous_path = nil
181
- until current_path == previous_path
182
- return true if current_path == ancestor_path
183
- previous_path, current_path = current_path, File.dirname(current_path)
184
- end
185
- false
186
- end
187
-
188
158
  private_class_method :debug, :real_path, :parse_pathfile
189
159
 
190
160
  # Reset options
@@ -1,3 +1,3 @@
1
1
  module Pathological
2
- VERSION = "0.2.1"
2
+ VERSION = "0.2.2"
3
3
  end
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.1
4
+ version: 0.2.2
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-09 00:00:00.000000000Z
13
+ date: 2011-09-16 00:00:00.000000000Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: rr
17
- requirement: &70277329396620 !ruby/object:Gem::Requirement
17
+ requirement: &70361439567920 !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: *70277329396620
25
+ version_requirements: *70361439567920
26
26
  - !ruby/object:Gem::Dependency
27
27
  name: scope
28
- requirement: &70277329396080 !ruby/object:Gem::Requirement
28
+ requirement: &70361439567420 !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: *70277329396080
36
+ version_requirements: *70361439567420
37
37
  - !ruby/object:Gem::Dependency
38
38
  name: yard
39
- requirement: &70277329395580 !ruby/object:Gem::Requirement
39
+ requirement: &70361439566960 !ruby/object:Gem::Requirement
40
40
  none: false
41
41
  requirements:
42
42
  - - ~>
@@ -44,10 +44,10 @@ dependencies:
44
44
  version: 0.7.2
45
45
  type: :development
46
46
  prerelease: false
47
- version_requirements: *70277329395580
47
+ version_requirements: *70361439566960
48
48
  - !ruby/object:Gem::Dependency
49
49
  name: rdiscount
50
- requirement: &70277329395080 !ruby/object:Gem::Requirement
50
+ requirement: &70361439566380 !ruby/object:Gem::Requirement
51
51
  none: false
52
52
  requirements:
53
53
  - - ~>
@@ -55,10 +55,10 @@ dependencies:
55
55
  version: 1.6.8
56
56
  type: :development
57
57
  prerelease: false
58
- version_requirements: *70277329395080
58
+ version_requirements: *70361439566380
59
59
  - !ruby/object:Gem::Dependency
60
60
  name: fakefs
61
- requirement: &70277329394700 !ruby/object:Gem::Requirement
61
+ requirement: &70361439565940 !ruby/object:Gem::Requirement
62
62
  none: false
63
63
  requirements:
64
64
  - - ! '>='
@@ -66,7 +66,7 @@ dependencies:
66
66
  version: '0'
67
67
  type: :development
68
68
  prerelease: false
69
- version_requirements: *70277329394700
69
+ version_requirements: *70361439565940
70
70
  description: ! " Pathological provides a way to manage a project's require paths
71
71
  by using a small config file that\n indicates all directories to include in the
72
72
  load path.\n"