scms 4.2.3 → 4.2.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +8 -8
- data/lib/scms.rb +52 -50
- 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
|
+
NWI5MmI3NjMwMGM3MWNkMTNhZjM1NGM2OTg4N2Y1NzIxYmY5NWUyMw==
|
5
5
|
data.tar.gz: !binary |-
|
6
|
-
|
6
|
+
ODRjY2QzODk0NjU5YTlkZTUzMTYwZDA0N2UwNzQwOGMxNWVlZGViYQ==
|
7
7
|
SHA512:
|
8
8
|
metadata.gz: !binary |-
|
9
|
-
|
10
|
-
|
11
|
-
|
9
|
+
ZTNjOGQ1N2RjMGUzNGVlNjVkNjJkOTNkYWIzYjI5YjMxZGNkYzkzZmZjZDQ5
|
10
|
+
MjIzNTk3OTczZTE2NWRmMTU2NzQwNDI2NGNkM2RmNGMyZWY2MzMxMjg5NWU5
|
11
|
+
NDBkMjdiNjkxOGMzYjE4ZTY3NzYzMmU3YzQyZDJkZDNhNDc1M2M=
|
12
12
|
data.tar.gz: !binary |-
|
13
|
-
|
14
|
-
|
15
|
-
|
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
|
-
|
352
|
-
|
353
|
-
|
354
|
-
|
355
|
-
|
356
|
-
|
357
|
-
|
358
|
-
|
359
|
-
|
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
|
-
|
362
|
-
|
363
|
-
|
364
|
-
|
365
|
-
|
366
|
-
|
367
|
-
|
368
|
-
|
369
|
-
|
370
|
-
|
371
|
-
|
372
|
-
|
373
|
-
|
374
|
-
|
375
|
-
|
376
|
-
|
377
|
-
|
378
|
-
|
379
|
-
ScmsUtils.
|
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
|
-
|
393
|
-
|
394
|
-
|
395
|
-
|
396
|
-
|
397
|
-
|
398
|
-
|
399
|
-
|
400
|
-
|
401
|
-
|
402
|
-
|
403
|
-
|
404
|
-
|
405
|
-
|
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
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.
|
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-
|
11
|
+
date: 2013-11-07 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: cprobert-s3sync
|