<feed xmlns='http://www.w3.org/2005/Atom'>
<title>dbshell-rails/lib/dbshell/rails, 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>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>Rename database client classes</title>
<updated>2017-04-29T20:21:01+00:00</updated>
<author>
<name>Teddy Wing</name>
</author>
<published>2017-04-29T20:21:01+00:00</published>
<link rel='alternate' type='text/html' href='https://git.teddywing.com/dbshell-rails/commit/?id=46b019abd520870ab159b60c03c45675f64dd88a'/>
<id>46b019abd520870ab159b60c03c45675f64dd88a</id>
<content type='text'>
Update our class names to reflect the new file structure introduced in
b700c1bef89a67a64f1040fb6bb03c0320eefe91.

Use the

    module DBShell
      module Client
      end
    end

syntax intead of `DBShell::Client` so that we don't have to define the
`Client` module in a separate file and require it. Otherwise we'd get an
error:

    lib/dbshell/client/sqlite3.rb:1:in `&lt;top (required)&gt;': uninitialized constant DBShell::Client (NameError)
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Update our class names to reflect the new file structure introduced in
b700c1bef89a67a64f1040fb6bb03c0320eefe91.

Use the

    module DBShell
      module Client
      end
    end

syntax intead of `DBShell::Client` so that we don't have to define the
`Client` module in a separate file and require it. Otherwise we'd get an
error:

    lib/dbshell/client/sqlite3.rb:1:in `&lt;top (required)&gt;': uninitialized constant DBShell::Client (NameError)
</pre>
</div>
</content>
</entry>
<entry>
<title>Update `require` paths in database client files</title>
<updated>2017-04-29T20:15:19+00:00</updated>
<author>
<name>Teddy Wing</name>
</author>
<published>2017-04-29T20:15:19+00:00</published>
<link rel='alternate' type='text/html' href='https://git.teddywing.com/dbshell-rails/commit/?id=6f4057392857313355769de7fea293b5e50f0779'/>
<id>6f4057392857313355769de7fea293b5e50f0779</id>
<content type='text'>
Change the paths in the code to conform to the new file layout
introduced in b700c1bef89a67a64f1040fb6bb03c0320eefe91.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Change the paths in the code to conform to the new file layout
introduced in b700c1bef89a67a64f1040fb6bb03c0320eefe91.
</pre>
</div>
</content>
</entry>
<entry>
<title>dbshell.rake: Remove unnecessary comment</title>
<updated>2017-04-29T19:48:32+00:00</updated>
<author>
<name>Teddy Wing</name>
</author>
<published>2017-04-29T19:48:32+00:00</published>
<link rel='alternate' type='text/html' href='https://git.teddywing.com/dbshell-rails/commit/?id=cf14e894685c695c7ecbaa2c119e2ea414afc00a'/>
<id>cf14e894685c695c7ecbaa2c119e2ea414afc00a</id>
<content type='text'>
No longer have a use for this information as I've already leveraged in
the database client class implementations.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
No longer have a use for this information as I've already leveraged in
the database client class implementations.
</pre>
</div>
</content>
</entry>
<entry>
<title>dbshell.rake: Use `DBShell::DatabaseClient`</title>
<updated>2017-04-29T18:23:08+00:00</updated>
<author>
<name>Teddy Wing</name>
</author>
<published>2017-04-29T18:20:49+00:00</published>
<link rel='alternate' type='text/html' href='https://git.teddywing.com/dbshell-rails/commit/?id=f1c4164aef7ef88735a254e1301c3e4bf5978714'/>
<id>f1c4164aef7ef88735a254e1301c3e4bf5978714</id>
<content type='text'>
Instead of calling `DBShell::Sqlite3Client` directly, call the wrapper
class that will delegate to `Sqlite3Client`, `PostgresClient`, etc.
depending on the value of `adapter` in the database connection params
passed in.

