sms_aero 0.0.3 → 0.0.4

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: 9c9b2f92c533b8b6968baeab9f7dd0444f42858e
4
- data.tar.gz: f3edb8db4f94f19dd617afb2cd63df0150bc7fb2
3
+ metadata.gz: 470108a6f91ae739f5b5df078f41e7f0e411d92d
4
+ data.tar.gz: 10464fe95cbebacfc862e9fb50ce8a2e692c1cfd
5
5
  SHA512:
6
- metadata.gz: e7a0693c1024fa4e832c2589590f6b6b86bcfea663d8f5b9bcc171cbf7112c8c70253fceb6a38cafc0373caf23fce0ea017368af93ec2fa267eae3e0616ad175
7
- data.tar.gz: aae0a4fd573e6074edcc0abaa1439c2c9e2c6eb10adb068aeb756d0decae53a7ccceb970241f68633f4309a33b02da1211e880f1d49398de48de2832b6134ca6
6
+ metadata.gz: ef5958263522fde72e2449b8c1619cde1594df83c16fdefc5a3a16563ee8231765ff548c3653b6b3533e260bd6b8e3ce2051a5a4405b2b3bf56cd4aed7feec35
7
+ data.tar.gz: 9ffb68119a7d53706cb62fbae6877f071ccb9ae205d4f717e25d940940d1a0c466c2e69903fb396ab09a294671f0fdab931045aa5138538885fbc211a94e941b
@@ -1,6 +1,7 @@
1
1
  # Describes an SMS that can be send to either a phone or a group
2
2
  class SmsAero
3
3
  class Sms < Evil::Struct
4
+ attribute :from, Types::FilledString
4
5
  attribute :text, Types::FilledString
5
6
  attribute :date, Types::Future, optional: true
6
7
  attribute :digital, Types::Digital, optional: true
data/sms_aero.gemspec CHANGED
@@ -1,6 +1,6 @@
1
1
  Gem::Specification.new do |gem|
2
2
  gem.name = "sms_aero"
3
- gem.version = "0.0.3"
3
+ gem.version = "0.0.4"
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"
@@ -15,7 +15,7 @@ Gem::Specification.new do |gem|
15
15
 
16
16
  gem.add_runtime_dependency "dry-types", "~> 0.9"
17
17
  gem.add_runtime_dependency "evil-struct", "~> 0.0.3"
18
- gem.add_runtime_dependency "evil-client", "~> 0.3.1"
18
+ gem.add_runtime_dependency "evil-client", "~> 0.3.2"
19
19
 
20
20
  gem.add_development_dependency "rake", ">= 10"
21
21
  gem.add_development_dependency "rspec", "~> 3.0"
@@ -1,7 +1,7 @@
1
1
  RSpec.describe SmsAero, "#send_sms" do
2
2
  let(:settings) { { user: "BAZ", password: "QUX" } }
3
3
  let(:client) { described_class.new(settings) }
4
- let(:params) { { text: "Hi", to: "+7 (909) 382-84-45" } }
4
+ let(:params) { { text: "Hi", to: "+7 (909) 382-84-45", from: "Qux" } }
5
5
  let(:answer) { { id: 3898, result: "accepted" } }
6
6
 
