Skip to content

Commit

Permalink
rename project to engineyard-migrate; renamed CLI to ey-migrate
Browse files Browse the repository at this point in the history
  • Loading branch information
drnic committed Feb 15, 2011
1 parent ae01388 commit f9d0457
Show file tree
Hide file tree
Showing 14 changed files with 42 additions and 38 deletions.
2 changes: 1 addition & 1 deletion Gemfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
source "http://rubygems.org"

# Specify your gem's dependencies in heroku2ey.gemspec
# Specify your gem's dependencies in engineyard-migrate.gemspec
gemspec
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,13 +13,13 @@ Currently, it is only installable from source.

The tool is simple to use. If you need to do something, it will tell you.

heroku2ey migrate path/to/heroku/app
ey-migrate migrate path/to/heroku/app

## Migration from Salesforce Heroku

### Database

Your SQL database is automatically migrated to your AppCloud application via `heroku2ey migrate`.
Your SQL database is automatically migrated to your AppCloud application via `ey-migrate migrate`.

A MySQL database is created automatically for you for each AppCloud application. On a 1 instance environment it runs on the same instances as your web application. For dedicated databases, use a 2+ instance environment with a dedicated database instance.

Expand Down Expand Up @@ -140,7 +140,7 @@ This will install `.ssh/config` required for your SSH credentials to run the tes

### Credentials

