scms 4.2.3 → 4.2.4

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 +8 -8
  2. data/lib/scms.rb +52 -50
  3. data/lib/scms/version.rb +1 -1
  4. metadata +2 -2
checksums.yaml CHANGED
@@ -1,15 +1,15 @@
1
1
  ---
2
2
  !binary "U0hBMQ==":
3
3
  metadata.gz: !binary |-
4
- M2ZiNGI3MjY4NGQ0YzI3MDBhZDBhMDgzNWQzNWE0YzlkYzY1MWUxMg==
4
+ NWI5MmI3NjMwMGM3MWNkMTNhZjM1NGM2OTg4N2Y1NzIxYmY5NWUyMw==
5
5
  data.tar.gz: !binary |-
6
- ZjUxODg5M2IyZWRmNzkxMGU3M2Y4MGVmZDUwNTgwZTQ3YzA4MGYzZQ==
6
+ ODRjY2QzODk0NjU5YTlkZTUzMTYwZDA0N2UwNzQwOGMxNWVlZGViYQ==
7
7
  SHA512:
8
8
  metadata.gz: !binary |-
9
- NjBmOTliMDQ2ZDI2ZTU3MWExMTJhNmJiM2JiY2FhNmUzNDY5YTg2NDhiM2Ji
10
- NDM2NzA0NWVkNzM3OTcwNGZlZDgwZTI2YzE1MThmNmFmNWZhOGEyNjNjMzcw
11
- Yzk3ZWNmYjVjMWNmNjllOGFiMzcyMDRmZjIzMzQ3ZDk5MDMwYzQ=
9
+ ZTNjOGQ1N2RjMGUzNGVlNjVkNjJkOTNkYWIzYjI5YjMxZGNkYzkzZmZjZDQ5
10
+ MjIzNTk3OTczZTE2NWRmMTU2NzQwNDI2NGNkM2RmNGMyZWY2MzMxMjg5NWU5
11
+ NDBkMjdiNjkxOGMzYjE4ZTY3NzYzMmU3YzQyZDJkZDNhNDc1M2M=
12
12
  data.tar.gz: !binary |-
13
- Y2Q0ODU2MTc4NmUxOTQzMjU2YjgzNTJiNjE5NmRiMWJiOWIxMWE1YzllOWVi
14
- ZGZjODViOGY5ZTE1ZjRhMTc1OGQ2YzMzMWI1ZGJlNDIyMjU2N2M1ZjRkN2Ux
15
- NTY1ODdmZGU4OTBiZWVlZWNmYTQ2NDE2MjBiMjI5MTljMWU4MjQ=
13
+ OTI5MTdmZWZhMTViZWE5ZDMyNDdkYWU0ZmYwNDcwYjQxZDc2ZDE3MGI3MDgz
14
+ YWYyYTk5M2MzZTY4MDVhYzg4MDgxMWY2NjQ1Y2EyM2QyODcxYjVlOWE3NDQ0
15
+ OWJkOTMzZGMyNjdiZGU4OTJlY2M3MTQ0NTJhNmM1NDg4YTBkNDY=
data/lib/scms.rb CHANGED
@@ -348,61 +348,63 @@ module Scms
348
348
  def Scms.bundle(settings, website)
349
349
  Scms.bundler()
350
350
 
351
- bundleConfig = settings["bundles"]
352
- if bundleConfig != nil
353
- ScmsUtils.boldlog("Bundeling:")
354
-
355
- bundleConfig.each do |bundle|
356
- #ScmsUtils.log( "bundle (#{bundle.class}) = #{bundle}" )
357
- bundle.each do |option|
358
- name = option[0]
359
- config = option[1]
351
+ if settings != nil
352
+ bundleConfig = settings["bundles"]
353
+ if bundleConfig != nil
354
+ ScmsUtils.boldlog("Bundeling:")
355
+
356
+ bundleConfig.each do |bundle|
357
+ #ScmsUtils.log( "bundle (#{bundle.class}) = #{bundle}" )
358
+ bundle.each do |option|
359
+ name = option[0]
360
+ config = option[1]
361
+
362
+ bundleName = File.join(config["generate"].gsub("~/",""))
363
+
360
364
 
