<feed xmlns='http://www.w3.org/2005/Atom'>
<title>delta/ruby-gems/chef.git/spec/tiny_server.rb, branch https_shell</title>
<subtitle>github.com: opscode/chef.git
</subtitle>
<link rel='alternate' type='text/html' href='http://trove.baserock.org/cgit/delta/ruby-gems/chef.git/'/>
<entry>
<title>Fix TinyServer races.</title>
<updated>2016-08-22T18:57:26+00:00</updated>
<author>
<name>John Keiser</name>
<email>john@johnkeiser.com</email>
</author>
<published>2016-08-19T00:11:12+00:00</published>
<link rel='alternate' type='text/html' href='http://trove.baserock.org/cgit/delta/ruby-gems/chef.git/commit/?id=07da07564be03070ac9a107faf77a33bb7270614'/>
<id>07da07564be03070ac9a107faf77a33bb7270614</id>
<content type='text'>
1. Wait for the start callback rather than the do block, as it happens
   later. This prevents us from getting into many conditions where the
   start returns before the server is fully initialized, where if stop()
   is called too soon after start returns, it would cause exceptions.
2. Wait for the thread to finish completely
3. Use Thread.current.abort_on_exception` to show the actual listen errors,
   so that problems like this can be diagnosed.
4. Use :each to start and stop TinyServer so that race conditions like this
   are exposed earlier and more often (this will let us rid ourselves of them
   more quickly).
5. Use WEBrick::HTTPServer directly, which gets rid of the need for the
   complicated trap workaround (rack is the one that traps).
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
1. Wait for the start callback rather than the do block, as it happens
   later. This prevents us from getting into many conditions where the
   start returns before the server is fully initialized, where if stop()
   is called too soon after start returns, it would cause exceptions.
2. Wait for the thread to finish completely
3. Use Thread.current.abort_on_exception` to show the actual listen errors,
   so that problems like this can be diagnosed.
4. Use :each to start and stop TinyServer so that race conditions like this
   are exposed earlier and more often (this will let us rid ourselves of them
   more quickly).
5. Use WEBrick::HTTPServer directly, which gets rid of the need for the
   complicated trap workaround (rack is the one that traps).
</pre>
</div>
</content>
</entry>
<entry>
<title>improved waiting logic for server start</title>
<updated>2016-08-16T17:28:43+00:00</updated>
<author>
<name>Matt Wrock</name>
<email>matt@mattwrock.com</email>
</author>
<published>2016-08-16T17:28:43+00:00</published>
<link rel='alternate' type='text/html' href='http://trove.baserock.org/cgit/delta/ruby-gems/chef.git/commit/?id=f39e177a4197ee7f887b15280ce7e2b42a49654d'/>
<id>f39e177a4197ee7f887b15280ce7e2b42a49654d</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>autofixing whitespace cops</title>
<updated>2016-02-05T23:00:00+00:00</updated>
<author>
<name>Lamont Granquist</name>
<email>lamont@scriptkiddie.org</email>
</author>
<published>2016-02-05T23:00:00+00:00</published>
<link rel='alternate' type='text/html' href='http://trove.baserock.org/cgit/delta/ruby-gems/chef.git/commit/?id=686113531d23f30e9973d659c456ae33eb9cff1f'/>
<id>686113531d23f30e9973d659c456ae33eb9cff1f</id>
<content type='text'>
4174 Style/SpaceInsideHashLiteralBraces
1860 Style/SpaceAroundOperators
1336 Style/SpaceInsideBlockBraces
1292 Style/AlignHash
 997 Style/SpaceAfterComma
 860 Style/SpaceAroundEqualsInParameterDefault
 310 Style/EmptyLines
 294 Style/IndentationConsistency
 267 Style/TrailingWhitespace
 238 Style/ExtraSpacing
 212 Style/SpaceBeforeBlockBraces
 166 Style/MultilineOperationIndentation
 144 Style/TrailingBlankLines
 120 Style/EmptyLineBetweenDefs
 101 Style/IndentationWidth
  82 Style/SpaceAroundBlockParameters
  40 Style/EmptyLinesAroundMethodBody
  29 Style/EmptyLinesAroundAccessModifier
   1 Style/RescueEnsureAlignment
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
4174 Style/SpaceInsideHashLiteralBraces
1860 Style/SpaceAroundOperators
1336 Style/SpaceInsideBlockBraces
1292 Style/AlignHash
 997 Style/SpaceAfterComma
 860 Style/SpaceAroundEqualsInParameterDefault
 310 Style/EmptyLines
 294 Style/IndentationConsistency
 267 Style/TrailingWhitespace
 238 Style/ExtraSpacing
 212 Style/SpaceBeforeBlockBraces
 166 Style/MultilineOperationIndentation
 144 Style/TrailingBlankLines
 120 Style/EmptyLineBetweenDefs
 101 Style/IndentationWidth
  82 Style/SpaceAroundBlockParameters
  40 Style/EmptyLinesAroundMethodBody
  29 Style/EmptyLinesAroundAccessModifier
   1 Style/RescueEnsureAlignment
