scms 4.1.2 → 4.2.0
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/assets/blank-template/_config.yml +1 -37
- data/assets/blank-template/_layouts/home-layout.erb +85 -0
- data/assets/blank-template/_layouts/layout.erb +1 -0
- data/assets/blank-template/_pages/cleanurl/_config.yml +1 -0
- data/assets/blank-template/_pages/cleanurl/intro.md +1 -0
- data/assets/blank-template/_pages/cleanurl/leadin.md +1 -0
- data/assets/blank-template/_pages/cleanurl/main.erb +69 -0
- data/assets/blank-template/_pages/cleanurl/sidenav.erb +5 -0
- data/assets/blank-template/_pages/getting-started/intro.md +1 -0
- data/assets/blank-template/_pages/getting-started/leadin.md +1 -0
- data/assets/blank-template/_pages/getting-started/main.erb +67 -0
- data/assets/blank-template/_pages/getting-started/sidenav.erb +5 -0
- data/assets/blank-template/_pages/index/_config.yml +1 -0
- data/assets/blank-template/_pages/index/carousel.erb +1 -0
- data/assets/blank-template/_pages/index/main.erb +1 -0
- data/assets/blank-template/css/bootstrap-theme.css +459 -0
- data/assets/blank-template/css/bootstrap-theme.min.css +9 -0
- data/assets/blank-template/css/bootstrap.css +7059 -0
- data/assets/blank-template/css/bootstrap.min.css +9 -0
- data/assets/blank-template/css/carousel.css +1 -0
- data/assets/blank-template/css/carousel.scss +151 -0
- data/assets/blank-template/css/layout.css +6 -0
- data/assets/blank-template/css/layout.scss +459 -0
- data/assets/blank-template/fonts/glyphicons-halflings-regular.eot +0 -0
- data/assets/blank-template/fonts/glyphicons-halflings-regular.svg +229 -0
- data/assets/blank-template/fonts/glyphicons-halflings-regular.ttf +0 -0
- data/assets/blank-template/fonts/glyphicons-halflings-regular.woff +0 -0
- data/assets/blank-template/js/application.js +61 -0
- data/assets/blank-template/js/bootstrap.js +2002 -0
- data/assets/blank-template/js/bootstrap.min.js +9 -0
- data/assets/blank-template/js/jquery-1.10.2.min.js +6 -0
- data/assets/blank-template/js/shims/holder.js +404 -0
- data/assets/blank-template/js/shims/html5shiv.js +8 -0
- data/assets/blank-template/js/shims/respond.min.js +6 -0
- data/assets/blank-template-v1/_config.yml +37 -0
- data/assets/{blank-template → blank-template-v1}/_layouts/skin.erb.html +0 -0
- data/assets/{blank-template → blank-template-v1}/_s3config.template.yml +0 -0
- data/assets/{blank-template → blank-template-v1}/_source/scripts/bootstrap.js +0 -0
- data/assets/{blank-template → blank-template-v1}/_source/scripts/script.js +0 -0
- data/assets/{blank-template → blank-template-v1}/_source/stylesheets/bootstrap-responsive.css +0 -0
- data/assets/{blank-template → blank-template-v1}/_source/stylesheets/bootstrap.css +0 -0
- data/assets/{blank-template → blank-template-v1}/_source/stylesheets/style.css +0 -0
- data/assets/{blank-template → blank-template-v1}/_views/about/intro.html +0 -0
- data/assets/{blank-template → blank-template-v1}/_views/about/main.html +0 -0
- data/assets/{blank-template → blank-template-v1}/_views/home/intro.md +0 -0
- data/assets/{blank-template → blank-template-v1}/_views/reuse.erb +0 -0
- data/assets/{blank-template → blank-template-v1}/images/glyphicons-halflings-white.png +0 -0
- data/assets/{blank-template → blank-template-v1}/images/glyphicons-halflings.png +0 -0
- data/assets/{blank-template → blank-template-v1}/js/jquery-1.8.2.min.js +0 -0
- data/assets/{blank-template → blank-template-v1}/robots.txt +0 -0
- data/lib/scms/scms-bundler.rb +108 -0
- data/lib/scms/scms-watcher.rb +52 -30
- data/lib/scms/version.rb +1 -1
- data/lib/scms.rb +24 -8
- metadata +52 -17
data/lib/scms/scms-watcher.rb
CHANGED
@@ -4,20 +4,50 @@ module ScmsWatcher
|
|
4
4
|
require 'pathname'
|
5
5
|
require 'listen'
|
6
6
|
|
7
|
-
def ScmsWatcher.watch(settings, options, configdir)
|
7
|
+
def ScmsWatcher.watch(settings, options, configdir)
|
8
|
+
|
9
|
+
# Listen to sass, bundle and _config.yml file changes
|
8
10
|
watcher = Thread.new {
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
11
|
+
files = []
|
12
|
+
Dir.glob('**/*.scss').each do|f|
|
13
|
+
files << f
|
14
|
+
end
|
15
|
+
Dir.glob('**/*.bundle').each do|f|
|
16
|
+
files << f
|
17
|
+
end
|
18
|
+
configfile = File.join(configdir, "_config.yml")
|
19
|
+
files << configfile if File::exists?(configfile)
|
20
|
+
|
21
|
+
FileWatcher.new(files).watch do |filename|
|
22
|
+
ext = File.extname(filename)
|
16
23
|
|
17
24
|
begin
|
18
|
-
|
19
|
-
|
20
|
-
|
25
|
+
case ext
|
26
|
+
when ".scss"
|
27
|
+
puts ""
|
28
|
+
puts "***********************************"
|
29
|
+
puts " Sass file changed: #{filename}"
|
30
|
+
puts "***********************************"
|
31
|
+
puts ""
|
32
|
+
Scms.sass(filename)
|
33
|
+
#Scms.sassall(Folders[:website])
|
34
|
+
when ".yml"
|
35
|
+
puts ""
|
36
|
+
puts "******************************************************"
|
37
|
+
puts " Config Modification #{filename} "
|
38
|
+
puts "******************************************************"
|
39
|
+
puts ""
|
40
|
+
settings = Scms.getSettings(configdir)
|
41
|
+
Scms.bundle(settings, Folders[:website])
|
42
|
+
Scms.build(Folders[:website], settings, options)
|
43
|
+
when ".bundle"
|
44
|
+
puts ""
|
45
|
+
puts "******************************************************"
|
46
|
+
puts " Bundle Modified: #{filename} "
|
47
|
+
puts "******************************************************"
|
48
|
+
puts ""
|
49
|
+
Scms.bundler(filename)
|
50
|
+
end
|
21
51
|
rescue Exception=>e
|
22
52
|
ScmsUtils.errLog(e.message)
|
23
53
|
ScmsUtils.log(e.backtrace.inspect)
|
@@ -25,17 +55,16 @@ module ScmsWatcher
|
|
25
55
|
end
|
26
56
|
}
|
27
57
|
|
28
|
-
#
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
listener = Listen.to(psst, force_polling: true) do |modified, added, removed|
|
58
|
+
# Listen to changes to files withing a bundle
|
59
|
+
ScmsBundler.watch()
|
60
|
+
|
61
|
+
# Listen to changed to folders that start with an underscore (_)
|
62
|
+
folders = []
|
63
|
+
Dir.glob('*').select { |fn| File.directory?(fn) and (fn.match(/^_/) ) }.each do|f|
|
64
|
+
folders.push(f)
|
65
|
+
end
|
66
|
+
puts "Listening to #{folders}"
|
67
|
+
listener = Listen.to(folders, force_polling: true) do |modified, added, removed|
|
39
68
|
|
40
69
|
sassfile = false
|
41
70
|
bundlefile = false
|
@@ -78,7 +107,7 @@ module ScmsWatcher
|
|
78
107
|
if modified.length > 0
|
79
108
|
modified.each{|filename|
|
80
109
|
modifiedfile = Pathname.new(filename).relative_path_from(Pathname.new(Folders[:website])).to_s
|
81
|
-
ext = File.extname(modifiedfile)
|
110
|
+
#ext = File.extname(modifiedfile)
|
82
111
|
|
83
112
|
puts ""
|
84
113
|
puts "***********************************************"
|
@@ -92,13 +121,6 @@ module ScmsWatcher
|
|
92
121
|
bundlefile = true
|
93
122
|
buildfile = false
|
94
123
|
end
|
95
|
-
|
96
|
-
if ext == ".scss"
|
97
|
-
sassfile = true
|
98
|
-
bundlefile = false
|
99
|
-
buildfile = false
|
100
|
-
break
|
101
|
-
end
|
102
124
|
}
|
103
125
|
end
|
104
126
|
|
data/lib/scms/version.rb
CHANGED
data/lib/scms.rb
CHANGED
@@ -3,6 +3,7 @@ module Scms
|
|
3
3
|
require 'scms/scms-utils.rb'
|
4
4
|
require 'scms/scms-helpers.rb'
|
5
5
|
require 'scms/scms-pageoptions.rb'
|
6
|
+
require 'scms/scms-bundler.rb'
|
6
7
|
require 'scms/scms-parser.rb'
|
7
8
|
require 'scms/scms-xmlhandler.rb'
|
8
9
|
require 'scms/s3deploy.rb'
|
@@ -305,15 +306,19 @@ module Scms
|
|
305
306
|
|
306
307
|
def Scms.getBundleModel(website, settings, options)
|
307
308
|
bundleModel = Hash.new {}
|
309
|
+
websiteroot = '/'
|
310
|
+
websiteroot = settings["rooturl"] unless settings["rooturl"] == nil
|
311
|
+
websiteroot = ScmsUtils.uriEncode("file:///#{website}/") if options[:mode] == "cms"
|
312
|
+
|
313
|
+
Dir.glob('**/*.bundle').each do|bundle|
|
314
|
+
bundleModel[bundle] = ScmsBundler.getGeneratedBundleName(bundle)
|
315
|
+
end
|
316
|
+
|
308
317
|
bundleConfig = settings["bundles"]
|
309
318
|
if bundleConfig != nil
|
310
319
|
bundleConfig.each do |bundle|
|
311
320
|
#ScmsUtils.log( "bundle (#{bundle.class}) = #{bundle}" )
|
312
321
|
|
313
|
-
websiteroot = '/'
|
314
|
-
websiteroot = settings["rooturl"] unless settings["rooturl"] == nil
|
315
|
-
websiteroot = ScmsUtils.uriEncode("file:///#{website}/") if options[:mode] == "cms"
|
316
|
-
|
317
322
|
bundle.each do |option|
|
318
323
|
name = option[0]
|
319
324
|
config = option[1]
|
@@ -323,10 +328,23 @@ module Scms
|
|
323
328
|
end
|
324
329
|
end
|
325
330
|
end
|
331
|
+
# puts "Bundle model:"
|
332
|
+
# puts bundleModel
|
333
|
+
# puts "----------------------------"
|
326
334
|
return bundleModel
|
327
335
|
end
|
328
336
|
|
337
|
+
def Scms.bundler(bundle = nil)
|
338
|
+
if bundle == nil
|
339
|
+
ScmsBundler.run()
|
340
|
+
else
|
341
|
+
ScmsBundler.bundle(bundle)
|
342
|
+
end
|
343
|
+
end
|
344
|
+
|
329
345
|
def Scms.bundle(settings, website)
|
346
|
+
Scms.bundler()
|
347
|
+
|
330
348
|
bundleConfig = settings["bundles"]
|
331
349
|
if bundleConfig != nil
|
332
350
|
ScmsUtils.boldlog("Bundeling:")
|
@@ -392,12 +410,12 @@ module Scms
|
|
392
410
|
ScmsUtils.log("Minimising Sass Files (.scss)")
|
393
411
|
Dir.chdir(website) do
|
394
412
|
Dir.glob("**/*.{scss}").each do |asset|
|
395
|
-
Scms.sass(asset
|
413
|
+
Scms.sass(asset)
|
396
414
|
end
|
397
415
|
end
|
398
416
|
end
|
399
417
|
|
400
|
-
def Scms.sass(asset
|
418
|
+
def Scms.sass(asset)
|
401
419
|
if File.exists?(asset)
|
402
420
|
begin
|
403
421
|
template = File.read(asset)
|
@@ -416,8 +434,6 @@ module Scms
|
|
416
434
|
end
|
417
435
|
else
|
418
436
|
ScmsUtils.errLog("Sass file doesn't exists: #{asset}")
|
419
|
-
ScmsUtils.writelog("::Sass file doesn't exist #{asset}", website)
|
420
|
-
ScmsUtils.writelog("type NUL > #{asset}", website)
|
421
437
|
end
|
422
438
|
end
|
423
439
|
|
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.
|
4
|
+
version: 4.2.0
|
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
|
+
date: 2013-11-01 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: cprobert-s3sync
|
@@ -166,22 +166,56 @@ files:
|
|
166
166
|
- README.md
|
167
167
|
- Rakefile
|
168
168
|
- assets/air-monkey-hook.js
|
169
|
+
- assets/blank-template-v1/_config.yml
|
170
|
+
- assets/blank-template-v1/_layouts/skin.erb.html
|
171
|
+
- assets/blank-template-v1/_s3config.template.yml
|
172
|
+
- assets/blank-template-v1/_source/scripts/bootstrap.js
|
173
|
+
- assets/blank-template-v1/_source/scripts/script.js
|
174
|
+
- assets/blank-template-v1/_source/stylesheets/bootstrap-responsive.css
|
175
|
+
- assets/blank-template-v1/_source/stylesheets/bootstrap.css
|
176
|
+
- assets/blank-template-v1/_source/stylesheets/style.css
|
177
|
+
- assets/blank-template-v1/_views/about/intro.html
|
178
|
+
- assets/blank-template-v1/_views/about/main.html
|
179
|
+
- assets/blank-template-v1/_views/home/intro.md
|
180
|
+
- assets/blank-template-v1/_views/reuse.erb
|
181
|
+
- assets/blank-template-v1/images/glyphicons-halflings-white.png
|
182
|
+
- assets/blank-template-v1/images/glyphicons-halflings.png
|
183
|
+
- assets/blank-template-v1/js/jquery-1.8.2.min.js
|
184
|
+
- assets/blank-template-v1/robots.txt
|
169
185
|
- assets/blank-template/_config.yml
|
170
|
-
- assets/blank-template/_layouts/
|
171
|
-
- assets/blank-template/
|
172
|
-
- assets/blank-template/
|
173
|
-
- assets/blank-template/
|
174
|
-
- assets/blank-template/
|
175
|
-
- assets/blank-template/
|
176
|
-
- assets/blank-template/
|
177
|
-
- assets/blank-template/
|
178
|
-
- assets/blank-template/
|
179
|
-
- assets/blank-template/
|
180
|
-
- assets/blank-template/
|
181
|
-
- assets/blank-template/
|
182
|
-
- assets/blank-template/
|
183
|
-
- assets/blank-template/
|
184
|
-
- assets/blank-template/
|
186
|
+
- assets/blank-template/_layouts/home-layout.erb
|
187
|
+
- assets/blank-template/_layouts/layout.erb
|
188
|
+
- assets/blank-template/_pages/cleanurl/_config.yml
|
189
|
+
- assets/blank-template/_pages/cleanurl/intro.md
|
190
|
+
- assets/blank-template/_pages/cleanurl/leadin.md
|
191
|
+
- assets/blank-template/_pages/cleanurl/main.erb
|
192
|
+
- assets/blank-template/_pages/cleanurl/sidenav.erb
|
193
|
+
- assets/blank-template/_pages/getting-started/intro.md
|
194
|
+
- assets/blank-template/_pages/getting-started/leadin.md
|
195
|
+
- assets/blank-template/_pages/getting-started/main.erb
|
196
|
+
- assets/blank-template/_pages/getting-started/sidenav.erb
|
197
|
+
- assets/blank-template/_pages/index/_config.yml
|
198
|
+
- assets/blank-template/_pages/index/carousel.erb
|
199
|
+
- assets/blank-template/_pages/index/main.erb
|
200
|
+
- assets/blank-template/css/bootstrap-theme.css
|
201
|
+
- assets/blank-template/css/bootstrap-theme.min.css
|
202
|
+
- assets/blank-template/css/bootstrap.css
|
203
|
+
- assets/blank-template/css/bootstrap.min.css
|
204
|
+
- assets/blank-template/css/carousel.css
|
205
|
+
- assets/blank-template/css/carousel.scss
|
206
|
+
- assets/blank-template/css/layout.css
|
207
|
+
- assets/blank-template/css/layout.scss
|
208
|
+
- assets/blank-template/fonts/glyphicons-halflings-regular.eot
|
209
|
+
- assets/blank-template/fonts/glyphicons-halflings-regular.svg
|
210
|
+
- assets/blank-template/fonts/glyphicons-halflings-regular.ttf
|
211
|
+
- assets/blank-template/fonts/glyphicons-halflings-regular.woff
|
212
|
+
- assets/blank-template/js/application.js
|
213
|
+
- assets/blank-template/js/bootstrap.js
|
214
|
+
- assets/blank-template/js/bootstrap.min.js
|
215
|
+
- assets/blank-template/js/jquery-1.10.2.min.js
|
216
|
+
- assets/blank-template/js/shims/holder.js
|
217
|
+
- assets/blank-template/js/shims/html5shiv.js
|
218
|
+
- assets/blank-template/js/shims/respond.min.js
|
185
219
|
- assets/mime.types
|
186
220
|
- assets/scms help.txt
|
187
221
|
- assets/yuicompressor/readme
|
@@ -190,6 +224,7 @@ files:
|
|
190
224
|
- build commands.txt
|
191
225
|
- lib/scms.rb
|
192
226
|
- lib/scms/s3deploy.rb
|
227
|
+
- lib/scms/scms-bundler.rb
|
193
228
|
- lib/scms/scms-customHandler.rb
|
194
229
|
- lib/scms/scms-helpers.rb
|
195
230
|
- lib/scms/scms-httpserver.rb
|