pusher-push-notifications 1.1.0 → 1.2.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 +5 -5
- data/CHANGELOG.md +7 -1
- data/Gemfile.lock +2 -2
- data/README.md +2 -0
- data/lib/pusher/push_notifications.rb +14 -0
- data/lib/pusher/push_notifications/client.rb +3 -3
- data/lib/pusher/push_notifications/version.rb +1 -1
- data/pusher-push-notifications.gemspec +1 -1
- metadata +19 -20
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
|
-
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
2
|
+
SHA256:
|
3
|
+
metadata.gz: b5b9a110c52cf58f3d233cd0ccc9b26a648cd39f67bb933df20e27e3da208227
|
4
|
+
data.tar.gz: 4db84528a1f21ee318dcd2337a62f07bfe221b77a453b2caf20703a3258ebf75
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 8b7874c65c716bd8cec5d99b27e9f1a6c6ee4e681ff63faa0d108c44489468dcbb7e8c2804c4d2ce3e5db67c4ba9b5a2bdb5db2ba8764acb59793020829deb15
|
7
|
+
data.tar.gz: 4893516085007e70da4f0b6e1401e5202615a45ca6fa0054756dd5fb5b22e31d95b110ae3e4c83f43f4a9bcc33e18e61651dbf5cbe4260e42f9677adeb4c78c6
|
data/CHANGELOG.md
CHANGED
@@ -5,7 +5,13 @@ All notable changes to this project will be documented in this file.
|
|
5
5
|
The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/)
|
6
6
|
and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html).
|
7
7
|
|
8
|
-
## [Unreleased](https://github.com/pusher/push-notifications-ruby/compare/v1.
|
8
|
+
## [Unreleased](https://github.com/pusher/push-notifications-ruby/compare/v1.2.0...HEAD)
|
9
|
+
|
10
|
+
## [1.2.0](https://github.com/pusher/push-notifications-ruby/compare/v1.1.0...v1.2.0) - 2020-06-25
|
11
|
+
|
12
|
+
Added
|
13
|
+
|
14
|
+
Support for "endpoint" overrides to allow for internal integration testing.
|
9
15
|
|
10
16
|
## [1.1.0](https://github.com/pusher/push-notifications-ruby/compare/v1.0.0...v1.1.0) - 2019-02-22
|
11
17
|
|
data/Gemfile.lock
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
pusher-push-notifications (1.
|
4
|
+
pusher-push-notifications (1.2.0)
|
5
5
|
caze (~> 0)
|
6
6
|
jwt (~> 2.1, >= 2.1.0)
|
7
7
|
rest-client (~> 2.0, >= 2.0.2)
|
@@ -128,7 +128,7 @@ DEPENDENCIES
|
|
128
128
|
rake (~> 10.0)
|
129
129
|
rb-readline (~> 0)
|
130
130
|
rspec (~> 3.0)
|
131
|
-
rubocop (
|
131
|
+
rubocop (>= 0.49.0)
|
132
132
|
vcr (~> 3.0, >= 3.0.3)
|
133
133
|
webmock (~> 3.0, >= 3.0.1)
|
134
134
|
|
data/README.md
CHANGED
@@ -22,6 +22,8 @@ gem 'pusher-push-notifications'
|
|
22
22
|
This configuration can be done anywhere you want, but if you are using rails the better place to put it is inside an initializer
|
23
23
|
|
24
24
|
```ruby
|
25
|
+
require 'pusher/push_notifications'
|
26
|
+
|
25
27
|
Pusher::PushNotifications.configure do |config|
|
26
28
|
config.instance_id = ENV['PUSHER_INSTANCE_ID'] # or the value directly
|
27
29
|
config.secret_key = ENV['PUSHER_SECRET_KEY']
|
@@ -44,6 +44,20 @@ module Pusher
|
|
44
44
|
end
|
45
45
|
@secret_key = secret_key
|
46
46
|
end
|
47
|
+
|
48
|
+
def endpoint=(endpoint)
|
49
|
+
if !endpoint.nil? && endpoint.delete(' ').empty?
|
50
|
+
raise PushError, 'Invalid endpoint override'
|
51
|
+
end
|
52
|
+
|
53
|
+
@endpoint = endpoint
|
54
|
+
end
|
55
|
+
|
56
|
+
def endpoint
|
57
|
+
return @endpoint unless @endpoint.nil?
|
58
|
+
|
59
|
+
"#{@instance_id}.pushnotifications.pusher.com"
|
60
|
+
end
|
47
61
|
end
|
48
62
|
end
|
49
63
|
end
|
@@ -54,15 +54,15 @@ module Pusher
|
|
54
54
|
private
|
55
55
|
|
56
56
|
attr_reader :config
|
57
|
-
def_delegators :@config, :instance_id, :secret_key
|
57
|
+
def_delegators :@config, :instance_id, :secret_key, :endpoint
|
58
58
|
|
59
59
|
def build_publish_url(resource)
|
60
|
-
"https://#{
|
60
|
+
"https://#{endpoint}/" \
|
61
61
|
"publish_api/v1/instances/#{instance_id}/#{resource}"
|
62
62
|
end
|
63
63
|
|
64
64
|
def build_users_url(user)
|
65
|
-
"https://#{
|
65
|
+
"https://#{endpoint}/" \
|
66
66
|
"customer_api/v1/instances/#{instance_id}/users/#{user}"
|
67
67
|
end
|
68
68
|
|
@@ -33,7 +33,7 @@ Gem::Specification.new do |spec|
|
|
33
33
|
spec.add_development_dependency 'rake', '~> 10.0'
|
34
34
|
spec.add_development_dependency 'rb-readline', '~> 0'
|
35
35
|
spec.add_development_dependency 'rspec', '~> 3.0'
|
36
|
-
spec.add_development_dependency 'rubocop', '
|
36
|
+
spec.add_development_dependency 'rubocop', '>= 0.49.0'
|
37
37
|
spec.add_development_dependency 'vcr', '~> 3.0', '>= 3.0.3'
|
38
38
|
spec.add_development_dependency 'webmock', '~> 3.0', '>= 3.0.1'
|
39
39
|
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: pusher-push-notifications
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.
|
4
|
+
version: 1.2.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Lucas Medeiros
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: exe
|
11
11
|
cert_chain: []
|
12
|
-
date:
|
12
|
+
date: 2020-06-25 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: caze
|
@@ -29,22 +29,22 @@ dependencies:
|
|
29
29
|
name: jwt
|
30
30
|
requirement: !ruby/object:Gem::Requirement
|
31
31
|
requirements:
|
32
|
-
- - "~>"
|
33
|
-
- !ruby/object:Gem::Version
|
34
|
-
version: '2.1'
|
35
32
|
- - ">="
|
36
33
|
- !ruby/object:Gem::Version
|
37
34
|
version: 2.1.0
|
35
|
+
- - "~>"
|
36
|
+
- !ruby/object:Gem::Version
|
37
|
+
version: '2.1'
|
38
38
|
type: :runtime
|
39
39
|
prerelease: false
|
40
40
|
version_requirements: !ruby/object:Gem::Requirement
|
41
41
|
requirements:
|
42
|
-
- - "~>"
|
43
|
-
- !ruby/object:Gem::Version
|
44
|
-
version: '2.1'
|
45
42
|
- - ">="
|
46
43
|
- !ruby/object:Gem::Version
|
47
44
|
version: 2.1.0
|
45
|
+
- - "~>"
|
46
|
+
- !ruby/object:Gem::Version
|
47
|
+
version: '2.1'
|
48
48
|
- !ruby/object:Gem::Dependency
|
49
49
|
name: rest-client
|
50
50
|
requirement: !ruby/object:Gem::Requirement
|
@@ -131,22 +131,22 @@ dependencies:
|
|
131
131
|
name: pry-byebug
|
132
132
|
requirement: !ruby/object:Gem::Requirement
|
133
133
|
requirements:
|
134
|
-
- - "~>"
|
135
|
-
- !ruby/object:Gem::Version
|
136
|
-
version: '3.6'
|
137
134
|
- - ">="
|
138
135
|
- !ruby/object:Gem::Version
|
139
136
|
version: 3.6.0
|
137
|
+
- - "~>"
|
138
|
+
- !ruby/object:Gem::Version
|
139
|
+
version: '3.6'
|
140
140
|
type: :development
|
141
141
|
prerelease: false
|
142
142
|
version_requirements: !ruby/object:Gem::Requirement
|
143
143
|
requirements:
|
144
|
-
- - "~>"
|
145
|
-
- !ruby/object:Gem::Version
|
146
|
-
version: '3.6'
|
147
144
|
- - ">="
|
148
145
|
- !ruby/object:Gem::Version
|
149
146
|
version: 3.6.0
|
147
|
+
- - "~>"
|
148
|
+
- !ruby/object:Gem::Version
|
149
|
+
version: '3.6'
|
150
150
|
- !ruby/object:Gem::Dependency
|
151
151
|
name: rake
|
152
152
|
requirement: !ruby/object:Gem::Requirement
|
@@ -193,16 +193,16 @@ dependencies:
|
|
193
193
|
name: rubocop
|
194
194
|
requirement: !ruby/object:Gem::Requirement
|
195
195
|
requirements:
|
196
|
-
- - "
|
196
|
+
- - ">="
|
197
197
|
- !ruby/object:Gem::Version
|
198
|
-
version:
|
198
|
+
version: 0.49.0
|
199
199
|
type: :development
|
200
200
|
prerelease: false
|
201
201
|
version_requirements: !ruby/object:Gem::Requirement
|
202
202
|
requirements:
|
203
|
-
- - "
|
203
|
+
- - ">="
|
204
204
|
- !ruby/object:Gem::Version
|
205
|
-
version:
|
205
|
+
version: 0.49.0
|
206
206
|
- !ruby/object:Gem::Dependency
|
207
207
|
name: vcr
|
208
208
|
requirement: !ruby/object:Gem::Requirement
|
@@ -295,8 +295,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
295
295
|
- !ruby/object:Gem::Version
|
296
296
|
version: '0'
|
297
297
|
requirements: []
|
298
|
-
|
299
|
-
rubygems_version: 2.6.14
|
298
|
+
rubygems_version: 3.0.8
|
300
299
|
signing_key:
|
301
300
|
specification_version: 4
|
302
301
|
summary: Pusher Push Notifications Ruby server SDK
|