sms_manager 0.3.3 → 0.5.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 +4 -4
- data/.github/workflows/ci.yml +29 -0
- data/.gitignore +2 -1
- data/CHANGELOG.md +11 -1
- data/Gemfile +1 -4
- data/Gemfile.lock +31 -46
- data/README.md +7 -14
- data/lib/sms_manager/error/sending_error.rb +3 -2
- data/lib/sms_manager/version.rb +4 -4
- data/sms_manager.gemspec +2 -2
- data/spec/sms_manager_spec.rb +2 -2
- data/spec/spec_helper.rb +3 -8
- metadata +14 -16
- data/.coveralls.yml +0 -1
- data/.travis.yml +0 -26
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 6a986ee74937dfc2814b5584f2699c3093814c2d39716e1b46e306381b7096f7
|
|
4
|
+
data.tar.gz: cb8f4e2ff487472fd3988fd7ca32ae59ebe2e19c3788aeceb0f6d21b32ab65d0
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 49d59837a4a830f8332610c5d863a849b76b07029ca34089b03fb9a2c56cee7d3f88d5bcefc4758e98605d74faf32df5a753df15c91c39eca301947f9541bf0c
|
|
7
|
+
data.tar.gz: c3a422003d86d2719f0703b3f7784238ff185200e2fa0ce76c90520ea04b1f65085747043a80b41b4ab173877120a846db0a033761ec4cdde6af37752b9877a4
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
name: CI
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
push:
|
|
5
|
+
branches: [ master ]
|
|
6
|
+
pull_request:
|
|
7
|
+
branches: [ master ]
|
|
8
|
+
|
|
9
|
+
jobs:
|
|
10
|
+
test:
|
|
11
|
+
runs-on: ubuntu-latest
|
|
12
|
+
strategy:
|
|
13
|
+
fail-fast: false
|
|
14
|
+
matrix:
|
|
15
|
+
ruby:
|
|
16
|
+
- '3.2'
|
|
17
|
+
- '3.3'
|
|
18
|
+
- '3.4'
|
|
19
|
+
- head
|
|
20
|
+
|
|
21
|
+
name: Ruby ${{ matrix.ruby }}
|
|
22
|
+
steps:
|
|
23
|
+
- uses: actions/checkout@v5
|
|
24
|
+
- uses: ruby/setup-ruby@v1
|
|
25
|
+
with:
|
|
26
|
+
ruby-version: ${{ matrix.ruby }}
|
|
27
|
+
bundler-cache: true
|
|
28
|
+
|
|
29
|
+
- run: bundle exec rake
|
data/.gitignore
CHANGED
data/CHANGELOG.md
CHANGED
data/Gemfile
CHANGED
data/Gemfile.lock
CHANGED
|
@@ -1,68 +1,53 @@
|
|
|
1
1
|
PATH
|
|
2
2
|
remote: .
|
|
3
3
|
specs:
|
|
4
|
-
sms_manager (0.
|
|
5
|
-
httpclient (
|
|
4
|
+
sms_manager (0.5.0)
|
|
5
|
+
httpclient (>= 2.8)
|
|
6
6
|
|
|
7
7
|
GEM
|
|
8
8
|
remote: https://rubygems.org/
|
|
9
9
|
specs:
|
|
10
|
-
addressable (2.
|
|
11
|
-
public_suffix (>= 2.0.2, <
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
rspec-
|
|
30
|
-
|
|
31
|
-
rspec-core (3.8.0)
|
|
32
|
-
rspec-support (~> 3.8.0)
|
|
33
|
-
rspec-expectations (3.8.3)
|
|
10
|
+
addressable (2.8.7)
|
|
11
|
+
public_suffix (>= 2.0.2, < 7.0)
|
|
12
|
+
bigdecimal (3.3.1)
|
|
13
|
+
crack (0.4.6)
|
|
14
|
+
bigdecimal
|
|
15
|
+
rexml
|
|
16
|
+
diff-lcs (1.6.2)
|
|
17
|
+
hashdiff (1.2.1)
|
|
18
|
+
httpclient (2.9.0)
|
|
19
|
+
mutex_m
|
|
20
|
+
mutex_m (0.3.0)
|
|
21
|
+
public_suffix (6.0.2)
|
|
22
|
+
rake (13.3.0)
|
|
23
|
+
rexml (3.4.4)
|
|
24
|
+
rspec (3.13.2)
|
|
25
|
+
rspec-core (~> 3.13.0)
|
|
26
|
+
rspec-expectations (~> 3.13.0)
|
|
27
|
+
rspec-mocks (~> 3.13.0)
|
|
28
|
+
rspec-core (3.13.6)
|
|
29
|
+
rspec-support (~> 3.13.0)
|
|
30
|
+
rspec-expectations (3.13.5)
|
|
34
31
|
diff-lcs (>= 1.2.0, < 2.0)
|
|
35
|
-
rspec-support (~> 3.
|
|
36
|
-
rspec-mocks (3.
|
|
32
|
+
rspec-support (~> 3.13.0)
|
|
33
|
+
rspec-mocks (3.13.6)
|
|
37
34
|
diff-lcs (>= 1.2.0, < 2.0)
|
|
38
|
-
rspec-support (~> 3.
|
|
39
|
-
rspec-support (3.
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
docile (~> 1.1)
|
|
43
|
-
json (>= 1.8, < 3)
|
|
44
|
-
simplecov-html (~> 0.10.0)
|
|
45
|
-
simplecov-html (0.10.2)
|
|
46
|
-
term-ansicolor (1.7.1)
|
|
47
|
-
tins (~> 1.0)
|
|
48
|
-
thor (0.20.3)
|
|
49
|
-
tins (1.20.2)
|
|
50
|
-
webmock (3.5.1)
|
|
51
|
-
addressable (>= 2.3.6)
|
|
35
|
+
rspec-support (~> 3.13.0)
|
|
36
|
+
rspec-support (3.13.6)
|
|
37
|
+
webmock (3.26.0)
|
|
38
|
+
addressable (>= 2.8.0)
|
|
52
39
|
crack (>= 0.3.2)
|
|
53
|
-
hashdiff
|
|
40
|
+
hashdiff (>= 0.4.0, < 2.0.0)
|
|
54
41
|
|
|
55
42
|
PLATFORMS
|
|
56
43
|
ruby
|
|
57
44
|
|
|
58
45
|
DEPENDENCIES
|
|
59
46
|
bundler
|
|
60
|
-
coveralls
|
|
61
47
|
rake
|
|
62
48
|
rspec
|
|
63
|
-
simplecov
|
|
64
49
|
sms_manager!
|
|
65
50
|
webmock
|
|
66
51
|
|
|
67
52
|
BUNDLED WITH
|
|
68
|
-
|
|
53
|
+
2.7.2
|
data/README.md
CHANGED
|
@@ -1,20 +1,14 @@
|
|
|
1
1
|
# SmsManager
|
|
2
2
|
|
|
3
3
|
[](http://badge.fury.io/rb/sms_manager)
|
|
4
|
-
[](https://travis-ci.org/PrimeHammer/sms_manager)
|
|
5
|
-
[](https://gemnasium.com/PrimeHammer/sms_manager)
|
|
6
|
-
[](https://codeclimate.com/github/PrimeHammer/sms_manager)
|
|
7
|
-
[](https://coveralls.io/github/PrimeHammer/sms_manager?branch=master)
|
|
8
4
|
|
|
9
|
-
|
|
5
|
+
[](https://github.com/PrimeHammer/sms_manager/actions)
|
|
10
6
|
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
`gem install sms_manager`
|
|
7
|
+
A Ruby SDK for [smsmanager.cz](http://smsmanager.cz/) - Czech SMS provider. Supports SMS sending and error handling. Uses legacy endpoint.
|
|
14
8
|
|
|
15
|
-
|
|
9
|
+
## Installation
|
|
16
10
|
|
|
17
|
-
`
|
|
11
|
+
`bundle add sms_manager`
|
|
18
12
|
|
|
19
13
|
## Usage
|
|
20
14
|
|
|
@@ -56,9 +50,8 @@ rescue SmsManager::Error => e
|
|
|
56
50
|
end
|
|
57
51
|
```
|
|
58
52
|
|
|
59
|
-
##
|
|
53
|
+
## Changelog & License
|
|
54
|
+
|
|
55
|
+
See [CHANGELOG](CHANGELOG.md) and [LICENSE](LICENSE.md) for details.
|
|
60
56
|
|
|
61
|
-
Copyright (c) 2013 David Hrachovy
|
|
62
|
-
See [LICENSE][] for details.
|
|
63
57
|
|
|
64
|
-
[license]: LICENSE.md
|
|
@@ -13,9 +13,9 @@ module SmsManager
|
|
|
13
13
|
if code >= 900 && code <= 999
|
|
14
14
|
CODE_9XX
|
|
15
15
|
elsif CODES[code]
|
|
16
|
-
CODES[code]
|
|
16
|
+
"#{CODES[code]} (#{code})"
|
|
17
17
|
else
|
|
18
|
-
|
|
18
|
+
"Neznámý chybový kód (#{code})"
|
|
19
19
|
end
|
|
20
20
|
end
|
|
21
21
|
|
|
@@ -25,6 +25,7 @@ module SmsManager
|
|
|
25
25
|
103 => 'Neplatné uživatelské jméno nebo heslo',
|
|
26
26
|
104 => 'Neplatný parametr gateway',
|
|
27
27
|
105 => 'Nedostatek kreditu pro prepaid',
|
|
28
|
+
109 => 'Požadavek neobsahuje všechna vyžadovaná data',
|
|
28
29
|
201 => 'Žádná platná telefonní čísla v požadavku',
|
|
29
30
|
202 => 'Text zprávy neexistuje nebo je příliš dlouhý',
|
|
30
31
|
203 => 'Neplatný parametr sender (odesílatele nejprve nastavte ve webovém rozhraní)'
|
data/lib/sms_manager/version.rb
CHANGED
data/sms_manager.gemspec
CHANGED
|
@@ -12,8 +12,8 @@ Gem::Specification.new do |gem|
|
|
|
12
12
|
gem.description = %q{Ruby SDK for smsmanager.cz API}
|
|
13
13
|
gem.summary = %q{SmsManager is a Ruby library for sending SMS messages by smsmanager.cz provider}
|
|
14
14
|
gem.homepage = "https://github.com/PrimeHammer/sms_manager"
|
|
15
|
-
gem.required_ruby_version = '>= 2
|
|
16
|
-
gem.add_dependency "httpclient", "
|
|
15
|
+
gem.required_ruby_version = '>= 3.2'
|
|
16
|
+
gem.add_dependency "httpclient", ">= 2.8"
|
|
17
17
|
gem.add_development_dependency "bundler"
|
|
18
18
|
gem.files = `git ls-files`.split($/)
|
|
19
19
|
gem.executables = gem.files.grep(%r{^bin/}).map{ |f| File.basename(f) }
|
data/spec/sms_manager_spec.rb
CHANGED
|
@@ -31,7 +31,7 @@ describe SmsManager do
|
|
|
31
31
|
|
|
32
32
|
expect { SmsManager.send number: '+420123456789', message: 'Hello!' }.to \
|
|
33
33
|
raise_error(SmsManager::Error) do |e|
|
|
34
|
-
expect(e.message).to eq('Neplatné uživatelské jméno nebo heslo')
|
|
34
|
+
expect(e.message).to eq('Neplatné uživatelské jméno nebo heslo (103)')
|
|
35
35
|
end
|
|
36
36
|
end
|
|
37
37
|
|
|
@@ -65,7 +65,7 @@ describe SmsManager do
|
|
|
65
65
|
|
|
66
66
|
expect { SmsManager.send_message number: '+420123456789', message: 'Hello!' }.to \
|
|
67
67
|
raise_error(SmsManager::Error) do |e|
|
|
68
|
-
expect(e.message).to eq('Neplatné uživatelské jméno nebo heslo')
|
|
68
|
+
expect(e.message).to eq('Neplatné uživatelské jméno nebo heslo (103)')
|
|
69
69
|
end
|
|
70
70
|
end
|
|
71
71
|
|
data/spec/spec_helper.rb
CHANGED
metadata
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: sms_manager
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.
|
|
4
|
+
version: 0.5.0
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- David Hrachovy
|
|
8
|
-
autorequire:
|
|
8
|
+
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
11
|
date: 2016-01-18 00:00:00.000000000 Z
|
|
@@ -14,28 +14,28 @@ dependencies:
|
|
|
14
14
|
name: httpclient
|
|
15
15
|
requirement: !ruby/object:Gem::Requirement
|
|
16
16
|
requirements:
|
|
17
|
-
- -
|
|
17
|
+
- - ">="
|
|
18
18
|
- !ruby/object:Gem::Version
|
|
19
19
|
version: '2.8'
|
|
20
20
|
type: :runtime
|
|
21
21
|
prerelease: false
|
|
22
22
|
version_requirements: !ruby/object:Gem::Requirement
|
|
23
23
|
requirements:
|
|
24
|
-
- -
|
|
24
|
+
- - ">="
|
|
25
25
|
- !ruby/object:Gem::Version
|
|
26
26
|
version: '2.8'
|
|
27
27
|
- !ruby/object:Gem::Dependency
|
|
28
28
|
name: bundler
|
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
|
30
30
|
requirements:
|
|
31
|
-
- -
|
|
31
|
+
- - ">="
|
|
32
32
|
- !ruby/object:Gem::Version
|
|
33
33
|
version: '0'
|
|
34
34
|
type: :development
|
|
35
35
|
prerelease: false
|
|
36
36
|
version_requirements: !ruby/object:Gem::Requirement
|
|
37
37
|
requirements:
|
|
38
|
-
- -
|
|
38
|
+
- - ">="
|
|
39
39
|
- !ruby/object:Gem::Version
|
|
40
40
|
version: '0'
|
|
41
41
|
description: Ruby SDK for smsmanager.cz API
|
|
@@ -45,9 +45,8 @@ executables: []
|
|
|
45
45
|
extensions: []
|
|
46
46
|
extra_rdoc_files: []
|
|
47
47
|
files:
|
|
48
|
-
- .
|
|
49
|
-
- .gitignore
|
|
50
|
-
- .travis.yml
|
|
48
|
+
- ".github/workflows/ci.yml"
|
|
49
|
+
- ".gitignore"
|
|
51
50
|
- CHANGELOG.md
|
|
52
51
|
- Gemfile
|
|
53
52
|
- Gemfile.lock
|
|
@@ -65,24 +64,23 @@ homepage: https://github.com/PrimeHammer/sms_manager
|
|
|
65
64
|
licenses:
|
|
66
65
|
- MIT
|
|
67
66
|
metadata: {}
|
|
68
|
-
post_install_message:
|
|
67
|
+
post_install_message:
|
|
69
68
|
rdoc_options: []
|
|
70
69
|
require_paths:
|
|
71
70
|
- lib
|
|
72
71
|
required_ruby_version: !ruby/object:Gem::Requirement
|
|
73
72
|
requirements:
|
|
74
|
-
- -
|
|
73
|
+
- - ">="
|
|
75
74
|
- !ruby/object:Gem::Version
|
|
76
|
-
version: '2
|
|
75
|
+
version: '3.2'
|
|
77
76
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
|
78
77
|
requirements:
|
|
79
|
-
- -
|
|
78
|
+
- - ">="
|
|
80
79
|
- !ruby/object:Gem::Version
|
|
81
80
|
version: '0'
|
|
82
81
|
requirements: []
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
signing_key:
|
|
82
|
+
rubygems_version: 3.4.1
|
|
83
|
+
signing_key:
|
|
86
84
|
specification_version: 4
|
|
87
85
|
summary: SmsManager is a Ruby library for sending SMS messages by smsmanager.cz provider
|
|
88
86
|
test_files:
|
data/.coveralls.yml
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
service_name: travis-ci
|
data/.travis.yml
DELETED
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
cache: bundler
|
|
2
|
-
|
|
3
|
-
language: ruby
|
|
4
|
-
|
|
5
|
-
rvm:
|
|
6
|
-
- 2.0.0
|
|
7
|
-
- 2.1
|
|
8
|
-
- 2.2
|
|
9
|
-
- jruby-head
|
|
10
|
-
- rbx-2
|
|
11
|
-
- ruby-head
|
|
12
|
-
|
|
13
|
-
sudo: false
|
|
14
|
-
|
|
15
|
-
bundler_args: --without development --retry=3 --jobs=3
|
|
16
|
-
|
|
17
|
-
env:
|
|
18
|
-
global:
|
|
19
|
-
- JRUBY_OPTS="$JRUBY_OPTS --debug"
|
|
20
|
-
|
|
21
|
-
matrix:
|
|
22
|
-
allow_failures:
|
|
23
|
-
- rvm: jruby-head
|
|
24
|
-
- rvm: rbx-2
|
|
25
|
-
- rvm: ruby-head
|
|
26
|
-
fast_finish: true
|