hoc_notifications 1.0.3 → 1.0.4

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: 01b2fdcaf19ecb97672bb46b0ef8ccd50b40aa30
4
- data.tar.gz: d5749eba22ba3333d25fa86e9e0ffed3d7241705
3
+ metadata.gz: 2ad37471f2c6ee1a849cc043513512527c053360
4
+ data.tar.gz: ba51c4e94a2d79a86610edaad4f8e399fff6ebb9
5
5
  SHA512:
6
- metadata.gz: 4c829692c147589049507e71349458e99b28683f0d16943eca518cb3d2260fe7fc0239340a728e3aec328ec4531469732783f0e83b6220ad0a86a060db5d46a0
7
- data.tar.gz: 082e140135f5cab4676d012e9d6d2f24a4ee95cb7420721b856c020806ffb02b0c3a82de926d9e9f86fea4b99a8a45016089103fb89113384fdc122933305c86
6
+ metadata.gz: 0f18bdd7285a642930c8c38eb9f2add07f7d1cba15025ad2c284f08256f0200abf9e684468162f0a0c9d90717f23ac4938e4f425a2227a6c7a6e34e32b1de3a5
7
+ data.tar.gz: 0701e1edf4d2788e36531ca863a4e4e1ab8b0c2278d0d452bc169b05d0bfa4396e9d5040bddb40d4b4eb9623ec39f66128667ca716518ea47425ed23ae128ff2
@@ -7,10 +7,6 @@ module HocNotifications
7
7
 
8
8
  source_root File.expand_path('../templates', __FILE__)
9
9
 
10
- #def copy_initializer_file
11
- # template "initializer.rb", "config/initializers/hoc_notifications.rb"
12
- #end
13
-
14
10
  def copy_migration_files
15
11
  migration_template "migration/create_hoc_notifications.rb", "db/migrate/create_hoc_notifications.rb"
16
12
  end
@@ -15,7 +15,7 @@ class CreateHocNotifications < ActiveRecord::Migration[4.2]
15
15
 
16
16
  t.string :action, null: false, default: ""
17
17
 
18
- t.text :data, null: false, default: ""
18
+ t.json :data, null: false, default: {}
19
19
 
20
20
  t.datetime :seen_at
21
21
 
@@ -2,7 +2,6 @@ require "hoc_notifications/version"
2
2
  require "hoc_notifications/acts_as_hoc_notifications_receiver"
3
3
  require "hoc_notifications/acts_as_hoc_notifications_sender"
4
4
  require "hoc_notifications/acts_as_hoc_notifications_notifiable"
5
- require "hoc_notifications/hoc_notification_action"
6
5
  require "hoc_notifications/active_record/hoc_notification.rb"
7
6
  module HocNotifications
8
7
  # Your code goes here...
@@ -6,7 +6,9 @@ module HocNotifications
6
6
 
7
7
  scope :unread, -> { where(seen_at: nil) }
8
8
 
9
- serialize :data, Hash
9
+ before_save -> {
10
+ self.data = {} if self.data.nil?
11
+ }
10
12
 
11
13
  after_create -> {
12
14
  return if recipient.nil?
@@ -1,3 +1,3 @@
1
1
  module HocNotifications
2
- VERSION = "1.0.3"
2
+ VERSION = "1.0.4"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: hoc_notifications
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.3
4
+ version: 1.0.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Gert Lavsen
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2018-09-10 00:00:00.000000000 Z
11
+ date: 2018-09-12 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -60,7 +60,6 @@ files:
60
60
  - lib/hoc_notifications/acts_as_hoc_notifications_notifiable.rb
61
61
  - lib/hoc_notifications/acts_as_hoc_notifications_receiver.rb
62
62
  - lib/hoc_notifications/acts_as_hoc_notifications_sender.rb
63
- - lib/hoc_notifications/hoc_notification_action.rb
64
63
  - lib/hoc_notifications/version.rb
65
64
  homepage: https://github.com/house-of-code/hoc_notifications
66
65
  licenses:
@@ -1,8 +0,0 @@
1
- module HocNotifications
2
- class HocNotificationAction
3
- def initialize(action:, title:, message:, sender:, recipients:, notifiable:, data: )
4
-
5
- end
6
- attr_accessor :action, :message, :title, :sender, :recipients, :notifiable, :data
7
- end
8
- end