{"push_id":3182600573,"size":6,"distinct_size":4,"ref":"refs/heads/schneems/fix-puma-rack-handler-config","head":"c24c0c883496f581d9092bbe7f7431129eeb7190","before":"a6d92a10ff2a657d512b1b4465fb6ccc3d93f3bf","commits":[{"sha":"2db6d4d779bac0d369e8b262090c0e8cddbccb73","author":{"name":"MSP-Greg","email":"9abfdc20211b0ed870023ccf9fa185e226f4206e@gmail.com"},"message":"update travis rubies - 2.3.8, 2.4.5, 2.5.3","distinct":true,"url":"https://api.github.com/repos/schneems/puma/commits/2db6d4d779bac0d369e8b262090c0e8cddbccb73"},{"sha":"7915afc340575ec3e90746884f7251b7d1554af8","author":{"name":"MSP-Greg","email":"9abfdc20211b0ed870023ccf9fa185e226f4206e@gmail.com"},"message":"update for RubyGems 3.0","distinct":true,"url":"https://api.github.com/repos/schneems/puma/commits/7915afc340575ec3e90746884f7251b7d1554af8"},{"sha":"ce57cfb8c3c8259cda13c322de32dd4ff07ec03a","author":{"name":"schneems","email":"a7a532ca64eb4cf510aab174cdabcc084c29a395@gmail.com"},"message":"Allow running individual tests via the `m` gem. \n\n```\n$ bundle exec m test/test_rack_handler.rb:34\n```\n\nIf it's not in the Gemfile, then you can't execute `m` with `bundle exec`.","distinct":false,"url":"https://api.github.com/repos/schneems/puma/commits/ce57cfb8c3c8259cda13c322de32dd4ff07ec03a"},{"sha":"cecc44aa0ae326e46031b48023253d08df706455","author":{"name":"Richard Schneeman","email":"d1820088e1cf067a2bc370052c48f5b3c46c3f57@gmail.com"},"message":"Merge pull request #1701 from schneems/schneems/m\n\nAllow running individual tests via the `m` gem.","distinct":false,"url":"https://api.github.com/repos/schneems/puma/commits/cecc44aa0ae326e46031b48023253d08df706455"},{"sha":"e5d566ed81f3663d70f0318f8bf3d858734cb74b","author":{"name":"Richard Schneeman","email":"d1820088e1cf067a2bc370052c48f5b3c46c3f57@gmail.com"},"message":"Merge pull request #1682 from MSP-Greg/update-travis-ruby\n\nupdate travis rubies - 2.3.8, 2.4.5, 2.5.3","distinct":true,"url":"https://api.github.com/repos/schneems/puma/commits/e5d566ed81f3663d70f0318f8bf3d858734cb74b"},{"sha":"c24c0c883496f581d9092bbe7f7431129eeb7190","author":{"name":"schneems","email":"a7a532ca64eb4cf510aab174cdabcc084c29a395@gmail.com"},"message":"Rack handler should use provided default host\n\nThis issue is somewhat tricky. When Rails is booted via `rails server` there are two types of configuration options passed, ones specified directly by a user like `rails s -p 3001` will always \"win\".\n\nFor any other config that is not explicitly passed in, puma will consider it a \"default\". For example when you run `rails s` (without -p) then the default port will be 3000.\n\nThere is one other way to configure puma though, and that is via a config file:\n\n```\n# config/puma.rb\nport 3002\n```\n\nThis is the order of precedence for configuration\n\n1) Anything the user explicitly passes to `rails s`\n2) Config specified in `config/puma.rb` file\n3) Default values passed in via `rails s`\n4) Defaults values stored in puma\n\nThis fallback mechanism works well except in the case of calling `port` in a `config/puma.rb` file. To understand look at the [old method definition](https://github.com/puma/puma/blob/2668597ec1dd9546d83db9f2ec5ad092add483e6/lib/puma/dsl.rb#L140-L145):\n\n```\ndef port(port, host=nil)\n  host ||= Configuration::DefaultTCPHost\n  bind \"tcp://#{host}:#{port}\"\nend\n```\n\nWhen the `port` method gets called, even if the user did not specify a `host` the `Configuration::DefaultTCPHost` will be used, which is a problem for local development because it defaults to `0.0.0.0`. [SO about 0.0.0.0 versus localhost](https://stackoverflow.com/questions/20778771/what-is-the-difference-between-0-0-0-0-127-0-0-1-and-localhost).\n\nIn this case, while a user did directly specify a port, they did not specify a host, so you would expect the `rails s` defaults passed in to take affect.\n\nTo make Puma respect that the host coming from `rails s` has more precedence than it's own default host, we must introduce the ability to set and retrieve a default_host value.\n\nThis is then used in the rack handler so when `rails s` passes in `:Host => \"localhost\"` then it is used instead of reverting to `0.0.0.0`.\n\nThe issue with #1699 is the test was wrong, it would have failed if a config file was present with a `port` invocation.","distinct":true,"url":"https://api.github.com/repos/schneems/puma/commits/c24c0c883496f581d9092bbe7f7431129eeb7190"}]}
{"actor":{"display_login":"schneems"}}