{"id":3125,"date":"2018-06-20T10:00:01","date_gmt":"2018-06-20T01:00:01","guid":{"rendered":"https:\/\/blog.timecrowd.net\/?p=3125"},"modified":"2018-06-18T11:10:24","modified_gmt":"2018-06-18T02:10:24","slug":"commit-to-rails-at-first-time","status":"publish","type":"post","link":"https:\/\/blog.timecrowd.net\/commit-to-rails-at-first-time\/","title":{"rendered":"\u521d\u3081\u3066Rails\u306b\u5909\u66f4\u304c\u53d6\u308a\u8fbc\u307e\u308c\u308b\u307e\u3067"},"content":{"rendered":"<p>\u4ee5\u524d\u3001<a href=\"https:\/\/blog.timecrowd.net\/customize-action-mailer-for-testing\/\" target=\"_blank\" rel=\"noopener\">Action Mailer\u3092\u30ab\u30b9\u30bf\u30de\u30a4\u30ba\u3057\u3066\u30e1\u30fc\u30eb\u9001\u4fe1\u3092\u30c6\u30b9\u30c8\u3057\u3088\u3046<\/a>\u3068\u3044\u3046\u8a18\u4e8b\u3067<code>ActionMailer::Base.register_interceptor<\/code>\u306b\u3064\u3044\u3066\u7d39\u4ecb\u3057\u307e\u3057\u305f\u3002<\/p>\n<p><span style=\"font-family: -apple-system, system-ui, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif; font-size: 1rem;\">\u305d\u306e\u8fba\u308a\u306e\u30b3\u30fc\u30c9\u3092\u8aad\u3093\u3067\u898b\u308b\u3068\u3069\u3046\u3082\u767b\u9332\u3059\u308b\u30e1\u30bd\u30c3\u30c9\uff08<\/span><code>register_*<\/code><span style=\"font-family: -apple-system, system-ui, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif; font-size: 1rem;\">\uff09\u306f\u5b58\u5728\u3059\u308b\u306e\u306b\u3001\u89e3\u9664\u3059\u308b\u30e1\u30bd\u30c3\u30c9\u304c\u5b58\u5728\u3057\u306a\u3044\u3053\u3068\u306b\u6c17\u304c\u4ed8\u304d\u307e\u3057\u305f\u3002<\/span><\/p>\n<p>\u3084\u306f\u308a\u767b\u9332\u3059\u308b\u30e1\u30bd\u30c3\u30c9\u3060\u3051\u3042\u3063\u3066\u89e3\u9664\u3059\u308b\u30e1\u30bd\u30c3\u30c9\u304c\u5b58\u5728\u3057\u306a\u3044\u3068\u3044\u3046\u306e\u306f\u30d0\u30e9\u30f3\u30b9\u304c\u60aa\u3044\u3060\u308d\u3046\u3068\u3044\u3046\u3053\u3068\u3067\u3001\u521d\u3081\u3066Rails\u306bPR\u3092\u51fa\u3059\u3053\u3068\u306b\u6311\u6226\u3057\u3066\u307f\u307e\u3057\u305f\u3002<\/p>\n<p>\u53f0\u6e7e\u306b\u6765\u3066\u304a\u3088\u305d1\u30f6\u6708\u534a\u7a0b\u304c\u7d4c\u3061\u3001\u3044\u3088\u3044\u3088\u76ee\u7684\u3067\u3042\u3063\u305f\u30c9\u30e9\u30b4\u30f3\u30dc\u30fc\u30c8\u306e\u8a66\u5408\u304c\u8fd1\u3065\u3044\u3066\u6765\u3066\u3061\u3087\u3063\u3068\u30ef\u30af\u30ef\u30af\u6c17\u5473\u306e\u65c5\u3057\u3066\u3044\u308b\u30a8\u30f3\u30b8\u30cb\u30a2\u4e09\u5b85\u3067\u3059\u3002\uff08\u6050\u3089\u304f\u6295\u7a3f\u3055\u308c\u308b\u9803\u306b\u306f\u7d42\u308f\u3063\u3066\u3044\u308b\uff06\u5e30\u56fd\u3057\u3066\u3044\u308b\u53ef\u80fd\u6027\u3042\u308a<\/p>\n<p>\u4eca\u65e5\u306fRails\u3078\u306e\u521d\u30b3\u30df\u30c3\u30c8\u306e\u69d8\u5b50\u3092\u304a\u5c4a\u3051\u3057\u305f\u3044\u3068\u601d\u3044\u307e\u3059\u3002<\/p>\n<p><a href=\"https:\/\/github.com\/rails\/rails\/pull\/32207\" target=\"_blank\" rel=\"noopener\">ActionMailer::Base can unregister observer(s) and interceptor(s). by kmiyake \u00b7 Pull Request #32207 \u00b7 rails\/rails<\/a><\/p>\n<div id=\"toc_container\" class=\"toc_white no_bullets\"><p class=\"toc_title\">\u76ee\u6b21<\/p><ul class=\"toc_list\"><li><a href=\"#i\"><span class=\"toc_number toc_depth_1\">1<\/span> \u767a\u898b<\/a><\/li><li><a href=\"#i-2\"><span class=\"toc_number toc_depth_1\">2<\/span> \u4fee\u6b63<\/a><\/li><li><a href=\"#i-3\"><span class=\"toc_number toc_depth_1\">3<\/span> \u5f85\u3066\u3069\u66ae\u3089\u305b\u3069<\/a><\/li><li><a href=\"#mergeContributor\"><span class=\"toc_number toc_depth_1\">4<\/span> merge\u3001\u305d\u3057\u3066\u6674\u308c\u3066Contributor\u306b<\/a><\/li><li><a href=\"#i-4\"><span class=\"toc_number toc_depth_1\">5<\/span> \u307e\u3068\u3081<\/a><\/li><\/ul><\/div>\n<h2><span id=\"i\">\u767a\u898b<\/span><\/h2>\n<p>\u5148\u306e\u8a18\u4e8b\u3067\u7d39\u4ecb\u3057\u305f\u51e6\u7406\u3092\u5b9f\u88c5\u3057\u305f\u969b\u306b\u3001\u5b9f\u306f\u65e2\u306b\u4e00\u5ea6<a href=\"https:\/\/github.com\/rails\/rails\/pull\/18446\" target=\"_blank\" rel=\"noopener\">\u540c\u3058\u5bfe\u5fdc\u3092\u3057\u305fPR<\/a>\u304cmerge\u3055\u308c\u3066\u3044\u305f\u306e\u3067\u3059\u3002\u305f\u3060\u3053\u308c\u306f\u3042\u3068\u306b\u306a\u3063\u3066\u30c6\u30b9\u30c8\u306b\u306fmocha\u3092\u4f7f\u7528\u3057\u306a\u3044\u3088\u3046\u306b\u3068\u3044\u3046\u3053\u3068\u3067<a href=\"https:\/\/github.com\/rails\/rails\/pull\/18446#issuecomment-159079361\" target=\"_blank\" rel=\"noopener\">revert<\/a>\u3055\u308c\u3066\u3057\u307e\u3063\u305f\u3088\u3046\u3067\u3059\u3002<\/p>\n<p>\u3068\u3044\u3046\u3053\u3068\u3067\u7d50\u5c40\u306f\u5909\u66f4\u304c\u53d6\u308a\u8fbc\u307e\u308c\u306c\u307e\u307e\u653e\u7f6e\u3055\u308c\u308b\u3053\u3068\u3068\u306a\u3063\u305f\u306e\u3067\u3059\u3002<\/p>\n<h2><span id=\"i-2\">\u4fee\u6b63<\/span><\/h2>\n<p>\u30d9\u30fc\u30b9\u306f\u5148\u306ePR\u3067\u5b9f\u88c5\u3055\u308c\u3066\u3044\u305f\u306e\u3067\u3001\u305d\u3061\u3089\u3092\u53c2\u8003\u306b\u5143\u3005\u306e\u4fee\u6b63\u306b\u306f\u542b\u307e\u308c\u3066\u3044\u306a\u304b\u3063\u305f<code>unregister_observer<\/code>\u3068<code>unregister_observers<\/code>\u3092\u8ffd\u52a0\u3057\u3001\u3044\u304f\u3064\u304b\u306e\u5909\u66f4\u70b9\u3092\u8abf\u6574\u3001\u30c6\u30b9\u30c8\u3092\u8ffd\u52a0\u3057\u3066PR\u3092\u4f5c\u6210\u3057\u307e\u3057\u305f\u3002<\/p>\n<p>PR\u3092\u4f5c\u6210\u3057\u3066\u3082\u306e\u306e\u6570\u5206\u3082\u3057\u306a\u3044\u3046\u3061\u306b<a href=\"https:\/\/github.com\/rails\/rails\/pull\/32207#pullrequestreview-102485490\" target=\"_blank\" rel=\"noopener\">\u30c6\u30b9\u30c8\u306e\u554f\u984c\u70b9\u3092\u6307\u6458<\/a>\u3057\u3066\u304f\u308b\u3068\u3044\u3046\u30c4\u30ef\u30e2\u30ce\u306b\u906d\u9047\u3057\u307e\u3057\u305f\u3002<\/p>\n<p><a href=\"https:\/\/www.ruby.or.jp\/ja\/news\/20150911\" target=\"_blank\" rel=\"noopener\">Ruby\u30a2\u30bd\u30b7\u30a8\u30fc\u30b7\u30e7\u30f3 &#8211; Ruby Prize 2015 \u5019\u88dc\u8005\u767a\u8868<\/a>\u3067\u306fRails\u306e\u30d1\u30c3\u30c1\u30e2\u30f3\u30b9\u30bf\u30fc\u3068\u8a55\u3055\u308c\u3066\u3044\u307e\u3059\u3002merge commit\u304c\u542b\u307e\u308c\u3066\u3044\u308b\u3068\u306f\u8a00\u3048\u3001<a href=\"http:\/\/contributors.rubyonrails.org\/contributors\/in-time-window\/this-year\" target=\"_blank\" rel=\"noopener\">\u4eca\u5e74\u306f\u65e2\u306b300\u3092\u8d85\u3048\u308bcommit<\/a>\u3092\u3057\u3066\u3044\u307e\u3059\u3002\uff08\u304a\u305d\u308d\u3057\u3084<\/p>\n<p>\u514e\u306b\u3082\u89d2\u306b\u3082\u30ec\u30d3\u30e5\u30fc\u3067\u306e\u6307\u6458\u4e8b\u9805\u3092\u4fee\u6b63\u3092\u53cd\u6620\u3057\u3066\u518dpush\u3057\u307e\u3057\u305f\u3002<\/p>\n<h2><span id=\"i-3\">\u5f85\u3066\u3069\u66ae\u3089\u305b\u3069<\/span><\/h2>\n<p>\u305d\u308c\u304b\u3089\u30c9\u30ad\u30c9\u30ad\u3057\u306a\u304c\u3089merge\u3055\u308c\u308b\u306e\u3092\u5f85\u3063\u3066\u3044\u307e\u3057\u305f\u3002\u304c\u3001\u5f85\u3066\u3069\u66ae\u3089\u305b\u3069\u97f3\u6c99\u6c70\u306a\u3057\u3002\u3068\u308a\u3042\u3048\u305a\u306e\u3093\u3073\u308a\u53cd\u5fdc\u3092\u5f85\u3063\u3066\u3044\u305f\u3089\u30012\u9031\u9593\u3061\u3087\u3063\u3068\u904e\u304e\u3066\u304b\u3089<a href=\"https:\/\/github.com\/rails\/rails\/pull\/32207#pullrequestreview-123600235\" target=\"_blank\" rel=\"noopener\">member\u306e\u65b9\u304b\u3089LGTM<\/a>\u3092\u3082\u3089\u3044\u307e\u3057\u305f\u3002<\/p>\n<p>\u305d\u3053\u3067CHANGELOG\u3092\u8ffd\u8a18\u3057\u3066\u304f\u308c\u306a\u3044\u304b\u3068\u3044\u3046\u6307\u6458\u304c\u3042\u3063\u305f\u306e\u3067\u3001\u3053\u3061\u3089\u3082\u4ee5\u524d\u306ePR\u3067\u66f8\u304b\u308c\u3066\u3044\u305f\u5185\u5bb9\u3092\u3044\u304f\u3064\u304b\u4fee\u6b63\u3057\u3066\u8ffd\u8a18\u3057\u307e\u3057\u305f\u3002<\/p>\n<p>CHANGELOG\u306e\u4fee\u6b63\u3092push\u3059\u308b\u3068\u3001\u4eca\u5ea6\u306f\u5225\u306e<a href=\"https:\/\/github.com\/rails\/rails\/pull\/32207#discussion_r191434600\" target=\"_blank\" rel=\"noopener\">member\u306e\u65b9\u304b\u3089\u5143\u3005\u306eauthor\u3082\u66f8\u304d\u52a0\u3048\u3066<\/a>\u304a\u3044\u3066\u304f\u308c\u3068\u8a00\u308f\u308c\u305f\u306e\u3067\u3001\u81ea\u5206\u306e\u540d\u524d\u306e\u524d\u306b\u8ffd\u8a18\u3057\u3066\u518d\u5ea6push\u3057\u307e\u3057\u305f\u3002<\/p>\n<p>\u52dd\u624b\u306b\u540d\u524d\u3092\u4f7f\u3063\u3066\u3044\u3044\u306e\u304b\u306a\u3041\u3068\u601d\u3044\u3001\u3068\u308a\u3042\u3048\u305a\u81ea\u5206\u306e\u540d\u524d\u3092\u66f8\u3044\u3066\u304a\u3044\u305f\u306e\u3067\u3059\u304c\u3001\u3069\u3046\u3084\u3089\u305d\u3093\u306a\u3053\u3068\u306f\u6c17\u306b\u3057\u306a\u304f\u3066\u3088\u304b\u3063\u305f\u3089\u3057\u3044\u3067\u3059\u3002<\/p>\n<h2><span id=\"mergeContributor\">merge\u3001\u305d\u3057\u3066\u6674\u308c\u3066Contributor\u306b<\/span><\/h2>\n<p>CHANGELOG\u306e\u4fee\u6b63\u5f8c\u3001\u7a0b\u306a\u304f\u3057\u3066\u4fee\u6b63\u304cmerge\u3055\u308c\u3066\u6674\u308c\u3066Rails\u306eContributor\u3068\u306a\u308b\u3053\u3068\u304c\u3067\u304d\u307e\u3057\u305f\uff01\uff08\u30e4\u30c3\u30bf\u30fc<\/p>\n<p><img loading=\"lazy\" class=\"alignnone size-full wp-image-3128\" src=\"https:\/\/blog.timecrowd.net\/wp-content\/uploads\/2018\/06\/Screen_Shot_2018-06-15_at_15_53_21.png\" alt=\"\" width=\"1364\" height=\"364\" srcset=\"https:\/\/blog.timecrowd.net\/wp-content\/uploads\/2018\/06\/Screen_Shot_2018-06-15_at_15_53_21.png 1364w, https:\/\/blog.timecrowd.net\/wp-content\/uploads\/2018\/06\/Screen_Shot_2018-06-15_at_15_53_21-768x205.png 768w\" sizes=\"(max-width: 1364px) 100vw, 1364px\" \/><\/p>\n<p><img loading=\"lazy\" class=\"alignnone size-full wp-image-3129\" src=\"https:\/\/blog.timecrowd.net\/wp-content\/uploads\/2018\/06\/Screen_Shot_2018-06-15_at_15_53_37.png\" alt=\"\" width=\"2050\" height=\"854\" srcset=\"https:\/\/blog.timecrowd.net\/wp-content\/uploads\/2018\/06\/Screen_Shot_2018-06-15_at_15_53_37.png 2050w, https:\/\/blog.timecrowd.net\/wp-content\/uploads\/2018\/06\/Screen_Shot_2018-06-15_at_15_53_37-768x320.png 768w\" sizes=\"(max-width: 2050px) 100vw, 2050px\" \/><\/p>\n<h2><span id=\"i-4\">\u307e\u3068\u3081<\/span><\/h2>\n<p>\u4eca\u307e\u3067\u9577\u304fRails\u3092\u4f7f\u3063\u3066\u304d\u305f\u306e\u3067\u3059\u304c\u3001\u521d\u3081\u3066Rails\u306bcommit\u3059\u308b\u3053\u3068\u304c\u3067\u304d\u307e\u3057\u305f\u3002<\/p>\n<p>\u5143\u3068\u306a\u3063\u305fPR\u306e\u4f5c\u6210\u65e5\u6642\u3092\u898b\u3066\u3044\u305f\u3060\u3051\u308c\u3070\u3001\u305d\u308c\u307b\u3069\u5fc5\u8981\u3068\u3055\u308c\u3066\u3044\u306a\u3044\u30e1\u30bd\u30c3\u30c9\u3060\u3063\u305f\u304b\u3082\u3057\u308c\u307e\u305b\u3093\u304c\u3001\u305d\u308c\u3067\u3082Rails\u3092\u5c11\u3057\u3067\u3082\u6539\u5584\u3067\u304d\u308c\u3070\u3068\u3044\u3046\u601d\u3044\u3067PR\u3092\u51fa\u3057\u3066merge\u3055\u308c\u308b\u3068\u3044\u3046\u7d4c\u9a13\u3092\u3067\u304d\u305f\u306e\u306f\u826f\u304b\u3063\u305f\u306a\u3068\u601d\u3044\u307e\u3059\u3002<\/p>\n<p>\u4eca\u5ea6\u306f\u4e00\u304b\u3089Rails\u306e\u554f\u984c\u306b\u53d6\u308a\u7d44\u3093\u3067PR\u3092\u51fa\u3057\u3066\u53d6\u308a\u8fbc\u3093\u3067\u3082\u3089\u3048\u308b\u3088\u3046\u306b\u3057\u305f\u3044\u306a\u3068\u601d\u3044\u307e\u3059\u3002<\/p>\n<p>\u7686\u3055\u3093\u3082\u81c6\u305b\u305a\u7a4d\u6975\u7684\u306b\u30aa\u30fc\u30d7\u30f3\u30bd\u30fc\u30b9\u306b\u8ca2\u732e\u3057\u3066\u3044\u304d\u307e\u3057\u3087\u3046\uff01<\/p>\n","protected":false},"excerpt":{"rendered":"\u4ee5\u524d\u3001Action Mailer\u3092\u30ab\u30b9\u30bf\u30de\u30a4\u30ba\u3057\u3066\u30e1\u30fc\u30eb\u9001\u4fe1\u3092\u30c6\u30b9\u30c8\u3057\u3088\u3046\u3068\u3044\u3046\u8a18\u4e8b\u3067ActionMailer::Base.register&#8230;","protected":false},"author":5,"featured_media":3132,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"cybocfi_hide_featured_image":""},"categories":[5],"tags":[12],"_links":{"self":[{"href":"https:\/\/blog.timecrowd.net\/wp-json\/wp\/v2\/posts\/3125"}],"collection":[{"href":"https:\/\/blog.timecrowd.net\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/blog.timecrowd.net\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/blog.timecrowd.net\/wp-json\/wp\/v2\/users\/5"}],"replies":[{"embeddable":true,"href":"https:\/\/blog.timecrowd.net\/wp-json\/wp\/v2\/comments?post=3125"}],"version-history":[{"count":6,"href":"https:\/\/blog.timecrowd.net\/wp-json\/wp\/v2\/posts\/3125\/revisions"}],"predecessor-version":[{"id":3134,"href":"https:\/\/blog.timecrowd.net\/wp-json\/wp\/v2\/posts\/3125\/revisions\/3134"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/blog.timecrowd.net\/wp-json\/wp\/v2\/media\/3132"}],"wp:attachment":[{"href":"https:\/\/blog.timecrowd.net\/wp-json\/wp\/v2\/media?parent=3125"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blog.timecrowd.net\/wp-json\/wp\/v2\/categories?post=3125"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blog.timecrowd.net\/wp-json\/wp\/v2\/tags?post=3125"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}