runeblog 0.1.68 → 0.1.69

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: bb2582c242a2e3130d14dad7b484d96b7703258fbdd0d59212b993df72c3c55c
4
- data.tar.gz: 0fcac65738ecc1dec58168ddf348292cc091d4408bf8a6590e2a76c984c4bef9
3
+ metadata.gz: 01a59a40806ea47e4c1050698e94fe48047c853357b2dd8dcc7519973d7969ed
4
+ data.tar.gz: f63c02e9da788ef463339a9cf9f0e0a3502975e7a1eaedd3bda935f53f9ab2fd
5
5
  SHA512:
6
- metadata.gz: a519a50fb120971d3fb2115b43d1857657f63fc8617894d3589c810ecb0a9b6c9d838e91fb09d09724669d518672fef9b27964d57b34b368cdbd0cabe4a83cc3
7
- data.tar.gz: 44be5e4a8c726655c634817f171fc73a759ac8bf0dc5aaf95d452a6df7efc9c9868635cd137ef66551182b76e5363f9bcd13388b2cacf0adbc514aef4479b0f5
6
+ metadata.gz: 71bf1ca60168bcb5297271eacd173f3f70e1447ac575c0d3e034ae0a3884024fdca117c4780cc401f48a5c73095864b15616253c1d8d4b0453aeac4a2d8a9875
7
+ data.tar.gz: 2034c163ca26b8215d9f9e5fa9debf3024924fdc506791868615ff791446ccb10fbbfb48b264ad277c4b2f3d6ed0116c30dd32a5dd84191e093592ee5d9ca1a4
data/bin/blog CHANGED
@@ -49,12 +49,12 @@ home = ENV['HOME']
49
49
  RubyText.start(:_echo, :keypad, scroll: true, log: "binblog.txt", fg: @fg, bg: @bg)
50
50
 
51
51
  if ! RuneBlog.exist?
52
- print fx("\n No blog found. Create new one? (y/n): ", :bold)
52
+ print fx("\n No blog repo found. Create new one? (y/n): ", :bold)
53
53
  response = gets.chomp
54
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)
55
+ print fx("\n Enter default view name: ", :bold)
56
+ view_name = gets.chomp
57
+ RuneBlog.create_new_blog_repo(view_name)
58
58
  get_started
59
59
  else
60
60
  exit
Binary file
@@ -67,11 +67,11 @@ class RuneBlog
67
67
  index.lt3
68
68
  =end
69
69
 
70
- def self.create_new_blog_repo(repo_filename, dir = ".blogs/data")
70
+ def self.create_new_blog_repo(first_view, dir = ".blogs/data")
71
71
  raise ArgumentError unless dir.is_a?(String) && ! dir.empty?
72
72
  root_dir = Dir.pwd + "/" + dir
73
73
  raise BlogRepoAlreadyExists if Dir.exist?(root_dir)
74
- new_dotfile(root: root_dir, current_view: repo_filename)
74
+ new_dotfile(root: root_dir, current_view: first_view)
75
75
  create_dir(dir)
76
76
  # New code goes here!
77
77
  Dir.chdir(dir) do
@@ -82,8 +82,7 @@ class RuneBlog
82
82
  new_sequence
83
83
  end
84
84
  blog = self.new
85
- STDERR.puts :cp021
86
- blog.create_view(repo_filename)
85
+ blog.create_view(first_view)
87
86
  rescue => err
88
87
  puts "Can't create blog repo: '#{dir}' - #{err}"
89
88
  puts err.backtrace.join("\n")
@@ -154,60 +153,30 @@ STDERR.puts :cp021
154
153
  end
155
154
 
156
155
  def create_view(arg)
157
- STDERR.puts :cp029
158
156
  debug "=== create_view #{arg.inspect}"
159
- STDERR.puts :cp029a
160
157
  raise ArgumentError unless arg.is_a?(String) && ! arg.empty?
161
158
 
162
- STDERR.puts :cp029b
163
159
  names = self.views.map(&:to_s)
164
- STDERR.puts :cp029c
165
160
  raise ViewAlreadyExists(arg) if names.include?(arg)
166
161
 
167
- STDERR.puts :cp029d
168
162
  dir = "#@root/views/#{arg}/"
169
- STDERR.puts :cp029e
170
163
  raise DirAlreadyExists(dir) if Dir.exist?(dir)
171
- STDERR.puts :cp029f
172
164
  create_dir(dir)
173
- STDERR.puts :cp029g
174
165
  up = Dir.pwd
