culturecode_stagehand 0.7.18 → 0.8.1
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 +4 -4
- data/lib/stagehand/schema/statements.rb +17 -0
- data/lib/stagehand/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: 8d1ca6b2ede30dbeed3da3f4800d413bcf60034f
|
|
4
|
+
data.tar.gz: ef9a06e54ec5318e811818b3243d52da2af98b09
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 2e42ce38a3a24048d9574aed6c3318668fe7809518669cfa0f34e23d4c91e3ca5199be9b11772cfb58283dd4098f3e0d6c0e2023d0fe6f400b76d7ebab6f12b0
|
|
7
|
+
data.tar.gz: c147dd44ef36edd4f8b28e8711e27a97233614586bbec766a2508ede2c3a7c3618e8e6ee256e8b6612bca8f88320da1691d613d8a6321a7c8bbf595a4b1c8d82
|
|
@@ -19,7 +19,24 @@ module Stagehand
|
|
|
19
19
|
Staging::CommitEntry.where(:table_name => old_table_name).update_all(:table_name => new_table_name)
|
|
20
20
|
end
|
|
21
21
|
end
|
|
22
|
+
|
|
23
|
+
# Allow dumping of stagehand create_table directive
|
|
24
|
+
# e.g. create_table "comments", stagehand: true do |t|
|
|
25
|
+
module DumperExtensions
|
|
26
|
+
def table(table_name, stream)
|
|
27
|
+
stagehand = Stagehand::Schema.has_stagehand?(table_name)
|
|
28
|
+
|
|
29
|
+
table_stream = StringIO.new
|
|
30
|
+
table_stream = super(table_name, table_stream)
|
|
31
|
+
table_stream.rewind
|
|
32
|
+
table_schema = table_stream.read.gsub(/create_table (.+) do/, 'create_table \1' + ", stagehand: #{stagehand} do")
|
|
33
|
+
stream.puts table_schema
|
|
34
|
+
|
|
35
|
+
return stream
|
|
36
|
+
end
|
|
37
|
+
end
|
|
22
38
|
end
|
|
23
39
|
end
|
|
24
40
|
|
|
25
41
|
ActiveRecord::Base.connection.class.include Stagehand::Schema::Statements
|
|
42
|
+
ActiveRecord::SchemaDumper.prepend Stagehand::Schema::DumperExtensions
|
data/lib/stagehand/version.rb
CHANGED
metadata
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: culturecode_stagehand
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.
|
|
4
|
+
version: 0.8.1
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Nicholas Jakobsen
|
|
@@ -9,7 +9,7 @@ authors:
|
|
|
9
9
|
autorequire:
|
|
10
10
|
bindir: bin
|
|
11
11
|
cert_chain: []
|
|
12
|
-
date: 2016-08-
|
|
12
|
+
date: 2016-08-20 00:00:00.000000000 Z
|
|
13
13
|
dependencies:
|
|
14
14
|
- !ruby/object:Gem::Dependency
|
|
15
15
|
name: rails
|