Upgrade to Pro — share decks privately, control downloads, hide ads and more …

rails-erdと初めてのOSSコントリビューション

 rails-erdと初めてのOSSコントリビューション

@第6回スタートアップRails勉強会 ( https://connpass.com/event/59930/ )

A79762150f8a3c6015ec11c4f494a371?s=128

kikunantoka

July 18, 2017
Tweet

Transcript

  1. rails-erdͱ ॳΊͯͷOSSίϯτϦϏϡʔγϣϯ @kikunantoka

  2. ࣗݾ঺հ about: name: Fumitaka Kikukawa twitter: @kikunantoka work_at: giftee Inc.

    // giftee is a good company.
  3. ΞδΣϯμ • DBઃܭͷ΍Γํʹ͍ͭͯʢπʔϧʣ • rails-erdʹ͍ͭͯ • ॳΊͯOSSίϯτϦϏϡʔτͨ͠࿩

  4. Έͳ͞Μ DBઃܭ͢Δ࣌ͬͯɺ ͲΜͳπʔϧ࢖ͬͯ·͔͢ʁ

  5. gifteeͰ͸ 1. MySQLWorkbenchͰୟ͖Λ࡞Δ 2. ΈΜͳͰٞ࿦͠ͳ͕Βमਖ਼ 3. $ rails g model

    4. ͦͷޙ͸rails-erdͰࣗಈग़ྗ
  6. ྫ͑͹ • ΧδϡΞϧΪϑτΛૹΔαʔϏεΛߟ͑Δ

  7. MySQLWorkbench • ୟ͖Λ࡞Δ

  8. ΈΜͳͰٞ࿦ • “serial”͸࿈൪ͳҙຯ߹͍͋Δ͔ΒɺϥϯμϜ ͳจࣈྻѻ͏ΧϥϜͳΒ “code”͡Όͳ͍ʁ

  9. Railsʹࣗಈग़ྗ…͸Ͱ͖ͳ͍ʁ • mysql workbench rails exporter plugin • αϙʔτ͕ଓ͍͍ͯͳ͍

  10. Railsʹࣗಈग़ྗ…͸Ͱ͖ͳ͍ʁ • MySQLWorkbenchͰSQLΛΤΫεϙʔτ͠ ͯɺSQLΛ࣮ߦ • $ rails db:schema:dump • ΞιγΤʔγϣϯ͸खಈ

  11. $ rails g model

  12. ࣮૷͕ਐΉʹͭΕ… • ͋ͬɺ΍ͬͺΓ͜ͷΧϥϜඞཁͳ͔ͬͨ • ͜ͷςʔϒϧɺ΍ͬͺΓ෼͚ͨ͘ͳ͍ʁ → ίʔυͷमਖ਼ΛMySQLWorkbenchʹ൓ө͠ଓ͚Δ ͷ͕ਏ͍… → ޙͰೖͬͨਓ͕ςʔϒϧߏ଄ΛΩϟονΞοϓͰ͖

    ͳ͍
  13. rails-erd

  14. rails-erd • DB schemaͱΞιγΤʔγϣϯ͔ΒࣗಈͰER ਤΛੜ੒ͯ͘͠ΕΔgem • https://github.com/voormedia/rails-erd

  15. rails-erd • ʮύʔϑΣΫτRuby on RailsʯͰ঺հ͞Ε͍ͯΔ • 5-6ষ rails-erdͰϞσϧ ͷERਤΛੜ੒͢Δ

  16. rails-erd • $ bundle exec erd

  17. rails-erd • erd.pdf

  18. ͜Μͳͷ΋ग़ྗͰ͖·͢

  19. ͜Μͳͷ΋ग़ྗͰ͖·͢

  20. ͓͢͢Ίͷerdconfig

  21. ࣗಈԽ • มߋͷ౓ʹίϚϯυଧͭͷΊΜͲ͍͘͞ • http://qiita.com/kikunantoka/items/1eb0f1bb0213450611c6

  22. ࣗಈԽ

  23. ͞ΒͳΔࣗಈԽ • ϓϩδΣΫτຖʹίϐϖ͢ΔͷΊΜͲ͏ • ීٴ͠ͳͦ͞͏

  24. δΣωϨʔλͩ • ຊՈΛݟͯΈΔ • ࠟ੻͸͋Δ΋ͷͷɺͲ͏΍Βಈ͍͍ͯͳ͍Α ͏ͩ…

  25. ॳΊͯͷ OSSίϯτϦϏϡʔτ

  26. Issueཱ͕͍ͬͯͨ • ͜ΕͳΒ௚ͤͦ͏

  27. PRΛ౤͛Δ·Ͱ 1. ϓϩδΣΫτΛFork 2. ࣮૷ 3. commit 4. kikunantoka/rails-erdʹPush 5.

    PRΛ౤͛Δ
  28. PR

  29. 2ि͙ؒΒ͍ ແ൓Ԡͩͬͨ΋ͷͷ… ͠ΕͬͱϚʔδ͞Εͯͨʂ

  30. Published

  31. Contributors

  32. Կ͕มΘ͔ͬͨ • $ rails g erd:install • ࣗಈͰϑΝΠϧ͕࡞੒͞Εɺdb:migrateΛ hookͯ͠ɺERਤΛੜ੒ͯ͘͠ΕΔ

  33. OSSͷૂ͍໨ • beginnerλά͸ෑډ͕௿͘ɺॳOSSίϯτϦ Ϗϡʔγϣϯʹ͸ྑͦ͞͏ • Α͘࢖͏gemͷissueͱ͔Λwatch͓ͯ͘͠ͱ ྑͦ͞͏

  34. ࠓޙ • ͍ͭ΋OSSʹ͓ੈ࿩ʹͳͬͯΔ͠ɺؐݩͯ͠ ͍͖͍ͨ

  35. ·ͱΊ • rails-erdʹ͍ͭͯ • ERਤΛRailsͷίʔυ͔Βࣗಈੜ੒ • OSS • PRνϟϯε͸ͨ͘͞Μస͕ͬͯͦ͏

  36. ίϚʔγϟϧ • We are hiring!!! - ΤϯδχΞืूதͰ͢ʂ ձһ਺ສਓಥഁʂ ࠃ಺/PͷΧδϡΞϧΪϑταʔϏε