massimo 0.5.2 → 0.5.3
Sign up to get free protection for your applications and to get access to all the features.
- data/VERSION +1 -1
- data/lib/massimo/config.rb +5 -6
- data/lib/massimo/resource.rb +1 -1
- metadata +3 -3
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.5.
|
1
|
+
0.5.3
|
data/lib/massimo/config.rb
CHANGED
@@ -8,6 +8,7 @@ module Massimo
|
|
8
8
|
:source_path => '.',
|
9
9
|
:output_path => 'public',
|
10
10
|
:resources_path => '.',
|
11
|
+
:base_url => '/',
|
11
12
|
:resources_url => '/',
|
12
13
|
:javascripts_url => '/javascripts',
|
13
14
|
:stylesheets_url => '/stylesheets',
|
@@ -41,12 +42,10 @@ module Massimo
|
|
41
42
|
end
|
42
43
|
|
43
44
|
def url_for(resource_name)
|
44
|
-
url_method
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
resources_url
|
49
|
-
end
|
45
|
+
url_method = "#{resource_name}_url"
|
46
|
+
resource_url = respond_to?(url_method) && send(url_method)
|
47
|
+
resource_url = resources_url unless resource_url
|
48
|
+
File.join(base_url, resource_url)
|
50
49
|
end
|
51
50
|
|
52
51
|
def files_in(resource_name, extension = '*')
|
data/lib/massimo/resource.rb
CHANGED
@@ -67,7 +67,7 @@ module Massimo
|
|
67
67
|
|
68
68
|
# The path to the output file.
|
69
69
|
def output_path
|
70
|
-
@output_path ||= Pathname.new File.join(Massimo.config.output_path, url)
|
70
|
+
@output_path ||= Pathname.new File.join(Massimo.config.output_path, url.sub(/^#{Regexp.escape(Massimo.config.base_url)}/, ''))
|
71
71
|
end
|
72
72
|
|
73
73
|
# Runs the content through any necessary filters, templates, etc.
|
metadata
CHANGED
@@ -5,8 +5,8 @@ version: !ruby/object:Gem::Version
|
|
5
5
|
segments:
|
6
6
|
- 0
|
7
7
|
- 5
|
8
|
-
-
|
9
|
-
version: 0.5.
|
8
|
+
- 3
|
9
|
+
version: 0.5.3
|
10
10
|
platform: ruby
|
11
11
|
authors:
|
12
12
|
- Pete Browne
|
@@ -14,7 +14,7 @@ autorequire:
|
|
14
14
|
bindir: bin
|
15
15
|
cert_chain: []
|
16
16
|
|
17
|
-
date: 2010-04-
|
17
|
+
date: 2010-04-28 00:00:00 -05:00
|
18
18
|
default_executable:
|
19
19
|
dependencies:
|
20
20
|
- !ruby/object:Gem::Dependency
|