Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

check for version

  • Loading branch information...
commit 1991c37a84ce3c83490465608eedd1c62c0b790b 1 parent 5f731fa
mguymon authored
Showing with 9 additions and 1 deletion.
  1. +9 −1 src/main/ruby/solr_sail/version.rb
View
10 src/main/ruby/solr_sail/version.rb
@@ -1,3 +1,11 @@
module SolrSail
- VERSION = IO.read("VERSION").strip
+
+ # Load VERSION file to VERSION var
+ if File.exists?( File.expand_path("#{File.dirname(__FILE__)}/../VERSION") )
+ VERSION = IO.read(File.expand_path("#{File.dirname(__FILE__)}/../VERSION")).strip
+
+ # VERSION file not found in gem dir, assume running from checkout
+ else
+ VERSION = IO.read(File.expand_path("VERSION")).strip
+ end
end
Please sign in to comment.
Something went wrong with that request. Please try again.