scms 4.0.0 → 4.0.1

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
- NDRkYmE3ODg1NzQzMDQ3NjcwYjJlNTAxNTk4YWJiYzg4MzQ5MmI0MA==
4
+ YzZkNWExZWQzODM0MTVjNDcxNjFiYzk3MTk1MmNjYTQyZjdmODQzNw==
5
5
  data.tar.gz: !binary |-
6
- YjliNjY2YzNhNTFmYzg1NjI2Y2I1ZjE3NTg0NmExMDY4ODA2ZWJkZg==
6
+ ODFmODVjZTU0NjYyYmMxNmY4MzcwOWRmZDJkMTMzMDIyMzJjNjFjNw==
7
7
  SHA512:
8
8
  metadata.gz: !binary |-
9
- ODdlZWEzZGM0MDQ2NTA5MzczOTQzZDMwYzY2Y2Q2NTA5Nzg0NzExYjE3NzA3
10
- NGU5OGQzYjEyNmZhMWY4NTA1NWVkNmFhNDUwYjJjYzZiYjA3NTI5ZTM3N2Q2
11
- MDA3NmRmYjE3NDViNTY4OWE3ZjdlNTkwODY4M2M1NTg3N2IxZWU=
9
+ YmUxY2VlMTU3ZDg5ODUyNGIzNGNiMjk1MDA2OTE5YmE0OGM3MTNkOGNmNDhh
10
+ ZmY2Njk5ZWMwNTVlMDIzNTUwNGQxYjBmNWEyYTc5Nzc5NzJkZWIzZjJhNDA3
11
+ NDU3NjZhYzUwOTRiMzcyZDcxNjEyNTA1MTUyMDlkNmUzM2FmNDY=
12
12
  data.tar.gz: !binary |-
13
- NTMyYTMwMGVlMzNiODZjZDg2MmUzOTk4MTMxZTRjMDFkMWZmZjRmMGUyOWIw
14
- M2YyY2RiZmQzYWUyNjRiYzczOTI1YWQ4OTVmN2Q2ZmU2MzQ2Y2Y1NzM2MjMw
15
- M2E4OTRjNGQyZWM2NGFlYTA3OWRmZjI2YmMxZjczZTAxYzhhY2Q=
13
+ YTFhMDY3YjgzNDFlNjQ2Mjk2NDZiY2QzNzgzYjI4MjQ5MDlkZTAzNWMwNmNj
14
+ ODM0OGUyZTNmZTA4YzlhNmU5ZjRmNTJhNWMwMjVkMTgxMmNmMWUxYzhkNTgx
15
+ YjdjNmEyNzJiMjNmODUxMjM1ODEzYzEwMTk2YmU3N2EyMzM5Yjk=
data/lib/scms.rb CHANGED
@@ -413,7 +413,8 @@ module Scms
413
413
  def Scms.bundle(settings, website)
414
414
  bundleConfig = settings["bundles"]
415
415
  if bundleConfig != nil
416
-
416
+ ScmsUtils.boldlog("Bundeling:")
417
+
417
418
  bundleConfig.each do |bundle|
418
419
  #ScmsUtils.log( "bundle (#{bundle.class}) = #{bundle}" )
419
420
  bundle.each do |option|
@@ -421,7 +422,7 @@ module Scms
421
422
  config = option[1]
422
423
 
423
424
  bundleName = File.join(config["generate"].gsub("~/",""))
424
- ScmsUtils.boldlog("Bundeling:")
425
+
425
426
 
426
427
  content = ""
427
428
  assetList = ""
@@ -433,10 +434,12 @@ module Scms
433
434
  if File::exists?(assetdir)
434
435
  #try catch for permisions
435
436
  begin
436
- content = content + "\n" + File.read(assetdir)
437
+ content = content + "\n\n" + File.read(assetdir)
437
438
  rescue Exception=>e
438
439
  ScmsUtils.errLog(e.message)
439
440
  ScmsUtils.log(e.backtrace.inspect)
441
+
442
+ ScmsUtils.log("#{assetList}")
440
443
  end
441
444
  else
442
445
  ScmsUtils.errLog("Asset file doesn't exists: #{asset}")
@@ -444,26 +447,26 @@ module Scms
444
447
  ScmsUtils.writelog("type NUL > #{assetdir}", website)
