Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Screw that, using a constant.

  • Loading branch information...
commit 97ad7c68902d136da034c539fe5d43d68ad38285 1 parent 7404e6c
@ELLIOTTCABLE authored
Showing with 10 additions and 8 deletions.
  1. +1 −1  Rakefile.rb
  2. +4 −4 lib/git-blog.rb
  3. +5 −3 lib/git-blog/core.rb
View
2  Rakefile.rb
@@ -12,7 +12,7 @@
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
View
8 lib/git-blog.rb
@@ -15,12 +15,12 @@
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 @@
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)'
View
8 lib/git-blog/core.rb
@@ -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'
Please sign in to comment.
Something went wrong with that request. Please try again.