sms_manager 0.4.0 → 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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 116db5dcbd5c5b1dc77ef1d45a51f025ae0acd4074d77e3a248ba15915e24be6
4
- data.tar.gz: 3eb7c3d427149a66860005381ed42622317d4ad981d1f19bd9e1b849c1cbd876
3
+ metadata.gz: 6a986ee74937dfc2814b5584f2699c3093814c2d39716e1b46e306381b7096f7
4
+ data.tar.gz: cb8f4e2ff487472fd3988fd7ca32ae59ebe2e19c3788aeceb0f6d21b32ab65d0
5
5
  SHA512:
6
- metadata.gz: 3d9c523be6481d6fbdf6a014a1b81f74ba3ea157076e410c5aeb063133ac4ae0c9e29489dc34dee2efc129b59c5058c8dcd80f6f5973df80113e06a6cad0ff38
7
- data.tar.gz: a7d77a34d09ccb94e3b2ddd46bfa64414662337e04090b44ee276200b225f886fb88c3fde485a202fef87fa419f4c013d8ef4b7b86c7d30b8c4e30f664a45744
6
+ metadata.gz: 49d59837a4a830f8332610c5d863a849b76b07029ca34089b03fb9a2c56cee7d3f88d5bcefc4758e98605d74faf32df5a753df15c91c39eca301947f9541bf0c
7
+ data.tar.gz: c3a422003d86d2719f0703b3f7784238ff185200e2fa0ce76c90520ea04b1f65085747043a80b41b4ab173877120a846db0a033761ec4cdde6af37752b9877a4
data/CHANGELOG.md CHANGED
@@ -36,4 +36,8 @@ end
36
36
  -----
37
37
  * Support only Ruby >= 3.2
38
38
  * Drop support for JRuby, Rubinius
39
- * Update dependencies
39
+ * Update dependencies
40
+
41
+ 0.5.0
42
+ -----
43
+ * Add code to the error message
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- sms_manager (0.4.0)
4
+ sms_manager (0.5.0)
5
5
  httpclient (>= 2.8)
6
6
 
7
7
  GEM
data/README.md CHANGED
@@ -52,6 +52,6 @@ end
52
52
 
53
53
  ## Changelog & License
54
54
 
55
- See [CHANGELOG][] and [LICENSE][] for details.
55
+ See [CHANGELOG](CHANGELOG.md) and [LICENSE](LICENSE.md) for details.
56
56
 
57
57
 
@@ -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
- 'Neznámý chybový kód'
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í)'
@@ -1,7 +1,7 @@
1
1
  module SmsManager
2
2
  class Version
3
3
  MAJOR = 0
4
- MINOR = 4
4
+ MINOR = 5
5
5
  PATCH = 0
6
6
 
7
7
  class << self
@@ -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
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: sms_manager
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.4.0
4
+ version: 0.5.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - David Hrachovy