markbates-gem_tools 0.1.0 → 0.1.1
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/bin/gemtools +59 -0
- metadata +5 -4
data/bin/gemtools
ADDED
@@ -0,0 +1,59 @@
|
|
1
|
+
#!/usr/bin/env ruby
|
2
|
+
#
|
3
|
+
# Created on 2008-8-2.
|
4
|
+
# Copyright (c) 2008. All rights reserved.
|
5
|
+
|
6
|
+
require 'optparse'
|
7
|
+
require File.dirname(__FILE__) + '/../lib/gem_tools'
|
8
|
+
|
9
|
+
begin
|
10
|
+
require 'rubygems'
|
11
|
+
rescue LoadError => e
|
12
|
+
puts e.to_s
|
13
|
+
puts "We can\"t install gems without rubygems"
|
14
|
+
exit 1
|
15
|
+
end
|
16
|
+
|
17
|
+
command = ARGV.first
|
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
|
+
setup
|
37
|
+
generate a started gems.yml
|
38
|
+
Options are:
|
39
|
+
BANNER
|
40
|
+
|
41
|
+
opts.separator ""
|
42
|
+
opts.on("-d", "--docs", String,
|
43
|
+
"Install the rdocs and ri during install",
|
44
|
+
"Default: off") { |opt| options[:docs] = opt }
|
45
|
+
opts.on("-f", "--force", String,
|
46
|
+
"Force the install of the gems",
|
47
|
+
"Default: off") { |opt| options[:force] = opt }
|
48
|
+
opts.on("-h", "--help",
|
49
|
+
"Show this help message") { puts opts; exit }
|
50
|
+
opts.parse!(ARGV)
|
51
|
+
|
52
|
+
if MANDATORY_OPTIONS && MANDATORY_OPTIONS.find { |option| options[option.to_sym].nil? }
|
53
|
+
puts opts; exit
|
54
|
+
end
|
55
|
+
|
56
|
+
OPTIONS = options
|
57
|
+
end.parse!
|
58
|
+
|
59
|
+
GemTools.run command
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: markbates-gem_tools
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Michael Moen
|
@@ -10,7 +10,7 @@ bindir: bin
|
|
10
10
|
cert_chain: []
|
11
11
|
|
12
12
|
date: 2009-02-02 00:00:00 -08:00
|
13
|
-
default_executable:
|
13
|
+
default_executable: gemtools
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|
16
16
|
name: markbates-yamler
|
@@ -23,8 +23,8 @@ dependencies:
|
|
23
23
|
version:
|
24
24
|
description: A lightweight tool to manage gems using a config file, similar to GemInstaller
|
25
25
|
email: michael@underpantsgnome.com
|
26
|
-
executables:
|
27
|
-
|
26
|
+
executables:
|
27
|
+
- gemtools
|
28
28
|
extensions: []
|
29
29
|
|
30
30
|
extra_rdoc_files:
|
@@ -33,6 +33,7 @@ files:
|
|
33
33
|
- lib/gem_tools/gem_tools.rb
|
34
34
|
- lib/gem_tools.rb
|
35
35
|
- README
|
36
|
+
- bin/gemtools
|
36
37
|
has_rdoc: true
|
37
38
|
homepage: http://underpantsgnome.rubyforge.org
|
38
39
|
post_install_message:
|