astroboa-cli 0.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/.gitignore +5 -0
- data/CHANGELOG.rdoc +1 -0
- data/COPYING +675 -0
- data/COPYING.LESSER +166 -0
- data/Gemfile +4 -0
- data/LICENSE +47 -0
- data/README.md +185 -0
- data/Rakefile +1 -0
- data/astroboa-cli.gemspec +32 -0
- data/bin/astroboa-cli +18 -0
- data/lib/astroboa-cli/cli.rb +16 -0
- data/lib/astroboa-cli/command/base.rb +173 -0
- data/lib/astroboa-cli/command/help.rb +95 -0
- data/lib/astroboa-cli/command/model.rb +181 -0
- data/lib/astroboa-cli/command/repository.rb +443 -0
- data/lib/astroboa-cli/command/server.rb +651 -0
- data/lib/astroboa-cli/command/service.rb +224 -0
- data/lib/astroboa-cli/command/version.rb +21 -0
- data/lib/astroboa-cli/command.rb +158 -0
- data/lib/astroboa-cli/util.rb +594 -0
- data/lib/astroboa-cli/version.rb +3 -0
- data/lib/astroboa-cli.rb +9 -0
- data/test/features/astroboa-cli.feature +4 -0
- metadata +139 -0
data/COPYING.LESSER
ADDED
|
@@ -0,0 +1,166 @@
|
|
|
1
|
+
GNU LESSER GENERAL PUBLIC LICENSE
|
|
2
|
+
Version 3, 29 June 2007
|
|
3
|
+
|
|
4
|
+
Copyright (C) 2007 Free Software Foundation, Inc. <http://fsf.org/>
|
|
5
|
+
Everyone is permitted to copy and distribute verbatim copies
|
|
6
|
+
of this license document, but changing it is not allowed.
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
This version of the GNU Lesser General Public License incorporates
|
|
10
|
+
the terms and conditions of version 3 of the GNU General Public
|
|
11
|
+
License, supplemented by the additional permissions listed below.
|
|
12
|
+
|
|
13
|
+
0. Additional Definitions.
|
|
14
|
+
|
|
15
|
+
As used herein, "this License" refers to version 3 of the GNU Lesser
|
|
16
|
+
General Public License, and the "GNU GPL" refers to version 3 of the GNU
|
|
17
|
+
General Public License.
|
|
18
|
+
|
|
19
|
+
"The Library" refers to a covered work governed by this License,
|
|
20
|
+
other than an Application or a Combined Work as defined below.
|
|
21
|
+
|
|
22
|
+
An "Application" is any work that makes use of an interface provided
|
|
23
|
+
by the Library, but which is not otherwise based on the Library.
|
|
24
|
+
Defining a subclass of a class defined by the Library is deemed a mode
|
|
25
|
+
of using an interface provided by the Library.
|
|
26
|
+
|
|
27
|
+
A "Combined Work" is a work produced by combining or linking an
|
|
28
|
+
Application with the Library. The particular version of the Library
|
|
29
|
+
with which the Combined Work was made is also called the "Linked
|
|
30
|
+
Version".
|
|
31
|
+
|
|
32
|
+
The "Minimal Corresponding Source" for a Combined Work means the
|
|
33
|
+
Corresponding Source for the Combined Work, excluding any source code
|
|
34
|
+
for portions of the Combined Work that, considered in isolation, are
|
|
35
|
+
based on the Application, and not on the Linked Version.
|
|
36
|
+
|
|
37
|
+
The "Corresponding Application Code" for a Combined Work means the
|
|
38
|
+
object code and/or source code for the Application, including any data
|
|
39
|
+
and utility programs needed for reproducing the Combined Work from the
|
|
40
|
+
Application, but excluding the System Libraries of the Combined Work.
|
|
41
|
+
|
|
42
|
+
1. Exception to Section 3 of the GNU GPL.
|
|
43
|
+
|
|
44
|
+
You may convey a covered work under sections 3 and 4 of this License
|
|
45
|
+
without being bound by section 3 of the GNU GPL.
|
|
46
|
+
|
|
47
|
+
2. Conveying Modified Versions.
|
|
48
|
+
|
|
49
|
+
If you modify a copy of the Library, and, in your modifications, a
|
|
50
|
+
facility refers to a function or data to be supplied by an Application
|
|
51
|
+
that uses the facility (other than as an argument passed when the
|
|
52
|
+
facility is invoked), then you may convey a copy of the modified
|
|
53
|
+
version:
|
|
54
|
+
|
|
55
|
+
a) under this License, provided that you make a good faith effort to
|
|
56
|
+
ensure that, in the event an Application does not supply the
|
|
57
|
+
function or data, the facility still operates, and performs
|
|
58
|
+
whatever part of its purpose remains meaningful, or
|
|
59
|
+
|
|
60
|
+
b) under the GNU GPL, with none of the additional permissions of
|
|
61
|
+
this License applicable to that copy.
|
|
62
|
+
|
|
63
|
+
3. Object Code Incorporating Material from Library Header Files.
|
|
64
|
+
|
|
65
|
+
The object code form of an Application may incorporate material from
|
|
66
|
+
a header file that is part of the Library. You may convey such object
|
|
67
|
+
code under terms of your choice, provided that, if the incorporated
|
|
68
|
+
material is not limited to numerical parameters, data structure
|
|
69
|
+
layouts and accessors, or small macros, inline functions and templates
|
|
70
|
+
(ten or fewer lines in length), you do both of the following:
|
|
71
|
+
|
|
72
|
+
a) Give prominent notice with each copy of the object code that the
|
|
73
|
+
Library is used in it and that the Library and its use are
|
|
74
|
+
covered by this License.
|
|
75
|
+
|
|
76
|
+
b) Accompany the object code with a copy of the GNU GPL and this license
|
|
77
|
+
document.
|
|
78
|
+
|
|
79
|
+
4. Combined Works.
|
|
80
|
+
|
|
81
|
+
You may convey a Combined Work under terms of your choice that,
|
|
82
|
+
taken together, effectively do not restrict modification of the
|
|
83
|
+
portions of the Library contained in the Combined Work and reverse
|
|
84
|
+
engineering for debugging such modifications, if you also do each of
|
|
85
|
+
the following:
|
|
86
|
+
|
|
87
|
+
a) Give prominent notice with each copy of the Combined Work that
|
|
88
|
+
the Library is used in it and that the Library and its use are
|
|
89
|
+
covered by this License.
|
|
90
|
+
|
|
91
|
+
b) Accompany the Combined Work with a copy of the GNU GPL and this license
|
|
92
|
+
document.
|
|
93
|
+
|
|
94
|
+
c) For a Combined Work that displays copyright notices during
|
|
95
|
+
execution, include the copyright notice for the Library among
|
|
96
|
+
these notices, as well as a reference directing the user to the
|
|
97
|
+
copies of the GNU GPL and this license document.
|
|
98
|
+
|
|
99
|
+
d) Do one of the following:
|
|
100
|
+
|
|
101
|
+
0) Convey the Minimal Corresponding Source under the terms of this
|
|
102
|
+
License, and the Corresponding Application Code in a form
|
|
103
|
+
suitable for, and under terms that permit, the user to
|
|
104
|
+
recombine or relink the Application with a modified version of
|
|
105
|
+
the Linked Version to produce a modified Combined Work, in the
|
|
106
|
+
manner specified by section 6 of the GNU GPL for conveying
|
|
107
|
+
Corresponding Source.
|
|
108
|
+
|
|
109
|
+
1) Use a suitable shared library mechanism for linking with the
|
|
110
|
+
Library. A suitable mechanism is one that (a) uses at run time
|
|
111
|
+
a copy of the Library already present on the user's computer
|
|
112
|
+
system, and (b) will operate properly with a modified version
|
|
113
|
+
of the Library that is interface-compatible with the Linked
|
|
114
|
+
Version.
|
|
115
|
+
|
|
116
|
+
e) Provide Installation Information, but only if you would otherwise
|
|
117
|
+
be required to provide such information under section 6 of the
|
|
118
|
+
GNU GPL, and only to the extent that such information is
|
|
119
|
+
necessary to install and execute a modified version of the
|
|
120
|
+
Combined Work produced by recombining or relinking the
|
|
121
|
+
Application with a modified version of the Linked Version. (If
|
|
122
|
+
you use option 4d0, the Installation Information must accompany
|
|
123
|
+
the Minimal Corresponding Source and Corresponding Application
|
|
124
|
+
Code. If you use option 4d1, you must provide the Installation
|
|
125
|
+
Information in the manner specified by section 6 of the GNU GPL
|
|
126
|
+
for conveying Corresponding Source.)
|
|
127
|
+
|
|
128
|
+
5. Combined Libraries.
|
|
129
|
+
|
|
130
|
+
You may place library facilities that are a work based on the
|
|
131
|
+
Library side by side in a single library together with other library
|
|
132
|
+
facilities that are not Applications and are not covered by this
|
|
133
|
+
License, and convey such a combined library under terms of your
|
|
134
|
+
choice, if you do both of the following:
|
|
135
|
+
|
|
136
|
+
a) Accompany the combined library with a copy of the same work based
|
|
137
|
+
on the Library, uncombined with any other library facilities,
|
|
138
|
+
conveyed under the terms of this License.
|
|
139
|
+
|
|
140
|
+
b) Give prominent notice with the combined library that part of it
|
|
141
|
+
is a work based on the Library, and explaining where to find the
|
|
142
|
+
accompanying uncombined form of the same work.
|
|
143
|
+
|
|
144
|
+
6. Revised Versions of the GNU Lesser General Public License.
|
|
145
|
+
|
|
146
|
+
The Free Software Foundation may publish revised and/or new versions
|
|
147
|
+
of the GNU Lesser General Public License from time to time. Such new
|
|
148
|
+
versions will be similar in spirit to the present version, but may
|
|
149
|
+
differ in detail to address new problems or concerns.
|
|
150
|
+
|
|
151
|
+
Each version is given a distinguishing version number. If the
|
|
152
|
+
Library as you received it specifies that a certain numbered version
|
|
153
|
+
of the GNU Lesser General Public License "or any later version"
|
|
154
|
+
applies to it, you have the option of following the terms and
|
|
155
|
+
conditions either of that published version or of any later version
|
|
156
|
+
published by the Free Software Foundation. If the Library as you
|
|
157
|
+
received it does not specify a version number of the GNU Lesser
|
|
158
|
+
General Public License, you may choose any version of the GNU Lesser
|
|
159
|
+
General Public License ever published by the Free Software Foundation.
|
|
160
|
+
|
|
161
|
+
If the Library as you received it specifies that a proxy can decide
|
|
162
|
+
whether future versions of the GNU Lesser General Public License shall
|
|
163
|
+
apply, that proxy's public statement of acceptance of any version is
|
|
164
|
+
permanent authorization for you to choose that version for the
|
|
165
|
+
Library.
|
|
166
|
+
|
data/Gemfile
ADDED
data/LICENSE
ADDED
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
Copyright © 2005-2012 BetaCONCEPT Limited, Ireland.
|
|
2
|
+
|
|
3
|
+
Astroboa CLI (Command Line Interface) is free software: you can redistribute it and/or modify
|
|
4
|
+
it under the terms of the GNU Lesser General Public License as published by
|
|
5
|
+
the Free Software Foundation, either version 3 of the License, or
|
|
6
|
+
(at your option) any later version.
|
|
7
|
+
|
|
8
|
+
Astroboa CLI is distributed in the hope that it will be useful,
|
|
9
|
+
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
10
|
+
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE or NONINFRINGEMENT.
|
|
11
|
+
IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
|
12
|
+
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
|
13
|
+
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
|
14
|
+
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
|
15
|
+
|
|
16
|
+
The included files named COPYING and COPYING.LESSER contain the full text
|
|
17
|
+
of the GNU and the GNU Lesser General Public License respectively.
|
|
18
|
+
Please read them in order to know the full details of Astroboa CLI License Terms.
|
|
19
|
+
|
|
20
|
+
--------------------------------------------------------------
|
|
21
|
+
Astroboa CLI has been inspired by the design of Heroku client
|
|
22
|
+
and contains some adapted code (mainly in the base.rb and command.rb files)
|
|
23
|
+
The contained / adapted Heroku Client code is covered by the following copyright
|
|
24
|
+
and permission notice:
|
|
25
|
+
|
|
26
|
+
The MIT License (MIT)
|
|
27
|
+
|
|
28
|
+
Copyright © Heroku 2008 - 2012
|
|
29
|
+
|
|
30
|
+
Permission is hereby granted, free of charge, to any person obtaining
|
|
31
|
+
a copy of this software and associated documentation files (the
|
|
32
|
+
"Software"), to deal in the Software without restriction, including
|
|
33
|
+
without limitation the rights to use, copy, modify, merge, publish,
|
|
34
|
+
distribute, sublicense, and/or sell copies of the Software, and to
|
|
35
|
+
permit persons to whom the Software is furnished to do so, subject to
|
|
36
|
+
the following conditions:
|
|
37
|
+
|
|
38
|
+
The above copyright notice and this permission notice shall be
|
|
39
|
+
included in all copies or substantial portions of the Software.
|
|
40
|
+
|
|
41
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
|
42
|
+
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
|
43
|
+
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
|
|
44
|
+
IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
|
|
45
|
+
CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
|
|
46
|
+
TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
|
|
47
|
+
SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
data/README.md
ADDED
|
@@ -0,0 +1,185 @@
|
|
|
1
|
+
# astroboa-cli
|
|
2
|
+
|
|
3
|
+
The astroboa-cli gem provides a command line interface to astroboa platform and astroboa apps management.
|
|
4
|
+
|
|
5
|
+
It has easy to use commands for installing astroboa platform, creating new repositories, taking backups and deploying your ruby apps directly to astroboa.
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
## Prerequisites
|
|
9
|
+
* Linux or MAC OS X operating system. Windows is not yet supported
|
|
10
|
+
|
|
11
|
+
* OPTIONAL BUILD TOOLS: In MAC OS X is strongly recommended to install 'brew' package manager as well as XCODE and XCODE command line tools in order to be able to compile new packages and ruby native extensions.
|
|
12
|
+
|
|
13
|
+
* Java 1.6.x is required for running astroboa server.
|
|
14
|
+
* If you consider a production system use **Sun/Oracle JDK**. For testing/development **OpenJDK** can be ok but we have not exhaustively tested it.
|
|
15
|
+
* On **MAC OS X up to Lion** java 1.6 is pre-installed. On Mountain Lion (even in upgrades) java is not installed.
|
|
16
|
+
To install java 1.6 on **Mountain Lion** open a terminal and run: `java -version`. A window will pop-up prompting you to: 'install Java SE in order to open "java"', click "Install" to get the latest version.
|
|
17
|
+
* On **Ubuntu Linux** there might be a problem to find packages for java 6 due to new Oracle licencing terms.
|
|
18
|
+
So either install the OpenJDK package or check https://github.com/flexiondotorg/oab-java6 to find how to create a local `apt` repository for Sun Java 6
|
|
19
|
+
|
|
20
|
+
* Ruby 1.9.x is required for installing/running `astroboa-cli` itself.
|
|
21
|
+
If you need to install or upgrade your ruby read the following section on 'how to install ruby'.
|
|
22
|
+
|
|
23
|
+
* libxml2 and libxslt.
|
|
24
|
+
astroboa-cli uses `nokogiri` gem which depends on `libxml2` and `libxslt`.
|
|
25
|
+
* On **MAC OS X** you do not need to install anything if you already have installed the latest XCODE (this needs some verification)
|
|
26
|
+
* On **Ubuntu Linux** run: `sudo apt-get install libxslt-dev libxml2-dev`.
|
|
27
|
+
For more info on how to install libxml2 and libxslt on different linux distros or mac os x read http://nokogiri.org/tutorials/installing_nokogiri.html
|
|
28
|
+
|
|
29
|
+
* OPTIONAL Postgres Gem:
|
|
30
|
+
You should manually install `pg` gem if you want to install/setup astroboa to work with postgres database.
|
|
31
|
+
If you do not specify a database during astroboa installation then `derby db` is used which is the best option for testing and development.
|
|
32
|
+
If you are ok with derby db then you do not need to install the 'pg' gem.
|
|
33
|
+
If you want to set up a production environment then choose postgres db during astroboa installation.
|
|
34
|
+
In this case you should first manually install the 'pg' gem.
|
|
35
|
+
astroboa-cli gem does not automatically install 'pg' gem since in some environments (e.g. MAC OS X) this might require to have a local postgres already installed which in turn is too much if you do not care about postgres.
|
|
36
|
+
|
|
37
|
+
* In **Ubuntu Linux** run first `sudo apt-get install libpq-dev` and then run `gem install pg`.
|
|
38
|
+
* For **MAC OS X** read http://deveiate.org/code/pg/README-OS_X_rdoc.html to learn how to install the `pg` gem.
|
|
39
|
+
|
|
40
|
+
|
|
41
|
+
## Install astroboa-cli gem in your ruby environment
|
|
42
|
+
|
|
43
|
+
After you have checked that prerequisites are met run at the command prompt:
|
|
44
|
+
|
|
45
|
+
$ gem install astroboa-cli
|
|
46
|
+
|
|
47
|
+
To see the available commands:
|
|
48
|
+
|
|
49
|
+
$ astroboa-cli help
|
|
50
|
+
|
|
51
|
+
To get help for a particular command:
|
|
52
|
+
|
|
53
|
+
$ astroboa-cli help <command>
|
|
54
|
+
|
|
55
|
+
e.g. astroboa-cli help server
|
|
56
|
+
|
|
57
|
+
To get help for a particular subcommand:
|
|
58
|
+
|
|
59
|
+
$ astroboa-cli help <command:subcommand>
|
|
60
|
+
|
|
61
|
+
e.g. `$ astroboa-cli help server:install`
|
|
62
|
+
|
|
63
|
+
|
|
64
|
+
### NOTE on running astroboa-cli with sudo:
|
|
65
|
+
If you use astroboa-cli in LINUX then server installation/running and repository installation/removal always require sudo privileges because astroboa is installed and runs as user 'astroboa'.
|
|
66
|
+
In MAC OS X no special user is created and thus sudo privileges are only required if you want to install astroboa to a directory that you do not own.
|
|
67
|
+
astroboa-cli checks the required privileges for each command and will produce an error message if not met.
|
|
68
|
+
If your ruby is installed with `rbenv` then **you need to also install** the `rbenv-sudo` plugin to overcome the problem of using rbenv installed rubies with sudo.
|
|
69
|
+
With `rbenv-sudo` installed you can install astroboa with the following command:
|
|
70
|
+
|
|
71
|
+
$ rbenv sudo astroboa-cli server:install
|
|
72
|
+
|
|
73
|
+
*Check the instructions that follow to learn how to install rbenv-sudo*
|
|
74
|
+
|
|
75
|
+
|
|
76
|
+
|
|
77
|
+
# How to install ruby
|
|
78
|
+
|
|
79
|
+
astroboa-cli requires ruby version 1.9.x.
|
|
80
|
+
If you do not have ruby already installed or your operating system comes with an older version, here is some quick info on two easy ways to install and maintain your ruby environment.
|
|
81
|
+
|
|
82
|
+
You can easily install ruby with `rbenv` or `rvm` utility programs.
|
|
83
|
+
|
|
84
|
+
## Install Ruby with RBENV
|
|
85
|
+
|
|
86
|
+
We recommend to install ruby using the `rbenv` and `ruby-build` utility commands.
|
|
87
|
+
|
|
88
|
+
---
|
|
89
|
+
On **Mac OS X** to install `rbenv` and `ruby-build` using the [Homebrew](http://mxcl.github.com/homebrew/) package manager do:
|
|
90
|
+
|
|
91
|
+
$ brew update
|
|
92
|
+
$ brew install rbenv
|
|
93
|
+
$ brew install ruby-build
|
|
94
|
+
|
|
95
|
+
Then add the following line in your .bash_profile:
|
|
96
|
+
$ echo 'if which rbenv > /dev/null; then eval "$(rbenv init -)"; fi' >> ~/.bash_profile
|
|
97
|
+
|
|
98
|
+
|
|
99
|
+
---
|
|
100
|
+
On **Ubuntu Linux** to install `rbenv` and `ruby-build` using `apt` package manager and `git` do (it has been tested in Ubuntu 12.04):
|
|
101
|
+
|
|
102
|
+
$ sudo apt-get install zlib1g-dev openssl libopenssl-ruby1.9.1 libssl-dev libruby1.9.1 libreadline-dev git-core
|
|
103
|
+
$ cd
|
|
104
|
+
$ git clone git://github.com/sstephenson/rbenv.git .rbenv
|
|
105
|
+
|
|
106
|
+
|
|
107
|
+
To make available `rbenv` commands to your shell add the following path to your `.bashrc`:
|
|
108
|
+
|
|
109
|
+
$ echo 'export PATH="$HOME/.rbenv/bin:$PATH"' >> ~/.bashrc
|
|
110
|
+
|
|
111
|
+
To get automatic initialization of `rbenv` add the following line in your `.bashrc`:
|
|
112
|
+
|
|
113
|
+
$ echo 'if which rbenv > /dev/null; then eval "$(rbenv init -)"; fi' >> ~/.bashrc
|
|
114
|
+
|
|
115
|
+
Then install ruby-build:
|
|
116
|
+
|
|
117
|
+
$ mkdir -p ~/.rbenv/plugins
|
|
118
|
+
$ cd ~/.rbenv/plugins
|
|
119
|
+
$ git clone git://github.com/sstephenson/ruby-build.git
|
|
120
|
+
|
|
121
|
+
---
|
|
122
|
+
|
|
123
|
+
**The folllowing instructions are the same for both MAC and Linux:**
|
|
124
|
+
|
|
125
|
+
To use `sudo` to run astroboa-cli (and any other ruby-based program) you should also install `rbenv-sudo`.
|
|
126
|
+
`rbenv` does not work with `sudo` due to sudo's 'secure_path' restriction.
|
|
127
|
+
`rbenv-sudo` is a plugin for `rbenv` that allows you to run rbenv-provided Rubies and Gems from within a sudo session.
|
|
128
|
+
|
|
129
|
+
$ git clone git://github.com/dcarley/rbenv-sudo.git ~/.rbenv/plugins/rbenv-sudo
|
|
130
|
+
|
|
131
|
+
After you have installed `rbenv`, `ruby-build` and optionally `rbenv-sudo` as described above do the following:
|
|
132
|
+
|
|
133
|
+
Restart your shell to apply the changes in your bashrc or bash_profile
|
|
134
|
+
|
|
135
|
+
$ exec $SHELL
|
|
136
|
+
|
|
137
|
+
To install ruby version 1.9.3-p194 do:
|
|
138
|
+
|
|
139
|
+
$ rbenv install 1.9.3-p194
|
|
140
|
+
$ rbenv rehash
|
|
141
|
+
|
|
142
|
+
|
|
143
|
+
*NOTE:* You should run `rbenv rehash` any time you install a new Ruby binary (for example, when installing a new Ruby version, or when installing a gem that provides a binary). So you should run `rbenv rehash` after you install astroboa-cli.
|
|
144
|
+
|
|
145
|
+
To set the global version of Ruby to be used in all your shells do:
|
|
146
|
+
|
|
147
|
+
$ rbenv global 1.9.3-p194
|
|
148
|
+
|
|
149
|
+
To set ruby 1.9.3-p194 as a local per-project ruby version by writing the version name to an .rbenv-version file in the current project directory do:
|
|
150
|
+
|
|
151
|
+
$ rbenv local 1.9.3-p194
|
|
152
|
+
|
|
153
|
+
To set ruby 1.9.3-p194 as the version to be used only in the current shell (sets the RBENV_VERSION environment variable in your shell) do:
|
|
154
|
+
|
|
155
|
+
$ rbenv shell 1.9.3-p194
|
|
156
|
+
|
|
157
|
+
Test your ruby installation:
|
|
158
|
+
|
|
159
|
+
$ rbenv global 1.9.3-p194
|
|
160
|
+
$ ruby -v
|
|
161
|
+
|
|
162
|
+
On MAC you will get output similar to this: ruby 1.9.3p194 (2012-04-20 revision 35410) [x86_64-darwin12.0.0]
|
|
163
|
+
|
|
164
|
+
For more information about `rbenv`, `ruby-build` and `rbenv-sudo` check https://github.com/sstephenson/rbenv, https://github.com/sstephenson/ruby-build and https://github.com/dcarley/rbenv-sudo
|
|
165
|
+
|
|
166
|
+
|
|
167
|
+
## Install Ruby with RVM
|
|
168
|
+
|
|
169
|
+
If you prefer to use 'rvm' as your ruby management utility use the following command to install it for a single user:
|
|
170
|
+
|
|
171
|
+
$ curl -L get.rvm.io | bash -s stable
|
|
172
|
+
|
|
173
|
+
For multi-user installation and detailed rvm installation instructions check: https://rvm.io/rvm/install/
|
|
174
|
+
|
|
175
|
+
After 'rvm' has been installed run the following commands to install ruby 1.9.3-p194:
|
|
176
|
+
|
|
177
|
+
$ rvm install 1.9.3-p194
|
|
178
|
+
$ rvm use 1.9.3-p194
|
|
179
|
+
|
|
180
|
+
# LICENSE
|
|
181
|
+
-------
|
|
182
|
+
Released under the LGPL license; see the files LICENSE, COPYING and COPYING.LESSER.
|
|
183
|
+
|
|
184
|
+
|
|
185
|
+
|
data/Rakefile
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
require "bundler/gem_tasks"
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
# -*- encoding: utf-8 -*-
|
|
2
|
+
$:.push File.expand_path("../lib", __FILE__)
|
|
3
|
+
require "astroboa-cli/version"
|
|
4
|
+
|
|
5
|
+
Gem::Specification.new do |s|
|
|
6
|
+
s.name = "astroboa-cli"
|
|
7
|
+
s.version = AstroboaCLI::VERSION
|
|
8
|
+
s.platform = Gem::Platform::RUBY
|
|
9
|
+
s.authors = ["BETACONCEPT","Gregory Chomatas"]
|
|
10
|
+
s.email = ["support@betaconcept.com"]
|
|
11
|
+
s.homepage = "http://www.astroboa.org"
|
|
12
|
+
s.date = Date.today.to_s
|
|
13
|
+
s.summary = %q{Astroboa Command Line Interface for astroboa platform and astroboa apps management.}
|
|
14
|
+
s.description = %q{astroboa-cli provides commands for installing astroboa platform, creating repositories, taking backups, deploying applications to astroboa, etc.}
|
|
15
|
+
s.license = "LGPL"
|
|
16
|
+
s.post_install_message = <<-MESSAGE
|
|
17
|
+
* run 'astroboa-cli help' to see the available commands
|
|
18
|
+
MESSAGE
|
|
19
|
+
|
|
20
|
+
s.rubyforge_project = "astroboa-cli"
|
|
21
|
+
|
|
22
|
+
s.files = `git ls-files`.split("\n")
|
|
23
|
+
s.test_files = `git ls-files -- {test,spec,features}/*`.split("\n")
|
|
24
|
+
s.executables = `git ls-files -- bin/*`.split("\n").map{ |f| File.basename(f) }
|
|
25
|
+
|
|
26
|
+
s.require_paths = ["lib"]
|
|
27
|
+
s.add_runtime_dependency 'progressbar'
|
|
28
|
+
s.add_runtime_dependency 'rubyzip'
|
|
29
|
+
s.add_runtime_dependency 'erubis'
|
|
30
|
+
s.add_runtime_dependency 'nokogiri', '>= 1.5.5'
|
|
31
|
+
s.executables = ["astroboa-cli"]
|
|
32
|
+
end
|
data/bin/astroboa-cli
ADDED
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
#!/usr/bin/env ruby
|
|
2
|
+
# encoding: UTF-8
|
|
3
|
+
|
|
4
|
+
begin
|
|
5
|
+
require "pathname"
|
|
6
|
+
bin_file = Pathname.new(__FILE__).realpath
|
|
7
|
+
|
|
8
|
+
# add lib to libpath so we can run tests without
|
|
9
|
+
# building the gem
|
|
10
|
+
$:.unshift File.expand_path("../../lib", bin_file)
|
|
11
|
+
|
|
12
|
+
# start up the CLI
|
|
13
|
+
require "astroboa-cli/cli"
|
|
14
|
+
AstroboaCLI::CLI.start(*ARGV)
|
|
15
|
+
rescue Interrupt
|
|
16
|
+
`stty icanon echo`
|
|
17
|
+
puts("\n ! Command #{AstroboaCLI::Command.current_command} cancelled.")
|
|
18
|
+
end
|