@@ -12,7 +12,7 @@ task :create, :destination do |_, params|
mkdir destination rescue nil
File.open destination/:Rakefile.rb, File::RDWR|File::TRUNC|File::CREAT do |rakefile|
- rakefile.puts "$:.unshift File.expand_path('#{GitBlog::Scope :lib}')"
+ rakefile.puts "$:.unshift File.expand_path('#{GitBlog::Scope / :lib}')"
rakefile.puts "require 'git-blog'"
rakefile.print "\n"; rakefile.close
end
@@ -15,12 +15,12 @@ task :initialize do
cd path
mkdir 'posts'
mkdir 'design'
- cp GitBlog::Scope :prepped / '.gitignore', '.'
+ cp GitBlog::Scope / :prepped / '.gitignore', '.'
%w(welcome_to_your_git_blog.markdown .gitignore).each do |file|
- cp GitBlog::Scope :prepped / :posts / file, 'posts'
+ cp GitBlog::Scope / :prepped / :posts / file, 'posts'
end
%w(main.css post.haml index.haml).each do |file|
- cp GitBlog::Scope :prepped / :design / file, 'design'
+ cp GitBlog::Scope / :prepped / :design / file, 'design'
end
Dir['**/**'].each do |file|
@@ -63,7 +63,7 @@ task :servable do
should_be_initialized File.expand_path('.')
mv '.git' / :hooks / 'post-receive', '.git' / :hooks / 'post-receive.old'
- cp GitBlog::Scope :prepped / 'post-receive.hook', '.git' / :hooks / 'post-receive'
+ cp GitBlog::Scope / :prepped / 'post-receive.hook', '.git' / :hooks / 'post-receive'
chmod 0775, '.git' / :hooks / 'post-receive'
puts '** git-blog is prepared for serving (git post-recieve hook prepared)'
@@ -12,9 +12,11 @@ module GitBlog
# Returns the path of file relative to the git-blog root.
# 'Borrowed' mostly wholesale from Haml 2.0.0 d-:
- def self.Scope path
- File.join(File.expand_path( File.dirname(__FILE__) / '..' / '..' ), path.to_s)
- end
+ # def self.Scope path
+ # File.join(File.expand_path( File.dirname(__FILE__) / '..' / '..' ), path.to_s)
+ # end
+ # Fuck that, using a constant. LAWL.
+ Scope = File.expand_path( File.dirname(__FILE__) / '..' / '..' )
end
require 'git-blog/parsers'
\ No newline at end of file