lex-pushover 0.1.1 → 0.1.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile.lock +14 -14
- data/README.md +43 -11
- data/legion-extensions-pushover.gemspec +1 -1
- data/lib/legion/extensions/pushover/runners/message.rb +4 -4
- data/lib/legion/extensions/pushover/version.rb +1 -1
- metadata +4 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 5683cf3b5d1b45b32024abe43cb060c5f10d70236f2ede7dff9338ee31bb423c
|
4
|
+
data.tar.gz: b2148a326361e5e72f58210914055342954da89697f08941cdcd519566c350a8
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 06cb1d5037b3c219ea6bfe7bbc7ebfb49f5bdccc7bacd89d14f852b1124890a0171249dd28b1e0f00036771521198da5ee68ab82c73adfe23181f405a31316a0
|
7
|
+
data.tar.gz: 7191893a63f3e9c8e969bf62bc030d5596849e5dc4c8461c2ffd9e1ab95a510dacd092159d6e8da7bf5b8485aa1543e2e7bd9ea0f3ec962a8ee5d0c38a2b09c5
|
data/Gemfile.lock
CHANGED
@@ -1,24 +1,24 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
lex-pushover (0.1.
|
5
|
-
pushover
|
4
|
+
lex-pushover (0.1.2)
|
5
|
+
pushover (>= 3.0.0)
|
6
6
|
|
7
7
|
GEM
|
8
8
|
remote: https://rubygems.org/
|
9
9
|
specs:
|
10
10
|
ast (2.4.1)
|
11
|
-
|
12
|
-
|
11
|
+
bigdecimal (2.0.0)
|
12
|
+
codecov (0.2.8)
|
13
13
|
json
|
14
14
|
simplecov
|
15
|
-
colorize (0.8.1)
|
16
15
|
diff-lcs (1.4.4)
|
17
16
|
docile (1.3.2)
|
18
|
-
excon (0.
|
17
|
+
excon (0.76.0)
|
19
18
|
gli (2.19.2)
|
20
19
|
json (2.3.1)
|
21
|
-
oj (3.10.
|
20
|
+
oj (3.10.12)
|
21
|
+
bigdecimal (>= 1.0, < 3)
|
22
22
|
parallel (1.19.2)
|
23
23
|
parser (2.7.1.4)
|
24
24
|
ast (~> 2.4.1)
|
@@ -45,25 +45,25 @@ GEM
|
|
45
45
|
rspec-support (3.9.3)
|
46
46
|
rspec_junit_formatter (0.4.1)
|
47
47
|
rspec-core (>= 2, < 4, != 2.12.0)
|
48
|
-
rubocop (0.
|
48
|
+
rubocop (0.89.1)
|
49
49
|
parallel (~> 1.10)
|
50
50
|
parser (>= 2.7.1.1)
|
51
51
|
rainbow (>= 2.2.2, < 4.0)
|
52
52
|
regexp_parser (>= 1.7)
|
53
53
|
rexml
|
54
|
-
rubocop-ast (>= 0.
|
54
|
+
rubocop-ast (>= 0.3.0, < 1.0)
|
55
55
|
ruby-progressbar (~> 1.7)
|
56
56
|
unicode-display_width (>= 1.4.0, < 2.0)
|
57
|
-
rubocop-ast (0.
|
58
|
-
parser (>= 2.7.
|
57
|
+
rubocop-ast (0.3.0)
|
58
|
+
parser (>= 2.7.1.4)
|
59
59
|
rubocop-md (0.4.0)
|
60
60
|
rubocop (~> 0.60)
|
61
61
|
rubocop-performance (1.7.1)
|
62
62
|
rubocop (>= 0.82.0)
|
63
|
-
rubocop-rspec (1.
|
64
|
-
rubocop (
|
63
|
+
rubocop-rspec (1.43.1)
|
64
|
+
rubocop (~> 0.87)
|
65
65
|
ruby-progressbar (1.10.1)
|
66
|
-
simplecov (0.
|
66
|
+
simplecov (0.19.0)
|
67
67
|
docile (~> 1.1)
|
68
68
|
simplecov-html (~> 0.11)
|
69
69
|
simplecov-html (0.12.2)
|
data/README.md
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
# Legion::Extensions::Pushover
|
2
2
|
|
3
|
-
|
3
|
+
A Legion Extension designed to connect Legion to Pushover
|
4
4
|
|
5
5
|
## Installation
|
6
6
|
|
7
7
|
Add this line to your application's Gemfile:
|
8
8
|
|
9
9
|
```ruby
|
10
|
-
gem '
|
10
|
+
gem 'lex-pushover'
|
11
11
|
```
|
12
12
|
|
13
13
|
And then execute:
|
@@ -16,20 +16,52 @@ And then execute:
|
|
16
16
|
|
17
17
|
Or install it yourself as:
|
18
18
|
|
19
|
-
$ gem install
|
19
|
+
$ gem install lex-pushover
|
20
|
+
|
21
|
+
## Adding to Legion
|
22
|
+
You can manually install with a `gem install lex-pushover` command or by adding it into your settings with something like this
|
23
|
+
```json
|
24
|
+
{
|
25
|
+
"extensions": {
|
26
|
+
"pushover": {
|
27
|
+
"enabled": true,
|
28
|
+
"workers": 1,
|
29
|
+
"token": "___token___", # optional and can be passed in via the payload
|
30
|
+
"user": "user" # optional and can be passed in via the payload
|
31
|
+
}
|
32
|
+
}
|
33
|
+
}
|
34
|
+
```
|
20
35
|
|
21
36
|
## Usage
|
37
|
+
There is only a single runner in this LEX. It can make the following calls
|
38
|
+
##### Functions
|
39
|
+
|function|message|title|token|user|
|
40
|
+
|---|---|---|---|---|
|
41
|
+
|push |Required|Optional|Optional|Optional
|
42
|
+
|emergency|Required|Optional|Optional|Optional
|
43
|
+
|high |Required|Optional|Optional|Optional
|
44
|
+
|normal |Required|Optional|Optional|Optional
|
45
|
+
|low |Required|Optional|Optional|Optional
|
46
|
+
|lowest |Required|Optional|Optional|Optional
|
47
|
+
|
48
|
+
Other optional parameteres
|
49
|
+
```ruby
|
50
|
+
message priority device title url url_title sound expire retry callback
|
51
|
+
```
|
22
52
|
|
53
|
+
#### Example Payloads
|
54
|
+
```json
|
55
|
+
{"message": "Hello World!"}
|
56
|
+
```
|
23
57
|
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
To install this gem onto your local machine, run `bundle exec rake install`. To release a new version, update the version number in `version.rb`, and then run `bundle exec rake release`, which will create a git tag for the version, push git commits and tags, and push the `.gem` file to [rubygems.org](https://rubygems.org).
|
29
|
-
|
30
|
-
## Contributing
|
58
|
+
```json
|
59
|
+
{"title": "Hello World!", "message": "I am a notification"}
|
60
|
+
```
|
31
61
|
|
32
|
-
|
62
|
+
```json
|
63
|
+
{"message": "With Creds","token": "easy as abc 123"}
|
64
|
+
```
|
33
65
|
|
34
66
|
|
35
67
|
## License
|
@@ -13,14 +13,14 @@ module Legion::Extensions::Pushover
|
|
13
13
|
end
|
14
14
|
|
15
15
|
def emergency(message:, title: nil, **opts)
|
16
|
-
result = message(message: message, title: title, **opts).push
|
16
|
+
result = message(message: message, title: title, priority: 2, **opts).push
|
17
17
|
raise IOError, result.errors unless result.errors.nil?
|
18
18
|
|
19
19
|
{}
|
20
20
|
end
|
21
21
|
|
22
22
|
def high(message:, title: nil, **opts)
|
23
|
-
result = message(message: message, title: title, **opts).push
|
23
|
+
result = message(message: message, title: title, priority: 1, **opts).push
|
24
24
|
raise IOError, result.errors unless result.errors.nil?
|
25
25
|
|
26
26
|
{}
|
@@ -34,14 +34,14 @@ module Legion::Extensions::Pushover
|
|
34
34
|
end
|
35
35
|
|
36
36
|
def low(message:, title: nil, **opts)
|
37
|
-
result = message(message: message, title: title, **opts).push
|
37
|
+
result = message(message: message, title: title, priority: -1, **opts).push
|
38
38
|
raise IOError, result.errors unless result.errors.nil?
|
39
39
|
|
40
40
|
{}
|
41
41
|
end
|
42
42
|
|
43
43
|
def lowest(message:, title: nil, **opts)
|
44
|
-
result = message(message: message, title: title, **opts).push
|
44
|
+
result = message(message: message, title: title, priority: -2, **opts).push
|
45
45
|
raise IOError, result.errors unless result.errors.nil?
|
46
46
|
|
47
47
|
{}
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: lex-pushover
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Esity
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2020-
|
11
|
+
date: 2020-08-24 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -142,14 +142,14 @@ dependencies:
|
|
142
142
|
requirements:
|
143
143
|
- - ">="
|
144
144
|
- !ruby/object:Gem::Version
|
145
|
-
version:
|
145
|
+
version: 3.0.0
|
146
146
|
type: :runtime
|
147
147
|
prerelease: false
|
148
148
|
version_requirements: !ruby/object:Gem::Requirement
|
149
149
|
requirements:
|
150
150
|
- - ">="
|
151
151
|
- !ruby/object:Gem::Version
|
152
|
-
version:
|
152
|
+
version: 3.0.0
|
153
153
|
description: Used to connect Legion to Pushover
|
154
154
|
email:
|
155
155
|
- matthewdiverson@gmail.com
|