medea 0.5.2 → 0.5.3
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/medea/jasondb.rb +3 -2
- data/lib/medea/version.rb +1 -1
- metadata +2 -2
data/lib/medea/jasondb.rb
CHANGED
@@ -26,16 +26,17 @@ module JasonDB
|
|
26
26
|
end
|
27
27
|
|
28
28
|
module Medea
|
29
|
-
def Medea::setup_templates
|
29
|
+
def Medea::setup_templates url=nil
|
30
30
|
template_dir = "templates"
|
31
31
|
name_pattern = /([A-Za-z]+)\.template/
|
32
32
|
headers = {:content_type => 'text/plain',
|
33
33
|
'X-VERSION' => TEMPLATE_VERSION}
|
34
34
|
curr_version = TEMPLATE_VERSION.split "."
|
35
|
+
base_url = url ? url : JasonDB::db_auth_url
|
35
36
|
Dir.glob(File.expand_path(File.join(template_dir, "*.template"))).select do |file|
|
36
37
|
#for each template, we need to post it to ..#{filename}:html_template
|
37
38
|
file =~ name_pattern
|
38
|
-
template_path = "#{
|
39
|
+
template_path = "#{base_url}..#{$1}:html_template"
|
39
40
|
|
40
41
|
#but,check the version first...
|
41
42
|
begin
|
data/lib/medea/version.rb
CHANGED