Skip to content

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also compare across forks.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also compare across forks.
...
Checking mergeability… Don’t worry, you can still create the pull request.
  • 3 commits
  • 2 files changed
  • 0 commit comments
  • 2 contributors
Commits on May 22, 2010
Danish Khan created database.yml file 858438b
Commits on May 30, 2010
Danish Khan created heroku rake task for typo blog 136b1f3
Commits on Jun 30, 2010
@irohiroki irohiroki Merge commit 'danishkhan/master' 039dc6f
Showing with 55 additions and 18 deletions.
  1. +0 −18 config/database.yml.example
  2. +55 −0 lib/tasks/heroku.rake
View
18 config/database.yml.example
@@ -1,18 +0,0 @@
-login: &login
- adapter: mysql
- host: localhost
- username: root
- password:
-
-
-development:
- database: typo_dev
- <<: *login
-
-test:
- database: typo_tests
- <<: *login
-
-production:
- database: typo
- <<: *login
View
55 lib/tasks/heroku.rake
@@ -0,0 +1,55 @@
+desc "Setup Typo to run on Heroku"
+task :heroku do
+ root_path = File.expand_path(File.dirname(__FILE__) + "/../../")
+
+ def gemfile
+ File.open('.gems', 'w') do |f|
+ f.puts "rails --version '2.3.5'"
+ f.puts "htmlentities"
+ f.puts "calendar_date_select"
+ f.puts "bluecloth --version '~> 2.0.5'"
+ f.puts "coderay --version '~> 0.8'"
+ f.puts "mislav-will_paginate --source gems.github.com --version '~> 2.3.11'"
+ f.puts "RedCloth --version '~> 4.2.2'"
+ f.puts "panztel-actionwebservice --version '2.3.5'"
+ f.puts "addressable --version '~> 2.1.0'"
+ f.puts "mini_magick --version '~> 1.2.5'"
+ end
+ end
+
+ def preinitializer
+ File.open('preinitializer.rb', 'w') do |f|
+ f.puts "require 'fileutils'"
+ f.puts "file_utils_no_write = FileUtils::NoWrite"
+ f.puts "Object.send :remove_const, :FileUtils"
+ f.puts "FileUtils = file_utils_no_write"
+ end
+ end
+
+ Dir.chdir(root_path) do
+ ["git init", "git add *", "git commit -m 'The typo package.'",
+ "mkdir public/files", "mkdir -p tmp/cache",
+ "touch public/files/.gitkeep", "touch tmp/cache/.gitkeep"].each do |cmd|
+ system("#{cmd}")
+ end
+ end
+
+ Dir.chdir("#{root_path}/config") do
+ preinitializer
+ end
+
+ Dir.chdir(root_path) do
+ ["git add *", "git commit -m 'Getting things setup for heroku'", "heroku create",
+ "git push heroku master",].each do |cmd|
+ system("#{cmd}")
+ end
+ end
+
+ Dir.chdir(root_path) do
+ ["git add .gems", "git commit -m 'added gems manifest file'",
+ "git push heroku", "heroku rake db:migrate", "heroku open"].each do |cmd|
+ gemfile
+ system("#{cmd}")
+ end
+ end
+end

No commit comments for this range

Something went wrong with that request. Please try again.