lib/runeblog.rb in runeblog-0.0.77 vs lib/runeblog.rb in runeblog-0.0.78

- old
+ new

@@ -122,17 +122,10 @@ system("rm -rf #@root/views/#{name}") @views -= [str2view(name)] end end - def deployment_url - return nil unless @deploy[@view] - lines = @deploy[@view] - user, server, sroot, spath = *@deploy[@view] - url = "http://#{server}/#{spath}" - end - def view_files vdir = @blog.viewdir(@view) # meh files = ["#{vdir}/index.html"] files += Dir.entries(vdir).grep(/^\d\d\d\d/).map {|x| "#{vdir}/#{x}" } @@ -167,16 +160,16 @@ error(err) end def posts dir = self.view.dir - posts = Dir.entries(dir).grep(/^0.*/) + posts = Dir.entries(dir).grep(/^\d{4}/) posts end def drafts dir = "#@root/src" - drafts = Dir.entries(dir).grep(/^0.*.lt3/) + drafts = Dir.entries(dir).grep(/^\d{4}.*/) end def change_view(view) File.write(".blog", "#@root\n#{view}\n") self.view = view # error checking?