polyglot 0.2.2 → 0.2.3
Sign up to get free protection for your applications and to get access to all the features.
- data/History.txt +17 -0
- data/lib/polyglot.rb +12 -2
- data/lib/polyglot/version.rb +1 -1
- data/website/index.html +1 -1
- metadata +2 -2
data/History.txt
CHANGED
@@ -1,3 +1,20 @@
|
|
1
|
+
== 0.2.3 2008-05-29
|
2
|
+
|
3
|
+
* 2 minor enhancements:
|
4
|
+
* Raise MissingSourceFile exception instead of LoadError if ActiveSupport is loaded
|
5
|
+
* Re-raise original exception new one on require load fail
|
6
|
+
|
7
|
+
== 0.2.2 2008-05-12
|
8
|
+
|
9
|
+
* 2 minor enhancements:
|
10
|
+
* Doesn't search $: when asked to load an absolute path
|
11
|
+
* Adds a helpful exception message on LoadError
|
12
|
+
|
13
|
+
== 0.2.1 2008-03-05
|
14
|
+
|
15
|
+
* 1 minor defect:
|
16
|
+
* code to raise LoadError itself raised an exception
|
17
|
+
|
1
18
|
== 0.2.0 2008-02-13
|
2
19
|
|
3
20
|
* 1 major enhancement:
|
data/lib/polyglot.rb
CHANGED
@@ -35,7 +35,12 @@ module Polyglot
|
|
35
35
|
loader.load(source_file)
|
36
36
|
@loaded[a[0]] = true
|
37
37
|
else
|
38
|
-
|
38
|
+
msg = "Failed to load #{a[0]} using extensions #{(@registrations.keys+["rb"]).sort*", "}"
|
39
|
+
if defined?(MissingSourceFile)
|
40
|
+
raise MissingSourceFile.new(msg, a[0])
|
41
|
+
else
|
42
|
+
raise LoadError.new(msg)
|
43
|
+
end
|
39
44
|
end
|
40
45
|
end
|
41
46
|
end
|
@@ -47,6 +52,11 @@ module Kernel
|
|
47
52
|
def require(*a, &b)
|
48
53
|
polyglot_original_require(*a, &b)
|
49
54
|
rescue LoadError => load_error
|
50
|
-
|
55
|
+
begin
|
56
|
+
Polyglot.load(*a, &b)
|
57
|
+
rescue
|
58
|
+
# Raise the original exception, possibly a MissingSourceFile with a path
|
59
|
+
raise load_error
|
60
|
+
end
|
51
61
|
end
|
52
62
|
end
|
data/lib/polyglot/version.rb
CHANGED
data/website/index.html
CHANGED
@@ -33,7 +33,7 @@
|
|
33
33
|
<h1>polyglot</h1>
|
34
34
|
<div id="version" class="clickable" onclick='document.location = "http://rubyforge.org/projects/polyglot"; return false'>
|
35
35
|
<p>Get Version</p>
|
36
|
-
<a href="http://rubyforge.org/projects/polyglot" class="numbers">0.2.
|
36
|
+
<a href="http://rubyforge.org/projects/polyglot" class="numbers">0.2.3</a>
|
37
37
|
</div>
|
38
38
|
<h2>Poly → many, glot → languages</h2>
|
39
39
|
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: polyglot
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.2.
|
4
|
+
version: 0.2.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Clifford Heath
|
@@ -9,7 +9,7 @@ autorequire:
|
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
11
|
|
12
|
-
date: 2008-05-
|
12
|
+
date: 2008-05-29 00:00:00 +10:00
|
13
13
|
default_executable:
|
14
14
|
dependencies: []
|
15
15
|
|