ridgepole 0.1.1 → 0.1.2

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: ab3d1415ea667dc38d7e9e3a039fa2faefab3e4c
4
- data.tar.gz: 98097987a640fba886daf5b82202c7198576e655
3
+ metadata.gz: 3c0c8c1752319c718ff7d81bd312595be2d82f13
4
+ data.tar.gz: d47279b479c711c61612ff141ac256ffc6372918
5
5
  SHA512:
6
- metadata.gz: cf3b70e23223126228023ebe3cd075711aec5c184422b1617e2b856da9ae710147c0a497d54311a1893bd0a032fe3856dd953b7130ee39bb1e3ee0f3d0485536
7
- data.tar.gz: 4149d78aa6421566d07f2b2e6c2e19cd60b611d7f880776bf5b03faf2931a95dbfefefc456641a3d49bf93a4d7c39890cbb8ecdb31c6cac75781c35d36f51c98
6
+ metadata.gz: 46869c5d0e8647b8abf3402d555cf84e60c3a024a9b48e46fbe0075ee1b7fd3cec44b51261df1f23446544ff3123394245649fe87812a56b3e5dccc174582463
7
+ data.tar.gz: 185b564db9d8af17abe59fc9bc1cea970f1cc906a8a8e6231bfe42d68e86f66d67c78521eef77f694236a24b50afb89434d218314ad96c41dfc2959912192a70
@@ -5,7 +5,17 @@ class Ridgepole::Dumper
5
5
 
6
6
  def dump
7
7
  stream = StringIO.new
8
- ActiveRecord::SchemaDumper.dump(ActiveRecord::Base.connection, stream)
8
+ conn = ActiveRecord::Base.connection
9
+ target_tables = @options.fetch(:tables, [])
10
+
11
+ unless target_tables.empty?
12
+ conn.tables.each do |tbl|
13
+ next if target_tables.include?(tbl)
14
+ ActiveRecord::SchemaDumper.ignore_tables << tbl
15
+ end
16
+ end
17
+
18
+ ActiveRecord::SchemaDumper.dump(conn, stream)
9
19
 
10
20
  dsl = stream.string.lines.select {|line|
11
21
  line !~ /\A#/ &&
@@ -1,3 +1,3 @@
1
1
  module Ridgepole
2
- VERSION = '0.1.1'
2
+ VERSION = '0.1.2'
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ridgepole
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.1
4
+ version: 0.1.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Genki Sugawara
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-06-22 00:00:00.000000000 Z
11
+ date: 2014-06-23 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activerecord