Skip to content
Browse files

Fixing gemspec. Heh.

  • Loading branch information...
1 parent c66362d commit a1b8f7ea298700324d51e0debd2fa1c90bc039ac @steveklabnik committed
Showing with 24 additions and 3 deletions.
  1. +21 −0 Rakefile
  2. +1 −1 lib/require_relative/version.rb
  3. +2 −2 require_relative.gemspec
View
21 Rakefile
@@ -39,6 +39,27 @@ begin
# Alias for docs task
task :doc => :docs
+ desc 'Update gh-pages branch'
+ task :pages => ['docs/.git', :docs] do
+ rev = `git rev-parse --short HEAD`.strip
+ Dir.chdir 'docs' do
+ sh "git add *.html"
+ sh "git add require_relative/*.html"
+ sh "git commit -m 'rebuild pages from #{rev}'" do |ok,res|
+ if ok
+ verbose { puts "gh-pages updated" }
+ sh "git push -q o HEAD:gh-pages"
+ end
+ end
+ end
+ end
+
+ file 'docs/.git' => ['docs/', '.git/refs/heads/gh-pages'] do |f|
+ sh "cd docs && git init -q && git remote add o ../.git" if !File.exist?(f.name)
+ sh "cd docs && git fetch -q o && git reset -q --hard o/gh-pages && touch ."
+ end
+ CLOBBER.include 'docs/.git'
+
rescue LoadError
warn "#$! -- rocco tasks not loaded."
end
View
2 lib/require_relative/version.rb
@@ -1,5 +1,5 @@
# This is simply the version number. Splitting it off into a different
# file is generally considered to be good practice. :)
module RequireRelative
- VERSION = "1.0.0"
+ VERSION = "1.0.1"
end
View
4 require_relative.gemspec
@@ -6,8 +6,8 @@ Gem::Specification.new do |s|
s.name = "require_relative"
s.version = RequireRelative::VERSION
s.platform = Gem::Platform::RUBY
- s.authors = ["Steve Klabnik <steve@steveklabnik.com>", "Brendan Taylor <whateley@gmail.com>"]
- s.email = ["steve@steveklabnik.com"]
+ s.authors = ["Steve Klabnik", "Brendan Taylor"]
+ s.email = ["steve@steveklabnik.com", "whateley@gmail.com"]
s.homepage = "https://steveklabnik.github.com/require_relative"
s.summary = %q{This backports require_relative to Ruby 1.8.}
s.description = %q{In Ruby 1.9.2, "." was removed from $:. This is a good idea, for security reasons. This gem backports this to Ruby 1.8.}

0 comments on commit a1b8f7e

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