livetext 0.8.55 → 0.8.56

Sign up to get free protection for your applications and to get access to all the features.
Files changed (4) hide show
  1. checksums.yaml +4 -4
  2. data/lib/livetext.rb +1 -1
  3. data/plugin/liveblog.rb +12 -26
  4. metadata +2 -2
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: a827edd43b13ecc5cb57e698e5cd03b4ddf5751568bb3f5e66a80947c2a46043
4
- data.tar.gz: b2d05eb81e4d5efce0b0dee63135780fd0abaa2d900309845200c35a7958c6f2
3
+ metadata.gz: 6587975b03e2f81708241121b6d5df2dfa8764f94515793f5573df47886b222e
4
+ data.tar.gz: 2d2e9794ef894fe27714afc97c8a5095d875f13b292f2dc15a2022d2fcca517e
5
5
  SHA512:
6
- metadata.gz: 1752760161830a773b4b2567f040dcfe114b935dce1985c1b4593ae01114eed891a2f7741705b2c00b09ad01a6b0ca29e77f4b53bc855cdbe9020dcb74d82b05
7
- data.tar.gz: 55ec4d3d731a462abccbaf78428fa9445dd79996cecae53e7a8bfcb83736e779a1b247e29e9e185677024306af3ce2aa5a943e4bd55eeed9b4b842011407569a
6
+ metadata.gz: a675f84a54124d0b5d98ddf40b38fec2f6bd1fc71367dcf504518a9795071f7e3ba6187c7d386b8a93d97e4b5bd6893572f6cb17171e91edcc1095b741f9f793
7
+ data.tar.gz: 670032474ae42a98e0f28abb8362a0389e85944eba48f026cf42009df26dc27702f4ab249a6eb37991b1a6fd2743b9f867aa399f809c935a3f6815640f307b9b
@@ -1,5 +1,5 @@
1
1
  class Livetext
2
- VERSION = "0.8.55"
2
+ VERSION = "0.8.56"
3
3
  Path = File.expand_path(File.join(File.dirname(__FILE__)))
4
4
  end
5
5
 
@@ -31,30 +31,17 @@ class ::Livetext::Functions # do this differently??
31
31
 
32
32
  end
33
33
 
34
- ### find_asset
35
-
36
- def find_asset(asset)
37
- raise "meh2"
38
- views = @config.views
39
- views.each do |view|
40
- vdir = @config.viewdir(view)
41
- post_dir = "#{vdir}#{@meta.slug}/assets/"
42
- path = post_dir + asset
43
- STDERR.puts " Seeking #{path}"
44
- return path if File.exist?(path)
34
+ ### copy_asset
35
+
36
+ def copy_asset(asset)
37
+ vdir = @blog.view.dir
38
+ return if File.exist?(vdir + "/" + asset)
39
+ top = vdir + "/../../"
40
+ if File.exist?(top + asset)
41
+ system("cp #{top}/#{asset} #{vdir}/#{asset}")
42
+ return
45
43
  end
46
- views.each do |view|
47
- dir = @config.viewdir(view) + "/assets/"
48
- path = dir + asset
49
- STDERR.puts " Seeking #{path}"
50
- return path if File.exist?(path)
51
- end
52
- top = @root + "/assets/"
53
- path = top + asset
54
- STDERR.puts " Seeking #{path}"
55
- return path if File.exist?(path)
56
-
57
- return nil
44
+ raise "Can't find #{asset.inspect}"
58
45
  end
59
46
 
60
47
  #############
@@ -146,14 +133,13 @@ end
146
133
  def asset
147
134
  @meta.assets ||= {}
148
135
  list = _args
149
- list.each {|asset| @meta.assets[asset] = find_asset(asset) }
150
- # STDERR.puts red("\n [DEBUG] ") + "Asset(s): #{@meta.assets}"
136
+ # For now: copies, doesn't keep record
137
+ list.each {|asset| copy_asset(asset) }
151
138
  end
152
139
 
153
140
  def assets
154
141
  @meta.assets ||= []
155
142
  @meta.assets += _body
156
- # STDERR.puts red("\n [DEBUG] ") + "Assets: #{_body.inspect}"
157
143
  end
158
144
 
159
145
  def write_post(meta)
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: livetext
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.8.55
4
+ version: 0.8.56
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
  description: A smart text processor extensible in Ruby
14
14
  email: rubyhacker@gmail.com