gem_tools 0.2.4 → 0.2.5
Sign up to get free protection for your applications and to get access to all the features.
- data/.gitignore +1 -0
- data/History.txt +3 -0
- data/README.textile +5 -0
- data/README.txt +5 -0
- data/VERSION +1 -1
- data/bin/gemtools +3 -0
- data/config/gems.yml +163 -20
- data/gem_tools.gemspec +2 -2
- data/lib/gem_tools.rb +46 -0
- metadata +2 -2
data/.gitignore
CHANGED
data/History.txt
CHANGED
data/README.textile
CHANGED
@@ -28,6 +28,11 @@ h3. Check to see if any of the gems in your app have newer versions
|
|
28
28
|
|
29
29
|
gemtools check_updates
|
30
30
|
|
31
|
+
h3. Generate a Gemfile from your current gems.yml
|
32
|
+
|
33
|
+
gemtools to_gemfile
|
34
|
+
|
35
|
+
|
31
36
|
Make sure they are loaded with the right versions during startup, by adding the
|
32
37
|
following to your script or environment.rb (Rails)
|
33
38
|
|
data/README.txt
CHANGED
@@ -28,6 +28,11 @@ h3. Check to see if any of the gems in your app have newer versions
|
|
28
28
|
|
29
29
|
gemtools check_updates
|
30
30
|
|
31
|
+
h3. Generate a Gemfile from your current gems.yml
|
32
|
+
|
33
|
+
gemtools to_gemfile
|
34
|
+
|
35
|
+
|
31
36
|
Make sure they are loaded with the right versions during startup, by adding the
|
32
37
|
following to your script or environment.rb (Rails)
|
33
38
|
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.2.
|
1
|
+
0.2.5
|
data/bin/gemtools
CHANGED
data/config/gems.yml
CHANGED
@@ -1,21 +1,164 @@
|
|
1
|
-
# this is optional
|
2
|
-
# source: http://local_mirror.example.com
|
3
|
-
# gem_command: 'jruby -S gem'
|
4
1
|
gems:
|
5
|
-
- name:
|
6
|
-
|
7
|
-
|
8
|
-
- name:
|
9
|
-
version:
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
2
|
+
- name: 'authlogic'
|
3
|
+
version: '1.3.9'
|
4
|
+
|
5
|
+
- name: 'datanoise-actionwebservice'
|
6
|
+
version: '2.2.2'
|
7
|
+
require_name: 'actionwebservice'
|
8
|
+
source: 'http://gems.github.com/'
|
9
|
+
|
10
|
+
- name: 'fastercsv'
|
11
|
+
version: '1.5.0'
|
12
|
+
|
13
|
+
- name: 'GData'
|
14
|
+
version: '0.0.4'
|
15
|
+
require_name: 'gdata/spreadsheet'
|
16
|
+
|
17
|
+
- name: 'hpricot'
|
18
|
+
version: '0.8.2'
|
19
|
+
|
20
|
+
- name: 'httparty'
|
21
|
+
version: '0.5.0'
|
22
|
+
|
23
|
+
- name: 'newrelic_rpm'
|
24
|
+
version: '2.9.5'
|
25
|
+
|
26
|
+
- name: 'parseexcel'
|
27
|
+
version: '0.5.2'
|
28
|
+
|
29
|
+
- name: 'prawn'
|
30
|
+
version: '0.5.0.1'
|
31
|
+
|
32
|
+
- name: 'prawn-core'
|
33
|
+
version: '0.5.0.1'
|
34
|
+
|
35
|
+
- name: 'prawn-layout'
|
36
|
+
version: '0.2.0.1'
|
37
|
+
|
38
|
+
- name: 'rails'
|
39
|
+
version: '2.2.2'
|
40
|
+
|
41
|
+
- name: 'roo'
|
42
|
+
version: '1.2.3'
|
43
|
+
|
44
|
+
- name: 'rubaidh-google_analytics'
|
45
|
+
version: '1.1.4'
|
46
|
+
require_name: 'rubaidh/google_analytics'
|
47
|
+
source: 'http://gems.github.com/'
|
48
|
+
|
49
|
+
- name: 'aasm'
|
50
|
+
version: '2.0.5'
|
51
|
+
|
52
|
+
- name: 'rubyzip'
|
53
|
+
version: '0.9.1'
|
54
|
+
require_name: 'zip/zipfilesystem'
|
55
|
+
|
56
|
+
- name: 'serviceproxy'
|
57
|
+
version: '0.2.1'
|
58
|
+
|
59
|
+
- name: 'settingslogic'
|
60
|
+
version: '2.0.3'
|
61
|
+
|
62
|
+
- name: 'spreadsheet-excel'
|
63
|
+
version: '0.3.5.1'
|
64
|
+
require_name: 'spreadsheet/excel'
|
65
|
+
|
66
|
+
- name: 'thoughtbot-paperclip'
|
67
|
+
version: '2.2.7'
|
68
|
+
require_name: 'paperclip'
|
69
|
+
|
70
|
+
- name: 'will_paginate'
|
71
|
+
version: '2.2.2'
|
72
|
+
|
73
|
+
- name: 'inaction_mailer'
|
74
|
+
version: '0.6'
|
75
|
+
load: false
|
76
|
+
|
77
|
+
- name: 'capistrano-ext'
|
78
|
+
version: '1.2.1'
|
79
|
+
load: false
|
80
|
+
|
81
|
+
- name: 'chronic'
|
82
|
+
version: '0.2.3'
|
83
|
+
load: false
|
84
|
+
|
85
|
+
- name: 'whenever'
|
86
|
+
version: '0.3.7'
|
87
|
+
load: false
|
88
|
+
|
89
|
+
- name: 'soap4r'
|
90
|
+
version: '1.5.8'
|
91
|
+
load: false
|
92
|
+
|
93
|
+
- name: 'crack'
|
94
|
+
version: '0.1.4'
|
95
|
+
load: false
|
96
|
+
|
97
|
+
- name: 'ruby-debug'
|
98
|
+
version: '0.10.3'
|
99
|
+
load: false
|
100
|
+
|
101
|
+
- name: 'cucumber'
|
102
|
+
version: '0.6.2'
|
103
|
+
load: false
|
104
|
+
|
105
|
+
- name: 'cucumber-rails'
|
106
|
+
version: '0.2.4'
|
107
|
+
load: false
|
108
|
+
|
109
|
+
- name: 'database_cleaner'
|
110
|
+
version: '0.4.3'
|
111
|
+
load: false
|
112
|
+
|
113
|
+
- name: 'webrat'
|
114
|
+
version: '0.7.0'
|
115
|
+
load: false
|
116
|
+
|
117
|
+
- name: 'rspec'
|
118
|
+
version: '1.3.0'
|
119
|
+
load: false
|
120
|
+
|
121
|
+
- name: 'rspec-rails'
|
122
|
+
version: '1.3.2'
|
123
|
+
load: false
|
124
|
+
|
125
|
+
- name: 'launchy'
|
126
|
+
version: '0.3.5'
|
127
|
+
load: false
|
128
|
+
|
129
|
+
- name: 'mocha'
|
130
|
+
version: '0.9.5'
|
131
|
+
load: false
|
132
|
+
|
133
|
+
- name: 'machinist'
|
134
|
+
version: '1.0.6'
|
135
|
+
load: false
|
136
|
+
|
137
|
+
- name: 'shoulda'
|
138
|
+
version: '2.9.1'
|
139
|
+
load: false
|
140
|
+
|
141
|
+
- name: 'xml-simple'
|
142
|
+
version: '1.0.12'
|
143
|
+
load: false
|
144
|
+
|
145
|
+
- name: 'memcache'
|
146
|
+
version: '1.2.0'
|
147
|
+
load: false
|
148
|
+
|
149
|
+
- name: 'tzinfo'
|
150
|
+
version: '0.3.16'
|
151
|
+
load: false
|
152
|
+
|
153
|
+
- name: 'tmail'
|
154
|
+
version: '1.2.7.1'
|
155
|
+
load: false
|
156
|
+
|
157
|
+
- name: 'text-format'
|
158
|
+
version: '1.0.0'
|
159
|
+
load: false
|
160
|
+
|
161
|
+
- name: 'cwninja-inaction_mailer'
|
162
|
+
version: '0.6'
|
163
|
+
require_name: 'inaction_mailer'
|
164
|
+
load: false
|
data/gem_tools.gemspec
CHANGED
@@ -5,11 +5,11 @@
|
|
5
5
|
|
6
6
|
Gem::Specification.new do |s|
|
7
7
|
s.name = %q{gem_tools}
|
8
|
-
s.version = "0.2.
|
8
|
+
s.version = "0.2.5"
|
9
9
|
|
10
10
|
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
|
11
11
|
s.authors = ["Michael Moen"]
|
12
|
-
s.date = %q{2010-
|
12
|
+
s.date = %q{2010-02-11}
|
13
13
|
s.default_executable = %q{gemtools}
|
14
14
|
s.description = %q{A lightweight tool to manage gems using a config file, similar to GemInstaller}
|
15
15
|
s.email = %q{michael@underpantsgnome.com}
|
data/lib/gem_tools.rb
CHANGED
@@ -1,6 +1,9 @@
|
|
1
1
|
$:.unshift(File.dirname(__FILE__)) unless
|
2
2
|
$:.include?(File.dirname(__FILE__)) || $:.include?(File.expand_path(File.dirname(__FILE__)))
|
3
3
|
|
4
|
+
require 'rubygems'
|
5
|
+
require 'ruby-debug'
|
6
|
+
|
4
7
|
module GemTools
|
5
8
|
extend self
|
6
9
|
|
@@ -39,6 +42,41 @@ module GemTools
|
|
39
42
|
puts OPTS
|
40
43
|
end
|
41
44
|
|
45
|
+
def to_gemfile
|
46
|
+
config = load_config
|
47
|
+
|
48
|
+
if File.exist?('Gemfile')
|
49
|
+
puts "GemFile already exists, not overwriting."
|
50
|
+
exit 1
|
51
|
+
end
|
52
|
+
|
53
|
+
no_load = config['gems'].collect { |gem| gem if gem['load'] == false }.compact
|
54
|
+
to_load = config['gems'].collect { |gem| gem unless gem['load'] == false }.compact
|
55
|
+
|
56
|
+
File.open('Gemfile', 'w+') do |f|
|
57
|
+
if config['source']
|
58
|
+
f.puts "source #{config['source']}"
|
59
|
+
else
|
60
|
+
f.puts "source :gemcutter"
|
61
|
+
f.puts "source 'http://gems.github.com/'"
|
62
|
+
end
|
63
|
+
|
64
|
+
f.puts ''
|
65
|
+
|
66
|
+
to_load.each do |gem|
|
67
|
+
f.puts bundler_gem_line(gem)
|
68
|
+
end
|
69
|
+
|
70
|
+
f.puts ''
|
71
|
+
|
72
|
+
f.puts 'group :no_load do'
|
73
|
+
no_load.each do |gem|
|
74
|
+
f.puts ' ' + bundler_gem_line(gem)
|
75
|
+
end
|
76
|
+
f.puts 'end'
|
77
|
+
end
|
78
|
+
end
|
79
|
+
|
42
80
|
def load_config
|
43
81
|
require 'yaml'
|
44
82
|
require 'erb'
|
@@ -144,4 +182,12 @@ module GemTools
|
|
144
182
|
puts "#{gem['name']} #{ver} is available, #{gem['version']} installed" if ver > gem['version']
|
145
183
|
end
|
146
184
|
end
|
185
|
+
|
186
|
+
private
|
187
|
+
|
188
|
+
def bundler_gem_line(gem)
|
189
|
+
line = "gem '#{gem['name']}', '#{gem['version']}'"
|
190
|
+
line += ", :require => '#{gem['require_name']}'" if gem['require_name']
|
191
|
+
line
|
192
|
+
end
|
147
193
|
end
|
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.2.
|
4
|
+
version: 0.2.5
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Michael Moen
|
@@ -9,7 +9,7 @@ autorequire:
|
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
11
|
|
12
|
-
date: 2010-
|
12
|
+
date: 2010-02-11 00:00:00 -06:00
|
13
13
|
default_executable: gemtools
|
14
14
|
dependencies: []
|
15
15
|
|