Permalink
Browse files

Move VERSION to a separate file to fix issues with Sinatra loading du…

…ring gemspec evaluation
  • Loading branch information...
bgentry committed Sep 26, 2011
1 parent dc1b76c commit b692a0100616052498b52da24b1d3bb96589c66a
Showing with 7 additions and 4 deletions.
  1. +0 −2 lib/showoff.rb
  2. +3 −0 lib/showoff/version.rb
  3. +4 −2 showoff.gemspec
View
@@ -31,8 +31,6 @@
class ShowOff < Sinatra::Application
- Version = VERSION = '0.7.0'
-
attr_reader :cached_image_size
set :views, File.dirname(__FILE__) + '/../views'
View
@@ -0,0 +1,3 @@
+# No namespace here since ShowOff is a class and I'd have to inherit from
+# Sinatra::Application (which we don't want to load here)
+SHOWOFF_VERSION = '0.7.0'
View
@@ -1,7 +1,9 @@
-require './lib/showoff'
+$:.unshift File.expand_path("../lib", __FILE__)
+require 'showoff/version'
+
Gem::Specification.new do |s|
s.name = "showoff"
- s.version = ShowOff::Version
+ s.version = SHOWOFF_VERSION
s.date = "2011-09-10"
s.summary = "The best damn presentation software a developer could ever love."
s.homepage = "http://github.com/schacon/showoff"

0 comments on commit b692a01

Please sign in to comment.