sms_aero 0.1.3 → 0.2.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
  SHA1:
3
- metadata.gz: 0f84a82915f090c625d64126b0fad70a3f6a3fce
4
- data.tar.gz: 78513f3ea714029ca398e3a3cdc1b811614a8ef6
3
+ metadata.gz: 23e743ac4212a9a6a84d86212d0a00351b985e44
4
+ data.tar.gz: f985838a08b4d01cb5ee1b5f9719bef0b69e90de
5
5
  SHA512:
6
- metadata.gz: be015d7d74874431cf49ae7baf123cb20df0a12f17993cde6e839d21ad819a5c31d6dce9aa6ea6068b10583c70a89dccf3e222cebd2d53eb60ab43782341eeb6
7
- data.tar.gz: 29602ab530dbdefa47917c2dd879d63aa3af356d619ea21a3e8d3d0567473283e80c2c202d5305c752523d0999827c706704fc47b20b840e7186b45c4d30ab57
6
+ metadata.gz: 8a827cb1a64b25448b0913b3d1b95dab83ed55f260d275e9f46a43fe3bfdd40d5be1be487a11b0aabb4cbabe7e49fb9182d71cead3d310dbf97f4bfa5fb94076
7
+ data.tar.gz: c3a692c580cb508831f18cf65e021187f8e899c943a2fd31ac65f808e47a5be5ded8f209d94f1b504d308259905707e7dcb92bee4034862e97730b630bd0a353
@@ -5,6 +5,9 @@ All notable changes to this project will be documented in this file.
5
5
  The format is based on [Keep a Changelog](http://keepachangelog.com/)
6
6
  and this project adheres to [Semantic Versioning](http://semver.org/).
7
7
 
8
+ ## [0.2.0] - [2018-04-27]
9
+ - fix channel types from the API v1 docs (jarosluv)
10
+
8
11
  ## [0.1.3] - [2018-01-05]
9
12
 
10
13
  ### Changed
@@ -57,3 +60,4 @@ Some changes in the interface has been made as well.
57
60
  [0.1.1]: https://github.com/nepalez/sms_aero/compare/v0.1.0...v0.1.1
58
61
  [0.1.2]: https://github.com/nepalez/sms_aero/compare/v0.1.1...v0.1.2
59
62
  [0.1.3]: https://github.com/nepalez/sms_aero/compare/v0.1.2...v0.1.3
63
+ [0.2.0]: https://github.com/nepalez/sms_aero/compare/v0.1.3...v0.2.0
@@ -132,7 +132,7 @@ class SmsAero < Evil::Client
132
132
  option :text, FilledString
133
133
  option :date, Future, optional: true
134
134
  option :digital, Digital, optional: true
135
- option :type, Channel, default: -> { 2 unless digital == 1 }
135
+ option :type, Channel, default: -> { 5 unless digital == 1 }
136
136
 
137
137
  validate { errors.add :missed_address unless !to ^ !group }
138
138
 
@@ -9,7 +9,7 @@ class SmsAero::Channel < String
9
9
 
10
10
  def initialize(value)
11
11
  channel = value.to_s
12
- return super(channel) if %w(1 2 3 4 6).include? channel
12
+ return super(channel) if %w(4 5 6 7 8).include? channel
13
13
  raise "Incorrect value #{channel} for channel"
14
14
  end
15
15
  end
@@ -1,6 +1,6 @@
1
1
  Gem::Specification.new do |gem|
2
2
  gem.name = "sms_aero"
3
- gem.version = "0.1.3"
3
+ gem.version = "0.2.0"
4
4
  gem.author = "Andrew Kozin (nepalez)"
5
5
  gem.email = "andrew.kozin@gmail.com"
6
6
  gem.homepage = "https://github.com/nepalez/sms_aero"
@@ -2,7 +2,7 @@ require "spec_helper"
2
2
 
3
3
  RSpec.describe SmsAero::Channel do
4
4
  context "valid code:" do
5
- let(:codes) { [1, 2, 3, 4, 6] }
5
+ let(:codes) { [4, 5, 6, 7, 8] }
6
6
 
7
7
  it "returns a code" do
8
8
  codes.each { |code| expect(described_class[code]).to eq code.to_s }
@@ -10,10 +10,10 @@ RSpec.describe SmsAero::Channel do
10
10
  end
11
11
 
12
12
  context "invalid code:" do
13
- let(:code) { 5 }
13
+ let(:code) { 3 }
14
14
 
15
15
  it "fails" do
16
- expect { described_class[code] }.to raise_error(StandardError, /5/)
16
+ expect { described_class[code] }.to raise_error(StandardError, /3/)
17
17
  end
18
18
  end
19
19
  end
@@ -16,7 +16,7 @@ RSpec.describe SmsAero, "#send_sms" do
16
16
  "password=9d1e4709d6a41407ab34cf99c7085f79&" \
17
17
  "text=Hi&" \
18
18
  "to=79093828445&" \
19
- "type=2&" \
19
+ "type=5&" \
20
20
  "user=BAZ"
21
21
  end
22
22
 
@@ -53,7 +53,7 @@ RSpec.describe SmsAero, "#send_sms" do
53
53
  "group=readers&" \
54
54
  "password=9d1e4709d6a41407ab34cf99c7085f79&" \
55
55
  "text=Hi&" \
56
- "type=2&" \
56
+ "type=5&" \
57
57
  "user=BAZ"
58
58
  end
59
59
 
@@ -71,7 +71,7 @@ RSpec.describe SmsAero, "#send_sms" do
71
71
  "password=9d1e4709d6a41407ab34cf99c7085f79&" \
72
72
  "text=Hi&" \
73
73
  "to=79093828445&" \
74
- "type=2&" \
74
+ "type=5&" \
75
75
  "user=BAZ"
76
76
  end
77
77
 
@@ -91,7 +91,7 @@ RSpec.describe SmsAero, "#send_sms" do
91
91
  "password=9d1e4709d6a41407ab34cf99c7085f79&" \
92
92
  "text=Hi&" \
93
93
  "to=79093828445&" \
94
- "type=2&" \
94
+ "type=5&" \
95
95
  "user=BAZ"
96
96
  end
97
97
 
@@ -145,7 +145,7 @@ RSpec.describe SmsAero, "#send_sms" do
145
145
  "password=9d1e4709d6a41407ab34cf99c7085f79&" \
146
146
  "text=Hi&" \
147
147
  "to=79093828445&" \
148
- "type=2&" \
148
+ "type=5&" \
149
149
  "user=BAZ"
150
150
  end
151
151
 
@@ -201,11 +201,11 @@ RSpec.describe SmsAero, "#send_sms" do
201
201
  "password=9d1e4709d6a41407ab34cf99c7085f79&" \
202
202
  "text=Hi&" \
203
203
  "to=79093828445&" \
204
- "type=3&" \
204
+ "type=4&" \
205
205
  "user=BAZ"
206
206
  end
207
207
 
208
- before { params[:type] = 3 }
208
+ before { params[:type] = 4 }
209
209
 
210
210
  it "sends a request" do
211
211
  subject
@@ -229,7 +229,7 @@ RSpec.describe SmsAero, "#send_sms" do
229
229
  "password=9d1e4709d6a41407ab34cf99c7085f79&" \
230
230
  "text=Hi&" \
231
231
  "to=79093828445&" \
232
- "type=2&" \
232
+ "type=5&" \
233
233
  "user=BAZ"
234
234
  end
235
235
 
@@ -249,7 +249,7 @@ RSpec.describe SmsAero, "#send_sms" do
249
249
  "password=9d1e4709d6a41407ab34cf99c7085f79&" \
250
250
  "text=Hi&" \
251
251
  "to=79093828445&" \
252
- "type=2&" \
252
+ "type=5&" \
253
253
  "user=BAZ"
254
254
  end
255
255
 
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: sms_aero
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.3
4
+ version: 0.2.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Andrew Kozin (nepalez)
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2018-01-05 00:00:00.000000000 Z
11
+ date: 2018-04-27 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: evil-client