On Aug 18, 2011, at 10:51 AM, Mark McLoughlin wrote:
ACK.
-- Michal
> Gem.available? was deprecated by RubyGems 1.8 in favour of
> the recently introducted Gem::Specification.find_by_name.
> ---
> client/Rakefile | 10 +++++++++-
> 1 files changed, 9 insertions(+), 1 deletions(-)
>
> diff --git a/client/Rakefile b/client/Rakefile
> index 25e99cb..4fed388 100644
> --- a/client/Rakefile
> +++ b/client/Rakefile
> @@ -32,7 +32,15 @@ Gem::PackageTask.new(spec) do |pkg|
> pkg.need_tar = true
> end
>
> -if Gem.available?('rspec')
> +def available?(name)
> + Gem::Specification.find_by_name(name)
> +rescue Gem::LoadError
> + false
> +rescue
> + Gem.available?(name)
> +end
> +
> +if available?('rspec')
> require 'spec/rake/spectask'
> desc "Run all examples"
> Spec::Rake::SpecTask.new('spec') do |t|
> --
> 1.7.4.4
>
------------------------------------------------------
Michal Fojtik, [email protected]
Deltacloud API: http://deltacloud.org