merb-helpers 1.1.0.pre → 1.1.0.rc1
Sign up to get free protection for your applications and to get access to all the features.
- data/Rakefile +1 -1
- data/lib/merb-helpers.rb +10 -8
- data/lib/merb-helpers/version.rb +2 -2
- metadata +5 -5
data/Rakefile
CHANGED
data/lib/merb-helpers.rb
CHANGED
@@ -1,10 +1,12 @@
|
|
1
|
+
require "merb-core"
|
2
|
+
|
1
3
|
module Merb
|
2
|
-
|
4
|
+
|
3
5
|
module Helpers
|
4
|
-
|
6
|
+
|
5
7
|
@@helpers_dir = File.dirname(__FILE__) / 'merb-helpers'
|
6
8
|
@@helpers_files = Dir["#{@@helpers_dir}/*_helpers.rb"].collect {|h| h.match(/\/(\w+)\.rb/)[1]}
|
7
|
-
|
9
|
+
|
8
10
|
def self.load
|
9
11
|
|
10
12
|
require 'merb-helpers/time_dsl'
|
@@ -13,7 +15,7 @@ module Merb
|
|
13
15
|
|
14
16
|
if Merb::Plugins.config[:merb_helpers]
|
15
17
|
config = Merb::Plugins.config[:merb_helpers]
|
16
|
-
|
18
|
+
|
17
19
|
if config[:include] && !config[:include].empty?
|
18
20
|
load_helpers(config[:include])
|
19
21
|
else
|
@@ -21,20 +23,20 @@ module Merb
|
|
21
23
|
# but doesn't put in a with or without option
|
22
24
|
load_helpers
|
23
25
|
end
|
24
|
-
|
26
|
+
|
25
27
|
else
|
26
28
|
load_helpers
|
27
29
|
end
|
28
30
|
end
|
29
|
-
|
31
|
+
|
30
32
|
# Load only specific helpers instead of loading all the helpers
|
31
33
|
def self.load_helpers(helpers = @@helpers_files)
|
32
34
|
helpers = helpers.is_a?(Array) ? helpers : [helpers]
|
33
35
|
helpers.each {|helper| Kernel.load(File.join(@@helpers_dir, "#{helper}.rb") )} # using load here allows specs to work
|
34
36
|
end
|
35
|
-
|
37
|
+
|
36
38
|
end
|
37
|
-
|
39
|
+
|
38
40
|
end
|
39
41
|
|
40
42
|
Merb::Helpers.load
|
data/lib/merb-helpers/version.rb
CHANGED
metadata
CHANGED
@@ -6,8 +6,8 @@ version: !ruby/object:Gem::Version
|
|
6
6
|
- 1
|
7
7
|
- 1
|
8
8
|
- 0
|
9
|
-
-
|
10
|
-
version: 1.1.0.
|
9
|
+
- rc1
|
10
|
+
version: 1.1.0.rc1
|
11
11
|
platform: ruby
|
12
12
|
authors:
|
13
13
|
- Michael D. Ivey
|
@@ -15,7 +15,7 @@ autorequire:
|
|
15
15
|
bindir: bin
|
16
16
|
cert_chain: []
|
17
17
|
|
18
|
-
date: 2010-
|
18
|
+
date: 2010-03-14 00:00:00 +00:00
|
19
19
|
default_executable:
|
20
20
|
dependencies:
|
21
21
|
- !ruby/object:Gem::Dependency
|
@@ -29,8 +29,8 @@ dependencies:
|
|
29
29
|
- 1
|
30
30
|
- 1
|
31
31
|
- 0
|
32
|
-
-
|
33
|
-
version: 1.1.0.
|
32
|
+
- rc1
|
33
|
+
version: 1.1.0.rc1
|
34
34
|
type: :runtime
|
35
35
|
version_requirements: *id001
|
36
36
|
- !ruby/object:Gem::Dependency
|