175
- STDERR.puts :cp029h
176
166
  Dir.chdir(dir)
177
- STDERR.puts :cp029i
178
167
  x = RuneBlog::Default
179
- STDERR.puts :cp029j
180
168
  create_dir('themes')
181
- STDERR.puts :cp029k
182
169
  create_dir("local")
183
- STDERR.puts :cp029l
184
170
  create_dir("generated")
185
- STDERR.puts :cp029m
186
- ## new code...
171
+
187
172
  Dir.chdir("themes") { system("tar zxvf #{GemData}/standard.tgz 2>/dev/null") }
188
- STDERR.puts :cp029n
189
173
  create_dir('assets')
190
- STDERR.puts :cp029o
191
- ## add default stuff to assets?
192
174
  pub = "user: xxx\nserver: xxx\ndocroot: xxx\npath: xxx\nproto: xxx\n"
193
175
  dump(pub, "publish")
194
- #? dump("", "tagpool")
195
176
  view = RuneBlog::View.new(arg)
196
177
  self.view = view
197
- # Rewrite this! think: livetext themes/standard/generate.lt3
198
- # (output goes elsewhere)
199
- # This is just all wrong now?
200
- STDERR.puts :cp029p
201
- live = Livetext.new(nil)
202
- STDERR.puts :cp029q
203
- Livetext.parameters = [RuneBlog.blog, 0, live]
204
- STDERR.puts :cp029r
205
- meta = live.transform(x::BlogTemplate)
206
- STDERR.puts :cp029s
207
- dump(meta, "themes/standard/blogview.lt3")
208
- STDERR.puts :cp029t
178
+ system("livetext themes/standard/generate.lt3 >generated/blog/index.html 2>generated/blog/index.err")
209
179
  dump("Initial creation", "last_published")
210
- STDERR.puts :cp029u
211
180
  Dir.chdir(up)
212
181
  @views << view
213
182
  @views
@@ -1,6 +1,6 @@
1
1
 
2
2
  class RuneBlog
3
- VERSION = "0.1.68"
3
+ VERSION = "0.1.69"
4
4
 
5
5
  Path = File.expand_path(File.join(File.dirname(__FILE__)))
6
6
  end
@@ -20,12 +20,13 @@ 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.84'
23
+ s.add_runtime_dependency 'livetext', '~> 0.8', '>= 0.8.85'
24
24
  s.add_runtime_dependency 'rubytext', '~> 0.1', '>= 0.1.16'
25
25
 
26
26
  # Files...
27
- main = Find.find("bin").to_a +
28
- Find.find("lib").to_a
27
+ main = Find.find("bin").to_a +
28
+ Find.find("lib").to_a +
29
+ Find.find("data").to_a
29
30
 
30
31
  misc = %w[./README.lt3 ./README.md ./runeblog.gemspec]
31
32
  test = Find.find("test").to_a
@@ -257,7 +257,7 @@ end # conditional tests
257
257
 
258
258
  def xtest_019_exception_existing_blog
259
259
  # puts __method__
260
- assert_raises(BlogAlreadyExists) { RuneBlog.create_new_blog }
260
+ assert_raises(BlogAlreadyExists) { RuneBlog.create_new_blog_repo }
261
261
  end
262
262
 
263
263
  def xtest_020_exception_missing_blog_accessor
@@ -32,13 +32,9 @@ end
32
32
  STDERR.puts :cp01
33
33
 
34
34
  system("rm -rf .blogs")
35
- STDERR.puts :cp02
36
35
  RuneBlog.create_new_blog_repo('test_view', ".blogs/data")
37
- STDERR.puts :cp03
38
36
  x = RuneBlog.new
39
- STDERR.puts :cp04
40
37
  x.create_view("alpha_view")
41
- STDERR.puts :cp05
42
38
 
43
39
  # Hack:
44
40
  if File.exist?("publish")
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.68
4
+ version: 0.1.69
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-05-22 00:00:00.000000000 Z
11
+ date: 2019-05-24 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.84
22
+ version: 0.8.85
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.84
32
+ version: 0.8.85
33
33
  - !ruby/object:Gem::Dependency
34
34
  name: rubytext
35
35
  requirement: !ruby/object:Gem::Requirement
@@ -61,6 +61,7 @@ files:
61
61
  - "./README.md"
62
62
  - "./runeblog.gemspec"
63
63
  - bin/blog
64
+ - data/standard.tgz
64
65
  - lib/default.rb
65
66
  - lib/global.rb
66
67
  - lib/helpers-blog.rb