<feed xmlns='http://www.w3.org/2005/Atom'>
<title>dbshell-rails/lib, branch v0.0.1</title>
<subtitle>A Rake task for Ruby on Rails to painlessly open a database shell</subtitle>
<link rel='alternate' type='text/html' href='https://git.teddywing.com/dbshell-rails/'/>
<entry>
<title>rails.rb: Simplify `load` call to include Rake task</title>
<updated>2017-05-01T02:08:58+00:00</updated>
<author>
<name>Teddy Wing</name>
</author>
<published>2017-05-01T02:08:58+00:00</published>
<link rel='alternate' type='text/html' href='https://git.teddywing.com/dbshell-rails/commit/?id=ad3b6c7e69470a2b5bd68c7cafa170332b213b92'/>
<id>ad3b6c7e69470a2b5bd68c7cafa170332b213b92</id>
<content type='text'>
Thanks to the Patterns guide on rubygems.org, I now see that we don't
have to use `__FILE__` at all. Cool!

See:
http://guides.rubygems.org/patterns/#requiring-files-relative-to-each-other
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Thanks to the Patterns guide on rubygems.org, I now see that we don't
have to use `__FILE__` at all. Cool!

See:
http://guides.rubygems.org/patterns/#requiring-files-relative-to-each-other
</pre>
</div>
</content>
</entry>
<entry>
<title>rails.rb: Change to single-quotes</title>
<updated>2017-05-01T02:05:32+00:00</updated>
<author>
<name>Teddy Wing</name>
</author>
<published>2017-05-01T02:05:32+00:00</published>
<link rel='alternate' type='text/html' href='https://git.teddywing.com/dbshell-rails/commit/?id=96b181b74aeac226d45a1f4d4a13488931b2b72d'/>
<id>96b181b74aeac226d45a1f4d4a13488931b2b72d</id>
<content type='text'>
Follow this package's convention.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Follow this package's convention.
</pre>
</div>
</content>
</entry>
<entry>
<title>dbshell.rake: Add a short description to our task</title>
<updated>2017-05-01T00:30:55+00:00</updated>
<author>
<name>Teddy Wing</name>
</author>
<published>2017-04-29T21:47:42+00:00</published>
<link rel='alternate' type='text/html' href='https://git.teddywing.com/dbshell-rails/commit/?id=5a8c88d3771018978be8f5fb05f44f6d8aba5e7e'/>
<id>5a8c88d3771018978be8f5fb05f44f6d8aba5e7e</id>
<content type='text'>
This has the additional benefit of making it appear in the `rake -T`
output.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This has the additional benefit of making it appear in the `rake -T`
output.
</pre>
</div>
</content>
</entry>
<entry>
<title>dbshell.rake: Add alias to `rake db:shell`</title>
<updated>2017-04-29T21:43:01+00:00</updated>
<author>
<name>Teddy Wing</name>
</author>
<published>2017-04-29T21:43:01+00:00</published>
<link rel='alternate' type='text/html' href='https://git.teddywing.com/dbshell-rails/commit/?id=96ffac15299beca07a0671cdbed13b137a9aa4c4'/>
<id>96ffac15299beca07a0671cdbed13b137a9aa4c4</id>
<content type='text'>
Provide two ways of accessing the task. One saves a character (":") and
is reminiscent of the Django command that this project is inspired by.
The other is more Rails-like and is consistent with the other
`db:`-prefixed Rails Rake tasks.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Provide two ways of accessing the task. One saves a character (":") and
is reminiscent of the Django command that this project is inspired by.
The other is more Rails-like and is consistent with the other
`db:`-prefixed Rails Rake tasks.
</pre>
</div>
</content>
</entry>
<entry>
<title>DBShell::Client::Postgres: Convert port to string</title>
<updated>2017-04-29T21:32:17+00:00</updated>
<author>
<name>Teddy Wing</name>
</author>
<published>2017-04-29T21:32:17+00:00</published>
<link rel='alternate' type='text/html' href='https://git.teddywing.com/dbshell-rails/commit/?id=3c522fc313f76dfbb7d1e87703965780245a432c'/>
<id>3c522fc313f76dfbb7d1e87703965780245a432c</id>
<content type='text'>
Turns out the port actually did need to be a string, contrary to what I
had assumed in e89275bc787ae17bc698ac8cdb8cdaf5ebeb7852. I ended up with
this error when passing a specific port in a real test:

    $ bake dbshell
    rake aborted!
    TypeError: no implicit conversion of Fixnum into String
    .../lib/dbshell/client/postgres.rb:8:in `exec'
    .../lib/dbshell/client/postgres.rb:8:in `runshell'
    .../lib/dbshell/client/database.rb:24:in `runshell'
    .../lib/dbshell/rails/tasks/dbshell.rake:6:in `block in &lt;top (required)&gt;'
    .../versions/2.3.3/bin/bundle:22:in `load'
    .../versions/2.3.3/bin/bundle:22:in `&lt;main&gt;'
    Tasks: TOP =&gt; dbshell
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Turns out the port actually did need to be a string, contrary to what I
had assumed in e89275bc787ae17bc698ac8cdb8cdaf5ebeb7852. I ended up with
this error when passing a specific port in a real test:

    $ bake dbshell
    rake aborted!
    TypeError: no implicit conversion of Fixnum into String
    .../lib/dbshell/client/postgres.rb:8:in `exec'
    .../lib/dbshell/client/postgres.rb:8:in `runshell'
    .../lib/dbshell/client/database.rb:24:in `runshell'
    .../lib/dbshell/rails/tasks/dbshell.rake:6:in `block in &lt;top (required)&gt;'
    .../versions/2.3.3/bin/bundle:22:in `load'
    .../versions/2.3.3/bin/bundle:22:in `&lt;main&gt;'
    Tasks: TOP =&gt; dbshell