This allows us to have a single interface that we can call from the Rake
task that can handle any of the database adapters that we support.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Instead of calling `DBShell::Sqlite3Client` directly, call the wrapper
class that will delegate to `Sqlite3Client`, `PostgresClient`, etc.
depending on the value of `adapter` in the database connection params
passed in.

This allows us to have a single interface that we can call from the Rake
task that can handle any of the database adapters that we support.
</pre>
</div>
</content>
</entry>
<entry>
<title>dbshell.rake: Use correct RAILS_ENV</title>
<updated>2017-04-29T17:43:09+00:00</updated>
<author>
<name>Teddy Wing</name>
</author>
<published>2017-04-29T17:43:09+00:00</published>
<link rel='alternate' type='text/html' href='https://git.teddywing.com/dbshell-rails/commit/?id=3242a68312f54a226595df35b03d19927996b124'/>
<id>3242a68312f54a226595df35b03d19927996b124</id>
<content type='text'>
Remove our hard-coded "development" environment and instead get the
current environment dynamically via the `RAILS_ENV` environment
variable. Assume that the current environment is "development" if the
env variable is unset.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Remove our hard-coded "development" environment and instead get the
current environment dynamically via the `RAILS_ENV` environment
variable. Assume that the current environment is "development" if the
env variable is unset.
</pre>
</div>
</content>
</entry>
<entry>
<title>Get `rake dbshell` working for SQLite3</title>
<updated>2017-04-29T17:36:30+00:00</updated>
<author>
<name>Teddy Wing</name>
</author>
<published>2017-04-29T17:36:30+00:00</published>
<link rel='alternate' type='text/html' href='https://git.teddywing.com/dbshell-rails/commit/?id=9f741398657ca47483211ffa6cb0a9dfbe3f88c8'/>
<id>9f741398657ca47483211ffa6cb0a9dfbe3f88c8</id>
<content type='text'>
Add `DBShell::Sqlite3.runshell`, which takes database connection
information and starts a SQLite3 shell.

Currently the Rake task just calls the SQLite3 `.runshell` method
directly without any database adapter discrimination and also forces the
development environment. It's nice to see it working. Now, we'll need to
clean up those parts of the Rakefile.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Add `DBShell::Sqlite3.runshell`, which takes database connection
information and starts a SQLite3 shell.

Currently the Rake task just calls the SQLite3 `.runshell` method
directly without any database adapter discrimination and also forces the
development environment. It's nice to see it working. Now, we'll need to
clean up those parts of the Rakefile.
</pre>
</div>
</content>
</entry>
<entry>
<title>dbshell.rake: Figure out how to get database connection info from Rails</title>
<updated>2017-04-29T17:15:46+00:00</updated>
<author>
<name>Teddy Wing</name>
</author>
<published>2017-04-29T17:13:48+00:00</published>
<link rel='alternate' type='text/html' href='https://git.teddywing.com/dbshell-rails/commit/?id=9a5e4413a0776b79e90ab6a3e95ed9dea1eb7a1d'/>
<id>9a5e4413a0776b79e90ab6a3e95ed9dea1eb7a1d</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>Add a test Rake task</title>
<updated>2017-04-29T10:15:37+00:00</updated>
<author>
<name>Teddy Wing</name>
</author>
<published>2017-04-29T10:13:50+00:00</published>
<link rel='alternate' type='text/html' href='https://git.teddywing.com/dbshell-rails/commit/?id=1ede66205549e84c83e04e4173dab3b0d6906255'/>
<id>1ede66205549e84c83e04e4173dab3b0d6906255</id>
<content type='text'>
Create a stub for our Rake task to see something working.

Inspired by
https://github.com/paulelliott/fabrication/blob/b470cd817e1973c14e3253cd76606cf934942ca1/lib/fabrication.rb
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Create a stub for our Rake task to see something working.

Inspired by
https://github.com/paulelliott/fabrication/blob/b470cd817e1973c14e3253cd76606cf934942ca1/lib/fabrication.rb
</pre>
</div>
</content>
</entry>
</feed>
