scms 1.9.0 → 1.9.2

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 949a83b503e813115cd68ca5706861040b203b2d
4
- data.tar.gz: 1788aa5ae7872d4982339907414c44ebc6f02a44
3
+ metadata.gz: ce31ecc9d9369edd7858fd14b68725d9a6b2199b
4
+ data.tar.gz: a776a26cbdb502cfb100e10332b967bd14d60103
5
5
  SHA512:
6
- metadata.gz: ae97e05a269a910e5a74894a3b92a62ad4119134b8f72eb07dfefa98cc7b74559d904aa326b07f8a467db2fa618a15dfabb4dc88a44ca4607230d6773ae5794e
7
- data.tar.gz: 3ff7747ef6ce525e1f33d4d09012eaae42db529b20550f1246b9d7cff0299db16be68045108d07baec92727e46ade1f4ace6a89dd8bd906536e05b482d13352a
6
+ metadata.gz: 17eecea46db52b5687577fed5ee1353429c88abdef6fd5d27e5ef461ee97387e08b785ca8ebeb5afd1538d89461df6206c4d8bebcdb29a9e519dc2190d41a562
7
+ data.tar.gz: 958feec11241c8440ef0f639420df3e3f4a55c2b098493efc93a1c6063a11cc0ffbe9621d19409d95b3cb062932a498bf67fb58014fbe78516fcf98c70b72d2b
@@ -14,17 +14,14 @@ pages:
14
14
 
15
15
  scripts:
16
16
  - script:
17
- version: 1.0
17
+ generate: scripts/bootstrap.min-v2.1.1.js
18
18
  bundle:
19
19
  - scripts/bootstrap.js
20
20
 
21
21
  stylesheets:
22
22
  - style:
23
- version: 1.0
23
+ generate: stylesheets/style-1.0.css
24
24
  bundle:
25
25
  - stylesheets/bootstrap.css
26
26
  - stylesheets/bootstrap-responsive.css
27
27
  - stylesheets/style.css
28
-
29
- #options:
30
- # build_dir: <%= ENV['TEMP'] %>\my-Scms-website
data/bin/scms CHANGED
@@ -57,13 +57,14 @@ optparse.parse!
57
57
  #Set globals
58
58
  $website = (options[:website].nil?) ? Dir.pwd : options[:website]
59
59
  $html = (ENV["SCMS_HTML_OUT"] or "false")
60
+ #puts "html mode: #{$html}"
60
61
  $stdout.sync = true
61
62
  root_folder = File.expand_path("../", File.dirname(__FILE__))
62
63
  Folders = {
63
64
  :root => root_folder,
64
65
  :website => File.join($website),
65
66
  :pub => (ENV["SCMS_PUBLISH_FOLDER"] or options[:pub]),
66
- :assets => (ENV["SCMS_STATICCMS_FOLDER"] or File.join(root_folder, "assets")),
67
+ :assets => File.join(root_folder, "assets"),
67
68
  :config => (ENV["SCMS_CONFIG_FOLDER"] or File.join($website))
68
69
  }
69
70
 
@@ -73,10 +74,7 @@ if options[:action] == "create"
73
74
  else
74
75
  puts "Making website: #{Folders[:website]}"
75
76
  FileUtils.mkdir_p Folders[:website]
76
- Dir.chdir(File.join(Folders[:assets], "blank-template")) do
77
- files = Dir.glob('*')
78
- FileUtils.cp_r files, Folders[:website]
79
- end
77
+ FileUtils.cp_r(Dir["#{File.join(Folders[:assets], "blank-template")}/*"], Folders[:website])
80
78
  end
81
79
  exit
82
80
  end
data/lib/scms.rb CHANGED
@@ -160,7 +160,7 @@ module Scms
160
160
  model = Hash.new
161
161
  model = { :page => page, :sitedir => $website, :resource => resource }
162
162
  if hasHandler == "yes"
163
- ScmsUtils.log("_Rendering with handler_")
163
+ ScmsUtils.log("Rendering with handler")
164
164
  viewSnippet = Handler.render(viewpath)
