scms 2.1.7 → 2.1.8
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/bin/scms +25 -15
- data/bin/scms-server +10 -13
- data/lib/scms/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,15 +1,15 @@
|
|
1
1
|
---
|
2
2
|
!binary "U0hBMQ==":
|
3
3
|
metadata.gz: !binary |-
|
4
|
-
|
4
|
+
MGFkN2Y3YjM3MjE4OTBlYjFlZjJhMTJjMGFlYjAyZjI2N2JiMzRmZg==
|
5
5
|
data.tar.gz: !binary |-
|
6
|
-
|
6
|
+
NGVjMGQzOWQ0YzE3OGQwMzkxNmQ4ODQzMjcyOTI5OGU0MTE5MzczOQ==
|
7
7
|
SHA512:
|
8
8
|
metadata.gz: !binary |-
|
9
|
-
|
10
|
-
|
11
|
-
|
9
|
+
MGU5ZWQxNWY0MWNlMjE2YjJjZWJlNjY2Y2E0NmQ3NjJiNTRmNWNiY2FjYTI0
|
10
|
+
NGFmMjE0MWE2OTE1ODEwMTFlMjRkZTI4NmNiNWQ2MDFkMjFlMTZhYjVmZmMz
|
11
|
+
MzlhZjA2NDMxMGZiMTQ5MWU1MDU0ZmYxYmM4MWE5ZDU1MWM3NGQ=
|
12
12
|
data.tar.gz: !binary |-
|
13
|
-
|
14
|
-
|
15
|
-
|
13
|
+
NTFmNGIyODQ2NTI0YmQxNTEzNDA3NjMyN2RkN2E3Yzc3Mzk4NTZhMDMwYTQ2
|
14
|
+
MzI5MzE1ZDE3NDk3ZmVhMWY0YmNhYjVmZGM2ZGYyMDljODA5MDk2ZTAzYTdj
|
15
|
+
ODQ2NTFkMzU0ZjMwNTA3OTk1MjZmOGM3ZGJjYzNjNjg0NDYwOTM=
|
data/bin/scms
CHANGED
@@ -24,15 +24,15 @@ optparse = OptionParser.new do|opts|
|
|
24
24
|
opts.banner = "Usage: scms [options]"
|
25
25
|
|
26
26
|
# Define the options, and what they do
|
27
|
-
opts.on('-w', '--website WEBSITE', "Website directory (
|
27
|
+
opts.on('-w', '--website WEBSITE', "Website directory (defaults to ./)") do |w|
|
28
28
|
options[:website] = w
|
29
29
|
end
|
30
30
|
|
31
|
-
opts.on('-c', '--config CONFIGDIR', "Configeration directory if different from Website (
|
31
|
+
opts.on('-c', '--config CONFIGDIR', "Configeration directory if different from Website (defaults to ./)") do |c|
|
32
32
|
options[:configdir] = c
|
33
33
|
end
|
34
34
|
|
35
|
-
opts.on('-o', '--output BuildDIR', "Website build dir (
|
35
|
+
opts.on('-o', '--output BuildDIR', "Website build dir (defaults to ./)") do |o|
|
36
36
|
options[:pub] = o
|
37
37
|
end
|
38
38
|
|
@@ -47,7 +47,7 @@ optparse = OptionParser.new do|opts|
|
|
47
47
|
end
|
48
48
|
|
49
49
|
options[:mode] = "pub"
|
50
|
-
opts.on( '-m', '--mode MODE', 'CMS or Publish' ) do|m|
|
50
|
+
opts.on( '-m', '--mode MODE', 'CMS or Publish (for use with Air-Monkey: http://ipassexam.github.io/Air-Monkey/)' ) do|m|
|
51
51
|
options[:mode] = m
|
52
52
|
end
|
53
53
|
|
@@ -107,23 +107,33 @@ Scms.upgrade(Folders[:website])
|
|
107
107
|
Scms.build(Folders[:website], Folders[:config], options[:mode])
|
108
108
|
Scms.copywebsite(Folders[:website], Folders[:pub]) if Folders[:pub] != nil
|
109
109
|
|
110
|
+
threads = []
|
111
|
+
|
110
112
|
if options[:server]
|
111
|
-
|
112
|
-
|
113
|
-
|
114
|
-
|
115
|
-
|
113
|
+
threads << Thread.new {
|
114
|
+
if system('scms-server')
|
115
|
+
puts "Launched scms-server"
|
116
|
+
else
|
117
|
+
puts "Stop scms?"
|
118
|
+
abort
|
119
|
+
end
|
120
|
+
}
|
116
121
|
end
|
117
122
|
|
118
123
|
if options[:action] == "watch"
|
119
|
-
|
120
|
-
|
121
|
-
|
122
|
-
|
123
|
-
|
124
|
+
watcher = Thread.new {
|
125
|
+
require 'filewatcher'
|
126
|
+
FileWatcher.new(["_views", "_templates", "_source"], "Watching for changes in _views, _templates or _source").watch do |filename|
|
127
|
+
puts "Updated " + filename
|
128
|
+
Scms.build(Folders[:website], Folders[:config], options[:mode])
|
129
|
+
end
|
130
|
+
}
|
131
|
+
watcher.join
|
124
132
|
end
|
125
133
|
|
126
134
|
mimetypefile = File.join(Folders[:root], "assets", "mime.types")
|
127
135
|
S3Deploy.sync(Folders[:website], Folders[:config], mimetypefile) if options[:action] == "deploy"
|
128
136
|
|
129
|
-
|
137
|
+
threads.each { |t|
|
138
|
+
t.join
|
139
|
+
}
|
data/bin/scms-server
CHANGED
@@ -14,8 +14,6 @@ require "scms/version"
|
|
14
14
|
require 'webrick'
|
15
15
|
require 'launchy'
|
16
16
|
|
17
|
-
puts "Working dir: #{Dir::pwd}"
|
18
|
-
|
19
17
|
options = {}
|
20
18
|
optparse = OptionParser.new do|opts|
|
21
19
|
# Set a banner, displayed at the top of the help screen.
|
@@ -26,16 +24,16 @@ optparse = OptionParser.new do|opts|
|
|
26
24
|
options[:dir] = d
|
27
25
|
end
|
28
26
|
|
29
|
-
# options[:host] = "localhost"
|
30
|
-
# opts.on( '-h', '--host HOST', 'http host for http server [default = localhost]' ) do|h|
|
31
|
-
# options[:host] = h
|
32
|
-
# end
|
33
|
-
|
34
27
|
options[:port] = 8008
|
35
28
|
opts.on( '-p', '--port PORT', 'port for http server [default = 8008]' ) do|p|
|
36
29
|
options[:port] = p
|
37
30
|
end
|
38
31
|
|
32
|
+
# options[:host] = "localhost"
|
33
|
+
# opts.on( '-h', '--host HOST', 'http host for http server [default = localhost]' ) do|h|
|
34
|
+
# options[:host] = h
|
35
|
+
# end
|
36
|
+
|
39
37
|
options[:version] = false
|
40
38
|
opts.on( '-v', '--version', 'Output scms version' ) do
|
41
39
|
puts "Version: #{Scms::VERSION}"
|
@@ -48,7 +46,9 @@ optparse = OptionParser.new do|opts|
|
|
48
46
|
end
|
49
47
|
end
|
50
48
|
optparse.parse!
|
51
|
-
|
49
|
+
|
50
|
+
#puts "Working dir: #{Dir::pwd}"
|
51
|
+
#puts "Doc root: #{options[:dir]}"
|
52
52
|
|
53
53
|
include WEBrick
|
54
54
|
|
@@ -63,8 +63,5 @@ Launchy.open( uri ) do |exception|
|
|
63
63
|
puts "Attempted to open #{uri} and failed because #{exception}"
|
64
64
|
end
|
65
65
|
|
66
|
-
|
67
|
-
|
68
|
-
ensure
|
69
|
-
server.shutdown
|
70
|
-
end
|
66
|
+
server.start
|
67
|
+
exit
|
data/lib/scms/version.rb
CHANGED