<!DOCTYPE html>
<html>
<head>
</head>
<body>
<dl style="line-height: 1.5; margin-left: 2em">
<dt style="clear: both; float: left; font-weight: bold; width: 8em">Author</dt>
<dd style="margin-left: 8.5em">YUKI Hiroshi <shimo****@clear*****></dd>
<dt style="clear: both; float: left; font-weight: bold; width: 8em">Date</dt>
<dd style="margin-left: 8.5em">2012-08-22 19:03:55 +0900 (Wed, 22 Aug 2012)</dd>
<dt style="clear: both; float: left; font-weight: bold; width: 8em">New Revision</dt>
<dd style="margin-left: 8.5em"><a href="https://github.com/groonga/gcs/commit/15856fa779b6e12b1fcaa4ac2c05c8b3be8e9fc3">15856fa779b6e12b1fcaa4ac2c05c8b3be8e9fc3</a></dd>
<dt style="clear: both; float: left; font-weight: bold; width: 8em">Log</dt>
<dd style="margin-left: 8.5em"><pre style="border: 1px solid #aaa; font-family: Consolas, Menlo, "Liberation Mono", Courier, monospace; line-height: 1.2; padding: 0.5em">Fixup IP address to valid hostname (with xip.io)</pre></dd>
<dt style="clear: both; float: left; font-weight: bold; width: 8em">Modified files</dt>
<dd style="margin-left: 8.5em">
<ul>
<li><a href="https://github.com/groonga/gcs/commit/15856fa779b6e12b1fcaa4ac2c05c8b3be8e9fc3#diff-0">lib/database/domain.js</a></li>
</ul>
</dd>
</dl>
<div class="diff-section" style="clear: both">
<table style="border-collapse: collapse; border: 1px solid #aaa">
<thead>
<tr class="diff-header" style="border: 1px solid #aaa">
<td colspan="3">
<pre style="border: 0; font-family: Consolas, Menlo, "Liberation Mono", Courier, monospace; line-height: 1.2; margin: 0; padding: 0.5em; white-space: normal"><span class="diff-header" style="background-color: #eaf2f5; color: #999999; display: block; white-space: pre"> Modified: lib/database/domain.js (+15 -6)</span>
<span class="diff-header-mark" style="background-color: #eaf2f5; color: #999999; display: block; white-space: pre">===================================================================</span>
</pre>
</td>
</tr>
</thead>
<tbody>
<tr>
<th class="diff-line-number" style="border: 1px solid #aaa">
<pre style="border: 0; font-family: Consolas, Menlo, "Liberation Mono", Courier, monospace; line-height: 1.2; margin: 0; padding: 0.5em; white-space: normal"><span class="diff-line-number-hunk-header" style="display: block; white-space: pre"><a href="https://github.com/groonga/gcs/commit/15856fa779b6e12b1fcaa4ac2c05c8b3be8e9fc3#L0L48">...</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/groonga/gcs/commit/15856fa779b6e12b1fcaa4ac2c05c8b3be8e9fc3#L0L49">49</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/groonga/gcs/commit/15856fa779b6e12b1fcaa4ac2c05c8b3be8e9fc3#L0L50">50</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/groonga/gcs/commit/15856fa779b6e12b1fcaa4ac2c05c8b3be8e9fc3#L0L51">51</a></span>
<span class="diff-line-number-nothing" style="display: block; white-space: pre"> </span>
<span class="diff-line-number-nothing" style="display: block; white-space: pre"> </span>
<span class="diff-line-number-nothing" style="display: block; white-space: pre"> </span>
<span class="diff-line-number-nothing" style="display: block; white-space: pre"> </span>
<span class="diff-line-number-nothing" style="display: block; white-space: pre"> </span>
<span class="diff-line-number-nothing" style="display: block; white-space: pre"> </span>
<span class="diff-line-number-nothing" style="display: block; white-space: pre"> </span>
<span class="diff-line-number-nothing" style="display: block; white-space: pre"> </span>
<span class="diff-line-number-nothing" style="display: block; white-space: pre"> </span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/groonga/gcs/commit/15856fa779b6e12b1fcaa4ac2c05c8b3be8e9fc3#L0L52">52</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/groonga/gcs/commit/15856fa779b6e12b1fcaa4ac2c05c8b3be8e9fc3#L0L53">53</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/groonga/gcs/commit/15856fa779b6e12b1fcaa4ac2c05c8b3be8e9fc3#L0L54">54</a></span>
<span class="diff-line-number-hunk-header" style="display: block; white-space: pre"><a href="https://github.com/groonga/gcs/commit/15856fa779b6e12b1fcaa4ac2c05c8b3be8e9fc3#L0L250">...</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/groonga/gcs/commit/15856fa779b6e12b1fcaa4ac2c05c8b3be8e9fc3#L0L251">251</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/groonga/gcs/commit/15856fa779b6e12b1fcaa4ac2c05c8b3be8e9fc3#L0L252">252</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/groonga/gcs/commit/15856fa779b6e12b1fcaa4ac2c05c8b3be8e9fc3#L0L253">253</a></span>
<span class="diff-line-number-deleted" style="background-color: #ffaaaa; color: #000000; display: block; white-space: pre"><a href="https://github.com/groonga/gcs/commit/15856fa779b6e12b1fcaa4ac2c05c8b3be8e9fc3#L0L254">254</a></span>
<span class="diff-line-number-deleted" style="background-color: #ffaaaa; color: #000000; display: block; white-space: pre"><a href="https://github.com/groonga/gcs/commit/15856fa779b6e12b1fcaa4ac2c05c8b3be8e9fc3#L0L255">255</a></span>
<span class="diff-line-number-deleted" style="background-color: #ffaaaa; color: #000000; display: block; white-space: pre"><a href="https://github.com/groonga/gcs/commit/15856fa779b6e12b1fcaa4ac2c05c8b3be8e9fc3#L0L256">256</a></span>
<span class="diff-line-number-nothing" style="display: block; white-space: pre"> </span>
<span class="diff-line-number-nothing" style="display: block; white-space: pre"> </span>
<span class="diff-line-number-nothing" style="display: block; white-space: pre"> </span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/groonga/gcs/commit/15856fa779b6e12b1fcaa4ac2c05c8b3be8e9fc3#L0L257">257</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/groonga/gcs/commit/15856fa779b6e12b1fcaa4ac2c05c8b3be8e9fc3#L0L258">258</a></span>
<span class="diff-line-number-deleted" style="background-color: #ffaaaa; color: #000000; display: block; white-space: pre"><a href="https://github.com/groonga/gcs/commit/15856fa779b6e12b1fcaa4ac2c05c8b3be8e9fc3#L0L259">259</a></span>
<span class="diff-line-number-deleted" style="background-color: #ffaaaa; color: #000000; display: block; white-space: pre"><a href="https://github.com/groonga/gcs/commit/15856fa779b6e12b1fcaa4ac2c05c8b3be8e9fc3#L0L260">260</a></span>
<span class="diff-line-number-deleted" style="background-color: #ffaaaa; color: #000000; display: block; white-space: pre"><a href="https://github.com/groonga/gcs/commit/15856fa779b6e12b1fcaa4ac2c05c8b3be8e9fc3#L0L261">261</a></span>
<span class="diff-line-number-nothing" style="display: block; white-space: pre"> </span>
<span class="diff-line-number-nothing" style="display: block; white-space: pre"> </span>
<span class="diff-line-number-nothing" style="display: block; white-space: pre"> </span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/groonga/gcs/commit/15856fa779b6e12b1fcaa4ac2c05c8b3be8e9fc3#L0L262">262</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/groonga/gcs/commit/15856fa779b6e12b1fcaa4ac2c05c8b3be8e9fc3#L0L263">263</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/groonga/gcs/commit/15856fa779b6e12b1fcaa4ac2c05c8b3be8e9fc3#L0L264">264</a></span>
</pre>
</th>
<th class="diff-line-number" style="border: 1px solid #aaa">
<pre style="border: 0; font-family: Consolas, Menlo, "Liberation Mono", Courier, monospace; line-height: 1.2; margin: 0; padding: 0.5em; white-space: normal"><span class="diff-line-number-hunk-header" style="display: block; white-space: pre"><a href="https://github.com/groonga/gcs/commit/15856fa779b6e12b1fcaa4ac2c05c8b3be8e9fc3#L0R48">...</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/groonga/gcs/commit/15856fa779b6e12b1fcaa4ac2c05c8b3be8e9fc3#L0R49">49</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/groonga/gcs/commit/15856fa779b6e12b1fcaa4ac2c05c8b3be8e9fc3#L0R50">50</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/groonga/gcs/commit/15856fa779b6e12b1fcaa4ac2c05c8b3be8e9fc3#L0R51">51</a></span>
<span class="diff-line-number-added" style="background-color: #aaffaa; color: #000000; display: block; white-space: pre"><a href="https://github.com/groonga/gcs/commit/15856fa779b6e12b1fcaa4ac2c05c8b3be8e9fc3#L0R52">52</a></span>
<span class="diff-line-number-added" style="background-color: #aaffaa; color: #000000; display: block; white-space: pre"><a href="https://github.com/groonga/gcs/commit/15856fa779b6e12b1fcaa4ac2c05c8b3be8e9fc3#L0R53">53</a></span>
<span class="diff-line-number-added" style="background-color: #aaffaa; color: #000000; display: block; white-space: pre"><a href="https://github.com/groonga/gcs/commit/15856fa779b6e12b1fcaa4ac2c05c8b3be8e9fc3#L0R54">54</a></span>
<span class="diff-line-number-added" style="background-color: #aaffaa; color: #000000; display: block; white-space: pre"><a href="https://github.com/groonga/gcs/commit/15856fa779b6e12b1fcaa4ac2c05c8b3be8e9fc3#L0R55">55</a></span>
<span class="diff-line-number-added" style="background-color: #aaffaa; color: #000000; display: block; white-space: pre"><a href="https://github.com/groonga/gcs/commit/15856fa779b6e12b1fcaa4ac2c05c8b3be8e9fc3#L0R56">56</a></span>
<span class="diff-line-number-added" style="background-color: #aaffaa; color: #000000; display: block; white-space: pre"><a href="https://github.com/groonga/gcs/commit/15856fa779b6e12b1fcaa4ac2c05c8b3be8e9fc3#L0R57">57</a></span>
<span class="diff-line-number-added" style="background-color: #aaffaa; color: #000000; display: block; white-space: pre"><a href="https://github.com/groonga/gcs/commit/15856fa779b6e12b1fcaa4ac2c05c8b3be8e9fc3#L0R58">58</a></span>
<span class="diff-line-number-added" style="background-color: #aaffaa; color: #000000; display: block; white-space: pre"><a href="https://github.com/groonga/gcs/commit/15856fa779b6e12b1fcaa4ac2c05c8b3be8e9fc3#L0R59">59</a></span>
<span class="diff-line-number-added" style="background-color: #aaffaa; color: #000000; display: block; white-space: pre"><a href="https://github.com/groonga/gcs/commit/15856fa779b6e12b1fcaa4ac2c05c8b3be8e9fc3#L0R60">60</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/groonga/gcs/commit/15856fa779b6e12b1fcaa4ac2c05c8b3be8e9fc3#L0R61">61</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/groonga/gcs/commit/15856fa779b6e12b1fcaa4ac2c05c8b3be8e9fc3#L0R62">62</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/groonga/gcs/commit/15856fa779b6e12b1fcaa4ac2c05c8b3be8e9fc3#L0R63">63</a></span>
<span class="diff-line-number-hunk-header" style="display: block; white-space: pre"><a href="https://github.com/groonga/gcs/commit/15856fa779b6e12b1fcaa4ac2c05c8b3be8e9fc3#L0R259">...</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/groonga/gcs/commit/15856fa779b6e12b1fcaa4ac2c05c8b3be8e9fc3#L0R260">260</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/groonga/gcs/commit/15856fa779b6e12b1fcaa4ac2c05c8b3be8e9fc3#L0R261">261</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/groonga/gcs/commit/15856fa779b6e12b1fcaa4ac2c05c8b3be8e9fc3#L0R262">262</a></span>
<span class="diff-line-number-nothing" style="display: block; white-space: pre"> </span>
<span class="diff-line-number-nothing" style="display: block; white-space: pre"> </span>
<span class="diff-line-number-nothing" style="display: block; white-space: pre"> </span>
<span class="diff-line-number-added" style="background-color: #aaffaa; color: #000000; display: block; white-space: pre"><a href="https://github.com/groonga/gcs/commit/15856fa779b6e12b1fcaa4ac2c05c8b3be8e9fc3#L0R263">263</a></span>
<span class="diff-line-number-added" style="background-color: #aaffaa; color: #000000; display: block; white-space: pre"><a href="https://github.com/groonga/gcs/commit/15856fa779b6e12b1fcaa4ac2c05c8b3be8e9fc3#L0R264">264</a></span>
<span class="diff-line-number-added" style="background-color: #aaffaa; color: #000000; display: block; white-space: pre"><a href="https://github.com/groonga/gcs/commit/15856fa779b6e12b1fcaa4ac2c05c8b3be8e9fc3#L0R265">265</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/groonga/gcs/commit/15856fa779b6e12b1fcaa4ac2c05c8b3be8e9fc3#L0R266">266</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/groonga/gcs/commit/15856fa779b6e12b1fcaa4ac2c05c8b3be8e9fc3#L0R267">267</a></span>
<span class="diff-line-number-nothing" style="display: block; white-space: pre"> </span>
<span class="diff-line-number-nothing" style="display: block; white-space: pre"> </span>
<span class="diff-line-number-nothing" style="display: block; white-space: pre"> </span>
<span class="diff-line-number-added" style="background-color: #aaffaa; color: #000000; display: block; white-space: pre"><a href="https://github.com/groonga/gcs/commit/15856fa779b6e12b1fcaa4ac2c05c8b3be8e9fc3#L0R268">268</a></span>
<span class="diff-line-number-added" style="background-color: #aaffaa; color: #000000; display: block; white-space: pre"><a href="https://github.com/groonga/gcs/commit/15856fa779b6e12b1fcaa4ac2c05c8b3be8e9fc3#L0R269">269</a></span>
<span class="diff-line-number-added" style="background-color: #aaffaa; color: #000000; display: block; white-space: pre"><a href="https://github.com/groonga/gcs/commit/15856fa779b6e12b1fcaa4ac2c05c8b3be8e9fc3#L0R270">270</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/groonga/gcs/commit/15856fa779b6e12b1fcaa4ac2c05c8b3be8e9fc3#L0R271">271</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/groonga/gcs/commit/15856fa779b6e12b1fcaa4ac2c05c8b3be8e9fc3#L0R272">272</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/groonga/gcs/commit/15856fa779b6e12b1fcaa4ac2c05c8b3be8e9fc3#L0R273">273</a></span>
</pre>
</th>
<td class="diff-content" style="border: 1px solid #aaa">
<pre style="border: 0; font-family: Consolas, Menlo, "Liberation Mono", Courier, monospace; line-height: 1.2; margin: 0; padding: 0.5em; white-space: normal"><span class="diff-hunk-header" style="background-color: #eaf2f5; color: #999999; display: block; white-space: pre">@@ -49,6 +49,15 @@ <span class="diff-context" style="background-color: #ffffaa; color: #000000">function assertValidDomainName(domain) {</span></span>
<span class="diff-not-changed" style="display: block; white-space: pre"> }</span>
<span class="diff-not-changed" style="display: block; white-space: pre"> }</span>
<span class="diff-not-changed" style="display: block; white-space: pre"> </span>
<span class="diff-added" style="background-color: #aaffaa; color: #000000; display: block; white-space: pre">+function toValidHostAndPort(hostAndPort) {</span>
<span class="diff-added" style="background-color: #aaffaa; color: #000000; display: block; white-space: pre">+ hostAndPort = hostAndPort.split(':');</span>
<span class="diff-added" style="background-color: #aaffaa; color: #000000; display: block; white-space: pre">+ if (hostAndPort[0] == 'localhost')</span>
<span class="diff-added" style="background-color: #aaffaa; color: #000000; display: block; white-space: pre">+ hostAndPort[0] = '127.0.0.1';</span>
<span class="diff-added" style="background-color: #aaffaa; color: #000000; display: block; white-space: pre">+ if (hostAndPort[0].match(/^\d+\.\d+\.\d+\.\d+$/))</span>
<span class="diff-added" style="background-color: #aaffaa; color: #000000; display: block; white-space: pre">+ hostAndPort[0] += '.xip.io';</span>
<span class="diff-added" style="background-color: #aaffaa; color: #000000; display: block; white-space: pre">+ return hostAndPort.join(':');</span>
<span class="diff-added" style="background-color: #aaffaa; color: #000000; display: block; white-space: pre">+}</span>
<span class="diff-added" style="background-color: #aaffaa; color: #000000; display: block; white-space: pre">+</span>
<span class="diff-not-changed" style="display: block; white-space: pre"> // Accepts two arguments: source and context.</span>
<span class="diff-not-changed" style="display: block; white-space: pre"> // You can give them in the reversed order, like:</span>
<span class="diff-not-changed" style="display: block; white-space: pre"> // new Domain("source", context) or new Domain(context, "source")</span>
<span class="diff-hunk-header" style="background-color: #eaf2f5; color: #999999; display: block; white-space: pre">@@ -251,14 +260,14 @@ <span class="diff-context" style="background-color: #ffffaa; color: #000000">Domain.prototype = {</span></span>
<span class="diff-not-changed" style="display: block; white-space: pre"> },</span>
<span class="diff-not-changed" style="display: block; white-space: pre"> </span>
<span class="diff-not-changed" style="display: block; white-space: pre"> getDocumentsEndpoint: function(hostname) {</span>
<span class="diff-deleted" style="background-color: #ffaaaa; color: #000000; display: block; white-space: pre">- if (hostname[0] != '.')</span>
<span class="diff-deleted" style="background-color: #ffaaaa; color: #000000; display: block; white-space: pre">- hostname = '.' + hostname;</span>
<span class="diff-deleted" style="background-color: #ffaaaa; color: #000000; display: block; white-space: pre">- return 'doc-' + this.name + '-' + this.id + hostname;</span>
<span class="diff-added" style="background-color: #aaffaa; color: #000000; display: block; white-space: pre">+ hostanme = hostname.replace(/^\./, '');</span>
<span class="diff-added" style="background-color: #aaffaa; color: #000000; display: block; white-space: pre">+ hostname = toValidHostAndPort(hostname);</span>
<span class="diff-added" style="background-color: #aaffaa; color: #000000; display: block; white-space: pre">+ return 'doc-' + this.name + '-' + this.id + '.' + hostname;</span>
<span class="diff-not-changed" style="display: block; white-space: pre"> },</span>
<span class="diff-not-changed" style="display: block; white-space: pre"> getSearchEndpoint: function(hostname) {</span>
<span class="diff-deleted" style="background-color: #ffaaaa; color: #000000; display: block; white-space: pre">- if (hostname[0] != '.')</span>
<span class="diff-deleted" style="background-color: #ffaaaa; color: #000000; display: block; white-space: pre">- hostname = '.' + hostname;</span>
<span class="diff-deleted" style="background-color: #ffaaaa; color: #000000; display: block; white-space: pre">- return 'search-' + this.name + '-' + this.id + hostname;</span>
<span class="diff-added" style="background-color: #aaffaa; color: #000000; display: block; white-space: pre">+ hostanme = hostname.replace(/^\./, '');</span>
<span class="diff-added" style="background-color: #aaffaa; color: #000000; display: block; white-space: pre">+ hostname = toValidHostAndPort(hostname);</span>
<span class="diff-added" style="background-color: #aaffaa; color: #000000; display: block; white-space: pre">+ return 'search-' + this.name + '-' + this.id + '.' + hostname;</span>
<span class="diff-not-changed" style="display: block; white-space: pre"> },</span>
<span class="diff-not-changed" style="display: block; white-space: pre"> </span>
<span class="diff-not-changed" style="display: block; white-space: pre"> createSync: function() {</span>
</pre>
</td>
</tr>
</tbody>
</table>
</div>
</body>
</html>