To run the integration tests, you either need access to the [credentials repository](https://github.com/engineyard/heroku2ey-test-credentials)
To run the integration tests, you either need access to the [credentials repository](https://github.com/engineyard/ey-migrate-test-credentials)

Please send a Github message to `drnic` requesting the test keys/

Expand Down
2 changes: 1 addition & 1 deletion Rakefile
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ namespace :cucumber do
task :download_credentials do
credentials = File.expand_path('../fixtures/credentials', __FILE__)
unless File.exists?(credentials)
sh "git clone git@github.com:engineyard/heroku2ey-test-credentials.git #{credentials}"
sh "git clone git@github.com:engineyard/ey-migrate-test-credentials.git #{credentials}"
end
end

Expand Down
6 changes: 3 additions & 3 deletions bin/heroku2ey → bin/ey-migrate
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@

require 'rubygems'
$:.unshift(File.expand_path(File.dirname(__FILE__) + "/../lib"))
require 'heroku2ey'
require 'heroku2ey/cli'
require 'engineyard-migrate'
require 'engineyard-migrate/cli'

$stdout.sync = true

Heroku2EY::CLI.start
Engineyard::Migrate::CLI.start
12 changes: 6 additions & 6 deletions heroku2ey.gemspec → engineyard-migrate.gemspec
Original file line number Diff line number Diff line change
@@ -1,18 +1,18 @@
# -*- encoding: utf-8 -*-
$:.push File.expand_path("../lib", __FILE__)
require "heroku2ey/version"
require "engineyard-migrate/version"

Gem::Specification.new do |s|
s.name = "heroku2ey"
s.version = Heroku2EY::VERSION
s.name = "engineyard-migrate"
s.version = Engineyard::Migrate::VERSION
s.platform = Gem::Platform::RUBY
s.authors = ["Dr Nic Williams", "Danish Khan"]
s.email = ["drnicwilliams@gmail.com"]
s.homepage = "https://github.com/engineyard/heroku2ey"
s.homepage = "https://github.com/engineyard/engineyard-migrate"
s.summary = %q{Salesforce Heroku to Engine Yard AppCloud migration tool.}
s.description = %q{Migrating your Ruby/Rails application from Salesforce Heroku to Engine Yard AppCloud made simple!}

s.rubyforge_project = "heroku2ey"
s.rubyforge_project = "engineyard-migrate"

s.files = `git ls-files`.split("\n")
s.test_files = `git ls-files -- {test,spec,features}/*`.split("\n")
Expand All @@ -33,5 +33,5 @@ Gem::Specification.new do |s|
s.add_development_dependency("rspec", ["~> 2.2.0"])
s.add_development_dependency("nokogiri", ["~> 1.4.0"])
s.add_development_dependency("ssh-config")
s.add_development_dependency("sqlite3")
s.add_development_dependency("taps", ["~> 0.3.15"])
end
23 changes: 12 additions & 11 deletions features/migration.feature
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ Feature: Migration
Then I should see table
| People |

When I run local executable "heroku2ey" with arguments "migrate . --account heroku2ey --environment heroku2eysimpleapp_production"
When I run local executable "ey-migrate" with arguments "migrate . --account heroku2ey --environment heroku2eysimpleapp_production"
Then I should see "Migration complete!"
When I visit the application at "ec2-50-17-248-148.compute-1.amazonaws.com"
Then I should see table
Expand All @@ -32,7 +32,7 @@ Feature: Migration

Scenario: Fail if application isn't on Heroku
Given I clone the application "git@github.com:engineyard/heroku2ey-simple-app.git" as "simple-app"
When I run local executable "heroku2ey" with arguments "migrate . --account heroku2ey --environment heroku2eysimpleapp_production"
When I run local executable "ey-migrate" with arguments "migrate . --account heroku2ey --environment heroku2eysimpleapp_production"
Then I should see
"""
Not a Salesforce Heroku application.
Expand All @@ -41,7 +41,7 @@ Feature: Migration
Scenario: Fail if Heroku credentials not available
Given I clone the application "git@github.com:engineyard/heroku2ey-simple-app.git" as "simple-app"
And I have a Heroku application "heroku2ey-simple-app"
When I run local executable "heroku2ey" with arguments "migrate . --account heroku2ey --environment heroku2eysimpleapp_production"
When I run local executable "ey-migrate" with arguments "migrate . --account heroku2ey --environment heroku2eysimpleapp_production"
Then I should see
"""
Please setup your Salesforce Heroku credentials first.
Expand All @@ -53,7 +53,7 @@ Feature: Migration
And I have setup my SSH keys
And I have setup my Heroku credentials
Given I run executable "git" with arguments "remote rm origin"
When I run local executable "heroku2ey" with arguments "migrate . --account heroku2ey --environment heroku2eysimpleapp_production"
When I run local executable "ey-migrate" with arguments "migrate . --account heroku2ey --environment heroku2eysimpleapp_production"
Then I should see
"""
Please host your Git repo externally and add as remote 'origin'.
Expand All @@ -65,7 +65,7 @@ Feature: Migration
And I have setup my SSH keys
And I have setup my Heroku credentials

When I run local executable "heroku2ey" with arguments "migrate . --account heroku2ey --environment heroku2eysimpleapp_production"
When I run local executable "ey-migrate" with arguments "migrate . --account heroku2ey --environment heroku2eysimpleapp_production"
Then I should see
"""
Please create, boot and deploy an AppCloud application for git@github.com:engineyard/heroku2ey-simple-app.git.
Expand All @@ -81,7 +81,7 @@ Feature: Migration
And I run executable "git" with arguments "remote rm origin"
And I run executable "git" with arguments "remote add origin git@github.com:engineyard/UNKNOWN.git"

When I run local executable "heroku2ey" with arguments "migrate . -e heroku2eysimpleapp_production"
When I run local executable "ey-migrate" with arguments "migrate . -e heroku2eysimpleapp_production"
Then I should see
"""
Please create, boot and deploy an AppCloud application for git@github.com:engineyard/UNKNOWN.git.
Expand All @@ -94,13 +94,14 @@ Feature: Migration
And I have setup my Heroku credentials

Given I have setup my AppCloud credentials
When I run local executable "heroku2ey" with arguments "migrate . -V"
When I run local executable "ey-migrate" with arguments "migrate . -V"
Then I should see "Multiple environments possible, please be more specific:"
Then I should see
"""
heroku2ey migrate . --app='heroku2eysimpleapp' --account='heroku2ey' --environment='heroku2eysimpleapp_production'
heroku2ey migrate . --app='heroku2eysimpleapp' --account='heroku2ey' --environment='heroku2ey_noinstances'
ey-migrate migrate . --app='heroku2eysimpleapp' --account='heroku2ey' --environment='heroku2eysimpleapp_production'
ey-migrate migrate . --app='heroku2eysimpleapp' --account='heroku2ey' --environment='heroku2ey_noinstances'
"""


Scenario: Fail if environment hasn't been booted yet
Given I have setup my SSH keys
Expand All @@ -111,7 +112,7 @@ Feature: Migration

Given I have setup my AppCloud credentials

When I run local executable "heroku2ey" with arguments "migrate . -e heroku2ey_noinstances"
When I run local executable "ey-migrate" with arguments "migrate . -e heroku2ey_noinstances"
Then I should see
"""
Please boot your AppCloud environment and then deploy your application.
Expand All @@ -127,7 +128,7 @@ Feature: Migration
Given I have setup my AppCloud credentials
And I remove AppCloud "heroku2eysimpleapp_production" application "heroku2eysimpleapp" folder

When I run local executable "heroku2ey" with arguments "migrate . -e heroku2eysimpleapp_production"
When I run local executable "ey-migrate" with arguments "migrate . -e heroku2eysimpleapp_production"
Then I should see
"""
Please deploy your AppCloud application before running migration.
Expand Down
8 changes: 4 additions & 4 deletions features/step_definitions/common_steps.rb
Original file line number Diff line number Diff line change
Expand Up @@ -48,13 +48,13 @@
end

When /^I run local executable "(.*)" with arguments "(.*)"/ do |executable, arguments|
if executable == "heroku2ey"
require 'heroku2ey'
require 'heroku2ey/cli'
if executable == "ey-migrate"
require 'engineyard-migrate'
require 'engineyard-migrate/cli'
in_project_folder do
stdout, stderr = capture_stdios do
begin
Heroku2EY::CLI.start(arguments.split(/ /))
Engineyard::Migrate::CLI.start(arguments.split(/ /))
rescue SystemExit
end
end
Expand Down
4 changes: 4 additions & 0 deletions lib/engineyard-migrate.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
module Engineyard
module Migrate
end
end
4 changes: 2 additions & 2 deletions lib/heroku2ey/cli.rb → lib/engineyard-migrate/cli.rb
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
require "engineyard/cli/ui"
require "engineyard/error"

module Heroku2EY
module Engineyard::Migrate
class CLI < Thor
include EY::UtilityMethods
attr_reader :verbose
Expand Down Expand Up @@ -205,7 +205,7 @@ def too_many_environments_discovered(task, environments, *args)
say ""
environments.each do |env|
flags = env.map { |key, value| "--#{key}='#{value}'"}.join(" ")
say " heroku2ey #{task} #{args.join(' ')} #{flags}"
say " ey-migrate #{task} #{args.join(' ')} #{flags}"
end
exit 1
end
Expand Down
5 changes: 5 additions & 0 deletions lib/engineyard-migrate/version.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
module Engineyard
module Migrate
VERSION = "0.1.0"
end
end
3 changes: 0 additions & 3 deletions lib/heroku2ey.rb

This file was deleted.

3 changes: 0 additions & 3 deletions lib/heroku2ey/version.rb

This file was deleted.

2 changes: 1 addition & 1 deletion spec/spec_helper.rb
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
$:.unshift(File.expand_path(File.dirname(__FILE__) + '/../lib'))
require 'bundler/setup'
require 'heroku2ey'
require 'engineyard-migrate'
require 'rspec'
Binary file removed vendor/cache/engineyard-1.3.15.pre.gem
Binary file not shown.

0 comments on commit f9d0457

Please sign in to comment.