source :rubygems
gemspec
-#
-# Specify support gems used that we might also develop locally.
-#
-# Available options:
-#
-# :dev_path - the development path of the gem. this path is used if running in 'development mode'.
-#
-# :vendor_path - where this gem is vendored. this path is used if it exists and we are running in 'production mode'
-#
-development_gems = {
- 'supply_drop' => {:dev_path => '../gems/supply_drop', :vendor_path => 'vendor/supply_drop'},
- 'certificate_authority' => {:dev_path => '../gems/certificate_authority', :vendor_path => 'vendor/certificate_authority'}
-}
+# #
+# # Specify support gems used that we might also develop locally.
+# #
+# # Available options:
+# #
+# # :dev_path - the development path of the gem. this path is used if running in 'development mode'.
+# #
+# # :vendor_path - where this gem is vendored. this path is used if it exists and we are running in 'production mode'
+# #
+# development_gems = {
+# 'supply_drop' => {:dev_path => '../gems/supply_drop', :vendor_path => 'vendor/supply_drop'},
+# 'certificate_authority' => {:dev_path => '../gems/certificate_authority', :vendor_path => 'vendor/certificate_authority'}
+# }
-#
-# A little bit of code to magically pick the correct gem
-#
+# #
+# # A little bit of code to magically pick the correct gem
+# #
-mode = :production
+# mode = :production
-gem_root = File.dirname(__FILE__)
-path_key = mode == :development ? :dev_path : :vendor_path
-development_gems.each do |gem_name, options|
- path = File.expand_path(options[path_key], gem_root)
- if File.directory?(path)
- gem gem_name, :path => path
- else
- gem gem_name
- end
-end
\ No newline at end of file
+# gem_root = File.dirname(__FILE__)
+# path_key = mode == :development ? :dev_path : :vendor_path
+# development_gems.each do |gem_name, options|
+# path = File.expand_path(options[path_key], gem_root)
+# if File.directory?(path)
+# gem gem_name, :path => path
+# else
+# gem gem_name
+# end
+# end
\ No newline at end of file
require "pty"
require "fileutils"
require "rake/testtask"
+require 'paint'
##
## HELPER
$base_dir = File.dirname(__FILE__)
$spec = eval(File.read(File.join($base_dir, $spec_path)))
$gem_path = File.join($base_dir, 'pkg', "#{$spec.name}-#{$spec.version}.gem")
-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 File.join([$base_dir, 'lib','leap_cli','load_paths'])
def built_gem_path
Dir[File.join($base_dir, "#{$spec.name}-*.gem")].sort_by{|f| File.mtime(f)}.last
#
require 'rubygems'
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 File.join(base_dir, 'lib','leap_cli','load_paths')
require 'leap_cli'
end
s.files += ["bin/leap"]
s.files += `find vendor -name '*.rb'`.split("\n")
s.files += `find vendor/vagrant_ssh_keys -name '*.pub' -o -name '*.key'`.split("\n")
- s.require_paths += LeapCli::REQUIRE_PATHS
+ s.require_paths += LeapCli::LOAD_PATHS
s.bindir = 'bin'
s.executables << 'leap'
##
# test
- s.add_development_dependency('rake')
+ s.add_development_dependency('rake', '>= 10.0.3')
s.add_development_dependency('minitest')
#s.add_development_dependency('rdoc')
#s.add_development_dependency('aruba')
require 'leap_cli/version.rb'
require 'leap_cli/requirements.rb'
+
require 'leap_cli/leapfile.rb'
require 'core_ext/hash'
require 'core_ext/boolean'
--- /dev/null
+#
+# Bundle and rubygems each have their own way of modifying $LOAD_PATH.
+#
+# We want to make sure that the right paths are loaded, including the
+# vendored gems, regardless of how leap is run.
+#
+#
+
+require File.expand_path('../version', __FILE__)
+
+base_leap_dir = File.expand_path('../../..', __FILE__)
+LeapCli::LOAD_PATHS.each do |path|
+ path = File.expand_path(path, base_leap_dir)
+ $LOAD_PATH.unshift(path) unless $LOAD_PATH.include?(path)
+end
\ No newline at end of file
VERSION = '0.1.6'
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', 'vendor/certificate_authority/lib']
+ LOAD_PATHS = ['lib', 'vendor/supply_drop/lib', 'vendor/certificate_authority/lib']
end
end
-$LOAD_PATH.unshift File.expand_path(File.dirname(__FILE__) + '/../lib')
require 'rubygems'
+require File.expand_path('../../lib/leap_cli/load_paths', __FILE__)
require 'minitest/autorun'
require 'leap_cli'
-require File.expand_path('test_helper', File.dirname(__FILE__))
+require File.expand_path('../test_helper', __FILE__)
class CommandLineTest < MiniTest::Unit::TestCase
-require File.dirname(__FILE__) + '/test_helper'
+require File.expand_path('../test_helper', __FILE__)
class ConfigObjectListTest < MiniTest::Unit::TestCase
-require File.expand_path('test_helper', File.dirname(__FILE__))
+require File.expand_path('../test_helper', __FILE__)
class ConfigObjectTest < MiniTest::Unit::TestCase
-require File.dirname(File.dirname(__FILE__)) + '/test_helper'
\ No newline at end of file
+require File.expand_path('../../test_helper', __FILE__)