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 +4 -4
- data/assets/blank-template/_config.yml +2 -5
- data/bin/scms +3 -5
- data/lib/scms.rb +16 -19
- data/lib/scms/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: ce31ecc9d9369edd7858fd14b68725d9a6b2199b
|
4
|
+
data.tar.gz: a776a26cbdb502cfb100e10332b967bd14d60103
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 17eecea46db52b5687577fed5ee1353429c88abdef6fd5d27e5ef461ee97387e08b785ca8ebeb5afd1538d89461df6206c4d8bebcdb29a9e519dc2190d41a562
|
7
|
+
data.tar.gz: 958feec11241c8440ef0f639420df3e3f4a55c2b098493efc93a1c6063a11cc0ffbe9621d19409d95b3cb062932a498bf67fb58014fbe78516fcf98c70b72d2b
|
@@ -14,17 +14,14 @@ pages:
|
|
14
14
|
|
15
15
|
scripts:
|
16
16
|
- script:
|
17
|
-
|
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
|
-
|
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 =>
|
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
|
-
|
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("
|
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
|
-
|
246
|
-
|
247
|
-
|
248
|
-
|
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] =
|
269
|
-
File.open(
|
270
|
-
Scms.packr(
|
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
|
-
|
293
|
-
|
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] =
|
312
|
-
File.open(
|
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(
|
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
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.
|
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-
|
11
|
+
date: 2013-07-09 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: cprobert-s3sync
|