runeblog 0.0.24 → 0.0.25

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 +4 -4
  2. data/bin/blog +5 -1
  3. data/data/VERSION +1 -1
  4. data/lib/runeblog.rb +10 -6
  5. metadata +1 -1
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: cf6ffaa36c7cdc9f9f49eabc32a276911e06564f
4
- data.tar.gz: 62daf126e9eda16f40fee3085fa035b71eaf38cd
3
+ metadata.gz: 22679e625f2e7bb946b2273035b9182af7f841a5
4
+ data.tar.gz: 2e7e1e6b1a63f203c9b3de30d0af40edca006965
5
5
  SHA512:
6
- metadata.gz: 2c830d2bea8e9e68408f7afe5b4e5b70e9638c4dacadec86803eff0e46e765aeb90ef59d3e8a2841f4363045b4fe2097f1abb851d0f2cfe8c65b17cf0956ca76
7
- data.tar.gz: 35c2713ecc18a9303fc6727efa97a1a91f74d0e39e6eeacdc82000ad575917b64121e99d43de4ed4a0701fbf73b7c8442d24892697db01b763fb11a9694c4f53
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.24 2017-05-09
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.24"
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(view)
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
- files =
170
- cmd = "scp #{files.join(' ')} root@#{server}:#{dir}"
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
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: runeblog
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.24
4
+ version: 0.0.25
5
5
  platform: ruby
6
6
  authors:
7
7
  - Hal Fulton