polyglot 0.3.3 → 0.3.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.
- checksums.yaml +15 -0
- data/lib/polyglot.rb +4 -2
- data/lib/polyglot/version.rb +1 -1
- metadata +5 -7
checksums.yaml
ADDED
@@ -0,0 +1,15 @@
|
|
1
|
+
---
|
2
|
+
!binary "U0hBMQ==":
|
3
|
+
metadata.gz: !binary |-
|
4
|
+
MDFmYzRhODVkODQ1MzIwYmI5ZDZkN2QxMDg3ZjRkOGExODFmMmNjZg==
|
5
|
+
data.tar.gz: !binary |-
|
6
|
+
MWQ5OWQ3MjYyNDQyYTEyYzk0NTEzMTM2ZGZiMzk3NjVkMjMyMjY1MQ==
|
7
|
+
SHA512:
|
8
|
+
metadata.gz: !binary |-
|
9
|
+
ZWU1MDE3ODg3NTE2ZTNiYzFmZDk1YWZhYWM5OWY4OTIxNjI2MGQyZWZjMTA5
|
10
|
+
ODJkNjJlMDViZTcwMGVhYWU1YjRjYjhjYTRhMjI3N2ZmMjcwZjRhOWI1NmVj
|
11
|
+
MGQ3YjkwMzJmZjY3OTUwYTdkYzRjZWIyZGJjODdhZTEzYmZjODI=
|
12
|
+
data.tar.gz: !binary |-
|
13
|
+
MTQ5YzRiNDM1MDkzYjA0NzliNGJhMmY2MWEyZTBiMWFjNzliMzM1M2MxNzJl
|
14
|
+
NzRlMDUyYTBmZjk0NDMxZGM1YzMxYjdhYTJlM2ZmNDBjNDgwNWEzMjFkNTQw
|
15
|
+
ZDE3ZWJmODY2NzE2MDlkNjIzNGFkNWYwYTNhZmJmN2ExMzIyODk=
|
data/lib/polyglot.rb
CHANGED
@@ -24,7 +24,9 @@ module Polyglot
|
|
24
24
|
|
25
25
|
def self.find(file, *options, &block)
|
26
26
|
is_absolute = Pathname.new(file).absolute?
|
27
|
-
|
27
|
+
is_dot_relative = file =~ /\.[\/\\]/
|
28
|
+
paths = is_absolute ? [''] : Array(is_dot_relative ? '.' : nil) + $:
|
29
|
+
paths.each do |lib|
|
28
30
|
base = is_absolute ? "" : lib+File::SEPARATOR
|
29
31
|
# In Windows, repeated SEPARATOR chars have a special meaning, avoid adding them
|
30
32
|
matches = Dir["#{base}#{file}{,.#{@registrations.keys*',.'}}"]
|
@@ -33,7 +35,7 @@ module Polyglot
|
|
33
35
|
if path = matches[0]
|
34
36
|
return [ path, @registrations[path.gsub(/.*\./,'')]]
|
35
37
|
end
|
36
|
-
|
38
|
+
end
|
37
39
|
return nil
|
38
40
|
end
|
39
41
|
|
data/lib/polyglot/version.rb
CHANGED
metadata
CHANGED
@@ -1,15 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: polyglot
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.3.
|
5
|
-
prerelease:
|
4
|
+
version: 0.3.4
|
6
5
|
platform: ruby
|
7
6
|
authors:
|
8
7
|
- Clifford Heath
|
9
8
|
autorequire:
|
10
9
|
bindir: bin
|
11
10
|
cert_chain: []
|
12
|
-
date:
|
11
|
+
date: 2014-02-18 00:00:00.000000000 Z
|
13
12
|
dependencies: []
|
14
13
|
description: ! '
|
15
14
|
|
@@ -34,26 +33,25 @@ files:
|
|
34
33
|
homepage: http://github.com/cjheath/polyglot
|
35
34
|
licenses:
|
36
35
|
- MIT
|
36
|
+
metadata: {}
|
37
37
|
post_install_message:
|
38
38
|
rdoc_options: []
|
39
39
|
require_paths:
|
40
40
|
- lib
|
41
41
|
required_ruby_version: !ruby/object:Gem::Requirement
|
42
|
-
none: false
|
43
42
|
requirements:
|
44
43
|
- - ! '>='
|
45
44
|
- !ruby/object:Gem::Version
|
46
45
|
version: '0'
|
47
46
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
48
|
-
none: false
|
49
47
|
requirements:
|
50
48
|
- - ! '>='
|
51
49
|
- !ruby/object:Gem::Version
|
52
50
|
version: '0'
|
53
51
|
requirements: []
|
54
52
|
rubyforge_project:
|
55
|
-
rubygems_version:
|
53
|
+
rubygems_version: 2.2.2
|
56
54
|
signing_key:
|
57
|
-
specification_version:
|
55
|
+
specification_version: 4
|
58
56
|
summary: Augment 'require' to load non-Ruby file types
|
59
57
|
test_files: []
|