diff options
author | Abinoam Praxedes Marques Jr <abinoam@gmail.com> | 2015-02-18 11:20:36 -0300 |
---|---|---|
committer | Abinoam Praxedes Marques Jr <abinoam@gmail.com> | 2015-02-19 16:26:30 -0300 |
commit | 00c267daa6d90ea9bf6c188644731dae9dc67fea (patch) | |
tree | d66cd6704ff79d89fc7b97dee832f556f0ad2523 | |
parent | cd85cfc4c0035c9abc33b1edf8ea021f784f85c7 (diff) | |
download | highline-00c267daa6d90ea9bf6c188644731dae9dc67fea.tar.gz |
Use bundler defaults as in 'bundler gem'
-rw-r--r-- | Rakefile | 2 | ||||
-rw-r--r-- | highline.gemspec | 15 | ||||
-rwxr-xr-x | lib/highline.rb | 4 | ||||
-rw-r--r-- | lib/highline/version.rb | 4 |
4 files changed, 12 insertions, 13 deletions
@@ -1,6 +1,7 @@ require "rdoc/task" require "rake/testtask" require "rubygems/package_task" +require "bundler/gem_tasks" require "rubygems" @@ -31,7 +32,6 @@ task :upload_docs => [:rdoc] do "bbazzarrakk@rubyforge.org:/var/www/gforge-projects/highline/" end -load(File.join(File.dirname(__FILE__), "highline.gemspec")) Gem::PackageTask.new(SPEC) do |package| # do nothing: I just need a gem but this block is required end 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" diff --git a/lib/highline.rb b/lib/highline.rb index 161635c..eedd1a8 100755 --- a/lib/highline.rb +++ b/lib/highline.rb @@ -16,6 +16,7 @@ require "highline/question" require "highline/menu" require "highline/color_scheme" require "highline/style" +require "highline/version" # # A HighLine object is a "high-level line oriented" shell over an input and an @@ -27,9 +28,6 @@ require "highline/style" # checking, convert types, etc. # class HighLine - # The version of the installed library. - VERSION = "1.6.21".freeze - # An internal HighLine error. User code does not need to trap this. class QuestionError < StandardError # do nothing, just creating a unique error type diff --git a/lib/highline/version.rb b/lib/highline/version.rb new file mode 100644 index 0000000..64f31e2 --- /dev/null +++ b/lib/highline/version.rb @@ -0,0 +1,4 @@ +class HighLine + # The version of the installed library. + VERSION = "1.6.21".freeze +end |