pushmore 0.0.2 → 0.1.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/lib/push_more.rb +11 -2
- metadata +6 -7
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
|
-
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
2
|
+
SHA256:
|
|
3
|
+
metadata.gz: c9d9b2a23ddce26a428ce4bb774f9c836076c6fafc6d40fb5a569db6bc6d3342
|
|
4
|
+
data.tar.gz: d29136fc1d01eb4935ae9e7d3c824d81c6e6bc487ef6673e04624d5827279428
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 28285e1245a2d86430d659d4da930bd18dabdcecacc5cc268d33eb467388946c5c79f2739cd23d48f2c1f66cd06be142803761be39d39769a2b587f9d60c2273
|
|
7
|
+
data.tar.gz: 1ac98115ed57f412cadd2170bf36c35d4baa570cd4eaee5f5dc4f1b41c37637ad627721621444f0dc95c8004a2a7ec30a1549298f043e7efabfc18cd096f0152
|
data/lib/push_more.rb
CHANGED
|
@@ -1,8 +1,17 @@
|
|
|
1
1
|
# frozen_string_literal: true
|
|
2
2
|
|
|
3
3
|
require "net/https"
|
|
4
|
+
require "ostruct"
|
|
4
5
|
|
|
5
6
|
class PushMore
|
|
7
|
+
def self.configuration
|
|
8
|
+
@configuration ||= OpenStruct.new
|
|
9
|
+
end
|
|
10
|
+
|
|
11
|
+
def self.configure
|
|
12
|
+
yield(configuration)
|
|
13
|
+
end
|
|
14
|
+
|
|
6
15
|
# Send notifcations to Telegram through PushMore.io
|
|
7
16
|
#
|
|
8
17
|
# Example:
|
|
@@ -15,9 +24,9 @@ class PushMore
|
|
|
15
24
|
|
|
16
25
|
WEBHOOK_BASE_URL = "https://pushmore.io/webhook/"
|
|
17
26
|
|
|
18
|
-
def initialize(body, key:
|
|
27
|
+
def initialize(body, key: nil)
|
|
19
28
|
@body = body
|
|
20
|
-
@key = key
|
|
29
|
+
@key = key || PushMore.configuration.api_key || ENV.fetch("PUSH_MORE_KEY")
|
|
21
30
|
end
|
|
22
31
|
|
|
23
32
|
def deliver
|
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: pushmore
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.0
|
|
4
|
+
version: 0.1.0
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Marc Köhlbrugge
|
|
8
|
-
autorequire:
|
|
8
|
+
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date:
|
|
11
|
+
date: 2020-11-19 00:00:00.000000000 Z
|
|
12
12
|
dependencies: []
|
|
13
13
|
description: Easily send notifications to Telegram
|
|
14
14
|
email: hey@marckohlbrugge.com
|
|
@@ -21,7 +21,7 @@ homepage: http://rubygems.org/gems/pushmore
|
|
|
21
21
|
licenses:
|
|
22
22
|
- MIT
|
|
23
23
|
metadata: {}
|
|
24
|
-
post_install_message:
|
|
24
|
+
post_install_message:
|
|
25
25
|
rdoc_options: []
|
|
26
26
|
require_paths:
|
|
27
27
|
- lib
|
|
@@ -36,9 +36,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
|
36
36
|
- !ruby/object:Gem::Version
|
|
37
37
|
version: '0'
|
|
38
38
|
requirements: []
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
signing_key:
|
|
39
|
+
rubygems_version: 3.1.2
|
|
40
|
+
signing_key:
|
|
42
41
|
specification_version: 4
|
|
43
42
|
summary: Ruby client for PushMore.io
|
|
44
43
|
test_files: []
|