Slide 1

Slide 1 text

<%= link_to "bundle", "update" %> Make "bundle update" more fun to review RubyKaigi 2014 19th September 2014 =begin

Slide 2

Slide 2 text

Kensuke Nagae @kyanny http://www.quipperschool.com/

Slide 3

Slide 3 text

https://medium.com/the-year-of-the-looking-glass/junior-designers-vs-senior-designers-fbe483d3b51e What I learnt

Slide 4

Slide 4 text

Solution Motivation Implementation

Slide 5

Slide 5 text

Solution Motivation Implementation What I made

Slide 6

Slide 6 text

Solution Motivation Implementation Why I needed it

Slide 7

Slide 7 text

Solution Motivation Implementation How I solved problem

Slide 8

Slide 8 text

Solution Motivation Implementation Retrospective

Slide 9

Slide 9 text

Solution Motivation Implementation What I made

Slide 10

Slide 10 text

Compare Linker https://github.com/kyanny/compare_linker

Slide 11

Slide 11 text

Make links from diff

Slide 12

Slide 12 text

Compare View URL https://github.com/blog/612-introducing-github-compare-view

Slide 13

Slide 13 text

Compare View URL github.com/markevans/dragonfly/compare/v1.0.6…v1.0.7

Slide 14

Slide 14 text

Compare View URL github.com/markevans/dragonfly/compare/v1.0.6…v1.0.7 username/reponame versions (old…new)

Slide 15

Slide 15 text

Compare View URL github.com/quipper/schema/compare/d6ba752…714ec45

Slide 16

Slide 16 text

Compare View URL github.com/quipper/schema/compare/d6ba752…714ec45 username/reponame Git commit object name (old…new)

Slide 17

Slide 17 text

Solution Motivation Implementation Why I needed it

Slide 18

Slide 18 text

1 year ago…

Slide 19

Slide 19 text

"bundle update" is neglected Too lazy to do it regularly No sense of duty from "bundle outdated"

Slide 20

Slide 20 text

"bundle update" is neglected Too lazy to do it regularly No sense of duty from "bundle outdated"

Slide 21

Slide 21 text

"bundle update" is neglected Too lazy to do it regularly No sense of duty from "bundle outdated"

Slide 22

Slide 22 text

"bundle update" is neglected Too lazy to do it regularly No sense of duty from "bundle outdated"

Slide 23

Slide 23 text

"bundle update" is neglected Too lazy to do it regularly No sense of duty from "bundle outdated" Automation!!

Slide 24

Slide 24 text

Feedbacks Heroku ver. Tachikoma.io http://qiita.com/camelmasa/items/afe2a69a0ed97d5e9dc6 http://tachikoma.io/

Slide 25

Slide 25 text

But Not the case…

Slide 26

Slide 26 text

quipper/schema

Slide 27

Slide 27 text

schema api qlink qsupport qcreate

Slide 28

Slide 28 text

api qlink qsupport qcreate schema def api_rocks do_something end

Slide 29

Slide 29 text

schema qlink qsupport qcreate api def api_rocks do_something end $ bundle update

Slide 30

Slide 30 text

schema api qlink qcreate qsupport def api_rocks do_something end def api_rocks do_something end def api_rocks do_something end $ bundle update $ bundle update $ bundle update

Slide 31

Slide 31 text

schema qlink qsupport qcreate def api_rocks do_something end def api_rocks do_something end def api_rocks do_something end $ bundle update $ bundle update $ bundle update Necessary??

Slide 32

Slide 32 text

https://www.flickr.com/photos/marcobellucci/3534516458

Slide 33

Slide 33 text

Not very useful

Slide 34

Slide 34 text

I did it very often…

Slide 35

Slide 35 text

I did it very often… github.com/

Slide 36

Slide 36 text

I did it very often… github.com/ dragonfly ruby github

Slide 37

Slide 37 text

I did it very often… github.com/ dragonfly ruby github

Slide 38

Slide 38 text

I did it very often… github.com/markevans/dragonfly dragonfly ruby github

Slide 39

Slide 39 text

I did it very often… github.com/markevans/dragonfly/compare/ dragonfly ruby github

Slide 40

Slide 40 text

I did it very often… github.com/markevans/dragonfly/compare/v1.0.6… dragonfly ruby github

Slide 41

Slide 41 text

I did it very often… github.com/markevans/dragonfly/compare/v1.0.6…v1.0.7 dragonfly ruby github

Slide 42

Slide 42 text

I did it very often… github.com/markevans/dragonfly/compare/v1.0.6…v1.0.7 dragonfly ruby github IUUQTXXXqJDLSDPNQIPUPTUIJSUFFOPGDMVCT

Slide 43

Slide 43 text

"bundle update" should/can be more fun to review

Slide 44

Slide 44 text

https://www.flickr.com/photos/derpoly/8288583655

Slide 45

Slide 45 text

I did it very often… github.com/markevans/dragonfly/compare/v1.0.6…v1.0.7 dragonfly ruby github Automation!!

Slide 46

