scms 2.1.7 → 2.1.8

Sign up to get free protection for your applications and to get access to all the features.
Files changed (5) hide show
  1. checksums.yaml +8 -8
  2. data/bin/scms +25 -15
  3. data/bin/scms-server +10 -13
  4. data/lib/scms/version.rb +1 -1
  5. metadata +1 -1
checksums.yaml CHANGED
@@ -1,15 +1,15 @@
1
1
  ---
2
2
  !binary "U0hBMQ==":
3
3
  metadata.gz: !binary |-
4
- MzMwZjY1MzA5N2NhODYwMjIyY2MyZmYzNTE1NmFlZmUyMmE0YzI4MA==
4
+ MGFkN2Y3YjM3MjE4OTBlYjFlZjJhMTJjMGFlYjAyZjI2N2JiMzRmZg==
5
5
  data.tar.gz: !binary |-
6
- OTIyN2Q2MjI4ZjYzMTU1NDVmM2RkZjk0MDIyNzQ5MmQ0NTk1ZDgzNA==
6
+ NGVjMGQzOWQ0YzE3OGQwMzkxNmQ4ODQzMjcyOTI5OGU0MTE5MzczOQ==
7
7
  SHA512:
8
8
  metadata.gz: !binary |-
9
- NzRkNDZlOWUwNWY1MTBjOGViMzFmY2ZmNjZiOWIzZTM5NmI5Y2FjMWEyOWVi
10
- N2NjMjI4NDlmM2U1YmY3NjZjNTdkNTdmYTk4YTM5NTBiMDAyNzI4NDE4ODc3
11
- MTFiMzk0MTAxMjRhNWMzYjZjMDY3OWNjOGY1MGZkNjNlNDYzYWI=
9
+ MGU5ZWQxNWY0MWNlMjE2YjJjZWJlNjY2Y2E0NmQ3NjJiNTRmNWNiY2FjYTI0
10
+ NGFmMjE0MWE2OTE1ODEwMTFlMjRkZTI4NmNiNWQ2MDFkMjFlMTZhYjVmZmMz
11
+ MzlhZjA2NDMxMGZiMTQ5MWU1MDU0ZmYxYmM4MWE5ZDU1MWM3NGQ=
12
12
  data.tar.gz: !binary |-
13
- NWE5ODA5YWEzNzlkM2FkYmIxNGQzNzc1MWYyMmFmZDgxNzYwYjk0YjhhY2Q0
14
- ODlhZDg2MTM5ZGZlNTc5YmZhZWY2MjFkZDA5MzljZDQ1MzhhNWE2YjIxYWVh
15
- MmMwMmUyYTE4NDE2ODljZDg1ZjA1YTA4NGRiMjBhMjkxYmE3ZDg=
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 (full path)") do |w|
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 (full path)") do |c|
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 (full path)") do |o|
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
- if system('scms-server --dir "#{Folders[:website]}"')
112
- puts "Launched scms-server"
113
- else
114
- puts "Close scms-server?"
115
- end
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
- require 'filewatcher'
120
- FileWatcher.new(["_views", "_templates", "_source"], "Watching for changes in _views, _templates or _source").watch do |filename|
121
- puts "Updated " + filename
122
- Scms.build(Folders[:website], Folders[:config], options[:mode])
123
- end
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
- Process.exit!(true)
137
+ threads.each { |t|
138
+ t.join
139
+ }
@@ -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
- puts "Doc root: #{options[:dir]}"
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
- begin
67
- server.start
68
- ensure
69
- server.shutdown
70
- end
66
+ server.start
67
+ exit
@@ -1,3 +1,3 @@
1
1
  module Scms
2
- VERSION = "2.1.7"
2
+ VERSION = "2.1.8"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: scms
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.1.7
4
+ version: 2.1.8
5
5
  platform: ruby
6
6
  authors:
7
7
  - Courtenay Probert