public
Created — forked from michaeldauria/gist:2048022

Migrate from Copycopter 1.0 (hosted by thoughtbot) to Copycopter 2.0 (open source, deploy your own instance)

  • Download Gist
HOW_TO.md
Markdown

Use the latest version of the copycopter_client gem:

gem 'copycopter_client', '2.0.0'

Export your published drafts from copycopter.com:

RAILS_ENV=production bundle exec rake copycopter:export

This will create a config/locales/copycopter.yml file.

Get the newly open-sourced Copycopter Server:

git clone git@github.com:copycopter/copycopter-server.git
cd copycopter-server

Deploy your own instance of Copycopter Server. Instructions for deploying to Heroku are here.

Create a project on your newly deployed Copycopter Server:

rake copycopter:project NAME=Crowdtap USERNAME=Copy PASSWORD=Copter

Back in your Rails app, update config/initializers/copycopter.rb to point to your Copycopter Server instance. Includes the API key and host at a minimum:

CopycopterClient.configure do |config|
  config.api_key = 'API_KEY'
  config.host = 'copycopter.mydomain.com'
end

Run your app in development mode. Refresh a page. You'll see a message like this in your log:

** [Copycopter] [P:70539] [T:70171207406360] Uploaded missing translations

Stop your app and publish all keys:

bundle exec rake copycopter:deploy

Double check that all keys exist on your new Copycopter Server instance.

Delete the config/locales/copycopter.yml. This ensures that your tests will pass if they depend the default values.

Please sign in to comment on this gist.

Something went wrong with that request. Please try again.