7
7
  before { stub_request(:any, //).to_return(body: answer.to_json) }
@@ -11,6 +11,7 @@ RSpec.describe SmsAero, "#send_sms" do
11
11
  let(:url) do
12
12
  "https://gate.smsaero.ru/send?" \
13
13
  "answer=json&" \
14
+ "from=Qux&" \
14
15
  "password=9d1e4709d6a41407ab34cf99c7085f79&" \
15
16
  "text=Hi&" \
16
17
  "to=79093828445&" \
@@ -33,6 +34,7 @@ RSpec.describe SmsAero, "#send_sms" do
33
34
  let(:url) do
34
35
  "https://gate.smsaero.ru/send?" \
35
36
  "answer=json&" \
37
+ "from=Qux&" \
36
38
  "password=9d1e4709d6a41407ab34cf99c7085f79&" \
37
39
  "text=Hi&" \
38
40
  "to=79093828445&" \
@@ -52,6 +54,7 @@ RSpec.describe SmsAero, "#send_sms" do
52
54
  let(:url) do
53
55
  "http://gate.smsaero.ru/send?" \
54
56
  "answer=json&" \
57
+ "from=Qux&" \
55
58
  "password=9d1e4709d6a41407ab34cf99c7085f79&" \
56
59
  "text=Hi&" \
57
60
  "to=79093828445&" \
@@ -87,6 +90,7 @@ RSpec.describe SmsAero, "#send_sms" do
87
90
  let(:url) do
88
91
  "https://gate.smsaero.ru/send?" \
89
92
  "answer=json&" \
93
+ "from=Qux&" \
90
94
  "date=4122144000&" \
91
95
  "password=9d1e4709d6a41407ab34cf99c7085f79&" \
92
96
  "text=Hi&" \
@@ -123,6 +127,7 @@ RSpec.describe SmsAero, "#send_sms" do
123
127
  let(:url) do
124
128
  "https://gate.smsaero.ru/send?" \
125
129
  "answer=json&" \
130
+ "from=Qux&" \
126
131
  "digital=1&" \
127
132
  "password=9d1e4709d6a41407ab34cf99c7085f79&" \
128
133
  "text=Hi&" \
@@ -142,6 +147,7 @@ RSpec.describe SmsAero, "#send_sms" do
142
147
  let(:url) do
143
148
  "https://gate.smsaero.ru/send?" \
144
149
  "answer=json&" \
150
+ "from=Qux&" \
145
151
  "password=9d1e4709d6a41407ab34cf99c7085f79&" \
146
152
  "text=Hi&" \
147
153
  "to=79093828445&" \
@@ -169,6 +175,7 @@ RSpec.describe SmsAero, "#send_sms" do
169
175
  let(:url) do
170
176
  "https://gate.smsaero.ru/testsend?" \
171
177
  "answer=json&" \
178
+ "from=Qux&" \
172
179
  "password=9d1e4709d6a41407ab34cf99c7085f79&" \
173
180
  "text=Hi&" \
174
181
  "to=79093828445&" \
@@ -1,7 +1,7 @@
1
1
  RSpec.describe SmsAero, "#send_to_group" do
2
2
  let(:settings) { { user: "BAZ", password: "QUX" } }
3
3
  let(:client) { described_class.new(settings) }
4
- let(:params) { { text: "Hi" } }
4
+ let(:params) { { text: "Hi", from: "Qux" } }
5
5
  let(:answer) { { id: 3898, result: "accepted" } }
6
6
 
7
7
  before { stub_request(:any, //).to_return(body: answer.to_json) }
@@ -11,6 +11,7 @@ RSpec.describe SmsAero, "#send_to_group" do
11
11
  let(:url) do
12
12
  "https://gate.smsaero.ru/sendtogroup?" \
13
13
  "answer=json&" \
14
+ "from=Qux&" \
14
15
  "group=all&" \
15
16
  "password=9d1e4709d6a41407ab34cf99c7085f79&" \
16
17
  "text=Hi&" \
@@ -33,6 +34,7 @@ RSpec.describe SmsAero, "#send_to_group" do
33
34
  let(:url) do
34
35
  "https://gate.smsaero.ru/sendtogroup?" \
35
36
  "answer=json&" \
37
+ "from=Qux&" \
36
38
  "group=all&" \
37
39
  "password=9d1e4709d6a41407ab34cf99c7085f79&" \
38
40
  "text=Hi&" \
@@ -52,6 +54,7 @@ RSpec.describe SmsAero, "#send_to_group" do
52
54
  let(:url) do
53
55
  "http://gate.smsaero.ru/sendtogroup?" \
54
56
  "answer=json&" \
57
+ "from=Qux&" \
55
58
  "group=all&" \
56
59
  "password=9d1e4709d6a41407ab34cf99c7085f79&" \
57
60
  "text=Hi&" \
@@ -71,6 +74,7 @@ RSpec.describe SmsAero, "#send_to_group" do
71
74
  let(:url) do
72
75
  "https://gate.smsaero.ru/sendtogroup?" \
73
76
  "answer=json&" \
77
+ "from=Qux&" \
74
78
  "group=foo&" \
75
79
  "password=9d1e4709d6a41407ab34cf99c7085f79&" \
76
80
  "text=Hi&" \
@@ -98,6 +102,7 @@ RSpec.describe SmsAero, "#send_to_group" do
98
102
  let(:url) do
99
103
  "https://gate.smsaero.ru/sendtogroup?" \
100
104
  "answer=json&" \
105
+ "from=Qux&" \
101
106
  "group=all&" \
102
107
  "date=4122144000&" \
103
108
  "password=9d1e4709d6a41407ab34cf99c7085f79&" \
@@ -134,6 +139,7 @@ RSpec.describe SmsAero, "#send_to_group" do
134
139
  let(:url) do
135
140
  "https://gate.smsaero.ru/sendtogroup?" \
136
141
  "answer=json&" \
142
+ "from=Qux&" \
137
143
  "group=all&" \
138
144
  "digital=1&" \
139
145
  "password=9d1e4709d6a41407ab34cf99c7085f79&" \
@@ -153,6 +159,7 @@ RSpec.describe SmsAero, "#send_to_group" do
153
159
  let(:url) do
154
160
  "https://gate.smsaero.ru/sendtogroup?" \
155
161
  "answer=json&" \
162
+ "from=Qux&" \
156
163
  "group=all&" \
157
164
  "password=9d1e4709d6a41407ab34cf99c7085f79&" \
158
165
  "text=Hi&" \
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.0.3
4
+ version: 0.0.4
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: 2016-11-22 00:00:00.000000000 Z
11
+ date: 2016-11-29 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: dry-types
@@ -44,14 +44,14 @@ dependencies:
44
44
  requirements:
45
45
  - - "~>"
46
46
  - !ruby/object:Gem::Version
47
- version: 0.3.1
47
+ version: 0.3.2
48
48
  type: :runtime
49
49
  prerelease: false
50
50
  version_requirements: !ruby/object:Gem::Requirement
51
51
  requirements:
52
52
  - - "~>"
53
53
  - !ruby/object:Gem::Version
54
- version: 0.3.1
54
+ version: 0.3.2
55
55
  - !ruby/object:Gem::Dependency
56
56
  name: rake
57
57
  requirement: !ruby/object:Gem::Requirement