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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: deb491f1cd9a387d6eec4d2baf8c1829f4d183fd0ea72ac33500c25e58fa8a1b
4
- data.tar.gz: 466c40024c489bf3289a01c6df42a28596e81ddb221cfbdff6ab45332b6f01a9
3
+ metadata.gz: 5683cf3b5d1b45b32024abe43cb060c5f10d70236f2ede7dff9338ee31bb423c
4
+ data.tar.gz: b2148a326361e5e72f58210914055342954da89697f08941cdcd519566c350a8
5
5
  SHA512:
6
- metadata.gz: c5d99d658554f508659a42491d7407799c62de485efd4d85441592cb85e00c9bf221284a0acb551b06d703e4e9cc2ff5c5710020c585ea3eebccab52a76227d4
7
- data.tar.gz: 2d179d5843a3d29fa8e17ece1e273a3447acac5a598759606be6d118cfdb4287bed564a862f821ab04ed1ad35312c525b234df64d65f1e73bc203a54b41a8586
6
+ metadata.gz: 06cb1d5037b3c219ea6bfe7bbc7ebfb49f5bdccc7bacd89d14f852b1124890a0171249dd28b1e0f00036771521198da5ee68ab82c73adfe23181f405a31316a0
7
+ data.tar.gz: 7191893a63f3e9c8e969bf62bc030d5596849e5dc4c8461c2ffd9e1ab95a510dacd092159d6e8da7bf5b8485aa1543e2e7bd9ea0f3ec962a8ee5d0c38a2b09c5
@@ -1,24 +1,24 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- lex-pushover (0.1.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
- codecov (0.2.2)
12
- colorize
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.75.0)
17
+ excon (0.76.0)
19
18
  gli (2.19.2)
20
19
  json (2.3.1)
21
- oj (3.10.7)
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.88.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.1.0, < 1.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.2.0)
58
- parser (>= 2.7.0.1)
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.42.0)
64
- rubocop (>= 0.87.0)
63
+ rubocop-rspec (1.43.1)
64
+ rubocop (~> 0.87)
65
65
  ruby-progressbar (1.10.1)
66
- simplecov (0.18.5)
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
- Welcome to your new gem! In this directory, you'll find the files you need to be able to package up your Ruby library into a gem. Put your Ruby code in the file `lib/legion/extensions/pushover`. To experiment with that code, run `bin/console` for an interactive prompt.
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 'legion-extensions-pushover'
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 legion-extensions-pushover
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
- ## Development
25
-
26
- After checking out the repo, run `bin/setup` to install dependencies. Then, run `rake spec` to run the tests. You can also run `bin/console` for an interactive prompt that will allow you to experiment.
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
- Bug reports and pull requests are welcome on GitHub at https://github.com/[USERNAME]/legion-extensions-pushover.
62
+ ```json
63
+ {"message": "With Creds","token": "easy as abc 123"}
64
+ ```
33
65
 
34
66
 
35
67
  ## License
@@ -32,5 +32,5 @@ Gem::Specification.new do |spec|
32
32
  spec.add_development_dependency 'rubocop-performance'
33
33
  spec.add_development_dependency 'rubocop-rspec'
34
34
 
35
- spec.add_dependency 'pushover'
35
+ spec.add_dependency 'pushover', '>= 3.0.0'
36
36
  end
@@ -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
  {}
@@ -1,7 +1,7 @@
1
1
  module Legion
2
2
  module Extensions
3
3
  module Pushover
4
- VERSION = '0.1.1'.freeze
4
+ VERSION = '0.1.2'.freeze
5
5
  end
6
6
  end
7
7
  end
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.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-07-21 00:00:00.000000000 Z
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: '0'
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: '0'
152
+ version: 3.0.0
153
153
  description: Used to connect Legion to Pushover
154
154
  email:
155
155
  - matthewdiverson@gmail.com