activerecord-postgres_pub_sub 0.3.0 → 0.4.0.rc0

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
  SHA256:
3
- metadata.gz: 8718d69b1dfd1ba96ced9bce3d6c9a0bdb3182ab1ed6657830886fbc53922ff1
4
- data.tar.gz: dafc6e29b11ed65f3af03227eae43d47f959179646a159ef79c158fe2d1e0c03
3
+ metadata.gz: 02b340ee1114764133651bfee80b7a52466d451ef90ceb4b30835ea33012a1f3
4
+ data.tar.gz: 9ed996ede62c63a16e879e67c47feab88277e4348a5ac47a9907d244925b9736
5
5
  SHA512:
6
- metadata.gz: f7c5f0a45c6c496f39da4ad1f16d81a124aaa679391e69cbcb9029b726729bde5c62750628e0465886a1184be4cd726585f9d7f87deea65772d7a9c2f43c1baf
7
- data.tar.gz: 142acf27d093b6f536c651b20584bb712b95da07097c9f391bcc19002bbaf9c22ccdb27b6ebc5ec77ed2100806ed853d5e8d119d0d49f8398deb5dfba4bef4eb
6
+ metadata.gz: bafbb14a6221e885d8b0e1aaa73a0abe96b3b93fffa93bfadca37512cf2214451182757d74ae6833d83f8f523b212e73013f5d50aab3dafdcb0bfaacf6f27b34
7
+ data.tar.gz: 5f45a91a953e546da8e2e5fcd22df847502c645744527fe3e4232c79ff6b3126a422cfd1b7113666d3a16e9344b6540bb856106039478baca71126bc257aee8d
data/CHANGELOG.md CHANGED
@@ -1,5 +1,8 @@
1
1
  # activerecord-postgres_pub_sub
2
2
 
3
+ ## v0.4.0 (unreleased)
4
+ - Add safe instance variable if StrongMigrations is used.
5
+
3
6
  ## v0.3.0
4
7
  - Add support for Rails 5.2.
5
8
 
@@ -2,6 +2,6 @@
2
2
 
3
3
  module ActiveRecord
4
4
  module PostgresPubSub
5
- VERSION = "0.3.0"
5
+ VERSION = "0.4.0.rc0"
6
6
  end
7
7
  end
@@ -39,6 +39,10 @@ module ActiveRecord
39
39
  def model_title
40
40
  @model_title ||= table_name.camelize
41
41
  end
42
+
43
+ def strong_migrations
44
+ defined?(StrongMigrations)
45
+ end
42
46
  end
43
47
  end
44
48
  end
@@ -4,6 +4,7 @@ class CreateNotifyOn<%= model_title %>InsertTrigger < ActiveRecord::Migration[5.
4
4
  TABLE_MODULE = "<%= table_module %>".freeze
5
5
 
6
6
  def up
7
+ <% if strong_migrations -%>@safe = true<% end -%>
7
8
  execute <<-SQL
8
9
  CREATE OR REPLACE FUNCTION notify_#{TABLE_MODULE}_listeners() RETURNS TRIGGER AS $$
9
10
  DECLARE
@@ -24,6 +25,7 @@ class CreateNotifyOn<%= model_title %>InsertTrigger < ActiveRecord::Migration[5.
24
25
  end
25
26
 
26
27
  def down
28
+ <% if strong_migrations -%>@safe = true<% end -%>
27
29
  execute <<-SQL
28
30
  DROP FUNCTION notify_#{TABLE_MODULE}_listeners() CASCADE
29
31
  SQL
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: activerecord-postgres_pub_sub
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.0
4
+ version: 0.4.0.rc0
5
5
  platform: ruby
6
6
  authors:
7
7
  - ezCater, Inc
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2018-05-30 00:00:00.000000000 Z
11
+ date: 2018-07-08 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activerecord
@@ -234,9 +234,9 @@ required_ruby_version: !ruby/object:Gem::Requirement
234
234
  version: '0'
235
235
  required_rubygems_version: !ruby/object:Gem::Requirement
236
236
  requirements:
237
- - - ">="
237
+ - - ">"
238
238
  - !ruby/object:Gem::Version
239
- version: '0'
239
+ version: 1.3.1
240
240
  requirements: []
241
241
  rubyforge_project:
242
242
  rubygems_version: 2.7.6