445
448
  end
446
449
  end
447
- ScmsUtils.log("#{assetList}")
448
450
 
449
- bundleFullPath = File.join(website, bundleName)
450
- bundleDir = File.dirname(File.join(website, bundleName))
451
- begin
452
- Dir.mkdir(bundleDir, 755) unless File::directory?(bundleDir)
453
- File.open(bundleFullPath, 'w') {|f| f.write(content) }
454
- ScmsUtils.successLog("Created: #{bundleName}")
455
- rescue Exception=>e
456
- ScmsUtils.errLog("Error creating bundle: #{bundleName}")
457
- ScmsUtils.errLog(e.message)
458
- ScmsUtils.log(e.backtrace.inspect)
459
- end
460
- if File.extname(bundleName) == ".js"
461
- puts "Minifing: #{bundleName}"
462
- Scms.packr(bundleFullPath) unless /(-min)|(\.min)/.match(bundleName)
463
- end
464
451
  else
465
452
  ScmsUtils.errLog("No files in bundle");
466
453
  end
454
+
455
+ bundleFullPath = File.join(website, bundleName)
456
+ bundleDir = File.dirname(File.join(website, bundleName))
457
+ begin
458
+ Dir.mkdir(bundleDir, 755) unless File::directory?(bundleDir)
459
+ File.open(bundleFullPath, 'w') {|f| f.write(content) }
460
+ ScmsUtils.successLog("Created: #{bundleName}")
461
+ rescue Exception=>e
462
+ ScmsUtils.errLog("Error creating bundle: #{bundleName}")
463
+ ScmsUtils.errLog(e.message)
464
+ ScmsUtils.log(e.backtrace.inspect)
465
+ end
466
+ if File.extname(bundleName) == ".js"
467
+ #puts "Minifing: #{bundleName}"
468
+ Scms.packr(bundleFullPath) unless /(-min)|(\.min)/.match(bundleName)
469
+ end
467
470
  end
468
471
  end
469
472
  end
@@ -503,6 +506,7 @@ module Scms
503
506
  end
504
507
 
505
508
  def Scms.packr(asset)
509
+ #puts "Trying to pack: #{asset}"
506
510
  if File.exists?(asset)
507
511
  begin
508
512
  code = File.read(asset)
data/lib/scms/s3deploy.rb CHANGED
@@ -16,7 +16,7 @@ module S3Deploy
16
16
  throw "No bucket defined in _s3config.yml settings file" if settings['bucket'] == nil
17
17
  ScmsUtils.boldlog( "Syncing with Amazon S3: #{settings['bucket']}" )
18
18
 
19
- exclude = "(\\.svn$)|(^_)"
19
+ exclude = "(\\.svn$)|(\\.git$)|(^_)"
20
20
  if settings['ignore'] != nil
21
21
  exclude = "#{exclude}|(#{settings["ignore"]})"
22
22
  end
@@ -17,9 +17,20 @@ module ScmsXmlHandler
17
17
  xslpi = File.join($website, xslpi)
18
18
 
19
19
  if File.exists?(xslpi)
20
- xsl = File.read(xslpi)
21
- xslt = Nokogiri::XSLT(xsl)
22
- return xslt.transform(xml).to_html
20
+ begin
21
+ xsl = File.read(xslpi)
22
+ xslt = Nokogiri::XSLT(xsl)
23
+ return xslt.transform(xml).to_html
24
+ rescue StandardError => e
25
+ ScmsUtils.errLog("Error transforming")
26
+ ScmsUtils.errLog(xslpi)
27
+ ScmsUtils.errLog(e.message)
28
+ ScmsUtils.errLog(e.inspect)
29
+ #print e.backtrace.join("\n")
30
+ rescue Exception => e
31
+ ScmsUtils.errLog("Error transforming with #{xslpi}")
32
+ ScmsUtils.errLog(e.message)
33
+ end
23
34
  else
24
35
  puts "Cant find pi: #{xslpi}"
25
36
  end
data/lib/scms/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module Scms
2
- VERSION = "4.0.0"
2
+ VERSION = "4.0.1"
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.0.0
4
+ version: 4.0.1
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-24 00:00:00.000000000 Z
11
+ date: 2013-10-25 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: cprobert-s3sync