</pre>
</div>
</content>
</entry>
<entry>
<title>Update all auth email address from opscode.com and getchef.com to chef.io.</title>
<updated>2016-02-02T22:53:28+00:00</updated>
<author>
<name>Noah Kantrowitz</name>
<email>noah@coderanger.net</email>
</author>
<published>2016-02-02T22:53:28+00:00</published>
<link rel='alternate' type='text/html' href='http://trove.baserock.org/cgit/delta/ruby-gems/chef.git/commit/?id=220b5a65ed21015f2704e5b344d95e304fcefd87'/>
<id>220b5a65ed21015f2704e5b344d95e304fcefd87</id>
<content type='text'>
Generated via git ls-files | xargs perl -pi -e "s/(Author.*?&lt;[^@]+@)(?:opscode\\.com|getchef\\.com)(&gt;)/\\1chef.io\\2/gi"</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Generated via git ls-files | xargs perl -pi -e "s/(Author.*?&lt;[^@]+@)(?:opscode\\.com|getchef\\.com)(&gt;)/\\1chef.io\\2/gi"</pre>
</div>
</content>
</entry>
<entry>
<title>Copyright year update for 2016 and massive cleanup.</title>
<updated>2016-02-02T22:43:28+00:00</updated>
<author>
<name>Noah Kantrowitz</name>
<email>noah@coderanger.net</email>
</author>
<published>2016-02-02T22:43:28+00:00</published>
<link rel='alternate' type='text/html' href='http://trove.baserock.org/cgit/delta/ruby-gems/chef.git/commit/?id=0878ed6123706ed4201644ee798da993f8cb5ad4'/>
<id>0878ed6123706ed4201644ee798da993f8cb5ad4</id>
<content type='text'>
Generated via git ls-files | xargs perl -pi -e "s/[Cc]opyright (?:\([Cc]\) )?((?\!$(date +%Y))\\d{4})(-\\d{4})?([, ][ \d]+)*(,|(?= ))/Copyright \\1-$(date +%Y),/g"</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Generated via git ls-files | xargs perl -pi -e "s/[Cc]opyright (?:\([Cc]\) )?((?\!$(date +%Y))\\d{4})(-\\d{4})?([, ][ \d]+)*(,|(?= ))/Copyright \\1-$(date +%Y),/g"</pre>
</div>
</content>
</entry>
<entry>
<title>Use double quotes by default</title>
<updated>2016-01-14T14:08:03+00:00</updated>
<author>
<name>Thom May</name>
<email>thom@chef.io</email>
</author>
<published>2016-01-14T14:08:03+00:00</published>
<link rel='alternate' type='text/html' href='http://trove.baserock.org/cgit/delta/ruby-gems/chef.git/commit/?id=51cfbdc4d16739caac4d946fadbe678444aafe34'/>
<id>51cfbdc4d16739caac4d946fadbe678444aafe34</id>
<content type='text'>
This is an entirely mechanically generated (chefstyle -a) change, to go
along with chef/chefstyle#5 . We should pick something and use it
consistently, and my opinion is that double quotes are the appropriate
thing.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This is an entirely mechanically generated (chefstyle -a) change, to go
along with chef/chefstyle#5 . We should pick something and use it
consistently, and my opinion is that double quotes are the appropriate
thing.
</pre>
</div>
</content>
</entry>
<entry>
<title>Consistent return value for started?</title>
<updated>2015-12-18T17:39:57+00:00</updated>
<author>
<name>Jay Mundrawala</name>
<email>jdmundrawala@gmail.com</email>
</author>
<published>2015-12-18T17:39:57+00:00</published>
<link rel='alternate' type='text/html' href='http://trove.baserock.org/cgit/delta/ruby-gems/chef.git/commit/?id=fa5cc13823ae8d3008448fa9b42015816679fb15'/>
<id>fa5cc13823ae8d3008448fa9b42015816679fb15</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>tiny_server should retry Errno::EHOSTUNREACH</title>
<updated>2015-12-18T17:39:00+00:00</updated>
<author>
<name>Jay Mundrawala</name>
<email>jdmundrawala@gmail.com</email>
</author>
<published>2015-12-18T17:39:00+00:00</published>
<link rel='alternate' type='text/html' href='http://trove.baserock.org/cgit/delta/ruby-gems/chef.git/commit/?id=939b6317aea3f554639cd110f18ee6b5ee185746'/>
<id>939b6317aea3f554639cd110f18ee6b5ee185746</id>
<content type='text'>
AIX seems to raise Errno::EHOSTUNREACH when the server
is not ready yet. Our tests on AIX fail with:
```
      Errno::EHOSTUNREACH:
         No route to host - connect(2) for "localhost" port 9000
       Shared Example Group: "a file with the wrong content" called from ./spec/support/shared/functional/file_resource.rb:936
       Shared Example Group: "a configured file resource" called from ./spec/support/shared/functional/file_resource.rb:279
       Shared Example Group: "a file resource" called from ./spec/functional/resource/remote_file_spec.rb:122
       # ./spec/tiny_server.rb:91:in `started?'
       # ./spec/tiny_server.rb:82:in `block in block_until_started'
       # ./spec/tiny_server.rb:81:in `times'
       # ./spec/tiny_server.rb:81:in `block_until_started'
       # ./spec/tiny_server.rb:72:in `start'
       # ./spec/support/shared/functional/http.rb:45:in `start_tiny_server'
       # ./spec/functional/resource/remote_file_spec.rb:111:in `block (3 levels) in &lt;top (required)&gt;'
