From 8123745202afee56a46e82423e76ea44b50f53ae Mon Sep 17 00:00:00 2001 From: Randy Morgan Date: Thu, 15 Dec 2011 10:52:42 +0900 Subject: silence warning from bundler when requiring this gem off of github. --- axlsx.gemspec | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/axlsx.gemspec b/axlsx.gemspec index 44c4141f..622b6a0f 100644 --- a/axlsx.gemspec +++ b/axlsx.gemspec @@ -1,6 +1,14 @@ -# This will recursively require rake when using rake 0.9.2.2 +# This will recursively require rake when using rake 0.9.2.2 and bundler #require 'rake' -require File.expand_path(File.dirname(__FILE__) + '/lib/axlsx/version.rb') + +begin + require File.expand_path(File.dirname(__FILE__) + '/lib/axlsx/version.rb') unless Axlsx::VERSION +rescue NameError=>e + # As far as I can tell, when a consuming application points to github, bundler runs the Gemfile, which in turn + # kicks this and then includes axlsx. As we are defining Axlsx::VERSION here, we see a + # warning: already initialized constant VERSION +end + Gem::Specification.new do |s| s.name = 'axlsx' s.version = Axlsx::VERSION -- cgit v1.2.3