summaryrefslogtreecommitdiff
path: root/highline.gemspec
diff options
context:
space:
mode:
authorAbinoam Praxedes Marques Jr <abinoam@gmail.com>2015-02-18 11:20:36 -0300
committerAbinoam Praxedes Marques Jr <abinoam@gmail.com>2015-02-19 16:26:30 -0300
commit00c267daa6d90ea9bf6c188644731dae9dc67fea (patch)
treed66cd6704ff79d89fc7b97dee832f556f0ad2523 /highline.gemspec
parentcd85cfc4c0035c9abc33b1edf8ea021f784f85c7 (diff)
downloadhighline-00c267daa6d90ea9bf6c188644731dae9dc67fea.tar.gz
Use bundler defaults as in 'bundler gem'
Diffstat (limited to 'highline.gemspec')
-rw-r--r--highline.gemspec15
1 files changed, 6 insertions, 9 deletions
diff --git a/highline.gemspec b/highline.gemspec
index d330b51..b71e9b2 100644
--- a/highline.gemspec
+++ b/highline.gemspec
@@ -1,12 +1,9 @@
-DIR = File.dirname(__FILE__)
-LIB = File.join(DIR, *%w[lib highline.rb])
-GEM_VERSION = open(LIB) { |lib|
- lib.each { |line|
- if v = line[/^\s*VERSION\s*=\s*(['"])(\d+\.\d+\.\d+)\1/, 2]
- break v
- end
- }
-}
+# coding: utf-8
+lib = File.expand_path('../lib', __FILE__)
+$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
+require 'highline/version'
+
+GEM_VERSION = HighLine::VERSION
SPEC = Gem::Specification.new do |spec|
spec.name = "highline"