simplepush 0.7.2 → 0.7.4
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/Gemfile.lock +7 -6
- data/README.md +2 -0
- data/lib/integrations/simplepush_notifier.rb +16 -1
- data/lib/simplepush/version.rb +1 -1
- data/lib/simplepush.rb +3 -0
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 353f24a0df585e1562d5fd230ec617b6dd8bf00eeb12276abdd6b28dedab11fd
|
4
|
+
data.tar.gz: d0621546fa701d920ae2402897556656bea49fc4750315d8c676489d5c3c0af3
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: c11593e4687e147deb35e3b22c640311071f82d6a2f79cb6105e7720e9668400abc31c84bdd34ea20fcb12c190fb380ef94d22cb2551e0b42c49b30684077d5f
|
7
|
+
data.tar.gz: d27ab08b731c3dabca0cea3a78900f317080999e9388cede3b36443ca42e485f247f2ea1a1fd04edd57083e7334e1c52bbd88f8caefdda79b4485326b7c94772
|
data/Gemfile.lock
CHANGED
@@ -1,17 +1,18 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
simplepush (0.7.
|
4
|
+
simplepush (0.7.4)
|
5
5
|
httparty
|
6
6
|
|
7
7
|
GEM
|
8
8
|
remote: https://rubygems.org/
|
9
9
|
specs:
|
10
|
-
async (
|
10
|
+
async (2.6.5)
|
11
11
|
console (~> 1.10)
|
12
|
-
|
12
|
+
fiber-annotation
|
13
|
+
io-event (~> 1.1)
|
13
14
|
timers (~> 4.1)
|
14
|
-
console (1.
|
15
|
+
console (1.23.3)
|
15
16
|
fiber-annotation
|
16
17
|
fiber-local
|
17
18
|
fiber-annotation (0.2.0)
|
@@ -19,9 +20,9 @@ GEM
|
|
19
20
|
httparty (0.21.0)
|
20
21
|
mini_mime (>= 1.0.0)
|
21
22
|
multi_xml (>= 0.5.2)
|
23
|
+
io-event (1.3.3)
|
22
24
|
mini_mime (1.1.5)
|
23
25
|
multi_xml (0.6.0)
|
24
|
-
nio4r (2.5.9)
|
25
26
|
rake (13.1.0)
|
26
27
|
timers (4.3.5)
|
27
28
|
|
@@ -34,4 +35,4 @@ DEPENDENCIES
|
|
34
35
|
simplepush!
|
35
36
|
|
36
37
|
BUNDLED WITH
|
37
|
-
2.
|
38
|
+
2.5.1
|
data/README.md
CHANGED
@@ -143,6 +143,8 @@ The following is a sample of the query as it is produced:
|
|
143
143
|
- 0.7.0 Added support for [Exception Notification Gem](https://github.com/smartinez87/exception_notification)
|
144
144
|
- 0.7.1 Fixed incorrect content-type handling.
|
145
145
|
- 0.7.2 Bump dependencies because of vulnerability in httparty
|
146
|
+
- 0.7.3 Fix OpenSSL cipher needing key again under Ruby >= 3.0, bump dependencies
|
147
|
+
- 0.7.4 Fix message length restrictions for Exception Notification
|
146
148
|
|
147
149
|
## Contributing
|
148
150
|
|
@@ -32,6 +32,7 @@ module ExceptionNotifier
|
|
32
32
|
MAX_TITLE_LENGTH = 120
|
33
33
|
MAX_VALUE_LENGTH = 300
|
34
34
|
MAX_BACKTRACE_SIZE = 3
|
35
|
+
MAX_TOTAL_SIZE_BYTES = 1024
|
35
36
|
|
36
37
|
attr_reader :exception,
|
37
38
|
:options
|
@@ -71,7 +72,21 @@ module ExceptionNotifier
|
|
71
72
|
text << formatted_request if request
|
72
73
|
text << formatted_session if request
|
73
74
|
|
74
|
-
text.join("\n------------------\n")
|
75
|
+
text = text.join("\n------------------\n")
|
76
|
+
|
77
|
+
if text.bytesize >= MAX_TOTAL_SIZE_BYTES
|
78
|
+
# puts "Text is too long (#{text.bytesize} bytes >= MAX_TOTAL_SIZE), need to truncate"
|
79
|
+
|
80
|
+
# if truncate bytes is available
|
81
|
+
if text.respond_to?(:truncate_bytes) && false
|
82
|
+
text = text.truncate_bytes(MAX_TOTAL_SIZE_BYTES)
|
83
|
+
else
|
84
|
+
text = text[0...(MAX_TOTAL_SIZE_BYTES/2)]
|
85
|
+
end
|
86
|
+
# puts "Text after truncate is #{text.bytesize} bytes <= MAX_TOTAL_SIZE"
|
87
|
+
end
|
88
|
+
|
89
|
+
text
|
75
90
|
end
|
76
91
|
|
77
92
|
def formatted_key_value(key, value)
|
data/lib/simplepush/version.rb
CHANGED
data/lib/simplepush.rb
CHANGED
@@ -30,6 +30,8 @@ class Simplepush
|
|
30
30
|
#
|
31
31
|
# This method is blocking.
|
32
32
|
#
|
33
|
+
# Returns the response object from Httparty.
|
34
|
+
#
|
33
35
|
def send(title, message, event = nil)
|
34
36
|
raise "Key and message argument must be set" unless message
|
35
37
|
|
@@ -55,6 +57,7 @@ class Simplepush
|
|
55
57
|
|
56
58
|
if title
|
57
59
|
cipher.encrypt # Restart cipher
|
60
|
+
cipher.key = @cipher_key
|
58
61
|
payload[:title] = Base64.urlsafe_encode64(cipher.update(payload[:title]) + cipher.final)
|
59
62
|
end
|
60
63
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: simplepush
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.7.
|
4
|
+
version: 0.7.4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Christopher Oezbek
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2024-02-13 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: httparty
|
@@ -67,7 +67,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
67
67
|
- !ruby/object:Gem::Version
|
68
68
|
version: '0'
|
69
69
|
requirements: []
|
70
|
-
rubygems_version: 3.4.
|
70
|
+
rubygems_version: 3.4.10
|
71
71
|
signing_key:
|
72
72
|
specification_version: 4
|
73
73
|
summary: Ruby SimplePush.io API client (unofficial)
|