runeblog 0.2.95 → 0.2.96
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/empty_view/config/facebook/credentials.txt +7 -0
- data/empty_view/config/facebook/facebook.rb +12 -7
- data/empty_view/config/facebook/{fb.js → fb.js.lt3} +5 -3
- data/empty_view/config/reddit/{config.txt → credentials.txt} +0 -0
- data/empty_view/config/reddit/reddit_post_url.py +1 -1
- data/empty_view/config/twitter/credentials.txt +3 -0
- data/empty_view/config/twitter/twitter.rb +3 -3
- data/lib/helpers-blog.rb +2 -2
- data/lib/repl.rb +19 -2
- data/lib/runeblog_version.rb +1 -1
- metadata +6 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 43bbc2d314d9a90cd34f558050a736ed58423f95576b0e32c3e36fc1405d756d
|
4
|
+
data.tar.gz: fcb2d941bff2c4c0bb3e609b347f1afcf9a13bb8073b2868a1af6d07c0883332
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 0a6446ceda937da5da353cc0b1259c1ad54743b936e36c4f45fadf2cc4e8def5ee2d8f227ef4f2c5e63e192eabd27134ddfd36de533364fe35d4177d45d335b9
|
7
|
+
data.tar.gz: 59c9fbab3e634c7fc99e147211b35e893b48cf6930deb331cba3cb1dbf36807bd746d8579c006fd27cd87ce5bd26eb34318b31e6c3c2b9580ae8c9b9856522e4
|
@@ -2,20 +2,25 @@ class Livetext::Functions
|
|
2
2
|
|
3
3
|
def facebook_init
|
4
4
|
fb_appid = _var("facebook.appid")
|
5
|
+
xfbml = _var("facebook.xfbml")
|
6
|
+
ver = _var("facebook.version")
|
7
|
+
width = _var("facebook.width")
|
8
|
+
share = _var("facebook.share")
|
9
|
+
faces = _var("facebook.faces")
|
5
10
|
<<~HTML
|
6
11
|
window.fbAsyncInit = function() {
|
7
12
|
FB.init({
|
8
13
|
appId : '#{fb_appid}',
|
9
|
-
xfbml :
|
10
|
-
version : '
|
14
|
+
xfbml : #{xfbml},
|
15
|
+
version : '#{ver}'
|
11
16
|
});
|
12
17
|
};
|
13
18
|
HTML
|
14
19
|
end
|
15
20
|
|
16
21
|
=begin
|
17
|
-
<!-- Needed:
|
18
|
-
<meta property='fb:admins' content='
|
22
|
+
<!-- Needed:
|
23
|
+
<meta property='fb:admins' content='$facebook.admins'/>
|
19
24
|
<meta property='og:url' content='http://rubyhacker.com/blog2/#{slug}.html'/>
|
20
25
|
<meta property='og:type' content='article'/>
|
21
26
|
<meta property='og:title' content='#{title}'/>
|
@@ -27,9 +32,9 @@ class Livetext::Functions
|
|
27
32
|
def facebook_likes
|
28
33
|
<<~HTML
|
29
34
|
<div class='fb-like'
|
30
|
-
data-share='
|
31
|
-
data-width='
|
32
|
-
data-show-faces='
|
35
|
+
data-share='#{share}'
|
36
|
+
data-width='#{width}'
|
37
|
+
data-show-faces='#{faces}'>
|
33
38
|
</div>
|
34
39
|
HTML
|
35
40
|
end
|
@@ -1,9 +1,11 @@
|
|
1
|
+
.variables facebook credentials.txt
|
2
|
+
|
1
3
|
<script>
|
2
4
|
window.fbAsyncInit = function() {
|
3
5
|
FB.init({
|
4
|
-
appId : '
|
5
|
-
xfbml :
|
6
|
-
version : '
|
6
|
+
appId : '$facebook.appid',
|
7
|
+
xfbml : $facebook.xfbml,
|
8
|
+
version : '$facebook.ver'
|
7
9
|
});
|
8
10
|
};
|
9
11
|
|
File without changes
|
@@ -13,8 +13,8 @@ class Livetext::Functions
|
|
13
13
|
-->
|
14
14
|
=end
|
15
15
|
|
16
|
-
def twitter_share
|
17
|
-
name
|
16
|
+
def twitter_share(title, url)
|
17
|
+
name = _var("twitter.user")
|
18
18
|
<<~HTML
|
19
19
|
<a href='https://twitter.com/share'
|
20
20
|
class='twitter-share-button'
|
@@ -26,7 +26,7 @@ class Livetext::Functions
|
|
26
26
|
end
|
27
27
|
|
28
28
|
def twitter_follow
|
29
|
-
name = "
|
29
|
+
name = _var("twitter.user")
|
30
30
|
<<~HTML
|
31
31
|
<a href='https://twitter.com/#{name}' class='twitter-follow-button' data-show-count='false'>Follow @#{name}</a>
|
32
32
|
HTML
|
data/lib/helpers-blog.rb
CHANGED
@@ -33,8 +33,8 @@ module RuneBlog::Helpers
|
|
33
33
|
when :config
|
34
34
|
files = %w[ROOT VIEW EDITOR universal.lt3 global.lt3]
|
35
35
|
files.each {|file| copy(data + "/" + file, dest) }
|
36
|
-
when :extra
|
37
|
-
copy!(extra, dest)
|
36
|
+
when :extra # FIXME remove later
|
37
|
+
# copy!(extra, dest)
|
38
38
|
end
|
39
39
|
end
|
40
40
|
|
data/lib/repl.rb
CHANGED
@@ -1,6 +1,7 @@
|
|
1
1
|
require 'runeblog'
|
2
2
|
require 'ostruct'
|
3
3
|
require 'helpers-repl' # FIXME structure
|
4
|
+
require 'pathmagic'
|
4
5
|
|
5
6
|
make_exception(:PublishError, "Error during publishing")
|
6
7
|
make_exception(:EditorProblem, "Could not edit $1")
|
@@ -378,10 +379,15 @@ module RuneBlog::REPL
|
|
378
379
|
v = v.to_s
|
379
380
|
v = fx(v, :bold) if v == @blog.view.name
|
380
381
|
output v + "\n"
|
381
|
-
|
382
|
+
# FIXME: next 3 lines are crufty as hell
|
383
|
+
lines = File.readlines(@blog.root/"views/#{v}/themes/standard/global.lt3")
|
384
|
+
lines = lines.select {|x| x =~ /^blog / && x !~ /VIEW_/ }
|
385
|
+
title = lines.first.split(" ", 2)[1]
|
386
|
+
print " ", ('%15s' % v) unless testing
|
387
|
+
puts " ", fx(title, :black) unless testing
|
382
388
|
end
|
383
389
|
puts unless testing
|
384
|
-
|
390
|
+
# @out
|
385
391
|
end
|
386
392
|
|
387
393
|
def cmd_list_posts(arg, testing = false)
|
@@ -400,6 +406,12 @@ module RuneBlog::REPL
|
|
400
406
|
base = post.sub(/.lt3$/, "")
|
401
407
|
num, rest = base[0..3], base[4..-1]
|
402
408
|
puts " ", fx(num, Red), fx(rest, Blue) unless testing
|
409
|
+
draft = @blog.root/:drafts/post + ".lt3"
|
410
|
+
other = @blog._get_views(draft) - [@blog.view.to_s]
|
411
|
+
unless other.empty?
|
412
|
+
print fx(" "*7 + "also in: ", :bold)
|
413
|
+
puts other.join(", ")
|
414
|
+
end
|
403
415
|
end
|
404
416
|
end
|
405
417
|
puts unless testing
|
@@ -420,6 +432,11 @@ module RuneBlog::REPL
|
|
420
432
|
base = draft.sub(/.lt3$/, "")
|
421
433
|
num, rest = base[0..3], base[4..-1]
|
422
434
|
puts " ", fx(num, Red), fx(rest, Blue) unless testing
|
435
|
+
other = @blog._get_views(@blog.root/:drafts/draft) - [@blog.view.to_s]
|
436
|
+
unless other.empty?
|
437
|
+
print fx(" "*7 + "also in: ", :bold)
|
438
|
+
puts other.join(", ")
|
439
|
+
end
|
423
440
|
end
|
424
441
|
end
|
425
442
|
puts unless testing
|
data/lib/runeblog_version.rb
CHANGED
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.2.
|
4
|
+
version: 0.2.96
|
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-12-
|
11
|
+
date: 2019-12-24 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: livetext
|
@@ -94,14 +94,16 @@ files:
|
|
94
94
|
- empty_view/config/exper/meta.html
|
95
95
|
- empty_view/config/exper/s2.html
|
96
96
|
- empty_view/config/exper/varmint.rb
|
97
|
+
- empty_view/config/facebook/credentials.txt
|
97
98
|
- empty_view/config/facebook/facebook.rb
|
98
99
|
- empty_view/config/facebook/fb.html
|
99
|
-
- empty_view/config/facebook/fb.js
|
100
|
-
- empty_view/config/reddit/
|
100
|
+
- empty_view/config/facebook/fb.js.lt3
|
101
|
+
- empty_view/config/reddit/credentials.txt
|
101
102
|
- empty_view/config/reddit/notes.txt
|
102
103
|
- empty_view/config/reddit/reddit_post_url.py
|
103
104
|
- empty_view/config/reddit/redpost.rb
|
104
105
|
- empty_view/config/reddit/the-graffiti-wall.html
|
106
|
+
- empty_view/config/twitter/credentials.txt
|
105
107
|
- empty_view/config/twitter/tw.html
|
106
108
|
- empty_view/config/twitter/tw.js
|
107
109
|
- empty_view/config/twitter/twitter.rb
|