# Note : this causes annoying psych warnings under Ruby 1.9.2-p180; to fix, upgrade to 1.9.3
# Note : this causes annoying psych warnings under Ruby 1.9.2-p180; to fix, upgrade to 1.9.3
begin
begin
require'bundler'
require'bundler'
Bundler.setup(:default,:development)
Bundler.setup(:default,:development)
rescueBundler::BundlerError=>e
rescueBundler::BundlerError=>e
$stderr.putse.message
$stderr.puts'Run `bundle install` to install missing gems'
$stderr.puts"Run `bundle install` to install missing gems"
exit_exception(e)
exite.status_code
end
end
using_dsl=false
using_dsl=false
...
@@ -14,18 +18,16 @@ begin
...
@@ -14,18 +18,16 @@ begin
using_dsl=true
using_dsl=true
rescueException=>e
rescueException=>e
# We might just be on an old version of Rake...
# We might just be on an old version of Rake...
exit_exception(e)
end
end
require'rake'
require'rake'
if(using_dsl)
includeRake::DSLifusing_dsl
includeRake::DSL
end
require"./lib/annotate"
require'./lib/annotate'
require'mg'
require"mg"
begin
begin
MG.new("annotate.gemspec")
MG.new("annotate.gemspec")
rescueException=>e
rescueException
STDERR.puts("WARNING: Couldn't read gemspec. As such, a number of tasks may be unavailable to you until you run 'rake gem:gemspec' to correct the issue.")
STDERR.puts("WARNING: Couldn't read gemspec. As such, a number of tasks may be unavailable to you until you run 'rake gem:gemspec' to correct the issue.")
# Gemspec is probably in a broken state, so let's give ourselves a chance to
# Gemspec is probably in a broken state, so let's give ourselves a chance to
# build a new one...
# build a new one...
...
@@ -88,7 +90,7 @@ namespace :jeweler do
...
@@ -88,7 +90,7 @@ namespace :jeweler do
FileUtils.rm_f("pkg")
FileUtils.rm_f("pkg")
end
end
end
end
task:clobber=>:'jeweler:clobber'
taskclobber: :'jeweler:clobber'
require"rspec/core/rake_task"# RSpec 2.0
require"rspec/core/rake_task"# RSpec 2.0
RSpec::Core::RakeTask.new(:spec)do|t|
RSpec::Core::RakeTask.new(:spec)do|t|
...
@@ -111,7 +113,7 @@ namespace :gemsets do
...
@@ -111,7 +113,7 @@ namespace :gemsets do
end
end
end
end
end
end
task:clobber=>:'gemsets:empty'
taskclobber: :'gemsets:empty'
namespace:integrationdo
namespace:integrationdo
desc"Remove any cruft generated by manual debugging runs which is .gitignore'd."
desc"Remove any cruft generated by manual debugging runs which is .gitignore'd."
...
@@ -120,19 +122,19 @@ namespace :integration do
...
@@ -120,19 +122,19 @@ namespace :integration do
end
end
desc"Reset any changed files, and remove any untracked files in spec/integration/*/, plus run integration:clean."
desc"Reset any changed files, and remove any untracked files in spec/integration/*/, plus run integration:clean."