scms 4.1.1 → 4.1.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +8 -8
- data/assets/air-monkey-hook.js +1 -1
- data/lib/scms.rb +4 -4
- data/lib/scms/scms-parser.rb +10 -6
- data/lib/scms/scms-watcher.rb +17 -6
- data/lib/scms/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,15 +1,15 @@
|
|
1
1
|
---
|
2
2
|
!binary "U0hBMQ==":
|
3
3
|
metadata.gz: !binary |-
|
4
|
-
|
4
|
+
YWViM2NmNGUxMmRkNjE2NTY0YjBlMWFiZGQ5NDMzOTVlZDM4OGNiNg==
|
5
5
|
data.tar.gz: !binary |-
|
6
|
-
|
6
|
+
MmZkYzFhZDJmYmRkOTcyNWE3MjljZTZiMjlmNWRkYTIzYTJjY2I4ZA==
|
7
7
|
SHA512:
|
8
8
|
metadata.gz: !binary |-
|
9
|
-
|
10
|
-
|
11
|
-
|
9
|
+
NjY5NzAxYmQ1OGQxNWZjZWQzYWMzZDNmYjE0OTRkYTdhMWM2OGE3MTU1YmE2
|
10
|
+
ZWE5MGFlZDhiODJlYTU1NmVjNGRiNDlkZWQyMDNlODVhYzJkZDk2ODY2Yjky
|
11
|
+
ZTRjOTZlZWJlODQyNWI3MDVhYmI1YTFhNTdkMGJiM2JlODI3YzA=
|
12
12
|
data.tar.gz: !binary |-
|
13
|
-
|
14
|
-
|
15
|
-
|
13
|
+
NGI1MThkNTk2ZmJhOWU4ODcyNjFmZGQyMDQwNzhkMDI3MDJkNzZlMmYzOTdj
|
14
|
+
YzIwMGE5ZTYxZDE5N2NkYmU5ZjBlYjkwZjZhN2JiNTQyNzI1NjEzY2U5NjVj
|
15
|
+
ZDA4ODRiYTM5OWJjZDEwODBiM2FkNGY2YTQ2NjQyYzg5MDlmMTg=
|
data/assets/air-monkey-hook.js
CHANGED
data/lib/scms.rb
CHANGED
@@ -60,12 +60,12 @@ module Scms
|
|
60
60
|
|
61
61
|
def Scms.generatePages(website, settings, options)
|
62
62
|
# build pages defined in config file
|
63
|
-
Scms.
|
63
|
+
Scms.generatePagesFromSettings(website, settings, options)
|
64
64
|
# build pages pased on _pages folder
|
65
|
-
Scms.
|
65
|
+
Scms.generatePagesFromFolder(website, settings, options)
|
66
66
|
end
|
67
67
|
|
68
|
-
def Scms.
|
68
|
+
def Scms.generatePagesFromSettings(website, settings, options)
|
69
69
|
if settings["pages"] != nil
|
70
70
|
ScmsUtils.log("Compiling Pages:")
|
71
71
|
settings["pages"].each do |pagedata|
|
@@ -104,7 +104,7 @@ module Scms
|
|
104
104
|
return views
|
105
105
|
end
|
106
106
|
|
107
|
-
def Scms.
|
107
|
+
def Scms.generatePagesFromFolder(website, settings, options)
|
108
108
|
pagesFolder = File.join(website, "_pages")
|
109
109
|
Dir.glob("#{pagesFolder}/**/*/").each do |pageFolder|
|
110
110
|
pagename = File.basename(pageFolder, ".*")
|
data/lib/scms/scms-parser.rb
CHANGED
@@ -47,22 +47,26 @@ module Scms
|
|
47
47
|
ScmsUtils.errLog("Critical Error: Could not parse template")
|
48
48
|
#ScmsUtils.errLog(e.message)
|
49
49
|
|
50
|
-
result = "<
|
50
|
+
result = "<div style='border: 1px solid #A8A8A8; border-radius:8px; background-color: #FFFFE0; box-shadow: 5px 5px 3px #CDCDCD; padding: 15px; margin: 15px;'>"
|
51
|
+
result += "<p>Critical Error: Could not parse template</p>"
|
52
|
+
result += "<code><pre>"
|
51
53
|
result += e.message
|
52
54
|
result += "\n\n"
|
53
55
|
result += e.inspect
|
56
|
+
|
54
57
|
result += "\n\n"
|
55
|
-
result += "
|
56
|
-
|
57
|
-
@model.each do |key, value|
|
58
|
+
result += "Valid Template Keys are:\n"
|
59
|
+
@model.marshal_dump.each do |key, value|
|
58
60
|
result += "- page.#{key}\n"
|
59
61
|
puts "nil value foy key: #{key}" if value == nil
|
60
62
|
singleton_class.send(:define_method, key) { value }
|
61
63
|
end
|
62
|
-
result += "
|
63
|
-
|
64
|
+
result += "\n\n"
|
65
|
+
result += e.backtrace.join("\n")
|
66
|
+
result += "</pre></code></div>"
|
64
67
|
result += "\n\n"
|
65
68
|
result += template
|
69
|
+
|
66
70
|
rescue Exception => e
|
67
71
|
puts "Problem with template - check property exists"
|
68
72
|
end
|
data/lib/scms/scms-watcher.rb
CHANGED
@@ -14,9 +14,14 @@ module ScmsWatcher
|
|
14
14
|
puts "***********************************"
|
15
15
|
puts ""
|
16
16
|
|
17
|
-
|
18
|
-
|
19
|
-
|
17
|
+
begin
|
18
|
+
settings = Scms.getSettings(configdir)
|
19
|
+
Scms.bundle(settings, Folders[:website])
|
20
|
+
Scms.build(Folders[:website], settings, options)
|
21
|
+
rescue Exception=>e
|
22
|
+
ScmsUtils.errLog(e.message)
|
23
|
+
ScmsUtils.log(e.backtrace.inspect)
|
24
|
+
end
|
20
25
|
end
|
21
26
|
}
|
22
27
|
|
@@ -97,9 +102,15 @@ module ScmsWatcher
|
|
97
102
|
}
|
98
103
|
end
|
99
104
|
|
100
|
-
|
101
|
-
|
102
|
-
|
105
|
+
begin
|
106
|
+
Scms.sassall(Folders[:website]) if sassfile
|
107
|
+
Scms.bundle(settings, Folders[:website]) if bundlefile
|
108
|
+
Scms.build(Folders[:website], settings, options) if buildfile
|
109
|
+
rescue Exception=>e
|
110
|
+
ScmsUtils.errLog(e.message)
|
111
|
+
ScmsUtils.log(e.backtrace.inspect)
|
112
|
+
end
|
113
|
+
|
103
114
|
end
|
104
115
|
|
105
116
|
listener.start # not blocking
|
data/lib/scms/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: scms
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 4.1.
|
4
|
+
version: 4.1.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Courtenay Probert
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2013-10-
|
11
|
+
date: 2013-10-30 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: cprobert-s3sync
|