pushpad 1.5.0 → 1.6.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 +4 -4
- data/.github/workflows/ci.yml +2 -2
- data/LICENSE.txt +1 -1
- data/lib/pushpad/notification.rb +2 -1
- data/lib/pushpad/subscription.rb +4 -3
- data/pushpad.gemspec +1 -1
- data/spec/pushpad/notification_spec.rb +2 -0
- data/spec/pushpad/subscription_spec.rb +2 -0
- metadata +7 -7
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 79880c6abcf0f8ecda48ad0df65bb07ee440660f58fb5fd60d898ceb162d5263
|
4
|
+
data.tar.gz: aa148bdaf14910ea7041867163d3f524682be1e54533d6153c790326961c7edc
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 8e0b08f9dc1b48b61fc4fc12f8a0a6a22872de66d4e61736792a5548b2f4795b36e5f9275589cfd8d717baf86278908b0833305bbb6fd1ab8fac75150a47d177
|
7
|
+
data.tar.gz: '08d16dc17ec9b9a5e2454f254fde072880c2eb50f84b298b882362d36c9b40dc8957b75fcb8935b5e045279c76a1da7de4fbaea685d8e9dedfed365d2993f093'
|
data/.github/workflows/ci.yml
CHANGED
@@ -10,9 +10,9 @@ jobs:
|
|
10
10
|
strategy:
|
11
11
|
fail-fast: false
|
12
12
|
matrix:
|
13
|
-
ruby-version: ['3.0', '3.1', '3.2', '3.3']
|
13
|
+
ruby-version: ['3.0', '3.1', '3.2', '3.3', '3.4']
|
14
14
|
steps:
|
15
|
-
- uses: actions/checkout@
|
15
|
+
- uses: actions/checkout@v5
|
16
16
|
- name: Set up Ruby
|
17
17
|
uses: ruby/setup-ruby@v1
|
18
18
|
with:
|
data/LICENSE.txt
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
The MIT License (MIT)
|
2
2
|
|
3
|
-
Copyright (c) 2016-
|
3
|
+
Copyright (c) 2016-2025 Pushpad (https://pushpad.xyz)
|
4
4
|
|
5
5
|
Permission is hereby granted, free of charge, to any person obtaining a copy
|
6
6
|
of this software and associated documentation files (the "Software"), to deal
|
data/lib/pushpad/notification.rb
CHANGED
@@ -16,10 +16,11 @@ module Pushpad
|
|
16
16
|
end
|
17
17
|
|
18
18
|
attr_accessor :body, :title, :target_url, :icon_url, :badge_url, :image_url, :ttl, :require_interaction, :silent, :urgent, :custom_data, :custom_metrics, :actions, :starred, :send_at
|
19
|
-
attr_reader :id, :created_at, :scheduled_count, :successfully_sent_count, :opened_count
|
19
|
+
attr_reader :id, :project_id, :created_at, :scheduled_count, :successfully_sent_count, :opened_count
|
20
20
|
|
21
21
|
def initialize(options)
|
22
22
|
@id = options[:id]
|
23
|
+
@project_id = options[:project_id]
|
23
24
|
@created_at = options[:created_at] && Time.parse(options[:created_at])
|
24
25
|
@scheduled_count = options[:scheduled_count]
|
25
26
|
@successfully_sent_count = options[:successfully_sent_count]
|
data/lib/pushpad/subscription.rb
CHANGED
@@ -15,10 +15,11 @@ module Pushpad
|
|
15
15
|
class DeleteError < RuntimeError
|
16
16
|
end
|
17
17
|
|
18
|
-
attr_reader :id, :endpoint, :p256dh, :auth, :uid, :tags, :last_click_at, :created_at
|
18
|
+
attr_reader :id, :project_id, :endpoint, :p256dh, :auth, :uid, :tags, :last_click_at, :created_at
|
19
19
|
|
20
20
|
def initialize(options)
|
21
21
|
@id = options[:id]
|
22
|
+
@project_id = options[:project_id]
|
22
23
|
@endpoint = options[:endpoint]
|
23
24
|
@p256dh = options[:p256dh]
|
24
25
|
@auth = options[:auth]
|
@@ -89,7 +90,7 @@ module Pushpad
|
|
89
90
|
end
|
90
91
|
|
91
92
|
def update(attributes, options = {})
|
92
|
-
project_id = options[:project_id] || Pushpad.project_id
|
93
|
+
project_id = project_id || options[:project_id] || Pushpad.project_id
|
93
94
|
raise "You must set project_id" unless project_id
|
94
95
|
|
95
96
|
raise "You must set id" unless id
|
@@ -109,7 +110,7 @@ module Pushpad
|
|
109
110
|
end
|
110
111
|
|
111
112
|
def delete(options = {})
|
112
|
-
project_id = options[:project_id] || Pushpad.project_id
|
113
|
+
project_id = project_id || options[:project_id] || Pushpad.project_id
|
113
114
|
raise "You must set project_id" unless project_id
|
114
115
|
|
115
116
|
raise "You must set id" unless id
|
data/pushpad.gemspec
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
Gem::Specification.new do |spec|
|
2
2
|
spec.name = "pushpad"
|
3
|
-
spec.version = '1.
|
3
|
+
spec.version = '1.6.0'
|
4
4
|
spec.authors = ["Pushpad"]
|
5
5
|
spec.email = ["support@pushpad.xyz"]
|
6
6
|
spec.summary = "Web push notifications for Chrome, Firefox, Opera, Edge and Safari using Pushpad."
|
@@ -62,6 +62,7 @@ module Pushpad
|
|
62
62
|
it "returns notification with attributes from json response" do
|
63
63
|
attributes = {
|
64
64
|
id: 5,
|
65
|
+
project_id: 123,
|
65
66
|
title: "Foo Bar",
|
66
67
|
body: "Lorem ipsum dolor sit amet, consectetur adipiscing elit.",
|
67
68
|
target_url: "https://example.com",
|
@@ -118,6 +119,7 @@ module Pushpad
|
|
118
119
|
it "returns notifications of project with attributes from json response" do
|
119
120
|
attributes = {
|
120
121
|
id: 5,
|
122
|
+
project_id: 123,
|
121
123
|
title: "Foo Bar",
|
122
124
|
body: "Lorem ipsum dolor sit amet, consectetur adipiscing elit.",
|
123
125
|
target_url: "https://example.com",
|
@@ -164,6 +164,7 @@ module Pushpad
|
|
164
164
|
it "returns subscription with attributes from json response" do
|
165
165
|
attributes = {
|
166
166
|
id: 5,
|
167
|
+
project_id: 123,
|
167
168
|
endpoint: "https://example.com/push/f7Q1Eyf7EyfAb1",
|
168
169
|
p256dh: "BCQVDTlYWdl05lal3lG5SKr3VxTrEWpZErbkxWrzknHrIKFwihDoZpc_2sH6Sh08h-CacUYI-H8gW4jH-uMYZQ4=",
|
169
170
|
auth: "cdKMlhgVeSPzCXZ3V7FtgQ==",
|
@@ -204,6 +205,7 @@ module Pushpad
|
|
204
205
|
it "returns subscriptions of project with attributes from json response" do
|
205
206
|
attributes = {
|
206
207
|
id: 1169,
|
208
|
+
project_id: 123,
|
207
209
|
endpoint: "https://example.com/push/f7Q1Eyf7EyfAb1",
|
208
210
|
p256dh: "BCQVDTlYWdl05lal3lG5SKr3VxTrEWpZErbkxWrzknHrIKFwihDoZpc_2sH6Sh08h-CacUYI-H8gW4jH-uMYZQ4=",
|
209
211
|
auth: "cdKMlhgVeSPzCXZ3V7FtgQ==",
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: pushpad
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.
|
4
|
+
version: 1.6.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Pushpad
|
8
|
-
autorequire:
|
8
|
+
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2025-10-10 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rspec
|
@@ -38,7 +38,7 @@ dependencies:
|
|
38
38
|
- - ">="
|
39
39
|
- !ruby/object:Gem::Version
|
40
40
|
version: '0'
|
41
|
-
description:
|
41
|
+
description:
|
42
42
|
email:
|
43
43
|
- support@pushpad.xyz
|
44
44
|
executables: []
|
@@ -70,7 +70,7 @@ homepage: https://pushpad.xyz
|
|
70
70
|
licenses:
|
71
71
|
- MIT
|
72
72
|
metadata: {}
|
73
|
-
post_install_message:
|
73
|
+
post_install_message:
|
74
74
|
rdoc_options: []
|
75
75
|
require_paths:
|
76
76
|
- lib
|
@@ -85,8 +85,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
85
85
|
- !ruby/object:Gem::Version
|
86
86
|
version: '0'
|
87
87
|
requirements: []
|
88
|
-
rubygems_version: 3.
|
89
|
-
signing_key:
|
88
|
+
rubygems_version: 3.5.22
|
89
|
+
signing_key:
|
90
90
|
specification_version: 4
|
91
91
|
summary: Web push notifications for Chrome, Firefox, Opera, Edge and Safari using
|
92
92
|
Pushpad.
|