Slide 1

Slide 1 text

Automate Workflow with Ruby . Didik Wicaksono

Slide 2

Slide 2 text

•github: @firewalker06 •twitter: @did1k

Slide 3

Slide 3 text

I work at

Slide 4

Slide 4 text

No content

Slide 5

Slide 5 text

No content

Slide 6

Slide 6 text

No content

Slide 7

Slide 7 text

We inspire people through Cooking

Slide 8

Slide 8 text

I’m with ID-Ruby Community •We will have our first Ruby Conference in Indonesia on Oct 6th-7th (ruby.id/cfp) •Please support our association: PERKODI (ruby.id/perkumpulan)

Slide 9

Slide 9 text

!" > 50 engineers, serving 66 countries with 17 languages

Slide 10

Slide 10 text

⛏ Workflow in a glance •Starts with a Hypothesis •Organize Task •Development & Code Review •Deploy & Announce Release

Slide 11

Slide 11 text

https://sourcediving.com/hypothesis-driven- development-6b3c7a4a53fc

Slide 12

Slide 12 text

I’m sure you already familiar with these services

Slide 13

Slide 13 text

Workflow breakdown •discuss hypothesis •create a card •assign card •create a branch •do magic •push a branch •create a pull request •code review •merge pull request •deploy code •announce release in Slack •mark card / checklist as completed

Slide 14

Slide 14 text

Looks repetitive •On Slack •discuss hypothesis •On Trello •create a card •assign card •On local •create a branch •do magic •push a branch •On Github • create a pull request • code review • merge pull request • Back to local again • deploy code • Back to Slack again • announce release in Slack • Finally on Trello • mark card / checklist as completed

Slide 15

Slide 15 text

If its repetitive, we can automate!

Slide 16

Slide 16 text

Looks good? •On Slack •discuss hypothesis •On local •create a card •assign card •create a branch •do magic •push a branch •create a pull request •code review •merge pull request •mark card / checklist as completed •On Slack • deploy code •announce release in Slack

Slide 17

Slide 17 text

Lets begin!

Slide 18

Slide 18 text

trello-flow

Slide 19

Slide 19 text

trello-flow We uses a lot of Trello boards

Slide 20

Slide 20 text

trello-flow •github.com/balvig/trello_flow •available commands: ‣ git open 
 # Open relevant card/all users card in browser ‣ git start
 git start 
 # choose card, assigns self & creates branch ‣ git finish 
 # checks off task, opens PR ‣ git cleanup 
 # cleans up merged card branches

Slide 21

Slide 21 text

Demo

Slide 22

Slide 22 text

Some element of code reviews can be automated

Slide 23

Slide 23 text

•github.com/bbatsov/rubocop •Ruby static code analyzer •enforce styleguide •run in development

Slide 24

Slide 24 text

No content

Slide 25

Slide 25 text

•houndci.com •uses rubocop to review Ruby •supports various languages including js, coffeescript and scss •integrated with Github

Slide 26

Slide 26 text

No content

Slide 27

Slide 27 text

CP-8 Cookpad Bot

Slide 28

Slide 28 text

CP-8 Cookpad Bot • github.com/balvig/cp-8 • This little fella helps simplify your frequent labelling in Github • Deployable to Heroku

Slide 29

Slide 29 text

CP-8 Cookpad Bot Opening a PR with "[WIP]" in the title adds WIP label

Slide 30

Slide 30 text

CP-8 Cookpad Bot Approving changes adds Reviewed label

Slide 31

Slide 31 text

CP-8 Cookpad Bot Tells you when a PR has no updates

Slide 32

Slide 32 text

CP-8 Cookpad Bot Attach and moves Trello cards around

Slide 33

Slide 33 text

capistrano-fiesta

Slide 34

Slide 34 text

capistrano-fiesta •github.com/balvig/capistrano- fiesta •integrates Github pull requests and Slack •compiles list of github PR since last release

Slide 35

Slide 35 text

capistrano-fiesta reads “Release note” in PR description

Slide 36

Slide 36 text

capistrano-fiesta Sends slack announcement

Slide 37

Slide 37 text

capistrano-fiesta compiles list of PR in github.com/[repo]/releases

Slide 38

Slide 38 text

Ruby + Bot = Ruboty

Slide 39

Slide 39 text

ruboty •github.com/r7kamura/ruboty •its a bot, built in Ruby •deployable to Heroku •supports various chat services and some DBs

Slide 40

Slide 40 text

ruboty

Slide 41

Slide 41 text

Everyday on Cookpad •Trello-flow •Rubocop and Hound •CP-8 Bot •Capistrano-fiesta •Ruboty

Slide 42

Slide 42 text

Everyday on Cookpad •Trello-flow •Rubocop and Hound •CP-8 Bot •Capistrano-fiesta •Ruboty