Sha256: a26532055d251b1686dde4a228081258119273c53d6a16e943591c2f0c2ba6b5

Contents?: true

Size: 1.77 KB

Versions: 22

Compression:

Stored size: 1.77 KB

Contents

# Install .rvmrc
run "rvm use ree-1.8.7-2010.02@#{project_name} --rvmrc --create"
begin
  require "rvm"
  RVM.gemset_use! project_name
rescue LoadError
end

# Install bundler files
file "Gemfile", <<-END
source "http://gemcutter.org"

gem "rails", "2.3.5"
gem "ruby-mysql"
gem "bard-rake", :require => false
gem "ruby-debug", :group => [:development, :test, :cucumber]

gem "haml", "~>3.0"
gem "compass", "~>0.10"

group :test, :cucumber do
  gem "autotest-rails"
  gem "rspec-rails", "~>1.3", :require => false
  gem "machinist"
  gem "faker"
end

group :cucumber do
  gem "cucumber-rails", :require => false
  gem "webrat"
  gem "database_cleaner"
  gem "pickle"
  gem "email_spec"
end
END
run "bundle install --relock"

file_inject "config/boot.rb", 
"# All that for this:", <<-END, :before
class Rails::Boot
  def run
    load_initializer

    Rails::Initializer.class_eval do
      def load_gems
        @bundler_loaded ||= Bundler.require :default, Rails.env
      end
    end

    Rails::Initializer.run(:set_load_path)
  end
end

END

file "config/preinitializer.rb", <<-END
begin
  require "rubygems"
  require "bundler"
rescue LoadError
  raise "Could not load the bundler gem. Install it with `gem install bundler`."
end

if Gem::Version.new(Bundler::VERSION) <= Gem::Version.new("0.9.24")
  raise RuntimeError, "Your bundler version is too old." +
    "Run `gem install bundler` to upgrade."
end

begin
  # Install dependencies if needed
  `bundle check`
  system "bundle install" if not $?.success?
  # Set up load paths for all bundled gems
  ENV["BUNDLE_GEMFILE"] = File.expand_path("../../Gemfile", __FILE__)
  Bundler.setup
rescue Bundler::GemNotFound
  raise RuntimeError, "Bundler couldn't find some gems." +
    "Did you run `bundle install`?"
end
END

file "config/setup_load_paths.rb", ""

Version data entries

22 entries across 22 versions & 1 rubygems

Version Path
bard-0.19.0 lib/bard/template/gems.rb
bard-0.18.0 lib/bard/template/gems.rb
bard-0.17.1 lib/bard/template/gems.rb
bard-0.17.0 lib/bard/template/gems.rb
bard-0.16.1 lib/bard/template/gems.rb
bard-0.16.0 lib/bard/template/gems.rb
bard-0.15.5 lib/bard/template/gems.rb
bard-0.15.4 lib/bard/template/gems.rb
bard-0.15.3 lib/bard/template/gems.rb
bard-0.15.2 lib/bard/template/gems.rb
bard-0.15.0 lib/bard/template/gems.rb
bard-0.14.2 lib/bard/template/gems.rb
bard-0.14.1 lib/bard/template/gems.rb
bard-0.14.0 lib/bard/template/gems.rb
bard-0.13.2 lib/bard/template/gems.rb
bard-0.13.1 lib/bard/template/gems.rb
bard-0.13.0 lib/bard/template/gems.rb
bard-0.12.0 lib/bard/template/gems.rb
bard-0.11.3 lib/bard/template/gems.rb
bard-0.11.2 lib/bard/template/gems.rb