Sha256: bbd96e672391c72f5a8976d26d11a150da8583609d082d0cc1e34826b0031d62
Contents?: true
Size: 1.55 KB
Versions: 1
Compression:
Stored size: 1.55 KB
Contents
$LOAD_PATH << "./lib" major, minor = RUBY_VERSION.split(".").values_at(0,1) ver = major.to_i*10 + minor.to_i abort "Need Ruby 2.4 or greater" unless ver >= 24 require 'global' # require 'rubytext' require 'repl' def getch # sleep 5 end def debug(str) # STDERR.puts str end def make_post(x, title) meta = OpenStruct.new num = x.create_new_post(title, true) num end def show_lines(text) lines = text.split("\n") str = "#{lines.size} lines\n" lines.each {|line| str << " #{line.inspect}\n" } str end STDERR.puts :cp01 system("rm -rf .blogs") STDERR.puts :cp02 RuneBlog.create_new_blog_repo('test_view', ".blogs/data") STDERR.puts :cp03 x = RuneBlog.new STDERR.puts :cp04 x.create_view("alpha_view") STDERR.puts :cp05 # Hack: if File.exist?("publish") system("cp publish .blogs/data/views/alpha_view/publish") end # puts "inside make_blog: pwd = #{Dir.pwd}" system("cp test/fakeimage.jpg .blogs/data/assets/") system("cp test/fakeimage.jpg .blogs/data/views/alpha_view/assets/") x.create_view("beta_view") x.create_view("gamma_view") x.change_view("alpha_view") # 1 2 7 8 9 make_post(x, "Post number 1") make_post(x, "Post number 2") x.change_view("beta_view") # 3 5 6 make_post(x, "Post number 3") x.change_view("gamma_view") # 4 10 make_post(x, "Post number 4") x.change_view("beta_view") make_post(x, "Post number 5") make_post(x, "Post number 6") x.change_view("alpha_view") make_post(x, "Post number 7") make_post(x, "Post number 8") make_post(x, "Post number 9") x.change_view("gamma_view") make_post(x, "Post number 10") x.change_view("alpha_view")
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
runeblog-0.1.68 | test/make_blog.rb |