gem_tools 0.0.1 → 0.0.2
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/History.txt +4 -0
- data/README.txt +24 -24
- data/bin/gemtools +56 -0
- data/lib/gem_tools/version.rb +1 -1
- metadata +4 -3
data/History.txt
CHANGED
data/README.txt
CHANGED
@@ -1,17 +1,17 @@
|
|
1
|
-
|
1
|
+
= GemTools
|
2
2
|
|
3
3
|
http://github.com/UnderpantsGnome/gem_tools-gem/wikis
|
4
4
|
|
5
|
-
|
5
|
+
== DESCRIPTION:
|
6
6
|
|
7
7
|
The gem verison of my lightweight tool to manage gems using a config file,
|
8
8
|
similar to GemInstaller.
|
9
9
|
|
10
|
-
|
10
|
+
== FEATURES/PROBLEMS:
|
11
11
|
|
12
12
|
Doesn't yet work in Windows
|
13
13
|
|
14
|
-
|
14
|
+
== SYNOPSIS:
|
15
15
|
|
16
16
|
I use this to manage gem versions in my apps, it has a rake task to install gems
|
17
17
|
and a load utility to load them on startup.
|
@@ -31,47 +31,47 @@ GemTools.load_gems
|
|
31
31
|
The config file looks like
|
32
32
|
<pre><code>
|
33
33
|
# These are optional
|
34
|
-
|
34
|
+
source: http://local_mirror.example.com
|
35
35
|
gem_command: 'jruby -S gem'
|
36
|
-
|
37
|
-
-
|
38
|
-
|
36
|
+
gems:
|
37
|
+
- name: mongrel
|
38
|
+
version: "1.0"
|
39
39
|
# this gem has a specfic source URL
|
40
|
-
|
40
|
+
source: 'http://mongrel.rubyforge.org/releases'
|
41
41
|
|
42
|
-
-
|
43
|
-
|
42
|
+
- name: hpricot_scrub
|
43
|
+
version: '0.3.3'
|
44
44
|
# this tells us to load not just install
|
45
|
-
|
45
|
+
load: true
|
46
46
|
|
47
|
-
-
|
48
|
-
|
49
|
-
|
47
|
+
- name: postgres
|
48
|
+
version: '0.7.1'
|
49
|
+
load: true
|
50
50
|
# any extra config that needs to be passed to gem install
|
51
|
-
|
51
|
+
config: '--with-pgsql-include-dir=/usr/local/pgsql/include
|
52
52
|
--with-pgsql-lib-dir=/usr/local/pgsql/lib'
|
53
53
|
|
54
|
-
-
|
55
|
-
|
56
|
-
|
54
|
+
- name: rfeedparser_ictv
|
55
|
+
version: '0.9.932'
|
56
|
+
load: true
|
57
57
|
# this one has a different load name than the gem name (not a normal need)
|
58
|
-
|
58
|
+
require_name: 'rfeedparser'
|
59
59
|
</pre></code>
|
60
60
|
|
61
|
-
|
61
|
+
== REQUIREMENTS:
|
62
62
|
|
63
63
|
None
|
64
64
|
|
65
|
-
|
65
|
+
== INSTALL:
|
66
66
|
|
67
67
|
sudo gem install gem_tools
|
68
68
|
|
69
|
-
|
69
|
+
== TODO
|
70
70
|
|
71
71
|
* Write the tests/specs
|
72
72
|
* Make it work in Windows
|
73
73
|
|
74
|
-
|
74
|
+
== LICENSE:
|
75
75
|
|
76
76
|
(The MIT License)
|
77
77
|
|
data/bin/gemtools
ADDED
@@ -0,0 +1,56 @@
|
|
1
|
+
#!/usr/bin/env ruby
|
2
|
+
#
|
3
|
+
# Created on 2008-8-2.
|
4
|
+
# Copyright (c) 2008. All rights reserved.
|
5
|
+
|
6
|
+
require File.dirname(__FILE__) + '/../lib/gem_tools'
|
7
|
+
|
8
|
+
begin
|
9
|
+
require 'rubygems'
|
10
|
+
rescue LoadError
|
11
|
+
# no rubygems to load, so we fail silently
|
12
|
+
end
|
13
|
+
|
14
|
+
require 'optparse'
|
15
|
+
|
16
|
+
command = ARGV.first
|
17
|
+
|
18
|
+
OPTIONS = { }
|
19
|
+
MANDATORY_OPTIONS = %w( )
|
20
|
+
|
21
|
+
parser = OptionParser.new do |opts|
|
22
|
+
opts.banner = <<BANNER
|
23
|
+
GemTools can be used to make sure you have the propper gems and versions for
|
24
|
+
your app installed. It handles installing and loading gems during runtime.
|
25
|
+
|
26
|
+
Usage: #{File.basename($0)} command [options]
|
27
|
+
|
28
|
+
Commands are:
|
29
|
+
|
30
|
+
install
|
31
|
+
Install the gems in ./gems.yml or ./config/gems.yml
|
32
|
+
|
33
|
+
dryrun
|
34
|
+
Print out the commands that would have been run
|
35
|
+
|
36
|
+
Options are:
|
37
|
+
BANNER
|
38
|
+
opts.separator ""
|
39
|
+
opts.on("-d", "--docs", String,
|
40
|
+
"Install the rdocs and ri during install",
|
41
|
+
"Default: off") { |OPTIONS[:docs]| }
|
42
|
+
opts.on("-f", "--force", String,
|
43
|
+
"Force the install of the gems",
|
44
|
+
"Default: off") { |OPTIONS[:force]| }
|
45
|
+
opts.on("-h", "--help",
|
46
|
+
"Show this help message") { puts opts; exit }
|
47
|
+
opts.parse!(ARGV)
|
48
|
+
|
49
|
+
if MANDATORY_OPTIONS && MANDATORY_OPTIONS.find { |option| OPTIONS[option.to_sym].nil? }
|
50
|
+
puts opts; exit
|
51
|
+
end
|
52
|
+
OPTS = opts
|
53
|
+
end
|
54
|
+
|
55
|
+
# do stuff
|
56
|
+
GemTools.run command
|
data/lib/gem_tools/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: gem_tools
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Michael Moen
|
@@ -25,8 +25,8 @@ dependencies:
|
|
25
25
|
description: A lightweight tool to manage gems using a config file, similar to GemInstaller
|
26
26
|
email:
|
27
27
|
- michael@underpantsgnome.com
|
28
|
-
executables:
|
29
|
-
|
28
|
+
executables:
|
29
|
+
- gemtools
|
30
30
|
extensions: []
|
31
31
|
|
32
32
|
extra_rdoc_files:
|
@@ -41,6 +41,7 @@ files:
|
|
41
41
|
- README.txt
|
42
42
|
- lib/gem_tools.rb
|
43
43
|
- lib/gem_tools/version.rb
|
44
|
+
- bin/gemtools
|
44
45
|
has_rdoc: true
|
45
46
|
homepage: http://underpantsgnome.rubyforge.org
|
46
47
|
post_install_message: |
|