diff options
-rwxr-xr-x | bin/leap | 10 | ||||
-rw-r--r-- | leap_cli.gemspec | 4 | ||||
-rw-r--r-- | leap_cli.rdoc | 5 | ||||
-rw-r--r-- | lib/leap_cli/version.rb | 1 |
4 files changed, 9 insertions, 11 deletions
@@ -13,11 +13,13 @@ rescue LoadError # This allows you to run the command directly while developing the gem, and also lets you # run from anywhere (I like to link 'bin/leap' to /usr/local/bin/leap). # - file = File.symlink?(__FILE__) ? File.readlink(__FILE__) : __FILE__ - lib_dir = File.expand_path(File.dirname(file) + '/../lib') - $LOAD_PATH.unshift lib_dir unless $LOAD_PATH.include?(lib_dir) require 'rubygems' - require 'bundler/setup' # force evaluation of "Gemfile" + base_dir = File.expand_path('..', File.dirname(File.symlink?(__FILE__) ? File.readlink(__FILE__) : __FILE__)) + require File.join([base_dir, 'lib','leap_cli','version.rb']) + LeapCli::REQUIRE_PATHS.each do |path| + path = File.expand_path(path, base_dir) + $LOAD_PATH.unshift path unless $LOAD_PATH.include?(path) + end require 'leap_cli' end diff --git a/leap_cli.gemspec b/leap_cli.gemspec index f51636a..3d13b7c 100644 --- a/leap_cli.gemspec +++ b/leap_cli.gemspec @@ -23,8 +23,7 @@ spec = Gem::Specification.new do |s| ## s.files = `find lib vendor -name '*.rb'`.split("\n") << "bin/leap" - s.require_paths << 'lib' - s.require_paths << 'vendor/supply_drop/lib' + s.require_paths += LeapCli::REQUIRE_PATHS s.bindir = 'bin' s.executables << 'leap' @@ -48,6 +47,7 @@ spec = Gem::Specification.new do |s| s.add_runtime_dependency('gli','~> 2.3') s.add_runtime_dependency('terminal-table') s.add_runtime_dependency('highline') + s.add_runtime_dependency('paint') # network gems s.add_runtime_dependency('capistrano') diff --git a/leap_cli.rdoc b/leap_cli.rdoc deleted file mode 100644 index 31d5deb..0000000 --- a/leap_cli.rdoc +++ /dev/null @@ -1,5 +0,0 @@ -= leap_cli - -Generate this with - leap_cli rdoc -After you have described your command line interface
\ No newline at end of file diff --git a/lib/leap_cli/version.rb b/lib/leap_cli/version.rb index 0f69f04..17f01ad 100644 --- a/lib/leap_cli/version.rb +++ b/lib/leap_cli/version.rb @@ -3,5 +3,6 @@ module LeapCli VERSION = '0.1.1' SUMMARY = 'Command line interface to the LEAP platform' DESCRIPTION = 'The command "leap" can be used to manage a bevy of servers running the LEAP platform from the comfort of your own home.' + REQUIRE_PATHS = ['lib', 'vendor/supply_drop/lib'] end end |