scms 2.1.1 → 2.1.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/bin/scms +17 -4
- data/lib/scms.rb +5 -1
- data/lib/scms/version.rb +1 -1
- data/scms.gemspec +2 -0
- metadata +17 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 67aeb5520c7e409fe81f50e84e3c02bad04ff364
|
4
|
+
data.tar.gz: 4aa673d9e4eac14fa353de89c0d1738a89cf9d5f
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 7242e1999abbde3814f56370c65631ac4cfd362cb137aa59e20ba6841373be4362936a6c28e75c184a786d7ee57da0be618eb4c7444a1fa3d83707960f2a6874
|
7
|
+
data.tar.gz: c85a647d2ba582bb952392d56c77a466adb5ea626aaf8852347e23883daeb368b3d17cf295711f8f558281247cf67ed4cbf613a63748ab15dade88c082275534
|
data/bin/scms
CHANGED
@@ -10,6 +10,7 @@
|
|
10
10
|
require 'optparse'
|
11
11
|
require 'fileutils'
|
12
12
|
require 'Scms'
|
13
|
+
require "scms/version"
|
13
14
|
|
14
15
|
class String
|
15
16
|
def to_path(end_slash=false)
|
@@ -46,13 +47,15 @@ optparse = OptionParser.new do|opts|
|
|
46
47
|
options[:mode] = m
|
47
48
|
end
|
48
49
|
|
49
|
-
options[:
|
50
|
-
opts.on( '-v', '--
|
51
|
-
|
50
|
+
options[:version] = false
|
51
|
+
opts.on( '-v', '--version', 'Output scms version' ) do
|
52
|
+
puts "Version: #{Scms::VERSION}"
|
53
|
+
exit
|
52
54
|
end
|
53
55
|
# This displays the help screen, all programs are
|
54
56
|
# assumed to have this option.
|
55
57
|
opts.on( '-h', '--help', 'Display this help screen' ) do
|
58
|
+
puts "Default action = build; default website directory = current working directory"
|
56
59
|
puts opts
|
57
60
|
exit
|
58
61
|
end
|
@@ -88,7 +91,7 @@ monkeyhook = File.join(Folders[:website], "scripts", "air-monkey-hook.js")
|
|
88
91
|
if options[:mode] == "cms"
|
89
92
|
FileUtils.cp(File.join(Folders[:assets], "air-monkey-hook.js"), monkeyhook)
|
90
93
|
else
|
91
|
-
FileUtils.rm(monkeyhook) if File.exist?(monkeyhook)
|
94
|
+
FileUtils.rm(monkeyhook) if File.exist?(monkeyhook) && options[:action] == "deploy"
|
92
95
|
end
|
93
96
|
|
94
97
|
#ScmsUtils.log "System root folder = #{Folders[:root]}"
|
@@ -101,5 +104,15 @@ raise "No website in folder #{Folders[:website]}" if !File::directory?(Folders[:
|
|
101
104
|
Scms.upgrade(Folders[:website])
|
102
105
|
Scms.build(Folders[:website], Folders[:config], options[:mode])
|
103
106
|
Scms.copywebsite(Folders[:website], Folders[:pub]) if Folders[:pub] != nil
|
107
|
+
|
108
|
+
if options[:action] == "watch"
|
109
|
+
require 'filewatcher'
|
110
|
+
puts "Setting up watcher"
|
111
|
+
FileWatcher.new(["_views"],"Watching files:").watch do |filename|
|
112
|
+
puts "Updated " + filename
|
113
|
+
Scms.build(Folders[:website], Folders[:config], options[:mode])
|
114
|
+
end
|
115
|
+
end
|
116
|
+
|
104
117
|
mimetypefile = File.join(Folders[:root], "assets", "mime.types")
|
105
118
|
S3Deploy.sync(Folders[:website], Folders[:config], mimetypefile) if options[:action] == "deploy"
|
data/lib/scms.rb
CHANGED
@@ -197,6 +197,9 @@ module Scms
|
|
197
197
|
|
198
198
|
monkeyhook = "";
|
199
199
|
monkeyhook = "<script src='scripts/air-monkey-hook.js'></script>" if @mode == "cms"
|
200
|
+
|
201
|
+
livereload = ""
|
202
|
+
livereload = "<script>document.write('<script src=\"http://' + (location.host || 'localhost').split(':')[0] + ':35729/livereload.js?snipver=1\"></' + 'script>')</script>" if @mode != "deploy"
|
200
203
|
|
201
204
|
pagemodel = Hash.new
|
202
205
|
pagemodel = {
|
@@ -212,7 +215,8 @@ module Scms
|
|
212
215
|
:navigation => navigation,
|
213
216
|
:data => pagedata,
|
214
217
|
:rootdir => @website,
|
215
|
-
:monkeyhook => monkeyhook
|
218
|
+
:monkeyhook => monkeyhook,
|
219
|
+
:livereload => livereload
|
216
220
|
}
|
217
221
|
|
218
222
|
break if pageconfig["generate"] == nil
|
data/lib/scms/version.rb
CHANGED
data/scms.gemspec
CHANGED
@@ -24,6 +24,8 @@ Gem::Specification.new do |spec|
|
|
24
24
|
spec.add_dependency "maruku"
|
25
25
|
spec.add_dependency "sass"
|
26
26
|
spec.add_dependency "packr"
|
27
|
+
spec.add_dependency "filewatcher"
|
28
|
+
#spec.add_dependency "guard-livereload"
|
27
29
|
|
28
30
|
spec.add_development_dependency "bundler", "~> 1.3"
|
29
31
|
spec.add_development_dependency "rake"
|
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: 2.1.
|
4
|
+
version: 2.1.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-
|
11
|
+
date: 2013-10-06 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: cprobert-s3sync
|
@@ -66,6 +66,20 @@ dependencies:
|
|
66
66
|
- - ! '>='
|
67
67
|
- !ruby/object:Gem::Version
|
68
68
|
version: '0'
|
69
|
+
- !ruby/object:Gem::Dependency
|
70
|
+
name: filewatcher
|
71
|
+
requirement: !ruby/object:Gem::Requirement
|
72
|
+
requirements:
|
73
|
+
- - ! '>='
|
74
|
+
- !ruby/object:Gem::Version
|
75
|
+
version: '0'
|
76
|
+
type: :runtime
|
77
|
+
prerelease: false
|
78
|
+
version_requirements: !ruby/object:Gem::Requirement
|
79
|
+
requirements:
|
80
|
+
- - ! '>='
|
81
|
+
- !ruby/object:Gem::Version
|
82
|
+
version: '0'
|
69
83
|
- !ruby/object:Gem::Dependency
|
70
84
|
name: bundler
|
71
85
|
requirement: !ruby/object:Gem::Requirement
|
@@ -155,7 +169,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
155
169
|
version: '0'
|
156
170
|
requirements: []
|
157
171
|
rubyforge_project:
|
158
|
-
rubygems_version: 2.
|
172
|
+
rubygems_version: 2.1.3
|
159
173
|
signing_key:
|
160
174
|
specification_version: 4
|
161
175
|
summary: Create simple static websites, in a jiffy
|