Screw that, using a constant.
authorelliottcable <[email protected]>
Thu, 26 Jun 2008 08:17:38 +0000 (26 00:17 -0800)
committerelliottcable <[email protected]>
Thu, 26 Jun 2008 08:17:38 +0000 (26 00:17 -0800)
Rakefile.rb
lib/git-blog.rb
lib/git-blog/core.rb

index c5735f9..cf48610 100644 (file)
@@ -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
index bd4e391..293c097 100644 (file)
@@ -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)'
index 3733684..bcd6b3f 100644 (file)
@@ -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