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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: e021bb5ab60b228bcc7dd8b0e088af60487f684b6c64abc619f09cbbdd843c8a
4
- data.tar.gz: 572d365ddb2687da51026203f2ab4d88aeead5d84e891df5aeec6270f6e446c0
3
+ metadata.gz: 6024acfe51b40d3f82d058f775eec5227435bf3618f22a31585eaac762ab1790
4
+ data.tar.gz: e41dd46176ce2fbe0682c9d1aff22e7bde4f4681f271846ce43812acff51ec1b
5
5
  SHA512:
6
- metadata.gz: 2917038cd8e6cadb31ee669027c19c7e2e35f96223a0beeb7df7da360af86042cb2d26403ed2df0a8cf3f4a3eef6936124d601771ff52742ed2fb284ea4d534b
7
- data.tar.gz: 12c24806b6a78b9661ee51df1736591bdc7cd37fb311a20d9f1377213e53b53aa997a8ddb657058fed76fffc4d226f990f8f89d5468c3fdc2d9ef68b6ec6df59
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
- resp = gets.chomp
55
- if resp.downcase == "y"
56
- RuneBlog.create_new_blog
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 LiveText::Functions
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
- @blog.view.publisher = ask_publishing_info
179
- out = @blog.view.dir + "/publish"
180
- print "pub = "
181
- p @blog.view.publisher
182
- print "out = "
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: "test_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("test_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")
@@ -1,6 +1,6 @@
1
1
 
2
2
  class RuneBlog
3
- VERSION = "0.1.62"
3
+ VERSION = "0.1.63"
4
4
 
5
5
  Path = File.expand_path(File.join(File.dirname(__FILE__)))
6
6
  end
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.72'
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
@@ -30,7 +30,7 @@ def show_lines(text)
30
30
  end
31
31
 
32
32
  system("rm -rf .blog")
33
- RuneBlog.create_new_blog(".blog/data_test")
33
+ RuneBlog.create_new_blog('test_view', ".blog/data_test")
34
34
  x = RuneBlog.new
35
35
  x.create_view("alpha_view")
36
36
 
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.62
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-18 00:00:00.000000000 Z
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.72
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.72
32
+ version: 0.8.76
33
33
  - !ruby/object:Gem::Dependency
34
34
  name: rubytext
35
35
  requirement: !ruby/object:Gem::Requirement