Slide 46 text

Make links from diff

Slide 47

Slide 47 text

Compare Linker

Slide 48

Slide 48 text

Solution Motivation Implementation How I solved problem

Slide 49

Slide 49 text

Compare Gemfile.lock(s) Receive webhook Build URL Post comment

Slide 50

Slide 50 text

Compare Gemfile.lock(s) Receive webhook Build URL Post comment

Slide 51

Slide 51 text

Webhook Payload (JSON)

Slide 52

Slide 52 text

pull request Compare Linker Receive webhook JSON { "action": "opened", "number": 48, "pull_request": { "id": 18905849, "state": "open", "title": "……", /* JSON data */ }

Slide 53

Slide 53 text

Compare Gemfile.lock(s) Receive webhook Build URL Post comment

Slide 54

Slide 54 text

Compare Linker GitHub API Get Gemfile.lock(s)

Slide 55

Slide 55 text

Compare Linker GitHub API Get Gemfile.lock(s) master feature

Slide 56

Slide 56 text

Compare Linker GitHub API Get Gemfile.lock(s) master feature file = octokit.contents( repo_full_name, { ref: 'master' } ).find { |content| content.name == "Gemfile.lock" } lockfile = Bundler::LockfileParser.new( Base64.decode64( octokit.blob(repo_full_name, file.sha1).content ) )

Slide 57

Slide 57 text

Compare Linker GitHub API Get Gemfile.lock(s) master feature file = octokit.contents( repo_full_name, { ref: 'master' } ).find { |content| content.name == "Gemfile.lock" } lockfile = Bundler::LockfileParser.new( Base64.decode64( octokit.blob(repo_full_name, file.sha1).content ) ) old_lockfile.specs.each do |old_spec| new_lockfile.specs.each do |new_spec| if old_spec.name == new_spec.name if old_spec.version != new_spec.version updated_gems << gem end end end end

Slide 58

Slide 58 text

Compare Linker GitHub API Get homepage_uri Rubygems API

Slide 59

Slide 59 text

http://github.com/markevans/dragonfly

Slide 60

Slide 60 text

Compare Gemfile.lock(s) Receive webhook Build URL Post comment

Slide 61

Slide 61 text

Compare View URL github.com/markevans/dragonfly/compare/v1.0.6…v1.0.7 username/reponame versions (old…new)

Slide 62

Slide 62 text

Compare View URL github.com/quipper/schema/compare/d6ba752…714ec45 username/reponame Git commit object name (old…new)

Slide 63

Slide 63 text

Compare Gemfile.lock(s) Receive webhook Build URL Post comment

Slide 64

Slide 64 text

Comment to pull request

Slide 65

Slide 65 text

Solution Motivation Implementation What I made How I solved problem Why I needed it

Slide 66

Slide 66 text

Solution Motivation Implementation What I made How I solved problem Why I needed it Retrospective

Slide 67

Slide 67 text

Issues…

Slide 68

Slide 68 text

Weak in Rails :(

Slide 69

Slide 69 text

Weak in Rails :( http://www.rubyonrails.org/

Slide 70

Slide 70 text

{ "action": "opened", "number": 48, "pull_request": { "id": 18905849, "state": "open", "title": "……", /* JSON data */ } pull request Compare Linker git push --force

Slide 71

Slide 71 text

Compare Linker git push --force pull request { "ref": "refs/head/xyz", "after": "4d2ab4e", "before": "993b46b", "created": false, "deleted": false, "forced": true, /* JSON data */ }

Slide 72

Slide 72 text

In short: It’s "So-so" (-_-) Not very successful project

Slide 73

Slide 73 text

https://medium.com/the-year-of-the-looking-glass/junior-designers-vs-senior-designers-fbe483d3b51e What I learnt

Slide 74

Slide 74 text

https://medium.com/the-year-of-the-looking-glass/junior-designers-vs-senior-designers-fbe483d3b51e I was thinking… idea other

Slide 75

Slide 75 text

https://medium.com/the-year-of-the-looking-glass/junior-designers-vs-senior-designers-fbe483d3b51e I was thinking… idea other F

Slide 76

Slide 76 text

https://medium.com/the-year-of-the-looking-glass/junior-designers-vs-senior-designers-fbe483d3b51e Actually… idea action improvement

Slide 77

Slide 77 text

https://www.flickr.com/photos/derpoly/8288583655 Idea is worth but…

Slide 78

Slide 78 text

https://medium.com/the-year-of-the-looking-glass/junior-designers-vs-senior-designers-fbe483d3b51e idea < action < improvement

Slide 79

Slide 79 text

Recap

Slide 80

Slide 80 text

Solution Motivation Implementation I made Compare Linker I wanted to make "bundle update" more fun to review I implemented it upon useful APIs

Slide 81

Slide 81 text

https://medium.com/the-year-of-the-looking-glass/junior-designers-vs-senior-designers-fbe483d3b51e Keep improvement!! idea action improvement

Slide 82

Slide 82 text

Thank you for listening :) =end