```
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
AIX seems to raise Errno::EHOSTUNREACH when the server
is not ready yet. Our tests on AIX fail with:
```
      Errno::EHOSTUNREACH:
         No route to host - connect(2) for "localhost" port 9000
       Shared Example Group: "a file with the wrong content" called from ./spec/support/shared/functional/file_resource.rb:936
       Shared Example Group: "a configured file resource" called from ./spec/support/shared/functional/file_resource.rb:279
       Shared Example Group: "a file resource" called from ./spec/functional/resource/remote_file_spec.rb:122
       # ./spec/tiny_server.rb:91:in `started?'
       # ./spec/tiny_server.rb:82:in `block in block_until_started'
       # ./spec/tiny_server.rb:81:in `times'
       # ./spec/tiny_server.rb:81:in `block_until_started'
       # ./spec/tiny_server.rb:72:in `start'
       # ./spec/support/shared/functional/http.rb:45:in `start_tiny_server'
       # ./spec/functional/resource/remote_file_spec.rb:111:in `block (3 levels) in &lt;top (required)&gt;'
```
</pre>
</div>
</content>
</entry>
<entry>
<title>fix rspec timeouts in tinyserver</title>
<updated>2015-12-10T19:11:44+00:00</updated>
<author>
<name>Lamont Granquist</name>
<email>lamont@scriptkiddie.org</email>
</author>
<published>2015-12-10T19:11:44+00:00</published>
<link rel='alternate' type='text/html' href='http://trove.baserock.org/cgit/delta/ruby-gems/chef.git/commit/?id=8c1cb10eb7f6d02504c52971e2ddfd3061e7a2a4'/>
<id>8c1cb10eb7f6d02504c52971e2ddfd3061e7a2a4</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>fix rspecs-ctrl-c</title>
<updated>2015-11-25T20:17:05+00:00</updated>
<author>
<name>Lamont Granquist</name>
<email>lamont@scriptkiddie.org</email>
</author>
<published>2015-11-25T20:17:05+00:00</published>
<link rel='alternate' type='text/html' href='http://trove.baserock.org/cgit/delta/ruby-gems/chef.git/commit/?id=3f5bbc8516073d6af7b6d2aa9b46bc09af57c880'/>
<id>3f5bbc8516073d6af7b6d2aa9b46bc09af57c880</id>
<content type='text'>
we can't fork off tinyserver without a lot of work in the test
codebase, so instead save a copy of the old rspec signal handler and then
after tinyserver has started (and we're sure that rack has scribbled
over the signal handler), restore the rspec signal handler.

there's an obvious race if someone hits ctrl-c after tinyserver has
scribbled over the sigint handler but before we restore it, but this is
99.9% better of a solution than nothing.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
we can't fork off tinyserver without a lot of work in the test
codebase, so instead save a copy of the old rspec signal handler and then
after tinyserver has started (and we're sure that rack has scribbled
over the signal handler), restore the rspec signal handler.

there's an obvious race if someone hits ctrl-c after tinyserver has
scribbled over the sigint handler but before we restore it, but this is
99.9% better of a solution than nothing.
</pre>
</div>
</content>
</entry>
</feed>
