Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Newer
Older
100644 43 lines (36 sloc) 0.978 kb
e9cd7b6 @winton Merge branch 'rails' of github.com:winton/gem_template
authored
1 unless defined?(ActsAsArchive::Gems)
efebcbe @winton Getting rid of bundler
authored
2
3 require 'rubygems'
4
e9cd7b6 @winton Merge branch 'rails' of github.com:winton/gem_template
authored
5 module ActsAsArchive
efebcbe @winton Getting rid of bundler
authored
6 class Gems
7
8 VERSIONS = {
e9cd7b6 @winton Merge branch 'rails' of github.com:winton/gem_template
authored
9 :activerecord => '=3.0.3',
efebcbe @winton Getting rid of bundler
authored
10 :rake => '=0.8.7',
2598f8b @winton Upgrading RSpec
authored
11 :rspec => '=1.3.1'
efebcbe @winton Getting rid of bundler
authored
12 }
13
14 TYPES = {
15 :gemspec => [],
16 :gemspec_dev => [ :rspec ],
17 :lib => [],
18 :rake => [ :rake, :rspec ],
e9cd7b6 @winton Merge branch 'rails' of github.com:winton/gem_template
authored
19 :spec => [ :activerecord, :rspec ]
efebcbe @winton Getting rid of bundler
authored
20 }
21
22 class <<self
23
24 def lockfile
25 file = File.expand_path('../../../gems', __FILE__)
26 unless File.exists?(file)
27 File.open(file, 'w') do |f|
28 Gem.loaded_specs.each do |key, value|
29 f.puts "#{key} #{value.version.version}"
30 end
31 end
32 end
33 end
34
35 def require(type=nil)
36 (TYPES[type] || TYPES.values.flatten.compact).each do |name|
37 gem name.to_s, VERSIONS[name]
38 end
39 end
40 end
41 end
42 end
43 end
Something went wrong with that request. Please try again.