the_heist 0.0.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/LICENSE +29 -0
- data/README.md +50 -0
- data/bin/heist +6 -0
- data/lib/heist/main.rb +43 -0
- data/lib/heist/version.rb +7 -0
- data/lib/heist.rb +6 -0
- metadata +73 -0
data/LICENSE
ADDED
@@ -0,0 +1,29 @@
|
|
1
|
+
Copyright 2011 Jerry Chen. All rights reserved.
|
2
|
+
|
3
|
+
Redistribution and use in source and binary forms, with or without
|
4
|
+
modification, are permitted provided that the following conditions are
|
5
|
+
met:
|
6
|
+
|
7
|
+
1. Redistributions of source code must retain the above copyright
|
8
|
+
notice, this list of conditions and the following disclaimer.
|
9
|
+
|
10
|
+
2. Redistributions in binary form must reproduce the above
|
11
|
+
copyright notice, this list of conditions and the following
|
12
|
+
disclaimer in the documentation and/or other materials provided
|
13
|
+
with the distribution.
|
14
|
+
|
15
|
+
THIS SOFTWARE IS PROVIDED BY JERRY CHEN ``AS IS'' AND ANY EXPRESS OR
|
16
|
+
IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
|
17
|
+
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
18
|
+
DISCLAIMED. IN NO EVENT SHALL JERRY CHEN OR CONTRIBUTORS BE LIABLE FOR
|
19
|
+
ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
20
|
+
DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE
|
21
|
+
GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
|
22
|
+
INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER
|
23
|
+
IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
|
24
|
+
OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
|
25
|
+
ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
26
|
+
|
27
|
+
The views and conclusions contained in the software and documentation
|
28
|
+
are those of the authors and should not be interpreted as representing
|
29
|
+
official policies, either expressed or implied, of Jerry Chen.
|
data/README.md
ADDED
@@ -0,0 +1,50 @@
|
|
1
|
+
|
2
|
+
The Heist
|
3
|
+
=========
|
4
|
+
|
5
|
+
Take the output of `gem list` and generate installation commands.
|
6
|
+
|
7
|
+
What Kind of Gem Includes A Definitive Article?
|
8
|
+
===============================================
|
9
|
+
|
10
|
+
But the gem name `heist` was already taken!
|
11
|
+
|
12
|
+
Installation
|
13
|
+
============
|
14
|
+
|
15
|
+
$ gem install the_heist
|
16
|
+
|
17
|
+
Usage
|
18
|
+
=====
|
19
|
+
|
20
|
+
Example gem list:
|
21
|
+
|
22
|
+
$ gem list
|
23
|
+
|
24
|
+
*** LOCAL GEMS ***
|
25
|
+
|
26
|
+
redis (2.0.6, 2.0.5, 1.0.7)
|
27
|
+
redis-namespace (0.8.0, 0.7.0)
|
28
|
+
|
29
|
+
Now pull off the heist!
|
30
|
+
|
31
|
+
$ gem list | heist
|
32
|
+
gem install redis --version=1.0.7 --no-ri --no-rdoc
|
33
|
+
gem install redis --version=2.0.5 --no-ri --no-rdoc
|
34
|
+
gem install redis --version=2.0.6 --no-ri --no-rdoc
|
35
|
+
gem install redis-namespace --version=0.7.0 --no-ri --no-rdoc
|
36
|
+
gem install redis-namespace --version=0.8.0 --no-ri --no-rdoc
|
37
|
+
|
38
|
+
Apologies
|
39
|
+
=========
|
40
|
+
|
41
|
+
There is probably a better way to do this.
|
42
|
+
|
43
|
+
Known Side Effects
|
44
|
+
==================
|
45
|
+
|
46
|
+
Coughing, wheezing, sneezing, itching, runny nose, loss of appetite, dabbling in Clojure.
|
47
|
+
|
48
|
+
Suppresses ri/rdoc by default.
|
49
|
+
|
50
|
+
It is likely that gem dependencies will lop on more gem versions than the explicitly designated ones.
|
data/bin/heist
ADDED
data/lib/heist/main.rb
ADDED
@@ -0,0 +1,43 @@
|
|
1
|
+
#
|
2
|
+
# main.rb
|
3
|
+
#
|
4
|
+
|
5
|
+
module Heist
|
6
|
+
|
7
|
+
GEM_RE = /^([^ ]+) \(([0-9\., ]+)\)/
|
8
|
+
|
9
|
+
class << self
|
10
|
+
def usage
|
11
|
+
prog = ($0[0] == ?. ? $0 : $0.split(/\//)[-1])
|
12
|
+
$stderr.write("ERROR: #{prog} requires piped input, e.g.\n" +
|
13
|
+
" $ gem list | #{prog}\n" +
|
14
|
+
" $ #{prog} < gemlist.txt\n")
|
15
|
+
end
|
16
|
+
|
17
|
+
def pull!
|
18
|
+
output = []
|
19
|
+
|
20
|
+
if $stdin.tty?
|
21
|
+
usage
|
22
|
+
exit 1
|
23
|
+
else
|
24
|
+
gemlist = $stdin.read
|
25
|
+
gemlist.scan(GEM_RE) do |match|
|
26
|
+
gem, versions = match
|
27
|
+
versions = versions.split(/, /)
|
28
|
+
|
29
|
+
versions.reverse.each do |version|
|
30
|
+
output << ("gem install #{gem}" +
|
31
|
+
" --version=#{version}" +
|
32
|
+
" --no-ri" +
|
33
|
+
" --no-rdoc")
|
34
|
+
end
|
35
|
+
end
|
36
|
+
|
37
|
+
puts output.join("\n")
|
38
|
+
exit 0
|
39
|
+
end
|
40
|
+
end
|
41
|
+
end
|
42
|
+
|
43
|
+
end
|
data/lib/heist.rb
ADDED
metadata
ADDED
@@ -0,0 +1,73 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: the_heist
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
hash: 29
|
5
|
+
prerelease: false
|
6
|
+
segments:
|
7
|
+
- 0
|
8
|
+
- 0
|
9
|
+
- 1
|
10
|
+
version: 0.0.1
|
11
|
+
platform: ruby
|
12
|
+
authors:
|
13
|
+
- Jerry Chen
|
14
|
+
autorequire:
|
15
|
+
bindir: bin
|
16
|
+
cert_chain: []
|
17
|
+
|
18
|
+
date: 2011-03-24 00:00:00 -05:00
|
19
|
+
default_executable:
|
20
|
+
dependencies: []
|
21
|
+
|
22
|
+
description: " Heist allows you to clone gem configs.\n"
|
23
|
+
email: jerry@apache.org
|
24
|
+
executables:
|
25
|
+
- heist
|
26
|
+
extensions: []
|
27
|
+
|
28
|
+
extra_rdoc_files:
|
29
|
+
- LICENSE
|
30
|
+
- README.md
|
31
|
+
files:
|
32
|
+
- README.md
|
33
|
+
- lib/heist/main.rb
|
34
|
+
- lib/heist/version.rb
|
35
|
+
- lib/heist.rb
|
36
|
+
- LICENSE
|
37
|
+
- bin/heist
|
38
|
+
has_rdoc: true
|
39
|
+
homepage: http://github.com/jcsalterego/heist
|
40
|
+
licenses: []
|
41
|
+
|
42
|
+
post_install_message:
|
43
|
+
rdoc_options: []
|
44
|
+
|
45
|
+
require_paths:
|
46
|
+
- lib
|
47
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
48
|
+
none: false
|
49
|
+
requirements:
|
50
|
+
- - ">="
|
51
|
+
- !ruby/object:Gem::Version
|
52
|
+
hash: 3
|
53
|
+
segments:
|
54
|
+
- 0
|
55
|
+
version: "0"
|
56
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
57
|
+
none: false
|
58
|
+
requirements:
|
59
|
+
- - ">="
|
60
|
+
- !ruby/object:Gem::Version
|
61
|
+
hash: 3
|
62
|
+
segments:
|
63
|
+
- 0
|
64
|
+
version: "0"
|
65
|
+
requirements: []
|
66
|
+
|
67
|
+
rubyforge_project:
|
68
|
+
rubygems_version: 1.3.7
|
69
|
+
signing_key:
|
70
|
+
specification_version: 3
|
71
|
+
summary: Heist allows you to clone gem configs.
|
72
|
+
test_files: []
|
73
|
+
|