notification-pusher 1.0.0.beta11 → 1.0.0

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 3389befe3b78fc16d567501785c291d3df968498f45703a109650dc4f6fcaa24
4
- data.tar.gz: 3887f3617fa6da2c532c62f86df358be8d1872a231d8f0cbcf21d829da69cbc3
3
+ metadata.gz: 0ba50c03c7d5d3e209e8185002e5dcbcd756f55528c2e484223d2d12b53bf205
4
+ data.tar.gz: 3d2646830fccda54fa8831f9beb7c59807ebf913d5d88a375291b2b0fdccefb1
5
5
  SHA512:
6
- metadata.gz: 1f6ebeb06eb9c23c24ea539ea1def734569f2308e62a5470a7a1c01a86784d006d4363e9d4f5ffb96fcebbb29564f2271ad81e295fe2d62d4f8ea241de78c4cc
7
- data.tar.gz: 73df929584ab73f5192c3203de279828be712e01282501f827784dc894b4ac9110cd34baec97f6f4e8a91f7a2b57fff26b43728ecc0aea017e67bc1f9bbf12a4
6
+ metadata.gz: 3428c5bb1dd2943de8254f995227c56f1954a002a69a286009203d56ce5ac17a81ede9d4205a88567c4b14d6d18cdb8b1b219c685c43ecbcd5557d7e001d98dd
7
+ data.tar.gz: 24bf19a1eb7d8cdd2ec4c10f02f5dcb156174c09d38fcf4008d6b554e83dac587b1255fe90b0d14df2854449728e7ee8650ff113ad4374ac4711c754c3a242d0
@@ -4,6 +4,10 @@
4
4
 
5
5
  * nothing yet
6
6
 
7
+ ### 1.0.0 - 2017-12-28
8
+
9
+ * bugfixes
10
+
7
11
  ### 1.0.0.beta6 - 2017-12-28
8
12
 
9
13
  * bugfixes
data/README.md CHANGED
@@ -86,7 +86,7 @@ Where `name` is the name of the defined pusher and `custom_options` are the opti
86
86
  You are also able to do the exact same in just one line of code:
87
87
 
88
88
  ```ruby
89
- notification = Notification.create target: User.first, object: Recipe.first, push: name, push_options: custom_options
89
+ notification = Notification.create target: User.first, object: Recipe.first, pusher: name, pusher_options: custom_options
90
90
  ```
91
91
 
92
92
  **Note:** In this case, pass `custom_options` as a `Hash`.
@@ -107,7 +107,7 @@ class NotificationPusher::CustomPusher
107
107
  def initialize notification, options = {}
108
108
  # ...
109
109
  end
110
-
110
+
111
111
  end
112
112
  ```
113
113
 
@@ -7,8 +7,8 @@ module NotificationPusher
7
7
  extend ActiveSupport::Concern
8
8
 
9
9
  included do
10
- attr_accessor :push
11
- attr_accessor :push_options
10
+ attr_accessor :pusher
11
+ attr_accessor :pusher_options
12
12
 
13
13
  after_create_commit :initialize_pusher
14
14
 
@@ -18,23 +18,23 @@ module NotificationPusher
18
18
  module InstanceMethods
19
19
 
20
20
  def push name, options = {}
21
- self.push = class_name
22
- self.push_options = options
21
+ self.pusher = name
22
+ self.pusher_options = options
23
23
  self.initialize_pusher
24
24
  end
25
25
 
26
- private
26
+ protected
27
27
 
28
28
  def initialize_pusher
29
- unless self.push.nil?
30
- if self.push.kind_of?(Array)
31
- self.push.each do |class_name|
29
+ unless self.pusher.nil?
30
+ if self.pusher.kind_of?(Array)
31
+ self.pusher.each do |class_name|
32
32
  pusher = NotificationPusher::Pusher.find_by_name(class_name).first
33
- pusher.push(self, self.push_options[class_name.to_sym])
33
+ pusher.push(self, self.pusher_options[class_name.to_sym])
34
34
  end
35
35
  else
36
- pusher = NotificationPusher::Pusher.find_by_name(self.push).first
37
- pusher.push(self, self.push_options)
36
+ pusher = NotificationPusher::Pusher.find_by_name(self.pusher).first
37
+ pusher.push(self, self.pusher_options)
38
38
  end
39
39
  end
40
40
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: notification-pusher
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.0.beta11
4
+ version: 1.0.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jonas Hübotter
@@ -30,14 +30,14 @@ dependencies:
30
30
  requirements:
31
31
  - - '='
32
32
  - !ruby/object:Gem::Version
33
- version: 1.0.0.beta11
33
+ version: 1.0.0
34
34
  type: :runtime
35
35
  prerelease: false
36
36
  version_requirements: !ruby/object:Gem::Requirement
37
37
  requirements:
38
38
  - - '='
39
39
  - !ruby/object:Gem::Version
40
- version: 1.0.0.beta11
40
+ version: 1.0.0
41
41
  - !ruby/object:Gem::Dependency
42
42
  name: rspec
43
43
  requirement: !ruby/object:Gem::Requirement
@@ -97,9 +97,9 @@ required_ruby_version: !ruby/object:Gem::Requirement
97
97
  version: '2.3'
98
98
  required_rubygems_version: !ruby/object:Gem::Requirement
99
99
  requirements:
100
- - - ">"
100
+ - - ">="
101
101
  - !ruby/object:Gem::Version
102
- version: 1.3.1
102
+ version: '0'
103
103
  requirements: []
104
104
  rubyforge_project:
105
105
  rubygems_version: 2.7.3