polyglot 0.2.2 → 0.2.3

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.
@@ -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:
@@ -35,7 +35,12 @@ module Polyglot
35
35
  loader.load(source_file)
36
36
  @loaded[a[0]] = true
37
37
  else
38
- raise LoadError.new("Polyglot failed to load '#{a[0]}' either directly or using extensions #{@registrations.keys.sort.inspect}")
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
- Polyglot.load(*a, &b)
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
@@ -2,7 +2,7 @@ module Polyglot #:nodoc:
2
2
  module VERSION #:nodoc:
3
3
  MAJOR = 0
4
4
  MINOR = 2
5
- TINY = 2
5
+ TINY = 3
6
6
 
7
7
  STRING = [MAJOR, MINOR, TINY].join('.')
8
8
  end
@@ -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.2</a>
36
+ <a href="http://rubyforge.org/projects/polyglot" class="numbers">0.2.3</a>
37
37
  </div>
38
38
  <h2>Poly &#x2192; many, glot &#x2192; 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.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 00:00:00 +10:00
12
+ date: 2008-05-29 00:00:00 +10:00
13
13
  default_executable:
14
14
  dependencies: []
15
15