template/suspenders.rb in suspenders-0.2.5 vs template/suspenders.rb in suspenders-0.2.6
- old
+ new
@@ -41,11 +41,15 @@
path = File.join(destination_root, destination)
File.open(path, "w") { |file| file.write(contents) }
end
def origin
- "git://github.com/thoughtbot/suspenders.git"
+ if ENV['REPO'].present?
+ ENV['REPO']
+ else
+ "git://github.com/thoughtbot/suspenders.git"
+ end
end
def trout(destination_path)
run "trout checkout --source-root=template/trout #{destination_path} #{origin}"
end
@@ -83,13 +87,13 @@
copy_file "README_FOR_SUSPENDERS", "doc/README_FOR_SUSPENDERS"
say "Get ready for bundler... (this will take a while)"
-say "Let's use MySQL"
+say "Let's use PostgreSQL"
-template "mysql_database.yml.erb", "config/database.yml", :force => true
+template "postgresql_database.yml.erb", "config/database.yml", :force => true
rake "db:create"
say "Setting up plugins"
generators_config = <<-RUBY
@@ -116,18 +120,19 @@
replace_in_file "spec/spec_helper.rb", "mock_with :rspec", "mock_with :mocha"
inject_into_file "features/support/env.rb",
%{Capybara.save_and_open_page_path = 'tmp'\n} +
- %{Capybara.javascript_driver = :akephalos\n},
+ %{Capybara.javascript_driver = :webkit\n},
:before => %{Capybara.default_selector = :css}
rake "flutie:install"
say "Ignore the right files"
concat_file "suspenders_gitignore", ".gitignore"
+concat_file "cucumber_assertions_hack", "features/support/env.rb"
["app/models",
"app/views/pages",
"db/migrate",
"log",
@@ -137,10 +142,10 @@
"spec/models",
"spec/views",
"spec/controllers",
"spec/helpers",
"spec/support/matchers",
- "spec/support/helpers",
+ "spec/support/mixins",
"spec/support/shared_examples"].each do |dir|
empty_directory_with_gitkeep dir
end
say "Copying miscellaneous support files"