Successfully reported this slideshow.
We use your LinkedIn profile and activity data to personalize ads and to show you more relevant ads. You can change your ad preferences anytime.

reading suture

626 views

Published on

Shinjuku.rb #42

Published in: Technology
  • Be the first to comment

reading suture

  1. 1. testdouble/suture 2016/10/26 Shinjuku.rb #42 @treby006
  2. 2. • Hiroaki Ninomiya / treby (@treby006) • Web (2016.7 ) • Shinjuku.rb • • Rails Vue.js Django
  3. 3. Rails, InfluxDB(Heroku) Ruby (Sakura VPS) ( )
  4. 4. • 12/17(Sat)@ • • https://github.com/imas/hackathon
  5. 5. http://lineblog.me/treby
  6. 6. • Code Analysis and Metrics • testdouble/suture • → gem • gem
  7. 7. testdouble/suture • gem • suture …… • RubyKaigi2016 searl • •
  8. 8. suture 1. (seam) 2. 3. 4. 5.
  9. 9. (1), (2) / • (Seam) • • •
  10. 10. (1), (2) /
  11. 11. (3) •
  12. 12. (3) SUTURE_RECORD_CALLS=true SQLite
  13. 13. (3) record in/out
  14. 14. (4) record in/out
  15. 15. (5) write new code
  16. 16. (5)
  17. 17. (5) verify in/out
  18. 18. (5) • • raise_on_result_mismatch: false • return_old_on_result_mismatch (default false)
  19. 19. Glided Rose kata • • https://github.com/testdouble/suture/tree/ master/example/rails_app
  20. 20. Gem • • create • verify • delete • config • reset
  21. 21. Suture.create • suture • plan surgeon • plan …… • surgeon …… strategy
  22. 22. Suture.create
  23. 23. Suture.create • create • BuildsPlan • ValidatesPlan • ChoosesSurgeon • PerformsSurgery
  24. 24. create - 1. BuildsPlan -> ValidatesPlan (1) 2. ChoosesSurgeon (3) 3. PerformSurgery (2)
  25. 25. create - BuildsPlan • config • ValidatesPlan
  26. 26. create - PerformSurgery • • ChoosesSurgeon( ) surgeon operate • Strategy
  27. 27. create - ChoosesSurgeon • …… plan Strategy • 4 surgeon • Observer • Auditor • Remediator • NoOp
  28. 28. Scalpel • • surgeon • plan location(old/new)
  29. 29. surgeon - Observer • • dictaphone( ) • Scalpel cut record • Image from https://commons.wikimedia.org/wiki/File:2007-12-29_Sony_dictaphone_M-727V.jpg
  30. 30. surgeon - Auditor • • • •
  31. 31. surgeon - Remediator • • •
  32. 32. surgeon - NoOp • •
  33. 33. • gem • suture • gem •

×