summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--README.md93
-rw-r--r--lib/leap_cli/log.rb3
-rw-r--r--lib/leap_cli/version.rb2
3 files changed, 33 insertions, 65 deletions
diff --git a/README.md b/README.md
index ca51796..b543a88 100644
--- a/README.md
+++ b/README.md
@@ -1,7 +1,7 @@
About LEAP command line interface
===================================================
-This gem installs an executable 'leap' that allows you to manage servers using the LEAP platform. You can read about the [platform on-line](https://leap.se).
+This gem installs an executable 'leap' that allows you to manage servers using the LEAP platform. You can read about the [platform on-line](https://leap.se/docs).
Installation
===================================================
@@ -16,31 +16,18 @@ Optionally install Vagrant in order to be able to test with local virtual machin
sudo apt-get install vagrant virtualbox zlib1g-dev
-NOTE: the packaged virtualbox and vagrant that comes with Debian and Ubuntu are rather ancient. Most people have better luck by downloading these packages from the upstream:
+Install the `leap` command system-wide:
-* https://downloads.vagrantup.com/
-* https://www.virtualbox.org/wiki/Downloads
+ sudo gem install leap_cli
-Install the `leap` command:
+Alternately, you can install just for your user:
- sudo apt-get install rake
- git clone https://leap.se/git/leap_cli.git
- cd leap_cli
- rake build
-
-Install as root user (recommended):
-
- sudo rake install
-
-Install as unprivileged user:
-
- rake install
- # watch out for the directory leap is installed to, then i.e.
- sudo ln -s ~/.gem/ruby/1.9.1/bin/leap /usr/local/bin/leap
+ gem install --user-install leap_cli
+ [ $(which ruby) ] && PATH="$PATH:$(ruby -e 'puts Gem.user_dir')/bin"
-With both methods, you can use now /usr/local/bin/leap, which in most cases will be in your $PATH.
+The `--user-install` option for `gem` will install gems to a location in your home directory (handy!) but this directory is not in your PATH (not handy!). Add the second line to your `.bashrc` file so that all your shells will have `leap` in PATH.
-To run directly from a clone of the git repo, see "Development", below.
+For other methods of installing `leap_cli`, see below.
Usage
===================================================
@@ -56,35 +43,42 @@ How to set up your environment for developing the ``leap`` command.
Prerequisites
---------------------------------------------------
-Debian Squeeze
-
- sudo apt-get install git ruby ruby-dev rubygems
- sudo gem install bundler rake
- export PATH=$PATH:/var/lib/gems/1.8/bin
+Debian & Ubuntu
-Debian Wheezy
+ sudo apt-get install git ruby ruby-dev rake bundler
- sudo apt-get install git ruby ruby-dev bundler
+Install from git
+---------------------------------------------------
-Ubuntu
+Download the source:
- sudo apt-get install git ruby ruby-dev
- sudo gem install bundler
+ cd leap_cli
-Install from git
+Installing from the source
---------------------------------------------------
-Download the source:
+Build the gem:
- git clone https://github.com/leapcode/leap_cli.git
+ git clone https://leap.se/git/leap_cli.git
cd leap_cli
+ rake build
+
+Install as root user:
+
+ sudo rake install
+
+Alternately, install as unprivileged user:
+
+ rake install
+ PATH="$PATH:$(ruby -e 'puts Gem.user_dir')/bin"
-Running from the source directory
+Running directly from the source directory
---------------------------------------------------
To run the ``leap`` command directly from the source tree, you need to install
the required gems using ``bundle`` and symlink ``bin/leap`` into your path:
+ git clone https://leap.se/git/leap_cli.git
cd leap_cli
bundle # install required gems
ln -s `pwd`/bin/leap ~/bin # link executable somewhere in your bin path
@@ -99,32 +93,3 @@ working directory is under leap_cli. Because the point is to be able to run ``le
other places, it is easier to create the symlink. If you run ``leap`` directly, and not via
the command launcher that rubygems installs, leap will run in a mode that simulates
``bundle exec leap`` (i.e. only gems included in Gemfile are allowed to be loaded).
-
-Changes
-====================================================
-
-1.7
-
-* requires platform 0.7
-* deployment logging (see /var/log/leap)
-* compatible with new tapicero
-* selectively destroy some dbs with `leap db destroy`
-* faster apt-get update
-* added `leap scp` command
-* bug fixes
-
-1.6.2
-
-* auto generate certs on compile
-* use internal ruby md5sum for compatibility on mac
-* may override or customize tests by putting tests in `files/tests`
-* bug fixes
-
-1.6.1
-
-* requires platform 0.6
-* better `leap test run`
-* added `leap tunnel` command
-* only print stack trace if `--debug` flag was specified
-* prompt user to upgrade host ssh key if a better one exists
-* bug fixes
diff --git a/lib/leap_cli/log.rb b/lib/leap_cli/log.rb
index fe9e1b7..af2fae7 100644
--- a/lib/leap_cli/log.rb
+++ b/lib/leap_cli/log.rb
@@ -131,6 +131,9 @@ module LeapCli
#
# set line prefix
#
+ if (host)
+ host = host.split('.').first
+ end
prefix = prefix_str(host, title)
#
diff --git a/lib/leap_cli/version.rb b/lib/leap_cli/version.rb
index 779aa25..bb8bbaf 100644
--- a/lib/leap_cli/version.rb
+++ b/lib/leap_cli/version.rb
@@ -1,7 +1,7 @@
module LeapCli
unless defined?(LeapCli::VERSION)
VERSION = '1.9'
- COMPATIBLE_PLATFORM_VERSION = '0.8'..'0.99'
+ COMPATIBLE_PLATFORM_VERSION = '0.9'..'0.99'
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.'
LOAD_PATHS = ['lib',