scms 3.0.0 → 3.0.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +8 -8
- data/README.md +7 -22
- data/bin/scms +38 -25
- data/lib/scms/scms-httpserver.rb +1 -1
- data/lib/scms/version.rb +1 -1
- data/scms.gemspec +1 -1
- metadata +4 -4
checksums.yaml
CHANGED
@@ -1,15 +1,15 @@
|
|
1
1
|
---
|
2
2
|
!binary "U0hBMQ==":
|
3
3
|
metadata.gz: !binary |-
|
4
|
-
|
4
|
+
MzkwY2RiZDFhZmJiNzA3NjFmYzI0MWFhMTFlMGVkMDk2NDMwNGU5ZA==
|
5
5
|
data.tar.gz: !binary |-
|
6
|
-
|
6
|
+
NDk2YjU2ZDRhYTA5NTdkMTYzYjY3NTBmMzRiOGEyODI3N2E1N2EzZA==
|
7
7
|
SHA512:
|
8
8
|
metadata.gz: !binary |-
|
9
|
-
|
10
|
-
|
11
|
-
|
9
|
+
NjRhYTU4MmEzZjFkN2ZmZGIzNTdmMDhiOTFlMDI3NTEwMjNiYTMzZjRkOWQ0
|
10
|
+
YjA0Y2UwZTIwYWQ1NTk2ZjNjN2JhOTViYTJhNjZlZjBkMjViOWVkNmRhMjM0
|
11
|
+
YzJiZDFhMTY2MjQ1MzI2OWRkOGRkYmZmYjk2NTY5NmY0YTJmNTk=
|
12
12
|
data.tar.gz: !binary |-
|
13
|
-
|
14
|
-
|
15
|
-
|
13
|
+
ZTg2MjViMGUwMzQ5NDVlMzlkZTYxNzJlZjAyMjQ2ZDliNzAyNTM3YmVkZDkw
|
14
|
+
ZjI2MGNkMTdmYTQyZWFhODZiYTk2ZDBmYWJiY2RkNzgyN2Q2YzczNTY3ZTUz
|
15
|
+
ZjI0ZTAyZDViOTFjYTAzNjg2NTJiMmIwMTEzZTUzN2Y2NjkzYmE=
|
data/README.md
CHANGED
@@ -2,35 +2,20 @@ A static website CMS
|
|
2
2
|
====================
|
3
3
|
|
4
4
|
If you need to build a quick html website but don't want to maintain each page independantly Static-CMS could be for you.
|
5
|
-
StaticCMS is a static website builder that creates html files from an eruby template. This facilitates the management of the skin/theme from a single file.
|
5
|
+
StaticCMS is a static website builder that creates html files from an eruby template. This facilitates the management of the layout/skin/theme from a single file.
|
6
6
|
It also has a few nifty features such as JavaScript and CSS bundeling and minimisation
|
7
7
|
When your happy with your website StaticCMS will also deploy to AmazonS3 setting approperate caching settings.
|
8
8
|
|
9
9
|
Find it useful? Then let me know: https://twitter.com/c_probert
|
10
10
|
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
### Creating a website
|
16
|
-
|
17
|
-
scms -a create -w /path/to/folder
|
18
|
-
|
19
|
-
_(if the -w flag is excluded it assumes current directory)_
|
20
|
-
|
21
|
-
### Building your website
|
22
|
-
|
23
|
-
scms -a build -w /path/to/folder
|
24
|
-
|
25
|
-
_(if the -a flag is excluded defult action is 'build')_
|
26
|
-
|
27
|
-
### Publishing your website
|
28
|
-
|
29
|
-
scms -a deploy -w /path/to/folder
|
30
|
-
|
11
|
+
gem install scms
|
12
|
+
scms --create mynewsite
|
13
|
+
cd mynewsite
|
14
|
+
scms --serve
|
31
15
|
|
32
16
|
Further Reading
|
33
17
|
---------------
|
34
18
|
|
35
|
-
* Homepage: http://cprobert.github.io/Static-CMS
|
19
|
+
* Homepage: http://cprobert.github.io/Static-CMS
|
20
|
+
* WYSIWYG editor: http://ipassexam.github.io/Air-Monkey/
|
36
21
|
* ERB template language: http://www.stuartellis.eu/articles/erb/
|
data/bin/scms
CHANGED
@@ -90,13 +90,18 @@ Folders = {
|
|
90
90
|
:config => (options[:configdir] or ENV["SCMS_CONFIG_FOLDER"] or options[:website]),
|
91
91
|
:assets => File.join(root_folder, "assets")
|
92
92
|
}
|
93
|
+
# These can be used in the bootstrap.rb
|
93
94
|
$website = Folders[:website]
|
95
|
+
$watch = options[:watch]
|
96
|
+
$cmsmode = options[:mode] == "cms"
|
94
97
|
|
95
|
-
|
96
|
-
|
97
|
-
ScmsUtils.log "
|
98
|
-
ScmsUtils.log "
|
99
|
-
ScmsUtils.log "
|
98
|
+
configfile = File.join(Folders[:website], "_config.yml")
|
99
|
+
|
100
|
+
# ScmsUtils.log "System root folder = #{Folders[:root]}"
|
101
|
+
# ScmsUtils.log "Website folder = #{Folders[:website]}"
|
102
|
+
# ScmsUtils.log "Destination dir = #{Folders[:destination]}"
|
103
|
+
# ScmsUtils.log "Config dir = #{Folders[:config]}"
|
104
|
+
# ScmsUtils.log "Mode = #{options[:mode]}"
|
100
105
|
|
101
106
|
raise "Invalid working directory! #{Folders[:website]}" if !File::directory?(Folders[:website])
|
102
107
|
|
@@ -124,22 +129,35 @@ end
|
|
124
129
|
Scms.build(Folders[:website], Folders[:config], options[:mode])
|
125
130
|
Scms.copywebsite(Folders[:website], Folders[:destination]) if Folders[:destination] != ''
|
126
131
|
|
127
|
-
threads = []
|
128
|
-
if options[:server]
|
129
|
-
threads << Thread.new {
|
130
|
-
ScmsServer.start(Folders[:website], options[:port])
|
131
|
-
}
|
132
|
-
end
|
133
|
-
|
134
132
|
if options[:watch]
|
135
|
-
|
136
|
-
|
137
|
-
|
138
|
-
|
139
|
-
|
133
|
+
require "Listen"
|
134
|
+
|
135
|
+
psst = []
|
136
|
+
#psst.push("_config.yml")# if File.exists?(configfile)
|
137
|
+
psst.push("_views") if File.directory? "_views"
|
138
|
+
psst.push("_layouts") if File.directory? "_layouts"
|
139
|
+
psst.push("_templates") if File.directory? "_templates"
|
140
|
+
psst.push("_source") if File.directory? "_source"
|
141
|
+
psst.push("_resources") if File.directory? "_resources"
|
142
|
+
|
143
|
+
puts "Setting up listen"
|
144
|
+
listener = Listen.to(psst, force_polling: true ) do |modified, added, removed|
|
145
|
+
puts "modified: #{modified}" if modified.length > 0
|
146
|
+
puts "added: #{added}" if added.length > 0
|
147
|
+
puts "removed: #{removed}" if removed.length > 0
|
148
|
+
|
149
|
+
Scms.build(Folders[:website], Folders[:config], options[:mode]) if modified.length > 0
|
140
150
|
end
|
141
|
-
|
142
|
-
|
151
|
+
trap("INT"){
|
152
|
+
puts "Closing file watcher"
|
153
|
+
listener.stop
|
154
|
+
}
|
155
|
+
listener.start # not blocking
|
156
|
+
sleep unless options[:server]
|
157
|
+
end
|
158
|
+
|
159
|
+
if options[:server]
|
160
|
+
ScmsServer.start(Folders[:website], options[:port])
|
143
161
|
end
|
144
162
|
|
145
163
|
if options[:publish]
|
@@ -148,9 +166,4 @@ if options[:publish]
|
|
148
166
|
mimetypefile = File.join(Folders[:assets], "mime.types")
|
149
167
|
S3Deploy.sync(Folders[:website], Folders[:config], mimetypefile)
|
150
168
|
end
|
151
|
-
end
|
152
|
-
|
153
|
-
# join web server thread if it hasn't been used with watch action
|
154
|
-
threads.each { |t|
|
155
|
-
t.join
|
156
|
-
}
|
169
|
+
end
|
data/lib/scms/scms-httpserver.rb
CHANGED
data/lib/scms/version.rb
CHANGED
data/scms.gemspec
CHANGED
@@ -31,7 +31,7 @@ Gem::Specification.new do |spec|
|
|
31
31
|
spec.add_dependency "maruku"
|
32
32
|
spec.add_dependency "sass"
|
33
33
|
spec.add_dependency "packr"
|
34
|
-
spec.add_dependency "
|
34
|
+
spec.add_dependency "listen"
|
35
35
|
spec.add_dependency "webrick"
|
36
36
|
spec.add_dependency "launchy"
|
37
37
|
|
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: 3.0.
|
4
|
+
version: 3.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-
|
11
|
+
date: 2013-10-12 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: cprobert-s3sync
|
@@ -67,7 +67,7 @@ dependencies:
|
|
67
67
|
- !ruby/object:Gem::Version
|
68
68
|
version: '0'
|
69
69
|
- !ruby/object:Gem::Dependency
|
70
|
-
name:
|
70
|
+
name: listen
|
71
71
|
requirement: !ruby/object:Gem::Requirement
|
72
72
|
requirements:
|
73
73
|
- - ! '>='
|
@@ -186,7 +186,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
186
186
|
version: '0'
|
187
187
|
requirements: []
|
188
188
|
rubyforge_project:
|
189
|
-
rubygems_version: 2.1.
|
189
|
+
rubygems_version: 2.1.8
|
190
190
|
signing_key:
|
191
191
|
specification_version: 4
|
192
192
|
summary: Create simple static websites, in a jiffy
|