runeblog 0.0.24 → 0.0.25
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/bin/blog +5 -1
- data/data/VERSION +1 -1
- data/lib/runeblog.rb +10 -6
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 22679e625f2e7bb946b2273035b9182af7f841a5
|
4
|
+
data.tar.gz: 2e7e1e6b1a63f203c9b3de30d0af40edca006965
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 3fa980976eed26d749f46d1867baaf6a63c652aa2c6093068a641f86ce8cc1c2d3776162b075cc522a51808a3313ee90bc2d1ef16f468fca9af2104decdcb2ec
|
7
|
+
data.tar.gz: ed84775eae7a494e8a14afc3ad72719bacc854c6a70f0e18f60e143e0fec9aa79be7f2a858917a17df6f3c3f6699df5bf0329221fa697ec95f298759bf004d50
|
data/bin/blog
CHANGED
@@ -9,7 +9,7 @@ trap("INT") { }
|
|
9
9
|
def execute_command
|
10
10
|
case @meth
|
11
11
|
when :help, :quit, :new_post, :list_views, :relink, :rebuild, :version,
|
12
|
-
:list_posts, :list_drafts, :do_nothing
|
12
|
+
:list_posts, :list_drafts, :do_nothing, :deploy
|
13
13
|
self.send(@meth)
|
14
14
|
when Object
|
15
15
|
self.send(@meth, @arg)
|
@@ -69,6 +69,9 @@ def parse_cmd
|
|
69
69
|
when "rebuild"
|
70
70
|
@meth = :rebuild
|
71
71
|
expected(1)
|
72
|
+
when "deploy"
|
73
|
+
@meth = :deploy
|
74
|
+
expected(1)
|
72
75
|
when "version"
|
73
76
|
@meth = :version
|
74
77
|
expected(1)
|
@@ -152,6 +155,7 @@ def help
|
|
152
155
|
|
153
156
|
relink Regenerate index for all views
|
154
157
|
rebuild Regenerate all posts and relink
|
158
|
+
deploy Deploy (current view)
|
155
159
|
EOS
|
156
160
|
end
|
157
161
|
|
data/data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
RuneBlog v 0.0.
|
1
|
+
RuneBlog v 0.0.25 2017-05-09
|
data/lib/runeblog.rb
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
|
2
2
|
class RuneBlog
|
3
|
-
VERSION = "0.0.
|
3
|
+
VERSION = "0.0.25"
|
4
4
|
|
5
5
|
Path = File.expand_path(File.join(File.dirname(__FILE__)))
|
6
6
|
DefaultData = Path + "/../data"
|
@@ -161,13 +161,17 @@ def edit_post(file)
|
|
161
161
|
system("vi #@root/src/#{file} +8 ")
|
162
162
|
end
|
163
163
|
|
164
|
-
def deploy
|
164
|
+
def deploy
|
165
165
|
# TBD clunky FIXME
|
166
|
-
deployment = @config.viewdir(view) + "deploy"
|
167
|
-
lines = File.readlines(deployment)
|
166
|
+
deployment = @config.viewdir(@view) + "deploy"
|
167
|
+
lines = File.readlines(deployment).map {|x| x.chomp }
|
168
168
|
user, server, dir = *lines
|
169
|
-
|
170
|
-
|
169
|
+
vdir = @config.viewdir(@view)
|
170
|
+
files = ["#{vdir}/index.html"]
|
171
|
+
files += Dir.entries(vdir).grep(/^\d\d\d\d/).map {|x| "#{vdir}/#{x}" }
|
172
|
+
cmd = "scp -r #{files.join(' ')} root@#{server}:#{dir}"
|
173
|
+
puts cmd
|
174
|
+
system(cmd)
|
171
175
|
end
|
172
176
|
|
173
177
|
### process_post
|