Narnach-gems 0.1.4 → 0.1.5
Sign up to get free protection for your applications and to get access to all the features.
- data/README.rdoc +23 -14
- data/bin/gems +1 -0
- data/gems.gemspec +1 -1
- data/lib/gems_parser.rb +6 -2
- metadata +1 -1
data/README.rdoc
CHANGED
@@ -5,6 +5,10 @@ Rails code would not get into dependency issues.
|
|
5
5
|
|
6
6
|
== Recent changes
|
7
7
|
|
8
|
+
=== Version 0.1.5
|
9
|
+
Gem import accepts 'current' as a special file name, which will use the output
|
10
|
+
of 'gem list' instead of a real file. This makes it easy to store the current gem configuration.
|
11
|
+
|
8
12
|
=== Version 0.1.4
|
9
13
|
It is now possible to add a list of gems to an existing project.
|
10
14
|
Changed internal storage format of ~/.gems.yml, which is auto-converted on use.
|
@@ -40,25 +44,30 @@ From the project root, use rake to install:
|
|
40
44
|
This will build the gem and install it for you.
|
41
45
|
|
42
46
|
== Usage
|
43
|
-
Output if 'gems help':
|
47
|
+
Output if 'gems help', with some changes to make them legible in RDoc:
|
44
48
|
Syntax:
|
45
|
-
gems
|
49
|
+
gems 'action' 'arguments'
|
46
50
|
|
47
51
|
Actions and arguments:
|
48
|
-
install
|
49
|
-
Install all gems in project
|
50
|
-
uninstall
|
51
|
-
Uninstall all gems in project
|
52
|
-
list
|
53
|
-
List all gems in project
|
54
|
-
import
|
55
|
-
Import all gems in
|
52
|
+
install 'name'
|
53
|
+
Install all gems in project 'name'.
|
54
|
+
uninstall 'name'
|
55
|
+
Uninstall all gems in project 'name'.
|
56
|
+
list 'name'
|
57
|
+
List all gems in project 'name'.
|
58
|
+
import 'name' 'file'
|
59
|
+
Import all gems in 'file' into project 'name'.
|
56
60
|
This will overwrite the gems currently in this project.
|
57
|
-
|
58
|
-
|
61
|
+
The special file 'current' will use the output of `gems list` instead of a file.
|
62
|
+
export 'name' 'file'
|
63
|
+
Export all gems in project 'name' to 'file'.
|
59
64
|
The file will be overwritten and can be parsed by the import action.
|
65
|
+
add 'name' 'file'
|
66
|
+
Add the gems 'file' to project 'name'.
|
60
67
|
projects
|
61
68
|
List all stored project names.
|
69
|
+
configure 'name' 'gem' [option1 option2 option3]
|
70
|
+
Configure a specific gem inside a project to use specific options when installing.
|
62
71
|
|
63
72
|
== Examples
|
64
73
|
To store your current gems as project 'dev', do the following:
|
@@ -71,7 +80,7 @@ To export project 'dev' to the file 'gems.dev', do the following:
|
|
71
80
|
gems export dev gems.dev
|
72
81
|
|
73
82
|
== About
|
74
|
-
Author:: Wes 'Narnach' Oldenbeuving (
|
75
|
-
Website:: http://
|
83
|
+
Author:: Wes 'Narnach' Oldenbeuving (http://github.com/Narnach)
|
84
|
+
Website:: http://github.com/Narnach/gems
|
76
85
|
Copyright:: Copyright (c) 2008 Wes Oldenbeuving
|
77
86
|
License:: MIT license. See MIT-LICENSE (in the gem directory) for license details.
|
data/bin/gems
CHANGED
@@ -50,6 +50,7 @@ Actions and arguments:
|
|
50
50
|
import <name> <file>
|
51
51
|
Import all gems in <file> into project <name>.
|
52
52
|
This will overwrite the gems currently in this project.
|
53
|
+
The special file 'current' will use the output of `gems list` instead of a file.
|
53
54
|
export <name> <file>
|
54
55
|
Export all gems in project <name> to <file>.
|
55
56
|
The file will be overwritten and can be parsed by the import action.
|
data/gems.gemspec
CHANGED
@@ -3,7 +3,7 @@ Gem::Specification.new do |s|
|
|
3
3
|
s.name = 'gems'
|
4
4
|
s.summary = "Gems is a simple tool to manage sets of RubyGems."
|
5
5
|
s.description = "Gems is a simple tool to manage sets of RubyGems. It can be used to install and uninstall large numbers of gems."
|
6
|
-
s.version = '0.1.
|
6
|
+
s.version = '0.1.5'
|
7
7
|
s.date = '2008-08-19'
|
8
8
|
s.platform = Gem::Platform::RUBY
|
9
9
|
s.authors = ["Wes Oldenbeuving"]
|
data/lib/gems_parser.rb
CHANGED
@@ -34,7 +34,11 @@ class GemsParser
|
|
34
34
|
end
|
35
35
|
|
36
36
|
def read_file
|
37
|
-
|
38
|
-
|
37
|
+
if file == 'current'
|
38
|
+
return `gem list`
|
39
|
+
else
|
40
|
+
raise 'File does not exist: "%s"' % file unless File.exist?(file)
|
41
|
+
return File.read(file)
|
42
|
+
end
|
39
43
|
end
|
40
44
|
end
|