merb-core 1.0.5 → 1.0.6
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/merb-core/core_ext/kernel.rb +3 -2
- data/lib/merb-core/version.rb +1 -1
- metadata +2 -2
@@ -19,10 +19,10 @@ module Kernel
|
|
19
19
|
#
|
20
20
|
# :api: private
|
21
21
|
def track_dependency(name, clr, *ver, &blk)
|
22
|
-
options = ver.
|
22
|
+
options = ver.last.is_a?(Hash) ? ver.pop : {}
|
23
23
|
new_dep = Gem::Dependency.new(name, ver.empty? ? nil : ver)
|
24
24
|
new_dep.require_block = blk
|
25
|
-
new_dep.require_as = (
|
25
|
+
new_dep.require_as = options.key?(:require_as) ? options[:require_as] : name
|
26
26
|
new_dep.original_caller = clr
|
27
27
|
|
28
28
|
deps = Merb::BootLoader::Dependencies.dependencies
|
@@ -138,6 +138,7 @@ module Kernel
|
|
138
138
|
def load_dependency(name, clr, *ver, &blk)
|
139
139
|
begin
|
140
140
|
dep = name.is_a?(Gem::Dependency) ? name : track_dependency(name, clr, *ver, &blk)
|
141
|
+
return unless dep.require_as
|
141
142
|
Gem.activate(dep)
|
142
143
|
rescue Gem::LoadError => e
|
143
144
|
e.set_backtrace dep.original_caller
|
data/lib/merb-core/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: merb-core
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0.
|
4
|
+
version: 1.0.6
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Ezra Zygmuntowicz
|
@@ -9,7 +9,7 @@ autorequire:
|
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
11
|
|
12
|
-
date: 2008-12-
|
12
|
+
date: 2008-12-16 00:00:00 -08:00
|
13
13
|
default_executable:
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|