scms 4.4.3 → 4.4.4

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
- NGUwODQ4ODJmMjdhY2NhMTMxMTZhZjBlN2MzMTY4ZTRlMzNmNTkxMQ==
4
+ OGY2OWVjNzNiZGJlNWUzZWI4NTA4ZjI3NGVkZDU2YzQ2YjE4ZDI1ZQ==
5
5
  data.tar.gz: !binary |-
6
- MDJjNTA3MDNhN2ZmMGZhN2FkNjM1ZjdiZGViYWViODY4Y2I2NzRiZA==
6
+ ZjNlYzliNzgwMDVjOWU4MjE5Y2Q5Y2UyOWUwMjljNjI4MGNhMzc3Yw==
7
7
  SHA512:
8
8
  metadata.gz: !binary |-
9
- ZjZhNzNmNTFiNzFlZTEyYjEwODc0M2QxYTE4MTk2ZDM0ZjNlZTFkNzJlOTMz
10
- OGU4N2M4NDgzYWQxOGVhYTUxYzg1YTllNzdkNWZkYjAwYmRmMjVhNDA1OTU0
11
- ZDQ5MGQzNDE4M2YyNjUxOWVmYmJhNTg1MmQ5MzQwMThhN2M2Mzc=
9
+ MmVmOTkxMDk5NGZjNTg0M2JlZjRjY2M4MzhhYmU4ZjQyMDk3OTVlNGFlNmNk
10
+ ZTBiYjE3ZDIzYjI3YmFiYjY2MzcxZDkwNDRjMDNmZDBmZTIxYjczNjFlYjBk
11
+ NTNkNDNkNDE5OGFlYWFhNGRjMTUwYmY4OWMxY2NkYmM1NmRhN2U=
12
12
  data.tar.gz: !binary |-
13
- MGMzNjVkNGRiYjVlMmM5YmRhODQ1Y2NmMTQ2Zjg0NmIxMmYyMzk1MjZiZjQw
14
- MGExYmExYzE4NzdiMTlmNDZlN2MxZGVkN2EyYjMyMWIwMmFmYWYwZThkMjA3
15
- NzI3NDExMGJlZTM4YmJhNTk0NjVjMzk0NTBiNWU1OWFlODNjY2Y=
13
+ MGZmYWRkMjM5NjdmMmE1MDhmMjAzMDI1ZTNjY2FjNzE3MDM2Mjk0MGRhNmY5
14
+ YzI5ODVlZDUxNDllODc3YzFlNzgwM2NkMTlkOGIxNzRiYTg0MjFmMjlhODc0
15
+ OGYxMTk4MTBmZmQ0NDllZjRiOGFlMGVhZTcwMTA2YzZiNWFiYWM=
@@ -87,7 +87,7 @@ module Scms
87
87
  ScmsUtils.writelog("type NUL > #{resourcepath}", website)
88
88
  end
89
89
  else
90
- ymlresource = config
90
+ ymlresource = config.dup
91
91
  ymlresource.delete("view")
92
92
  ymlresource.delete("views")
93
93
  ymlresource.delete("resource")
@@ -22,12 +22,12 @@ module ScmsUtils
22
22
  def ScmsUtils.readyaml(yamlpath)
23
23
  config = nil
24
24
  if File.exist?(yamlpath)
25
- tree = File.read(yamlpath)
25
+ #tree = File.read(yamlpath)
26
26
  begin
27
- myconfig = ERB.new(tree).result()
28
- #puts "Conf = #{myconfig}"
29
- config = YAML.load(myconfig)
30
- #config = YAML.load_file(yamlpath)
27
+ # myconfig = ERB.new(tree).result()
28
+ # puts "Conf = #{myconfig}"
29
+ # config = YAML.load(myconfig)
30
+ config = YAML.load_file(yamlpath)
31
31
  rescue Exception => e
32
32
  ScmsUtils.errLog("Error Loading _config.yml (check there are no tabs in the file)")
33
33
  ScmsUtils.log("Yaml: #{ScmsUtils.uriEncode("file:///#{yamlpath}")}")
data/lib/scms/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module Scms
2
- VERSION = "4.4.3"
2
+ VERSION = "4.4.4"
3
3
  end
data/lib/scms.rb CHANGED
@@ -51,7 +51,6 @@ module Scms
51
51
  ScmsUtils.writelog("type NUL > #{bootstrap}", website)
52
52
  end
53
53
  end
54
- ScmsUtils.log("Generating pages")
55
54
  Scms.generatePages(website, settings, options)
56
55
  else
57
56
  ScmsUtils.errLog("Config is empty")
@@ -71,6 +70,7 @@ module Scms
71
70
 
72
71
  private
73
72
  def Scms.generatePagesFromFolder(website, settings, options)
73
+ ScmsUtils.log("Generating from _pages folder")
74
74
  pagesFolder = File.join(website, "_pages")
75
75
  Dir.glob("#{pagesFolder}/**/*/").each do |pageFolder|
76
76
  pagename = File.basename(pageFolder, ".*")
@@ -110,20 +110,28 @@ module Scms
110
110
  private
111
111
  def Scms.generatePagesFromSettings(website, settings, options)
112
112
  if settings["pages"] != nil
113
- ScmsUtils.log("Compiling Pages:")
113
+ ScmsUtils.log("Generating from pages from config")
114
114
  settings["pages"].each do |pagedata|
115
115
  if pagedata != nil
116
116
  pagedata.each do |pageOptions|
117
+
117
118
  pagename = pageOptions[0]
118
119
  pageconfig = pageOptions[1]
120
+ settingsViews = pageconfig['views']
119
121
 
120
122
  pageOptions = PageOptions.new(pagename, website, pageconfig, settings)
121
- views = Scms.getSettingsViews(pageconfig["views"], website, pageOptions, options)
122
-
123
- # Dont save a page if no views have been defined (so the config han have pages for nav building)
124
- break if views.length < 1
123
+
124
+ views = Scms.getSettingsViews(settingsViews, website, pageOptions, options)
125
+ # Dont save a page if no views have been defined (so the config can have pages for nav building)
126
+ if views.length < 1
127
+ #ScmsUtils.log("No views specified for: #{pagename}")
128
+ #puts "#{pageconfig}"
129
+ break
130
+ end
125
131
  Scms.savePage(settings, website, pageOptions, views, options)
126
132
  end
133
+ else
134
+ ScmsUtils.errLog("No pagedata")
127
135
  end
128
136
  end
129
137
  end
@@ -144,6 +152,8 @@ module Scms
144
152
  viewmodel = Scms.getViewModel(viewname, viewpath, website, pageOptions, options, viewData)
145
153
  views[viewname] = Scms.includeView(viewpath, viewmodel)
146
154
  end
155
+ else
156
+ #puts "No settingsViews"
147
157
  end
148
158
  return views
149
159
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: scms
3
3
  version: !ruby/object:Gem::Version
4
- version: 4.4.3
4
+ version: 4.4.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Courtenay Probert