361
- bundleName = File.join(config["generate"].gsub("~/",""))
362
-
363
-
364
- content = ""
365
- assetList = ""
366
- files = config["files"]
367
- if files != nil
368
- files.each do |asset|
369
- assetList += " - #{asset}\n"
370
- assetdir = File.join(website, asset)
371
- if File::exists?(assetdir)
372
- #try catch for permisions
373
- begin
374
- content = content + "\n\n" + File.read(assetdir)
375
- rescue Exception=>e
376
- ScmsUtils.errLog(e.message)
377
- ScmsUtils.log(e.backtrace.inspect)
378
-
379
- ScmsUtils.log("#{assetList}")
365
+ content = ""
366
+ assetList = ""
367
+ files = config["files"]
368
+ if files != nil
369
+ files.each do |asset|
370
+ assetList += " - #{asset}\n"
371
+ assetdir = File.join(website, asset)
372
+ if File::exists?(assetdir)
373
+ #try catch for permisions
374
+ begin
375
+ content = content + "\n\n" + File.read(assetdir)
376
+ rescue Exception=>e
377
+ ScmsUtils.errLog(e.message)
378
+ ScmsUtils.log(e.backtrace.inspect)
379
+
380
+ ScmsUtils.log("#{assetList}")
381
+ end
382
+ else
383
+ ScmsUtils.errLog("Asset file doesn't exists: #{asset}")
384
+ ScmsUtils.writelog("::Asset file doesn't exists: #{asset}", website)
385
+ ScmsUtils.writelog("type NUL > #{assetdir}", website)
380
386
  end
381
- else
382
- ScmsUtils.errLog("Asset file doesn't exists: #{asset}")
383
- ScmsUtils.writelog("::Asset file doesn't exists: #{asset}", website)
384
- ScmsUtils.writelog("type NUL > #{assetdir}", website)
385
387
  end
388
+
389
+ else
390
+ ScmsUtils.errLog("No files in bundle");
386
391
  end
387
-
388
- else
389
- ScmsUtils.errLog("No files in bundle");
390
- end
391
392
 
392
- bundleFullPath = File.join(website, bundleName)
393
- bundleDir = File.dirname(File.join(website, bundleName))
394
- begin
395
- Dir.mkdir(bundleDir, 755) unless File::directory?(bundleDir)
396
- File.open(bundleFullPath, 'w') {|f| f.write(content) }
397
- ScmsUtils.successLog("Created: #{bundleName}")
398
- rescue Exception=>e
399
- ScmsUtils.errLog("Error creating bundle: #{bundleName}")
400
- ScmsUtils.errLog(e.message)
401
- ScmsUtils.log(e.backtrace.inspect)
402
- end
403
- if File.extname(bundleName) == ".js"
404
- #puts "Minifing: #{bundleName}"
405
- Scms.packr(bundleFullPath) unless /(-min)|(\.min)/.match(bundleName)
393
+ bundleFullPath = File.join(website, bundleName)
394
+ bundleDir = File.dirname(File.join(website, bundleName))
395
+ begin
396
+ Dir.mkdir(bundleDir, 755) unless File::directory?(bundleDir)
397
+ File.open(bundleFullPath, 'w') {|f| f.write(content) }
398
+ ScmsUtils.successLog("Created: #{bundleName}")
399
+ rescue Exception=>e
400
+ ScmsUtils.errLog("Error creating bundle: #{bundleName}")
401
+ ScmsUtils.errLog(e.message)
402
+ ScmsUtils.log(e.backtrace.inspect)
403
+ end
404
+ if File.extname(bundleName) == ".js"
405
+ #puts "Minifing: #{bundleName}"
406
+ Scms.packr(bundleFullPath) unless /(-min)|(\.min)/.match(bundleName)
407
+ end
406
408
  end
407
409
  end
408
410
  end
data/lib/scms/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module Scms
2
- VERSION = "4.2.3"
2
+ VERSION = "4.2.4"
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.2.3
4
+ version: 4.2.4
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-11-01 00:00:00.000000000 Z
11
+ date: 2013-11-07 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: cprobert-s3sync