scms 2.0.2 → 2.0.3

Sign up to get free protection for your applications and to get access to all the features.
Files changed (4) hide show
  1. checksums.yaml +4 -4
  2. data/lib/scms.rb +26 -19
  3. data/lib/scms/version.rb +1 -1
  4. metadata +1 -1
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: d4d890650bc4b0a2fb20e609ec9e71bcb22f318f
4
- data.tar.gz: 246fa4d2b29c5480c9fa1e886f8077fc1c94a70d
3
+ metadata.gz: 5f381843ee93fb7c0c758ba3205076e82392b921
4
+ data.tar.gz: 6458d3e0809e62af6f6ba24c417f0c88b3d29e1c
5
5
  SHA512:
6
- metadata.gz: d8174103d4c85d19fe0a2febc793e4484d8196ab08b1f7a1901776b8e08a3e406c4798e735983606dd44e5e36bdf0f9a3c3a8a34976851905871c389db02b44a
7
- data.tar.gz: 0367a45b24d39f7a11073caaf278d5b243cff1cc695945b3eeaaa7a8dd108c3d0b0acd6c0fd374153488cb064f396df75e8fc14815324d996316c815e0dfb423
6
+ metadata.gz: 39ac479902d10445c3189c93cb0eb0e2267f046a620f41fb849317a9a2172a7a417c2525b339d7d54d75650b02cd432db0e754487af7da5f5023e5dafde1f470
7
+ data.tar.gz: db12283f651d7d18c4da2f0b2a74fddddce747549cff8e685f66e39d1ff3357d33beea9534f75b8768755a3d5a6c972d4b3f6894b24571c424c783ac2f224048
@@ -123,8 +123,11 @@ module Scms
123
123
  if !htmlsnipet.empty?
124
124
  viewmodel = Hash.new
125
125
  viewmodel = {
126
- :page => pagedata,
127
- :sitedir => @website,
126
+ :name => pagename,
127
+ :title => title,
128
+ :url => pageurl,
129
+ :data => pagedata,
130
+ :rootdir => @website,
128
131
  :resource => resource
129
132
  }
130
133
 
@@ -149,7 +152,7 @@ module Scms
149
152
  end
150
153
 
151
154
  if @mode == "cms"
152
- views[view[0]] = "<div class='cms' data-view='#{view[1]}' data-page='#{pagedata}'>#{Scms.parsetemplate(viewSnippet, viewmodel)}</div>"
155
+ views[view[0]] = "<div class='cms' data-view='#{view[1]}' data-page='#{pageurl}'>#{Scms.parsetemplate(viewSnippet, viewmodel)}</div>"
153
156
  else
154
157
  views[view[0]] = Scms.parsetemplate(viewSnippet, viewmodel)
155
158
  end
@@ -244,23 +247,27 @@ module Scms
244
247
  content = ""
245
248
  assetList = ""
246
249
  files = option[1]["files"]
247
- files.each do |asset|
248
- assetList += "\t#{asset}\n"
249
- assetname = File.join(@website, asset)
250
- if File::exists?(assetname)
251
- content = content + "\n" + File.read(assetname)
252
- else
253
- ScmsUtils.errLog( "Error: No such file #{assetname}" )
250
+ if files != nil
251
+ files.each do |asset|
252
+ assetList += "\t#{asset}\n"
253
+ assetname = File.join(@website, asset)
254
+ if File::exists?(assetname)
255
+ content = content + "\n" + File.read(assetname)
256
+ else
257
+ ScmsUtils.errLog( "Error: No such file #{assetname}" )
258
+ end
254
259
  end
255
- end
256
- ScmsUtils.log("#{assetList}")
257
-
258
- bundleDir = File.dirname(bundleName)
259
- Dir.mkdir(bundleDir, 755) unless File::directory?(bundleDir)
260
- File.open(bundleName, 'w') {|f| f.write(content) }
261
- if File.extname(bundleName) == ".js"
262
- puts "Minifing: #{bundleName}"
263
- Scms.packr(bundleName) unless /(-min)|(\.min)/.match(bundleName)
260
+ ScmsUtils.log("#{assetList}")
261
+
262
+ bundleDir = File.dirname(bundleName)
263
+ Dir.mkdir(bundleDir, 755) unless File::directory?(bundleDir)
264
+ File.open(bundleName, 'w') {|f| f.write(content) }
265
+ if File.extname(bundleName) == ".js"
266
+ puts "Minifing: #{bundleName}"
267
+ Scms.packr(bundleName) unless /(-min)|(\.min)/.match(bundleName)
268
+ end
269
+ else
270
+ ScmsUtils.errLog("No files in bundle");
264
271
  end
265
272
  end
266
273
  end
@@ -1,3 +1,3 @@
1
1
  module Scms
2
- VERSION = "2.0.2"
2
+ VERSION = "2.0.3"
3
3
  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: 2.0.2
4
+ version: 2.0.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Courtenay Probert