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 CHANGED
@@ -1,15 +1,15 @@
1
1
  ---
2
2
  !binary "U0hBMQ==":
3
3
  metadata.gz: !binary |-
4
- Mzc0NDUwODJkNDk4Y2FiODVmZDIxZjA3MTEyZjVlNTJjYjNmMTRkYw==
4
+ YWViM2NmNGUxMmRkNjE2NTY0YjBlMWFiZGQ5NDMzOTVlZDM4OGNiNg==
5
5
  data.tar.gz: !binary |-
6
- N2FlZjI2YmM2NTkzNWUxNmFiZDZmYWEyNzBmYzYzYmYxNWUwYWIwMw==
6
+ MmZkYzFhZDJmYmRkOTcyNWE3MjljZTZiMjlmNWRkYTIzYTJjY2I4ZA==
7
7
  SHA512:
8
8
  metadata.gz: !binary |-
9
- Mzg3NTU2MjhjYTgyNzYzMWI0MDUyYWMzMjQ5MmQwYzEzMGE2NWFlMmNjOTIx
10
- YmNlZDViNjMwNWQ3M2NkM2Q3M2JjODA1NTFjZDY4M2I5YWJmMTU4ZDY5NmEw
11
- YzRjMDFlN2ExN2M0ZTM4OTFmNmRlOTE2MDk5ODM2OTMyYTE4NjA=
9
+ NjY5NzAxYmQ1OGQxNWZjZWQzYWMzZDNmYjE0OTRkYTdhMWM2OGE3MTU1YmE2
10
+ ZWE5MGFlZDhiODJlYTU1NmVjNGRiNDlkZWQyMDNlODVhYzJkZDk2ODY2Yjky
11
+ ZTRjOTZlZWJlODQyNWI3MDVhYmI1YTFhNTdkMGJiM2JlODI3YzA=
12
12
  data.tar.gz: !binary |-
13
- NDk4ZDgzMDk5N2E1MDZlMGIwZTBmZDM0OWJiMTQxMmI4YmU5M2E2M2IwY2E0
14
- YjAzMWE2NjA2MTUwODUwOGIxNWI1YjRkMWIzYmU2YTA4MWZjN2E0YjBmM2E2
15
- NDlhYTA2ZDE4MDY5MmQ0MzgxOTRkZTNiNWMxYTQ4NDhlYzk5YWU=
13
+ NGI1MThkNTk2ZmJhOWU4ODcyNjFmZGQyMDQwNzhkMDI3MDJkNzZlMmYzOTdj
14
+ YzIwMGE5ZTYxZDE5N2NkYmU5ZjBlYjkwZjZhN2JiNTQyNzI1NjEzY2U5NjVj
15
+ ZDA4ODRiYTM5OWJjZDEwODBiM2FkNGY2YTQ2NjQyYzg5MDlmMTg=
@@ -46,7 +46,7 @@ $(function() {
46
46
  if ($.trim($this.html()) === "")
47
47
  $this.html(addTextMsg);
48
48
  $(this).css({
49
- backgroundColor: 'AliceBlue',
49
+ backgroundColor: '#FFFFE0',
50
50
  cursor: 'pointer'
51
51
  });
52
52
  })
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.generateSettingsPages(website, settings, options)
63
+ Scms.generatePagesFromSettings(website, settings, options)
64
64
  # build pages pased on _pages folder
65
- Scms.generateFolderPages(website, settings, options)
65
+ Scms.generatePagesFromFolder(website, settings, options)
66
66
  end
67
67
 
68
- def Scms.generateSettingsPages(website, settings, options)
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.generateFolderPages(website, settings, options)
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, ".*")
@@ -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 = "<code style='border: 1px solid #666; background-color: light-yellow;'><pre>"
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 += "Invalid Keys in Template\n\n"
56
- result += "Valid Keys are:\n"
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 += "</code></pre>"
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
@@ -14,9 +14,14 @@ module ScmsWatcher
14
14
  puts "***********************************"
15
15
  puts ""
16
16
 
17
- settings = Scms.getSettings(configdir)
18
- Scms.bundle(settings, Folders[:website])
19
- Scms.build(Folders[:website], settings, options)
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
- Scms.sassall(Folders[:website]) if sassfile
101
- Scms.bundle(settings, Folders[:website]) if bundlefile
102
- Scms.build(Folders[:website], settings, options) if buildfile
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
@@ -1,3 +1,3 @@
1
1
  module Scms
2
- VERSION = "4.1.1"
2
+ VERSION = "4.1.2"
3
3
  end
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.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-28 00:00:00.000000000 Z
11
+ date: 2013-10-30 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: cprobert-s3sync