165
165
  else
166
166
  snnipetCode = File.read(viewpath)
@@ -241,14 +241,11 @@ module Scms
241
241
  else
242
242
  scriptversion = 1
243
243
  end
244
- scriptname = "#{name}-v#{scriptversion}.js"
245
- scriptsdir = File.join(@pub, "scripts")
246
-
247
- #puts scriptsdir
248
- FileUtils.mkdir_p(scriptsdir) unless File::directory?(scriptsdir)
249
- #Dir.mkdir_p(scriptsdir, 755 ) if !File::directory?(scriptsdir)
250
- out = File.join(scriptsdir, scriptname)
251
-
244
+ scriptname = File.join("scripts", "#{name}-v#{scriptversion}.js") #Legasy name filename from root and version
245
+ scriptname = File.join(option[1]["generate"]) if option[1]["generate"] != nil #just use the generate
246
+ scriptsdir = File.dirname(scriptname)
247
+ Dir.mkdir(scriptsdir, 755) unless File::directory?(scriptsdir)
248
+
252
249
  ScmsUtils.successLog("#{scriptname}")
253
250
  content = ""
254
251
 
@@ -265,9 +262,9 @@ module Scms
265
262
  end
266
263
  ScmsUtils.log("#{assetList}")
267
264
 
268
- scripts[name] = "scripts/#{scriptname}"
269
- File.open(out, 'w') {|f| f.write(content) }
270
- Scms.packr(out) unless /(-min)|(\.min)/.match(name)
265
+ scripts[name] = scriptname
266
+ File.open(scriptname, 'w') {|f| f.write(content) }
267
+ Scms.packr(scriptname) unless /(-min)|(\.min)/.match(scriptname)
271
268
  end
272
269
  end
273
270
  end
@@ -287,10 +284,10 @@ module Scms
287
284
  else
288
285
  stylesheetversion = 1
289
286
  end
290
- stylesheetname = "#{name}-v#{stylesheetversion}.css"
291
-
292
- Dir.mkdir(File.join(@pub, "stylesheets"), 755 ) if ! File::directory?(File.join(@pub, "stylesheets"))
293
- out = File.join(@pub, "stylesheets", stylesheetname)
287
+ stylesheetname = File.join("stylesheets", "#{name}-v#{stylesheetversion}.css") #Legasy name filename from root and version
288
+ stylesheetname = File.join(option[1]["generate"]) if option[1]["generate"] != nil #just use the generate
289
+ stylesheetdir = File.dirname(stylesheetname)
290
+ Dir.mkdir(stylesheetdir, 755) unless File::directory?(stylesheetdir)
294
291
 
295
292
  ScmsUtils.successLog("#{stylesheetname}")
296
293
  content = ""
@@ -308,8 +305,8 @@ module Scms
308
305
  end
309
306
  ScmsUtils.log( "#{assetList}" )
310
307
 
311
- stylesheets[name] = "stylesheets/#{stylesheetname}"
312
- File.open(out, 'w') {|f| f.write(content) }
308
+ stylesheets[name] = stylesheetname
309
+ File.open(stylesheetname, 'w') {|f| f.write(content) }
313
310
  end
314
311
  end
315
312
  end
@@ -380,7 +377,7 @@ module Scms
380
377
  end
381
378
 
382
379
  def Scms.sassall(crunchDir)
383
- ScmsUtils.log( "Minimising Sass Files (.scss)" )
380
+ ScmsUtils.log("Minimising Sass Files (.scss)")
384
381
  Dir.chdir(crunchDir) do
385
382
  Dir.glob("**/*.{scss}").each do |asset|
386
383
  Scms.sass(asset)
data/lib/scms/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module Scms
2
- VERSION = "1.9.0"
2
+ VERSION = "1.9.2"
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: 1.9.0
4
+ version: 1.9.2
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-07-08 00:00:00.000000000 Z
11
+ date: 2013-07-09 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: cprobert-s3sync