# InvocaGems Makes working on the Invoca gems used by applications easier. ## Lighting Talk Intro Watch it here and count how many times I say "uuum"! (Answer: lots) [Invoca Gem Lightning Talk](https://drive.google.com/a/invoca.com/file/d/0BzmD8uReM33rRi0ydTBiQlRmMzA/view) ## Workflow The normal workflow would go something like this.... ### 1) Create a branch on the app-repo Start in the repo for the application that needs the changes. (For example web or pnapi). Create a branch for your story changes. ### 2) Open the gem for editing I am using invoca-metrics in this example. ``` bundle exec invoca_gem edit invoca-metrics ``` This will do the following: * check out the invoca-metrics repo into invoca_gems/invoca_metrics. * create a new branch on that repo starting at the sha from the app-repo Gemfile. The branch will use the same name as the app-repo. * update the app-repo Gemfile to refer to the invoca metrics gem using a path. ### 3) Make your gem changes At this point you can edit the invoca-metrics gem from the invoca_gems/invoca_metrics directory. You can confirm your changes work on the app-repo by running tests there. ### 4) Save your gem changes When ready, save your changes to the invoca_metrics gem. ``` bundle exec invoca_gem save invoca-metrics --commit-message 'made some changes' ``` This can take a little while, so brace for it. This will do the following: * Commit your changes to the invoca_metrics gem and push them to github. * Update the app-repo Gemfile for the new version and sha of the invoca_metrics gem. * Update any other invoca gems that depend invoca_metrics. For each of these gems it will: * Pull down the gem and create a branch at the sha from the app-repo. * Update the gem version of invoca_metrics in the gemspec. * Update the sha in the Gemfile for the dependent gem. * Bundle install to pick up the changes. (Takes a while.) * Commit the changes and push to github. * Update the app-repo gem to refer to the new sha. * Bundle install the app-repo to pick up all the changes. Whew. ### 5) Create pull requests When ready you can view the changes and issue pull requests from github using the following command. ``` bundle exec invoca_gem show_changes ``` This will open a browser window showing all of the changed gems. From there you can open pull requests and confirm build results. ## Other commands Run the following to find available commands. ``` bundle exec invoca_gem ``` ## Installation Add this line to your application's Gemfile as a development dependency: ```ruby group :development do gem 'invoca_gems' end ``` And then execute: $ bundle