myops-textlocal 1.0.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 +7 -0
- data/lib/my_ops/sms_providers/text_local.rb +26 -0
- data/lib/myops-textlocal.rb +5 -0
- metadata +47 -0
checksums.yaml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
SHA1:
|
3
|
+
metadata.gz: eae7ee44261a0be85dcd54378425c0f5011ea577
|
4
|
+
data.tar.gz: 9ddab98cf0b9385895607ea61e4ef956dca10561
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: ca32640e10e069b1bb10dc152d893d4f4f16804c8f7538edb7f4233166f878e60f6d62f4ba839d23bd0ddc1bd08c1c05a5ec5038cd4947794cbf29eaf9045fec
|
7
|
+
data.tar.gz: 97f117cd5c864ab64e461fc64090f8ea4d7b756c8c4d49c53f5cb18db219b2e5a89e8757713db76a4df2493f3e30f56c791024db4ec27c01ac6d0c65a41fe571
|
@@ -0,0 +1,26 @@
|
|
1
|
+
require 'my_ops/sms_provider'
|
2
|
+
require 'nifty/utils/http'
|
3
|
+
|
4
|
+
module MyOps
|
5
|
+
module SMSProviders
|
6
|
+
class TextLocal < MyOps::SMSProvider
|
7
|
+
|
8
|
+
self.provider_name = "TextLocal"
|
9
|
+
self.provider_description = "Send alert SMS messages using the TextLocal service (www.textlocal.co.uk)"
|
10
|
+
|
11
|
+
def send_message(recipient, message)
|
12
|
+
response = Nifty::Utils::HTTP.post("https://api.txtlocal.com/send/",
|
13
|
+
:params => {
|
14
|
+
:username => MyOps.config.textlocal.username,
|
15
|
+
:hash => MyOps.config.textlocal.auth_hash,
|
16
|
+
:sender => MyOps.config.textlocal.sender,
|
17
|
+
:message => message,
|
18
|
+
:numbers => recipient
|
19
|
+
}
|
20
|
+
)
|
21
|
+
response[:code] == 200
|
22
|
+
end
|
23
|
+
|
24
|
+
end
|
25
|
+
end
|
26
|
+
end
|
metadata
ADDED
@@ -0,0 +1,47 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: myops-textlocal
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 1.0.0
|
5
|
+
platform: ruby
|
6
|
+
authors:
|
7
|
+
- Adam Cooke
|
8
|
+
autorequire:
|
9
|
+
bindir: bin
|
10
|
+
cert_chain: []
|
11
|
+
date: 2016-08-01 00:00:00.000000000 Z
|
12
|
+
dependencies: []
|
13
|
+
description: A MyOps module for sending text messages using TextLocal
|
14
|
+
email:
|
15
|
+
- adam@atechmedia.com
|
16
|
+
executables: []
|
17
|
+
extensions: []
|
18
|
+
extra_rdoc_files: []
|
19
|
+
files:
|
20
|
+
- lib/my_ops/sms_providers/text_local.rb
|
21
|
+
- lib/myops-textlocal.rb
|
22
|
+
homepage: https://github.com/adamcooke/myopts-textlocal
|
23
|
+
licenses:
|
24
|
+
- MIT
|
25
|
+
metadata: {}
|
26
|
+
post_install_message:
|
27
|
+
rdoc_options: []
|
28
|
+
require_paths:
|
29
|
+
- lib
|
30
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
31
|
+
requirements:
|
32
|
+
- - ">="
|
33
|
+
- !ruby/object:Gem::Version
|
34
|
+
version: '0'
|
35
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
36
|
+
requirements:
|
37
|
+
- - ">="
|
38
|
+
- !ruby/object:Gem::Version
|
39
|
+
version: '0'
|
40
|
+
requirements: []
|
41
|
+
rubyforge_project:
|
42
|
+
rubygems_version: 2.4.5
|
43
|
+
signing_key:
|
44
|
+
specification_version: 4
|
45
|
+
summary: A MyOps module for sending text messages using TextLocal
|
46
|
+
test_files: []
|
47
|
+
has_rdoc:
|