runeblog 0.1.62 → 0.1.63
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/bin/blog +7 -6
- data/lib/liveblog.rb +6 -1
- data/lib/repl.rb +8 -8
- data/lib/runeblog.rb +3 -3
- data/lib/runeblog_version.rb +1 -1
- data/runeblog.gemspec +1 -1
- data/test/make_blog.rb +1 -1
- metadata +4 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 6024acfe51b40d3f82d058f775eec5227435bf3618f22a31585eaac762ab1790
|
4
|
+
data.tar.gz: e41dd46176ce2fbe0682c9d1aff22e7bde4f4681f271846ce43812acff51ec1b
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: c747fa33eda75eb642de4bd7208c7a13999f4e7b4ac879f095dd82086ad1ced05f5df10f10fa9419a09b0060455b4045d9d5b0a63a6b0a00d1155e937995aa45
|
7
|
+
data.tar.gz: 6146598bb4643be209c6a86c81ec976892917b73c757fac7b1ef85556a91247dc875f4be4dca546afffa42146604dac3146a3e2b70f1a6966e2725596b20d99e
|
data/bin/blog
CHANGED
@@ -46,14 +46,15 @@ home = ENV['HOME']
|
|
46
46
|
@fg = @fg.downcase.to_sym
|
47
47
|
@bg = @bg.downcase.to_sym
|
48
48
|
|
49
|
-
RubyText.start(:_echo, :keypad, scroll: true, log: "binblog.txt",
|
50
|
-
fg: @fg, bg: @bg)
|
49
|
+
RubyText.start(:_echo, :keypad, scroll: true, log: "binblog.txt", fg: @fg, bg: @bg)
|
51
50
|
|
52
51
|
if ! RuneBlog.exist?
|
53
|
-
print fx("\n No blog found. Create new one? (y/n) ", :bold)
|
54
|
-
|
55
|
-
if
|
56
|
-
|
52
|
+
print fx("\n No blog found. Create new one? (y/n): ", :bold)
|
53
|
+
response = gets.chomp
|
54
|
+
if response.downcase == "y"
|
55
|
+
print fx("\n Enter blog name: ", :bold)
|
56
|
+
blog_name = gets.chomp
|
57
|
+
RuneBlog.create_new_blog(blog_name)
|
57
58
|
get_started
|
58
59
|
else
|
59
60
|
exit
|
data/lib/liveblog.rb
CHANGED
@@ -15,6 +15,11 @@ def categories # does nothing right now
|
|
15
15
|
end
|
16
16
|
|
17
17
|
|
18
|
+
def style
|
19
|
+
fname = _args[0]
|
20
|
+
_out %[<link rel="stylesheet" href="???/assets/#{fname}')">]
|
21
|
+
end
|
22
|
+
|
18
23
|
# Move elsewhere later!
|
19
24
|
|
20
25
|
def h1; _out "<h1>#{@_data}</h1>"; end
|
@@ -226,7 +231,7 @@ Dot = self # Clunky! for dot commands called from Functions class
|
|
226
231
|
|
227
232
|
# Find a better way to do this?
|
228
233
|
|
229
|
-
class
|
234
|
+
class Livetext::Functions
|
230
235
|
|
231
236
|
def br
|
232
237
|
# Thought: Maybe make a way for functions to "simply" call the
|
data/lib/repl.rb
CHANGED
@@ -174,15 +174,15 @@ module RuneBlog::REPL
|
|
174
174
|
reset_output
|
175
175
|
@blog.create_view(arg)
|
176
176
|
@blog.change_view(arg)
|
177
|
-
resp = yesno("Add publishing info now? ")
|
178
|
-
|
179
|
-
|
180
|
-
|
181
|
-
|
182
|
-
|
183
|
-
p out
|
184
|
-
write_config(@blog.view.publisher, out)
|
177
|
+
resp = yesno("Add publishing/hosting info now? (Y/N): ")
|
178
|
+
if resp
|
179
|
+
@blog.view.publisher = ask_publishing_info
|
180
|
+
out = @blog.view.dir + "/publish"
|
181
|
+
write_config(@blog.view.publisher, out)
|
182
|
+
end
|
185
183
|
@out
|
184
|
+
rescue ViewAlreadyExists
|
185
|
+
puts 'Blog already exists'
|
186
186
|
end
|
187
187
|
|
188
188
|
def cmd_new_post(arg, testing = false)
|
data/lib/runeblog.rb
CHANGED
@@ -38,11 +38,11 @@ class RuneBlog
|
|
38
38
|
|
39
39
|
include Helpers
|
40
40
|
|
41
|
-
def self.create_new_blog(dir = ".blog/data")
|
41
|
+
def self.create_new_blog(blog_name, dir = ".blog/data")
|
42
42
|
raise ArgumentError unless dir.is_a?(String) && ! dir.empty?
|
43
43
|
root_dir = Dir.pwd + "/" + dir
|
44
44
|
raise BlogAlreadyExists if Dir.exist?(root_dir)
|
45
|
-
new_dotfile(root: root_dir, current_view:
|
45
|
+
new_dotfile(root: root_dir, current_view: blog_name)
|
46
46
|
create_dir(dir)
|
47
47
|
Dir.chdir(dir) do
|
48
48
|
create_dir("views")
|
@@ -51,7 +51,7 @@ class RuneBlog
|
|
51
51
|
new_sequence
|
52
52
|
end
|
53
53
|
blog = self.new
|
54
|
-
blog.create_view(
|
54
|
+
blog.create_view(blog_name)
|
55
55
|
rescue => err
|
56
56
|
puts "Can't create blog: '#{dir}' - #{err}"
|
57
57
|
puts err.backtrace.join("\n")
|
data/lib/runeblog_version.rb
CHANGED
data/runeblog.gemspec
CHANGED
@@ -20,7 +20,7 @@ spec = Gem::Specification.new do |s|
|
|
20
20
|
s.authors = ["Hal Fulton"]
|
21
21
|
s.email = 'rubyhacker@gmail.com'
|
22
22
|
s.executables << "blog"
|
23
|
-
s.add_runtime_dependency 'livetext', '~> 0.8', '>= 0.8.
|
23
|
+
s.add_runtime_dependency 'livetext', '~> 0.8', '>= 0.8.76'
|
24
24
|
s.add_runtime_dependency 'rubytext', '~> 0.1', '>= 0.1.16'
|
25
25
|
|
26
26
|
# Files...
|
data/test/make_blog.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.1.
|
4
|
+
version: 0.1.63
|
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-04-
|
11
|
+
date: 2019-04-20 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: livetext
|
@@ -19,7 +19,7 @@ dependencies:
|
|
19
19
|
version: '0.8'
|
20
20
|
- - ">="
|
21
21
|
- !ruby/object:Gem::Version
|
22
|
-
version: 0.8.
|
22
|
+
version: 0.8.76
|
23
23
|
type: :runtime
|
24
24
|
prerelease: false
|
25
25
|
version_requirements: !ruby/object:Gem::Requirement
|
@@ -29,7 +29,7 @@ dependencies:
|
|
29
29
|
version: '0.8'
|
30
30
|
- - ">="
|
31
31
|
- !ruby/object:Gem::Version
|
32
|
-
version: 0.8.
|
32
|
+
version: 0.8.76
|
33
33
|
- !ruby/object:Gem::Dependency
|
34
34
|
name: rubytext
|
35
35
|
requirement: !ruby/object:Gem::Requirement
|