runeblog 0.1.26 → 0.1.27
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/publish.rb +15 -9
- data/lib/repl.rb +2 -2
- data/lib/runeblog_version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 8a62d185febf4123fc8d4ed23590b5de3b55ca151f014839d2d843fe2c29c5e6
|
4
|
+
data.tar.gz: ca9dffc3767d974cccb94af5a9dfa5fc29de7b59acec33dbcac081129440b872
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 65f13f6fc0c058c4cd9d4344fa8fc2f91b3856a11795c7b3a67f1d47f449fa7bb9e672826005d8c2d3aa999cdc2aa79eb3e64281fe79f5597e2cf6c760b6d1d2
|
7
|
+
data.tar.gz: f4c00317f30a3fc619d7d39d4a198a39ae0175f30a3ac0d04c8b55a87f5f6c0df6679ac9d4a1745b9344bda89d8d0df38972a7c2feee38016430ec2d26869b0b
|
data/lib/publish.rb
CHANGED
@@ -31,8 +31,8 @@ class RuneBlog::Publishing
|
|
31
31
|
|
32
32
|
def system!(str)
|
33
33
|
rc = system(str)
|
34
|
-
|
35
|
-
|
34
|
+
debug "Running: #{str}"
|
35
|
+
debug "Failed!\n " if ! rc
|
36
36
|
rc
|
37
37
|
end
|
38
38
|
|
@@ -40,13 +40,19 @@ class RuneBlog::Publishing
|
|
40
40
|
dir = "#@docroot/#@path"
|
41
41
|
result = system!("ssh #@user@#@server -x mkdir -p #{dir}")
|
42
42
|
result = system!("ssh #@user@#@server -x mkdir -p #{dir}/../assets")
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
|
43
|
+
files.each do |file|
|
44
|
+
dest = "#@user@#@server:#{dir}"
|
45
|
+
file.gsub!(/\/\//, "/") # weird... :-/
|
46
|
+
dest.gsub!(/\/\//, "/") # weird... :-/
|
47
|
+
cmd = "scp -r #{file} #{dest} >/dev/null 2>/tmp/wtf"
|
48
|
+
debug "cmd = #{cmd.inspect} - see /tmp/wtf"
|
49
|
+
result = system!(cmd) || puts("\n Could not copy #{file} to #{dest}")
|
50
|
+
end
|
51
|
+
unless assets.empty?
|
52
|
+
cmd = "scp #{assets.join(' ')} #@user@#@server:#{dir}/../assets >/dev/null 2>/tmp/wtf2"
|
53
|
+
result = system!(cmd)
|
54
|
+
raise PublishError if !result
|
55
|
+
end
|
50
56
|
dump(files, "#{@blog.view.dir}/last_published")
|
51
57
|
true
|
52
58
|
end
|
data/lib/repl.rb
CHANGED
@@ -135,7 +135,7 @@ module RuneBlog::REPL
|
|
135
135
|
else
|
136
136
|
if @blog.view?(arg)
|
137
137
|
@blog.view = arg # reads config
|
138
|
-
output
|
138
|
+
output "View: " + @blog.view.name.to_s
|
139
139
|
puts "\n ", fx(arg, :bold), "\n" unless testing
|
140
140
|
end
|
141
141
|
end
|
@@ -239,7 +239,7 @@ module RuneBlog::REPL
|
|
239
239
|
puts unless testing
|
240
240
|
puts " ", fx(str, :bold) unless testing
|
241
241
|
if posts.empty?
|
242
|
-
output!
|
242
|
+
output! "No posts"
|
243
243
|
puts fx(" No posts", :bold) unless testing
|
244
244
|
else
|
245
245
|
posts.each do |post|
|
data/lib/runeblog_version.rb
CHANGED