active_sms-backend-smsru 0.0.2 → 0.0.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +70 -6
- data/lib/active_sms-backend-smsru.rb +2 -0
- data/lib/active_sms/backend/smsru.rb +1 -0
- data/lib/active_sms/backend/smsru/version.rb +1 -1
- data/screenshot.png +0 -0
- metadata +4 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 3a047be97d7e0d28c4a51d27e57bbbdc102e5a7c
|
4
|
+
data.tar.gz: ca835b0507aaceb77884fa0f7fca11edc530bb65
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 5c1aecbaa9afaef2fd422352f62261c2688bbd6e28c3dc6788d4ad50b1699dc84cba8a5622f2d04d990e51e8820f92ca2daabb6ff3b4056c63443de5f45b85b9
|
7
|
+
data.tar.gz: f7ab855e111e35abf56bb1cae61c1057d0240d1ee60f2cce0f812913a12001669587038895b022da131fb8fcf23baa475d37489391960d8ca0e950f71210fe6b
|
data/README.md
CHANGED
@@ -1,19 +1,83 @@
|
|
1
1
|
# ActiveSMS sms.ru backend
|
2
2
|
|
3
|
-
|
3
|
+
[![Build Status](https://travis-ci.org/Fedcomp/active_sms-backend-smsru.svg?branch=master)](https://travis-ci.org/Fedcomp/active_sms-backend-smsru)
|
4
|
+
[![Gem Version](https://badge.fury.io/rb/active_sms-backend-smsru.svg)](https://badge.fury.io/rb/active_sms-backend-smsru)
|
4
5
|
|
5
|
-
|
6
|
+
backend for [ActiveSMS](https://github.com/Fedcomp/active_sms) to work with [sms.ru](https://sms.ru)
|
6
7
|
|
7
|
-
|
8
|
+
## Installation and usage
|
8
9
|
|
9
|
-
|
10
|
+
Add this line to your application's Gemfile:
|
10
11
|
|
11
|
-
|
12
|
+
```ruby
|
13
|
+
gem "active_sms"
|
14
|
+
gem "active_sms-backend-smsru"
|
15
|
+
```
|
16
|
+
|
17
|
+
Then somewhere in your initialization code:
|
18
|
+
|
19
|
+
```ruby
|
20
|
+
require "active_sms"
|
21
|
+
|
22
|
+
ActiveSMS.configure do |c|
|
23
|
+
c.register_backend :my_main_backend,
|
24
|
+
ActiveSMS::Backend::Smsru,
|
25
|
+
api_id: ENV["SMSRU_TOKEN"]
|
26
|
+
|
27
|
+
c.default_backend = :my_main_backend
|
28
|
+
end
|
29
|
+
```
|
30
|
+
|
31
|
+
Now, whenever you need to send SMS, just do:
|
32
|
+
|
33
|
+
```ruby
|
34
|
+
phone = "799999999"
|
35
|
+
text = "My sms text"
|
36
|
+
|
37
|
+
# Should actually send sms
|
38
|
+
ActiveSMS.send_sms("79999999999", "text")
|
39
|
+
```
|
40
|
+
|
41
|
+
For more advanced usage please
|
42
|
+
go to [ActiveSMS documentation](https://github.com/Fedcomp/active_sms#real-life-example)
|
43
|
+
|
44
|
+
**Don't forget**, you need to put real *api_id* in SMSRU_TOKEN environment variable.
|
45
|
+
In bash you would do it like that:
|
46
|
+
```bash
|
47
|
+
export SMSRU_TOKEN "XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX"
|
48
|
+
```
|
49
|
+
Read below how to receive own token to work with sms.ru.
|
50
|
+
|
51
|
+
# Receiving api_id from sms.ru
|
52
|
+
|
53
|
+
First of all, you should register on https://sms.ru/ .
|
54
|
+
Then, when you are registered, make sure you have
|
55
|
+
some small amount of balance to actually send sms.
|
56
|
+
On your main page (when you are logged)
|
57
|
+
you should see:
|
58
|
+
|
59
|
+
![api_id block at the right](screenshot.png)
|
60
|
+
|
61
|
+
instead of XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX you should see your actual api_id key.
|
12
62
|
|
13
63
|
## Contributing
|
14
64
|
|
15
|
-
Bug reports and pull requests are
|
65
|
+
Bug reports and pull requests are
|
66
|
+
welcome on GitHub at https://github.com/Fedcomp/active_sms-backend-smsru
|
67
|
+
|
68
|
+
## Submitting a Pull Request
|
69
|
+
1. Fork the [official repository](https://github.com/Fedcomp/active_sms-backend-smsru).
|
70
|
+
2. Create a topic branch.
|
71
|
+
3. Implement your feature or bug fix.
|
72
|
+
4. Add, commit, and push your changes.
|
73
|
+
5. Submit a pull request.
|
74
|
+
|
75
|
+
* Please add tests if you changed code. Contributions without tests won't be accepted.
|
76
|
+
* If you don't know how to add tests, please put in a PR and leave a comment
|
77
|
+
asking for help.
|
78
|
+
* Please don't update the Gem version.
|
16
79
|
|
80
|
+
( Inspired by https://github.com/thoughtbot/factory_girl/blob/master/CONTRIBUTING.md )
|
17
81
|
|
18
82
|
## License
|
19
83
|
|
data/screenshot.png
ADDED
Binary file
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: active_sms-backend-smsru
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Fedcomp
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2016-10-
|
11
|
+
date: 2016-10-12 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: active_sms
|
@@ -153,8 +153,10 @@ files:
|
|
153
153
|
- README.md
|
154
154
|
- Rakefile
|
155
155
|
- active_sms-backend-smsru.gemspec
|
156
|
+
- lib/active_sms-backend-smsru.rb
|
156
157
|
- lib/active_sms/backend/smsru.rb
|
157
158
|
- lib/active_sms/backend/smsru/version.rb
|
159
|
+
- screenshot.png
|
158
160
|
homepage: https://github.com/Fedcomp/active_sms-backend-smsru
|
159
161
|
licenses:
|
160
162
|
- MIT
|