culturecode_stagehand 0.7.18 → 0.8.1

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: 58df2083dd4f1a0fc7f3d4c1c1778d0acf941473
4
- data.tar.gz: 20225cec28769c77e6a46ab8d012eff9a94ca10a
3
+ metadata.gz: 8d1ca6b2ede30dbeed3da3f4800d413bcf60034f
4
+ data.tar.gz: ef9a06e54ec5318e811818b3243d52da2af98b09
5
5
  SHA512:
6
- metadata.gz: cbc3a5779ace87420c2341ab705d727e4cb187717a8cdfb30e2d3a78ea19fb8d60b7d3ac96839f6a31915dd7036b0aa2c39dc35ea092c7c460dea0952a6ce686
7
- data.tar.gz: 2dc328dced0b5f6207c59c08e49b573aee592818b13205fdf535ddf6db65c555fd89b2b08c1d8fff65426d6f4a3e8b85e15a49b27a2e1375d99387890afde386
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
@@ -1,3 +1,3 @@
1
1
  module Stagehand
2
- VERSION = "0.7.18"
2
+ VERSION = "0.8.1"
3
3
  end
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.7.18
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-09 00:00:00.000000000 Z
12
+ date: 2016-08-20 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: rails