Skip to content
Browse files

adding a globber task

  • Loading branch information...
1 parent d104e2b commit f2619f35d7104b68ec3e3d75697ef81f1bd8945f @tenderlove committed Jul 16, 2013
Showing with 8 additions and 7 deletions.
  1. +1 −4 .gitignore
  2. +7 −3 Rakefile
View
5 .gitignore
@@ -1,4 +1 @@
-.bundle
-db/*.sqlite3
-log/*.log
-tmp/**/*
+public/index.html
View
10 Rakefile
@@ -60,7 +60,7 @@ class WEBSITE
collection.map { |object|
@locals[partial.to_s] = object
- filename = "app/views/accounts/_#{partial}.html.erb"
+ filename = "views/accounts/_#{partial}.html.erb"
erb = ERB.new File.read(filename), 0, '<>-'
erb.filename = filename
erb.result binding
@@ -99,10 +99,10 @@ end
require 'net/http'
def make_website
- erb = ERB.new File.read('app/views/layouts/application.html.erb'), 0, '<>-'
+ erb = ERB.new File.read('views/layouts/application.html.erb'), 0, '<>-'
ws = WEBSITE.new
binding = ws.get_binding do
- fn = 'app/views/accounts/index.html.erb'
+ fn = 'views/accounts/index.html.erb'
inner = ERB.new File.read(fn), 0, '<>-'
inner.filename = fn
inner.result(ws.get_binding)
@@ -120,4 +120,8 @@ file 'public/index.html' => 'ruby-committers.yml' do
File.open('public/index.html', 'wb') { |f| f.write make_website }
end
+task :clobber do
+ rm "public/index.html"
+end
+
task :default => 'public/index.html'

0 comments on commit f2619f3

Please sign in to comment.
Something went wrong with that request. Please try again.