webmat (owner)

Forks

Revisions

gist: 199772 Download_button fork
public
Public Clone URL: git://gist.github.com/199772.git
Embed All Files: show embed
environment.rb #
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
# Neater Github gem dependencies for Rails
 
module GithubGem
  def github_gem(gem_name, opts={})
    lib_name = gem_name.split('-', 2)[1]
    self.gem gem_name, {:lib => lib_name, :source => 'http://gems.github.com'}.merge(opts)
  end
end
 
Rails::Initializer.run do |config|
  config.extend GithubGem
 
  config.gem 'andand'
  config.github_gem 'binarylogic-authlogic', :version => '2.1.1'
 
  if %w(test development).include?(RAILS_ENV)
    config.gem "mocha"
    config.github_gem "thoughtbot-shoulda", :version => '>=2.10'
    config.github_gem "seanhussey-woulda"
  end
  # ...
end
 
# Certainly beats the equivalent
=begin
config.gem 'andand'
config.gem 'binarylogic-authlogic', :version => '2.1.1',
:lib => 'authlogic', :source => 'http://gems.github.com'
 
if %w(test development).include?(RAILS_ENV)
config.gem "mocha"
config.gem "thoughtbot-shoulda", :version => '>=2.10',
:lib => 'shoulda', :source => 'http://gems.github.com'
config.gem "seanhussey-woulda",
:lib => 'woulda', :source => 'http://gems.github.com'
end
=end