</pre>
</div>
</content>
</entry>
<entry>
<title>DBShell::Client::Database: Add support for the 'postgis' adapter</title>
<updated>2017-04-29T21:26:59+00:00</updated>
<author>
<name>Teddy Wing</name>
</author>
<published>2017-04-29T21:26:59+00:00</published>
<link rel='alternate' type='text/html' href='https://git.teddywing.com/dbshell-rails/commit/?id=ad34e0127eae4965f4e48c132e06b3dfba474d18'/>
<id>ad34e0127eae4965f4e48c132e06b3dfba474d18</id>
<content type='text'>
PostGIS is, for our purposes, no different from Postgres. Both should
launch `psql`.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
PostGIS is, for our purposes, no different from Postgres. Both should
launch `psql`.
</pre>
</div>
</content>
</entry>
<entry>
<title>rails.rb: Simplify the Rake task loader call</title>
<updated>2017-04-29T21:15:00+00:00</updated>
<author>
<name>Teddy Wing</name>
</author>
<published>2017-04-29T21:15:00+00:00</published>
<link rel='alternate' type='text/html' href='https://git.teddywing.com/dbshell-rails/commit/?id=d976bb250e81c48f95eee50130e17c92a3e20a32'/>
<id>d976bb250e81c48f95eee50130e17c92a3e20a32</id>
<content type='text'>
Since we only have a single *.rake file, we can get away with making
this less general. Doing so condenses what was there previously into a
single line and is arguably more explicit.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Since we only have a single *.rake file, we can get away with making
this less general. Doing so condenses what was there previously into a
single line and is arguably more explicit.
</pre>
</div>
</content>
</entry>
<entry>
<title>rails.rb: Move Rake task loader outside of the module context</title>
<updated>2017-04-29T21:10:33+00:00</updated>
<author>
<name>Teddy Wing</name>
</author>
<published>2017-04-29T21:10:33+00:00</published>
<link rel='alternate' type='text/html' href='https://git.teddywing.com/dbshell-rails/commit/?id=b32dfa416313a762c3e74bdd1692b36001bfb050'/>
<id>b32dfa416313a762c3e74bdd1692b36001bfb050</id>
<content type='text'>
I don't think the load call really needs to be inside the module, as
evidenced by
https://github.com/paulelliott/fabrication/blob/b470cd817e1973c14e3253cd76606cf934942ca1/lib/fabrication.rb
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
I don't think the load call really needs to be inside the module, as
evidenced by
https://github.com/paulelliott/fabrication/blob/b470cd817e1973c14e3253cd76606cf934942ca1/lib/fabrication.rb
</pre>
</div>
</content>
</entry>
<entry>
<title>Integrate MySQL support</title>
<updated>2017-04-29T20:58:11+00:00</updated>
<author>
<name>Teddy Wing</name>
</author>
<published>2017-04-29T20:58:11+00:00</published>
<link rel='alternate' type='text/html' href='https://git.teddywing.com/dbshell-rails/commit/?id=fb9ff6eb8cbad57b3ca2bbd58dc098f208edd1e1'/>
<id>fb9ff6eb8cbad57b3ca2bbd58dc098f208edd1e1</id>
<content type='text'>
* Create a `.runshell()` method in `DBShell::Client::MySQL`
* Delegate to that class &amp; method from `DBShell::Client::Database`
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
* Create a `.runshell()` method in `DBShell::Client::MySQL`
* Delegate to that class &amp; method from `DBShell::Client::Database`
</pre>
</div>
</content>
</entry>
<entry>
<title>Rename `InvalidDatabaseAdapter` to `UnsupportedDatabaseAdapter`</title>
<updated>2017-04-29T20:54:27+00:00</updated>
<author>
<name>Teddy Wing</name>
</author>
<published>2017-04-29T20:54:27+00:00</published>
<link rel='alternate' type='text/html' href='https://git.teddywing.com/dbshell-rails/commit/?id=56a002d2681431b34be36cf7247dc41a313601d9'/>
<id>56a002d2681431b34be36cf7247dc41a313601d9</id>
<content type='text'>
Tried this out with MySQL, and got this error since I haven't integrated
it yet. It struck me that "Invalid" doesn't make any sense. Really it's
something that is possible to do but that our gem doesn't support, so we
should be clearer about that fact.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Tried this out with MySQL, and got this error since I haven't integrated
it yet. It struck me that "Invalid" doesn't make any sense. Really it's
something that is possible to do but that our gem doesn't support, so we
should be clearer about that fact.
</pre>
</div>
</content>
</entry>
</feed>
