gset 0.1.4
Sign up to get free protection for your applications and to get access to all the features.
- data/LICENSE +19 -0
- data/README.md +53 -0
- data/bin/gset +52 -0
- metadata +50 -0
data/LICENSE
ADDED
@@ -0,0 +1,19 @@
|
|
1
|
+
Copyright (c) 2012 Michel Martens
|
2
|
+
|
3
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
4
|
+
of this software and associated documentation files (the "Software"), to deal
|
5
|
+
in the Software without restriction, including without limitation the rights
|
6
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
7
|
+
copies of the Software, and to permit persons to whom the Software is
|
8
|
+
furnished to do so, subject to the following conditions:
|
9
|
+
|
10
|
+
The above copyright notice and this permission notice shall be included in
|
11
|
+
all copies or substantial portions of the Software.
|
12
|
+
|
13
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
14
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
15
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
16
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
17
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
18
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
19
|
+
THE SOFTWARE.
|
data/README.md
ADDED
@@ -0,0 +1,53 @@
|
|
1
|
+
# Make your life easier with gemsets
|
2
|
+
|
3
|
+
We have all become familiar with the concept of gemsets. They
|
4
|
+
come in different shapes and sizes, and provide isolation
|
5
|
+
for project dependencies. Some of the libraries that
|
6
|
+
implement gemsets are [rip](https://github.com/defunkt/rip),
|
7
|
+
[RVM](https://rvm.beginrescueend.com/gemsets/) and
|
8
|
+
[rbenv-gemset](https://github.com/jamis/rbenv-gemset).
|
9
|
+
|
10
|
+
This library recreates the absolutely minimal feature set for creating
|
11
|
+
and using gemsets.
|
12
|
+
|
13
|
+
## Introductory screencast
|
14
|
+
|
15
|
+
If you want to see this workflow in action, [check the introductory
|
16
|
+
video](http://vimeo.com/soveran/gs). The other tool showcased in the
|
17
|
+
screencast is [dep](http://twpil.github.com/dep/), a dependency
|
18
|
+
tracker.
|
19
|
+
|
20
|
+
## Usage
|
21
|
+
|
22
|
+
This library provides a command line application called `gs`. These
|
23
|
+
are the available options:
|
24
|
+
|
25
|
+
### gs init
|
26
|
+
|
27
|
+
Creates the $PWD/.gs directory.
|
28
|
+
|
29
|
+
### gs help
|
30
|
+
|
31
|
+
Displays the documentation.
|
32
|
+
|
33
|
+
### gs [command]
|
34
|
+
|
35
|
+
When called with no arguments, it starts a shell session and
|
36
|
+
configures the variables GEM_HOME, GEM_PATH and PATH to point to the
|
37
|
+
$PWD/.gs directory. In addition, it sets the GS_NAME variable with the
|
38
|
+
name of the current gemset (useful for PS1).
|
39
|
+
|
40
|
+
When called with arguments other than init or help, it will execute
|
41
|
+
command in a gs shell session and return to the parent session once
|
42
|
+
finished.
|
43
|
+
|
44
|
+
## Getting started
|
45
|
+
|
46
|
+
First, grab the gem:
|
47
|
+
|
48
|
+
$ gem install gs
|
49
|
+
|
50
|
+
Next, type `gs init` within your project and then just `gs` to start
|
51
|
+
the subshell. The environment variables used by RubyGems will now
|
52
|
+
point to the `.gs` directory, and every gem you install, every gem you
|
53
|
+
remove, will use that path.
|
data/bin/gset
ADDED
@@ -0,0 +1,52 @@
|
|
1
|
+
#!/usr/bin/env ruby
|
2
|
+
|
3
|
+
help = <<EOS
|
4
|
+
GSET(1)
|
5
|
+
|
6
|
+
NAME
|
7
|
+
gset -- Gemset management
|
8
|
+
|
9
|
+
SYNOPSIS
|
10
|
+
gset init
|
11
|
+
gset help
|
12
|
+
gset [command]
|
13
|
+
|
14
|
+
DESCRIPTION
|
15
|
+
When called with no arguments, it starts a shell session and
|
16
|
+
configures the variables GEM_HOME, GEM_PATH and PATH to point
|
17
|
+
to the $PWD/.gs directory. In addition, it sets the GS_NAME
|
18
|
+
variable with the name of the current gemset (useful for PS1).
|
19
|
+
|
20
|
+
init
|
21
|
+
Creates the $PWD/.gs directory.
|
22
|
+
|
23
|
+
help
|
24
|
+
Displays this message.
|
25
|
+
|
26
|
+
[command]
|
27
|
+
An optional command that will be executed under gset shell
|
28
|
+
session and return to the caller session once finished.
|
29
|
+
EOS
|
30
|
+
|
31
|
+
case ARGV[0]
|
32
|
+
when "init" then Dir.mkdir(".gs"); exec($0)
|
33
|
+
when "help" then puts help
|
34
|
+
else
|
35
|
+
if File.directory?(".gs")
|
36
|
+
pwd = Dir.pwd
|
37
|
+
env = ENV.to_hash
|
38
|
+
env["GS_NAME"] = File.basename(pwd)
|
39
|
+
env["GEM_HOME"] = pwd + "/.gs"
|
40
|
+
env["GEM_PATH"] = pwd + "/.gs:#{`gem env path`}"
|
41
|
+
env["PATH"] = pwd + "/.gs/bin:#{ENV['PATH']}"
|
42
|
+
|
43
|
+
if ARGV.length > 0
|
44
|
+
exec env, *ARGV
|
45
|
+
else
|
46
|
+
exec env, ENV["SHELL"]
|
47
|
+
end
|
48
|
+
else
|
49
|
+
puts "Directory .gs not found. Try `gset help`."
|
50
|
+
exit 1
|
51
|
+
end
|
52
|
+
end
|
metadata
ADDED
@@ -0,0 +1,50 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: gset
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 0.1.4
|
5
|
+
prerelease:
|
6
|
+
platform: ruby
|
7
|
+
authors:
|
8
|
+
- Michel Martens
|
9
|
+
autorequire:
|
10
|
+
bindir: bin
|
11
|
+
cert_chain: []
|
12
|
+
date: 2013-03-28 00:00:00.000000000 Z
|
13
|
+
dependencies: []
|
14
|
+
description: Gemset management
|
15
|
+
email:
|
16
|
+
- soveran@gmail.com
|
17
|
+
executables:
|
18
|
+
- gset
|
19
|
+
extensions: []
|
20
|
+
extra_rdoc_files: []
|
21
|
+
files:
|
22
|
+
- README.md
|
23
|
+
- LICENSE
|
24
|
+
- bin/gset
|
25
|
+
homepage: http://soveran.github.com/gs
|
26
|
+
licenses:
|
27
|
+
- MIT
|
28
|
+
post_install_message:
|
29
|
+
rdoc_options: []
|
30
|
+
require_paths:
|
31
|
+
- lib
|
32
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
33
|
+
none: false
|
34
|
+
requirements:
|
35
|
+
- - ! '>='
|
36
|
+
- !ruby/object:Gem::Version
|
37
|
+
version: '0'
|
38
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
39
|
+
none: false
|
40
|
+
requirements:
|
41
|
+
- - ! '>='
|
42
|
+
- !ruby/object:Gem::Version
|
43
|
+
version: '0'
|
44
|
+
requirements: []
|
45
|
+
rubyforge_project:
|
46
|
+
rubygems_version: 1.8.25
|
47
|
+
signing_key:
|
48
|
+
specification_version: 3
|
49
|
+
summary: Gemset management
|
50
|
+
test_files: []
|