scms 4.0.2 → 4.0.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +8 -8
- data/bin/scms +1 -0
- data/lib/scms.rb +12 -6
- data/lib/scms/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,15 +1,15 @@
|
|
1
1
|
---
|
2
2
|
!binary "U0hBMQ==":
|
3
3
|
metadata.gz: !binary |-
|
4
|
-
|
4
|
+
MTE5MWU1NDc5ZTM1MDNmNDQzMzI5M2U2NGZjNThlOTI3ZmQxMGI3NA==
|
5
5
|
data.tar.gz: !binary |-
|
6
|
-
|
6
|
+
ZWUwYmE2ZTNmYWQyN2QwNGJjMmMxNTUyZGJlNDEyM2ZhY2I0MTJkOA==
|
7
7
|
SHA512:
|
8
8
|
metadata.gz: !binary |-
|
9
|
-
|
10
|
-
|
11
|
-
|
9
|
+
ODc5MTRhMDQxNTllOGVmM2NlZTMzNmNmNmVlOTZkMWFiNDg0YTAyNzU0ZTgy
|
10
|
+
MjE3MDExYzhmMWE5NTE5NDk2YjBkNWE4NDk4MzMwNmVjMDIzZDgzODcxMTY1
|
11
|
+
NTc4NzMxMGFlNDkyOWMxOTM4MzY1ODY2MzNhNTU2ODJjYTQ1OWQ=
|
12
12
|
data.tar.gz: !binary |-
|
13
|
-
|
14
|
-
|
15
|
-
|
13
|
+
NjY0MmQyY2U4ZjJlZTMzMTQ3MGM3ZDkxMTQ2MDE5YzI0N2IzZWIyNDY0MDA1
|
14
|
+
MWUzNDEzOWFjYmViZmI1NDI5ZDE2NWU2NmUyZmI1ZTJhMDQzZjRiNjhmYWY4
|
15
|
+
YTIyN2I4MTU1NzVhYjMwMzJlMDkzYjU1YjhiMTA1NDBlNWY3ODE=
|
data/bin/scms
CHANGED
@@ -103,6 +103,7 @@ $cmsmode = options[:mode] == "cms"
|
|
103
103
|
# ScmsUtils.log "Mode = #{options[:mode]}"
|
104
104
|
|
105
105
|
raise "Invalid working directory! #{Folders[:website]}" if !File::directory?(Folders[:website])
|
106
|
+
Dir.chdir Folders[:website]
|
106
107
|
|
107
108
|
if options[:create] != nil
|
108
109
|
puts "Creating scms website: #{options[:create]}"
|
data/lib/scms.rb
CHANGED
@@ -28,8 +28,6 @@ module Scms
|
|
28
28
|
end
|
29
29
|
|
30
30
|
def Scms.build(website, settings, options)
|
31
|
-
|
32
|
-
|
33
31
|
ScmsUtils.boldlog("Compiling #{website}")
|
34
32
|
|
35
33
|
if settings
|
@@ -68,7 +66,6 @@ module Scms
|
|
68
66
|
|
69
67
|
def Scms.parseSettingsPages(website, settings, options)
|
70
68
|
if settings["pages"] != nil
|
71
|
-
|
72
69
|
ScmsUtils.log("Compiling Pages:")
|
73
70
|
settings["pages"].each do |pagedata|
|
74
71
|
#puts "pagedata: #{pagedata}"
|
@@ -260,7 +257,7 @@ module Scms
|
|
260
257
|
puts "nil value foy key: #{key}" if value == nil
|
261
258
|
singleton_class.send(:define_method, key) { value }
|
262
259
|
end
|
263
|
-
result
|
260
|
+
result += "</code></pre>"
|
264
261
|
|
265
262
|
|
266
263
|
result += "\n\n"
|
@@ -276,13 +273,11 @@ module Scms
|
|
276
273
|
end
|
277
274
|
|
278
275
|
def Scms.save(settings, website, pageOptions, views, options)
|
279
|
-
|
280
276
|
fileName = File.join(website, File.join(pageOptions.url.sub('~/','')))
|
281
277
|
erb = File.join(website, pageOptions.template)
|
282
278
|
#ScmsUtils.log("Generating: #{fileName} with #{pageOptions.template}")
|
283
279
|
|
284
280
|
if File.exists?(erb)
|
285
|
-
|
286
281
|
# Build bundle model
|
287
282
|
bundleModel = Scms.bundleModel(website, settings, options)
|
288
283
|
# Build navigation model
|
@@ -373,11 +368,22 @@ module Scms
|
|
373
368
|
pagedata.each do |pageoptions|
|
374
369
|
pagename = pageoptions[0]
|
375
370
|
pageconfig = pageoptions[1]
|
371
|
+
|
376
372
|
pageurl = "about:blank"
|
377
373
|
pageurl = pageconfig["url"] unless pageconfig["url"] == nil
|
374
|
+
|
375
|
+
#pageUrlExt = File.extname(pageurl)
|
376
|
+
#puts "pageUrlExt: #{pageUrlExt}"
|
377
|
+
#puts "No extension" if pageUrlExt == ""
|
378
|
+
if options[:mode] == "cms"
|
379
|
+
pageurl += "index.html" if pageurl.match(/\/$/)
|
380
|
+
end
|
381
|
+
|
378
382
|
navtext = pagename
|
379
383
|
navtext = pageconfig["text"]
|
384
|
+
|
380
385
|
navmeta = pageconfig["meta"]
|
386
|
+
|
381
387
|
navModel.push({"text" => navtext, "url" => pageurl.gsub("~/", websiteroot), "pagename" => pagename, "meta" => navmeta})
|
382
388
|
end
|
383
389
|
end
|
data/lib/scms/version.rb
CHANGED