runeblog 0.1.29 → 0.1.30

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: bf2ac993dd2684a92af0a2db233e9d7ed03144dae12839c1b7e21f5562309eda
4
- data.tar.gz: 1b8454157280f73784b33837e635b19b74b887e230d11897b8bb54943eda8ed3
3
+ metadata.gz: dfed05ef1c5eb502d0f6769c95388f1f5b1b01e222c49fa6f57fd63e85303e82
4
+ data.tar.gz: 298cb71465d7fd9e180846f907834d613823fad2483e24283c795ef9f0d74485
5
5
  SHA512:
6
- metadata.gz: 75f8c7ab5323645d06cd479d9fac68ba4937624ea3464a9d01ad3062ddf008506d48c2aa91ba4d8d7fe6f8eec8047131781cc89d2cda5d0d4a8c4ab1fc31de97
7
- data.tar.gz: d30725e010bbc96f6a7f449405c06f0ad629007fe03a2844a468515f5e59492336bb993d39a2343a07bf8a7ee3c012003bef1ecaf94f0e1ecb977f907871a4ea
6
+ metadata.gz: 56c51aab79afdd45313fc5f1e15940372bb2465409eba613b5e8f57115e61cea280efe888f18e85a0e8d9040a225868ac1e04c4d8a32a37b1c5c7f3d4ff583eb
7
+ data.tar.gz: 24be0b1d1a612de9a5c226cb4bd3256271437e975223309358a542c33e3dff34912dd197751691e38775f45010b77e088f8aea8367db2b8fe0c96a0c500ac778
data/lib/default.rb CHANGED
@@ -11,7 +11,7 @@ BlogHeader = <<-TEXT
11
11
  <table>
12
12
  <tr>
13
13
  <td>
14
- <img src=../../assets/fakeimage.jpg width=400 height=300>
14
+ <img src=assets/fakeimage.jpg width=400 height=300>
15
15
  </td>
16
16
  <td>
17
17
  <h3>Yet another blog... by Kilgore Trout</h3>
data/lib/helpers-repl.rb CHANGED
@@ -55,6 +55,8 @@ module RuneBlog::REPL
55
55
 
56
56
  "publish" => :cmd_publish,
57
57
 
58
+ "ssh" => :cmd_ssh,
59
+
58
60
  "q" => :cmd_quit,
59
61
  "quit" => :cmd_quit
60
62
  }
data/lib/publish.rb CHANGED
@@ -39,7 +39,7 @@ debug "Failed!\n " if ! rc
39
39
  def publish(files, assets=[])
40
40
  dir = "#@docroot/#@path"
41
41
  result = system!("ssh #@user@#@server -x mkdir -p #{dir}")
42
- result = system!("ssh #@user@#@server -x mkdir -p #{dir}/../assets")
42
+ result = system!("ssh #@user@#@server -x mkdir -p #{dir}/assets")
43
43
  files.each do |file|
44
44
  dest = "#@user@#@server:#{dir}"
45
45
  file.gsub!(/\/\//, "/") # weird... :-/
@@ -49,7 +49,7 @@ debug "Failed!\n " if ! rc
49
49
  result = system!(cmd) || puts("\n Could not copy #{file} to #{dest}")
50
50
  end
51
51
  unless assets.empty?
52
- cmd = "scp #{assets.join(' ')} #@user@#@server:#{dir}/../assets >/dev/null 2>/tmp/wtf2"
52
+ cmd = "scp #{assets.join(' ')} #@user@#@server:#{dir}/assets >/dev/null 2>/tmp/wtf2"
53
53
  result = system!(cmd)
54
54
  raise PublishError if !result
55
55
  end
data/lib/repl.rb CHANGED
@@ -277,6 +277,11 @@ module RuneBlog::REPL
277
277
  [true, @out]
278
278
  end
279
279
 
280
+ def cmd_ssh(arg, testing = false)
281
+ pub = @blog.view.publisher
282
+ system("ssh #{pub.user}@#{pub.server}")
283
+ end
284
+
280
285
  def cmd_INVALID(arg, testing = false)
281
286
  reset_output "\n Command '#{arg}' was not understood."
282
287
  print fx("\n Command ", :bold)
@@ -321,6 +326,7 @@ module RuneBlog::REPL
321
326
  relink Regenerate index for all views
322
327
  rebuild Regenerate all posts and relink
323
328
  publish Publish (current view)
329
+ ssh Login to remote server
324
330
  EOS
325
331
  output msg
326
332
  msg.each_line do |line|
@@ -1,6 +1,6 @@
1
1
 
2
2
  class RuneBlog
3
- VERSION = "0.1.29"
3
+ VERSION = "0.1.30"
4
4
 
5
5
  Path = File.expand_path(File.join(File.dirname(__FILE__)))
6
6
  end
data/test/make_blog.rb CHANGED
@@ -37,6 +37,7 @@ x.create_view("alpha_view")
37
37
  # Hack:
38
38
  system("cp publish .blog/data_test/views/alpha_view/publish")
39
39
  system("cp fakeimage.jpg .blog/data_test/assets/")
40
+ system("cp fakeimage.jpg .blog/data_test/views/alpha_view/assets/")
40
41
 
41
42
  x.create_view("beta_view")
42
43
  x.create_view("gamma_view")
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: runeblog
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.29
4
+ version: 0.1.30
5
5
  platform: ruby
6
6
  authors:
7
7
  - Hal Fulton
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2019-01-19 00:00:00.000000000 Z
11
+ date: 2019-01-20 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: livetext