stream_rails 3.0.0 → 3.1.0

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: 12af4b32dde33e9df2997ad8d9e92d7e1c912478d72db04bf949377dbe56646a
4
- data.tar.gz: b6619f2ecaf1fb5b21251eec60b117386dfbc4622ffe1a71a5164506d172d809
3
+ metadata.gz: 8b0894921cba62c5e9f644dce9428aa6778e63c7584c52b40b665f9db45a7b86
4
+ data.tar.gz: 7677ebcae137afa8117dd28dee32f7ba6f34a06a9b0585e4c16906f027e875be
5
5
  SHA512:
6
- metadata.gz: 4bd338ff891bca9426862b0996b19e6beca617662597b8b66c71995895a64a6aadb986f27c539a49e9fdf33bb5b9688f5f7393a37edd03d2eb56b2892047232b
7
- data.tar.gz: 328cd1ce3ba75efefcfdf21828c2608dcd1c63428a238c9c647e21b612a567b1d23c810f8a79d08d51754cc48241076a3c0421d9ed3eb0cc0128e6d71ee338b1
6
+ metadata.gz: 8b0a996fe4daa4a1a2446380168b758aa5c0298eabb92bb4930ec6eff0ceb33d5b902dd70e7b0c75a934c75e40c50ca320233e5d8a5c60c81809cc492518e5bb
7
+ data.tar.gz: 35134b66addb79ef69a0d9da80fc3d8c6b956f6d1e28a6e148c31b6f19876785d0a1fa310e9e3c14fd6e3d27af75531117796f630ff415812341f787ebf093aa
data/README.md CHANGED
@@ -115,7 +115,7 @@ end
115
115
 
116
116
  #### Sequel
117
117
 
118
- Please, use Sequel `~4`.
118
+ Please, use Sequel `~5`.
119
119
 
120
120
  The integration will look as follows:
121
121
 
@@ -4,7 +4,7 @@ require 'stream_rails/sync_policies'
4
4
  module StreamRails
5
5
  class << self
6
6
  def create_reference(record)
7
- if record.is_a?(ActiveRecord::Base) || (Object.const_defined?('Sequel') && record.is_a?(Sequel::Model))
7
+ if record.is_a?(ActiveRecord::Base) || record.is_a?(Sequel::Model)
8
8
  "#{record.class.model_name}:#{record.id}"
9
9
  else
10
10
  record&.to_s
@@ -62,7 +62,7 @@ module StreamRails
62
62
  return unless StreamRails.enabled?
63
63
 
64
64
  feed = get_owner_feed(instance)
65
- feed.remove(instance.activity_foreign_id, true)
65
+ feed.remove(instance.activity_foreign_id, foreign_id: true)
66
66
  end
67
67
  end
68
68
  end
@@ -4,9 +4,9 @@ module StreamRails
4
4
  def self.included(base)
5
5
  if base.respond_to? :after_commit
6
6
  base.after_commit :add_to_feed, on: :create
7
- elsif Object.const_defined?('Sequel') && base < Sequel::Model
7
+ elsif base <= Sequel::Model
8
8
  base.class_eval do
9
- define_method(:_after_create) do |*args|
9
+ define_method(:after_create) do |*args|
10
10
  super(*args)
11
11
  add_to_feed
12
12
  end
@@ -30,8 +30,8 @@ module StreamRails
30
30
  def self.included(base)
31
31
  if base.respond_to? :before_destroy
32
32
  base.before_destroy :remove_from_feed
33
- elsif Object.const_defined?('Sequel') && base < Sequel::Model
34
- base.instance_eval do
33
+ elsif base <= Sequel::Model
34
+ base.class_eval do
35
35
  define_method(:before_destroy) do |*args|
36
36
  remove_from_feed
37
37
  super(*args)
@@ -1,3 +1,3 @@
1
1
  module StreamRails
2
- VERSION = '3.0.0'.freeze
2
+ VERSION = '3.1.0'.freeze
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: stream_rails
3
3
  version: !ruby/object:Gem::Version
4
- version: 3.0.0
4
+ version: 3.1.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Tommaso Barbugli
@@ -10,7 +10,7 @@ authors:
10
10
  autorequire:
11
11
  bindir: bin
12
12
  cert_chain: []
13
- date: 2021-03-05 00:00:00.000000000 Z
13
+ date: 2021-03-15 00:00:00.000000000 Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: actionpack
@@ -60,14 +60,14 @@ dependencies:
60
60
  requirements:
61
61
  - - "~>"
62
62
  - !ruby/object:Gem::Version
63
- version: 4.0.1
63
+ version: 4.1.0
64
64
  type: :runtime
65
65
  prerelease: false
66
66
  version_requirements: !ruby/object:Gem::Requirement
67
67
  requirements:
68
68
  - - "~>"
69
69
  - !ruby/object:Gem::Version
70
- version: 4.0.1
70
+ version: 4.1.0
71
71
  - !ruby/object:Gem::Dependency
72
72
  name: rake
73
73
  requirement: !ruby/object:Gem::Requirement
@@ -102,14 +102,14 @@ dependencies:
102
102
  requirements:
103
103
  - - "~>"
104
104
  - !ruby/object:Gem::Version
105
- version: '4.49'
105
+ version: '5.42'
106
106
  type: :development
107
107
  prerelease: false
108
108
  version_requirements: !ruby/object:Gem::Requirement
109
109
  requirements:
110
110
  - - "~>"
111
111
  - !ruby/object:Gem::Version
112
- version: '4.49'
112
+ version: '5.42'
113
113
  - !ruby/object:Gem::Dependency
114
114
  name: simplecov
115
115
  requirement: !ruby/object:Gem::Requirement