Permalink
Browse files

automatically include task if file is required

  • Loading branch information...
1 parent 2ba24e7 commit fcaab487d74e788fc091e85b4392176e1e879e4b @MSch committed Dec 10, 2010
Showing with 5 additions and 24 deletions.
  1. +1 −1 irb-rake-task.gemspec
  2. +4 −23 lib/irb/rake_task.rb
View
@@ -3,7 +3,7 @@ $:.push File.expand_path("../lib", __FILE__)
Gem::Specification.new do |s|
s.name = "irb-rake-task"
- s.version = "0.0.1"
+ s.version = "0.0.2"
s.platform = Gem::Platform::RUBY
s.authors = ["Martin Schuerrer"]
s.email = ["martin@schuerrer.org"]
View
@@ -3,27 +3,8 @@
require 'irb'
require 'irb/completion'
-module IRB
- class RakeTask < ::Rake::TaskLib
-
- # Name of task.
- #
- # default:
- # :spec
- attr_accessor :name
-
- def initialize(*args)
- @name = args.shift || :console
-
- yield self if block_given?
-
- desc("Start the console") unless ::Rake.application.last_comment
-
- task name do
- ARGV.clear
- IRB.start
- end
- end
-
- end
+desc("Open IRB console")
+task name do
+ ARGV.clear
+ IRB.start
end

0 comments on commit fcaab48

Please sign in to comment.