rake_db_dump 0.0.1 → 0.0.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 3ee3daf84ffa27f45d3a18abe1afe9b89aaa1c23
4
- data.tar.gz: 6e5095379f2e7eeb12ce8e33118eac1789a658c5
3
+ metadata.gz: 5686d5033b98866accb9eaf6342fdbf571f207a6
4
+ data.tar.gz: a6d4a6afb58addf43d280a9b9496b5fc8f2fa540
5
5
  SHA512:
6
- metadata.gz: 8c818ff27e803a696ee5bc7ce25e26564f56e5a6c8d00031314de543fd6bd1a473adb53e02d5ce04f5321d17bcd19a81c3c69998e337e1548dbdfd7c47475c75
7
- data.tar.gz: 2479c8ec4cf5ee1aa8a8a781181ef1953a1ad645cf542dac2ac32624e2eaa7284fdc9ff717b6ba5f21c552538d139d93b4c73be112f4741a4a0559ef64ac77a5
6
+ metadata.gz: 920e744ec32cbb90496039a5f01927d9292b431be55d0379a789ed31e93b820a65cab5165635b13b4674159e42d27c4a0d9b1edbac1b88aeb59b058104ff0af1
7
+ data.tar.gz: 1b45a6aafb3abc2607b485ff12b867c9d5127bb2b78270624364bee74c9fd7c6cfd7bae530f954b4d7ca27db887538ab5ae67497b10bd2b1fde4248e621333cd
data/README.md CHANGED
@@ -1,6 +1,10 @@
1
- # RakeDbDump
1
+ # rake db:dump
2
2
 
3
- TODO: Write a gem description
3
+ Adds a `db:dump` Rake task so you can see the contents and schema for all the tables in your `config/database.yml` without needing a SQL client.
4
+
5
+ Assumes an `environment` Rake task already exists to create the Active Record connection (as it will for Rails projects).
6
+
7
+ Assumes Rails version 3 or higher and the PostgreSQL adapter.
4
8
 
5
9
  ## Installation
6
10
 
@@ -18,12 +22,42 @@ Or install it yourself as:
18
22
 
19
23
  ## Usage
20
24
 
21
- TODO: Write usage instructions here
25
+ $ rake db:dump
26
+
27
+ ## Example output
28
+ ```
29
+
30
+ _________________________ members table ___________________________________
31
+ | Type of id: integer not null
32
+ | Type of team_id: integer not null
33
+ | Type of name: varchar(255) not null
34
+
35
+ id: 1
36
+ team_id: 1
37
+ name: Jill
38
+
39
+ id: 2
40
+ team_id: 1
41
+ name: Ted
42
+
43
+ id: 3
44
+ team_id: 2
45
+ name: Lenny
46
+
47
+ id: 4
48
+ team_id: 2
49
+ name: Tina
50
+ _________________________ teams table _____________________________________
51
+ | Type of id: integer not null
52
+ | Type of color: varchar(255) not null
53
+
54
+ id: 1
55
+ color: green
22
56
 
23
- ## Contributing
57
+ id: 2
58
+ color: orange
59
+ _________________________ schema_migrations table _________________________
60
+ | Type of version: varchar(255) not null
24
61
 
25
- 1. Fork it
26
- 2. Create your feature branch (`git checkout -b my-new-feature`)
27
- 3. Commit your changes (`git commit -am 'Add some feature'`)
28
- 4. Push to the branch (`git push origin my-new-feature`)
29
- 5. Create new Pull Request
62
+ version: 20130811234816
63
+ ```
data/lib/rake_db_dump.rb CHANGED
@@ -1,7 +1,5 @@
1
1
  require "rake_db_dump/version"
2
2
 
3
- load File.join(File.dirname(__FILE__), "tasks/db_dump.rake")
4
-
5
3
  module RakeDbDump
6
- # Your code goes here...
4
+ require "rake_db_dump/railtie" if defined?(Rails)
7
5
  end
@@ -0,0 +1,11 @@
1
+ require 'rails'
2
+
3
+ module RakeDbDump
4
+ class Railtie < Rails::Railtie
5
+ railtie_name :rake_db_dump
6
+
7
+ rake_tasks do
8
+ load 'tasks/db_dump.rake'
9
+ end
10
+ end
11
+ end
@@ -1,3 +1,3 @@
1
1
  module RakeDbDump
2
- VERSION = "0.0.1"
2
+ VERSION = "0.0.2"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rake_db_dump
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.1
4
+ version: 0.0.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Daniel Stutzman
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2013-08-23 00:00:00.000000000 Z
11
+ date: 2013-08-24 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -53,6 +53,7 @@ files:
53
53
  - README.md
54
54
  - Rakefile
55
55
  - lib/rake_db_dump.rb
56
+ - lib/rake_db_dump/railtie.rb
56
57
  - lib/rake_db_dump/version.rb
57
58
  - lib/tasks/db_dump.rake
58
59
  - rake_db_dump.gemspec