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 +4 -4
- data/lib/ridgepole/dumper.rb +11 -1
- data/lib/ridgepole/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 3c0c8c1752319c718ff7d81bd312595be2d82f13
|
4
|
+
data.tar.gz: d47279b479c711c61612ff141ac256ffc6372918
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 46869c5d0e8647b8abf3402d555cf84e60c3a024a9b48e46fbe0075ee1b7fd3cec44b51261df1f23446544ff3123394245649fe87812a56b3e5dccc174582463
|
7
|
+
data.tar.gz: 185b564db9d8af17abe59fc9bc1cea970f1cc906a8a8e6231bfe42d68e86f66d67c78521eef77f694236a24b50afb89434d218314ad96c41dfc2959912192a70
|
data/lib/ridgepole/dumper.rb
CHANGED
@@ -5,7 +5,17 @@ class Ridgepole::Dumper
|
|
5
5
|
|
6
6
|
def dump
|
7
7
|
stream = StringIO.new
|
8
|
-
ActiveRecord::
|
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#/ &&
|
data/lib/ridgepole/version.rb
CHANGED
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.
|
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-
|
11
|
+
date: 2014-06-23 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activerecord
|