scms 1.9.4 → 1.9.5

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/version.rb +1 -1
  3. data/lib/scms.rb +8 -5
  4. metadata +1 -1
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 0d13e89ab65773ba3b85c1bbf9fdd3336faf0535
4
- data.tar.gz: 9cd9682ef55ce720cd9d3d3d79330d26a475e665
3
+ metadata.gz: 8afbf980cb75d561c9a31da6363773ed87695218
4
+ data.tar.gz: 14b0ec6f0fe85009bcc5758ac7ddd6d761bb5f81
5
5
  SHA512:
6
- metadata.gz: cde4753adbc84538ffa0fd7cb1d41e079c16a488adbfec7693813104f11fd1a77f450dc32f87221c10117d12b40f31c7989196da9431ac5e3ec6437d292de4a8
7
- data.tar.gz: 213efe391c2e75b4e22b2a100974170ce452b7dae4cb901f7ca29f10861aa628221678e7c930e1f985ddac273ebea0e244c0247561b3fe93c8de6175f5bd8870
6
+ metadata.gz: eeb4cac2eea8f198918e020d4c5ffeebce645b18299306290603577382d7a598fc0798f33a15b3a8b827bccd07f4995bbc601373749726d667568cc3ebc8d41f
7
+ data.tar.gz: d366328cd072ca5f08a6434c987b2f17685073d46e3960a138ade8028a145e2abc7502bfa2c78d4201f7dce2338c96daa73e7d77889dda45e97439b6ccaedb3f
data/lib/scms/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module Scms
2
- VERSION = "1.9.4"
2
+ VERSION = "1.9.5"
3
3
  end
data/lib/scms.rb CHANGED
@@ -72,8 +72,8 @@ module Scms
72
72
  end
73
73
 
74
74
  #Bundle resources
75
- scripts = Scms.bundle($settings["scripts"])
76
- stylesheets = Scms.bundle($settings["stylesheets"])
75
+ scripts = Scms.bundle($settings["scripts"], ".js")
76
+ stylesheets = Scms.bundle($settings["stylesheets"], ".css")
77
77
  bundles = Scms.bundle($settings["bundles"])
78
78
  #Generate pages
79
79
  Scms.parsepages(scripts, stylesheets, bundles)
@@ -230,7 +230,7 @@ module Scms
230
230
  end
231
231
  end
232
232
 
233
- def Scms.bundle(bundleConfig)
233
+ def Scms.bundle(bundleConfig, defaultExt=".bundle")
234
234
  scripts = Hash.new
235
235
  if bundleConfig != nil
236
236
  ScmsUtils.log("Bundeling:")
@@ -243,7 +243,7 @@ module Scms
243
243
  else
244
244
  bundleVersion = 1
245
245
  end
246
- bundleName = File.join("scripts", "#{name}-v#{bundleVersion}.js") #Legasy name filename from root and version
246
+ bundleName = File.join("scripts", "#{name}-v#{bundleVersion}.#{defaultExt}") #Legasy name filename from root and version
247
247
  bundleName = File.join(option[1]["generate"]) if option[1]["generate"] != nil #just use the generate
248
248
  scripts[name] = bundleName
249
249
  ScmsUtils.successLog("#{bundleName}")
@@ -265,7 +265,10 @@ module Scms
265
265
  bundleDir = File.dirname(bundleName)
266
266
  Dir.mkdir(bundleDir, 755) unless File::directory?(bundleDir)
267
267
  File.open(bundleName, 'w') {|f| f.write(content) }
268
- Scms.packr(bundleName) unless /(-min)|(\.min)/.match(bundleName)
268
+ if File.extname(bundleName) == ".js"
269
+ puts "Minifing: #{bundleName}"
270
+ Scms.packr(bundleName) unless /(-min)|(\.min)/.match(bundleName)
271
+ end
269
272
  end
270
273
  end
271
274
  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: 1.9.4
4
+ version: 1.9.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - Courtenay Probert