sms_aero 0.1.0 → 0.1.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +8 -1
- data/config/locales/en.yml +7 -0
- data/lib/sms_aero.rb +3 -1
- data/lib/sms_aero/optional.rb +6 -2
- data/sms_aero.gemspec +2 -2
- data/spec/spec_helper.rb +0 -4
- metadata +21 -23
- data/spec/support/en.yml +0 -8
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 4085b518c9a9df7ed562ce3b9b4af7e9bafc4d18
|
4
|
+
data.tar.gz: c4f2d81c67a6bf2085b4013b160bf03743e6eaf2
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 88343afc18f9b4018cf8bdf9f45ac1f57a25f838ca41e7734221768bdabbec6a85791272fb8c1e84c5401ebbc7529927b40dfd191bf9630515b2c5cfb2aee0a9
|
7
|
+
data.tar.gz: ca6cc12bd5f7ba6b50b8f4d239a32726e0d61b6d8f0d4b733edc18adf1f5c9f63ec1aacd7b91c2cc986a64801bca2810dea2eacfd41b8f576d8770d9a9f55937
|
data/CHANGELOG.md
CHANGED
@@ -5,6 +5,12 @@ 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.1.1] - [2017-09-02]
|
9
|
+
|
10
|
+
### Changed
|
11
|
+
|
12
|
+
- Switched to [evil-client] v2+ (nepalez)
|
13
|
+
|
8
14
|
## [0.1.0] - [2017-08-11]
|
9
15
|
|
10
16
|
The gem is re-written on top of newer version of [evil-client]
|
@@ -35,4 +41,5 @@ Some changes in the interface has been made as well.
|
|
35
41
|
[dry-types]: https://github.com/dry-rb/dry-types
|
36
42
|
[0.0.8]: https://github.com/nepalez/sms_aero/compare/v0.0.7...v0.0.8
|
37
43
|
[0.0.9]: https://github.com/nepalez/sms_aero/compare/v0.0.8...v0.0.9
|
38
|
-
[0.1.0]: https://github.com/nepalez/sms_aero/compare/v0.0.9...v0.1.0
|
44
|
+
[0.1.0]: https://github.com/nepalez/sms_aero/compare/v0.0.9...v0.1.0
|
45
|
+
[0.1.1]: https://github.com/nepalez/sms_aero/compare/v0.1.0...v0.1.1
|
data/lib/sms_aero.rb
CHANGED
@@ -1,5 +1,7 @@
|
|
1
1
|
require "evil/client"
|
2
2
|
|
3
|
+
I18n.load_path += [File.expand_path("../../config/locales/en.yml", __FILE__)]
|
4
|
+
|
3
5
|
# HTTP(s) client to the "SMS Aero" online service
|
4
6
|
class SmsAero < Evil::Client
|
5
7
|
require_relative "sms_aero/callable"
|
@@ -131,7 +133,7 @@ class SmsAero < Evil::Client
|
|
131
133
|
option :digital, Digital, optional: true
|
132
134
|
option :type, Channel, default: -> { 2 unless digital == 1 }
|
133
135
|
|
134
|
-
validate
|
136
|
+
validate { errors.add :missed_address unless !to ^ !group }
|
135
137
|
|
136
138
|
path { group && "sendtogroup" || testsend && "testsend" || "send" }
|
137
139
|
query { options.slice(:to, :group, :from, :text, :date, :digital, :type) }
|
data/lib/sms_aero/optional.rb
CHANGED
@@ -5,11 +5,15 @@ module SmsAero::Optional
|
|
5
5
|
super opts.each_with_object({}) { |(key, val), obj| obj[key.to_sym] = val }
|
6
6
|
end
|
7
7
|
|
8
|
+
def __options__
|
9
|
+
@__options__ ||= self.class.dry_initializer.attributes(self)
|
10
|
+
end
|
11
|
+
|
8
12
|
def respond_to_missing?(name, *)
|
9
|
-
|
13
|
+
__options__.respond_to? name
|
10
14
|
end
|
11
15
|
|
12
16
|
def method_missing(*args, &block)
|
13
|
-
respond_to_missing?(*args) ?
|
17
|
+
respond_to_missing?(*args) ? __options__.send(*args, &block) : super
|
14
18
|
end
|
15
19
|
end
|
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.1.
|
3
|
+
gem.version = "0.1.1"
|
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"
|
@@ -13,7 +13,7 @@ Gem::Specification.new do |gem|
|
|
13
13
|
|
14
14
|
gem.required_ruby_version = ">= 2.2"
|
15
15
|
|
16
|
-
gem.add_runtime_dependency "evil-client", "~>
|
16
|
+
gem.add_runtime_dependency "evil-client", "~> 2.0"
|
17
17
|
|
18
18
|
gem.add_development_dependency "rake", ">= 10"
|
19
19
|
gem.add_development_dependency "rspec", "~> 3.0"
|
data/spec/spec_helper.rb
CHANGED
metadata
CHANGED
@@ -1,86 +1,86 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: sms_aero
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Andrew Kozin (nepalez)
|
8
|
-
autorequire:
|
8
|
+
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2017-
|
11
|
+
date: 2017-09-02 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
|
-
name: evil-client
|
15
14
|
requirement: !ruby/object:Gem::Requirement
|
16
15
|
requirements:
|
17
16
|
- - "~>"
|
18
17
|
- !ruby/object:Gem::Version
|
19
|
-
version: '
|
20
|
-
|
18
|
+
version: '2.0'
|
19
|
+
name: evil-client
|
21
20
|
prerelease: false
|
21
|
+
type: :runtime
|
22
22
|
version_requirements: !ruby/object:Gem::Requirement
|
23
23
|
requirements:
|
24
24
|
- - "~>"
|
25
25
|
- !ruby/object:Gem::Version
|
26
|
-
version: '
|
26
|
+
version: '2.0'
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
|
-
name: rake
|
29
28
|
requirement: !ruby/object:Gem::Requirement
|
30
29
|
requirements:
|
31
30
|
- - ">="
|
32
31
|
- !ruby/object:Gem::Version
|
33
32
|
version: '10'
|
34
|
-
|
33
|
+
name: rake
|
35
34
|
prerelease: false
|
35
|
+
type: :development
|
36
36
|
version_requirements: !ruby/object:Gem::Requirement
|
37
37
|
requirements:
|
38
38
|
- - ">="
|
39
39
|
- !ruby/object:Gem::Version
|
40
40
|
version: '10'
|
41
41
|
- !ruby/object:Gem::Dependency
|
42
|
-
name: rspec
|
43
42
|
requirement: !ruby/object:Gem::Requirement
|
44
43
|
requirements:
|
45
44
|
- - "~>"
|
46
45
|
- !ruby/object:Gem::Version
|
47
46
|
version: '3.0'
|
48
|
-
|
47
|
+
name: rspec
|
49
48
|
prerelease: false
|
49
|
+
type: :development
|
50
50
|
version_requirements: !ruby/object:Gem::Requirement
|
51
51
|
requirements:
|
52
52
|
- - "~>"
|
53
53
|
- !ruby/object:Gem::Version
|
54
54
|
version: '3.0'
|
55
55
|
- !ruby/object:Gem::Dependency
|
56
|
-
name: rubocop
|
57
56
|
requirement: !ruby/object:Gem::Requirement
|
58
57
|
requirements:
|
59
58
|
- - "~>"
|
60
59
|
- !ruby/object:Gem::Version
|
61
60
|
version: '0.42'
|
62
|
-
|
61
|
+
name: rubocop
|
63
62
|
prerelease: false
|
63
|
+
type: :development
|
64
64
|
version_requirements: !ruby/object:Gem::Requirement
|
65
65
|
requirements:
|
66
66
|
- - "~>"
|
67
67
|
- !ruby/object:Gem::Version
|
68
68
|
version: '0.42'
|
69
69
|
- !ruby/object:Gem::Dependency
|
70
|
-
name: webmock
|
71
70
|
requirement: !ruby/object:Gem::Requirement
|
72
71
|
requirements:
|
73
72
|
- - "~>"
|
74
73
|
- !ruby/object:Gem::Version
|
75
74
|
version: '2.1'
|
76
|
-
|
75
|
+
name: webmock
|
77
76
|
prerelease: false
|
77
|
+
type: :development
|
78
78
|
version_requirements: !ruby/object:Gem::Requirement
|
79
79
|
requirements:
|
80
80
|
- - "~>"
|
81
81
|
- !ruby/object:Gem::Version
|
82
82
|
version: '2.1'
|
83
|
-
description:
|
83
|
+
description:
|
84
84
|
email: andrew.kozin@gmail.com
|
85
85
|
executables: []
|
86
86
|
extensions: []
|
@@ -98,6 +98,7 @@ files:
|
|
98
98
|
- LICENSE.txt
|
99
99
|
- README.md
|
100
100
|
- Rakefile
|
101
|
+
- config/locales/en.yml
|
101
102
|
- lib/sms_aero.rb
|
102
103
|
- lib/sms_aero/birthday.rb
|
103
104
|
- lib/sms_aero/callable.rb
|
@@ -136,12 +137,11 @@ files:
|
|
136
137
|
- spec/operations/delete_phone_spec.rb
|
137
138
|
- spec/operations/send_sms_spec.rb
|
138
139
|
- spec/spec_helper.rb
|
139
|
-
- spec/support/en.yml
|
140
140
|
homepage: https://github.com/nepalez/sms_aero
|
141
141
|
licenses:
|
142
142
|
- MIT
|
143
143
|
metadata: {}
|
144
|
-
post_install_message:
|
144
|
+
post_install_message:
|
145
145
|
rdoc_options: []
|
146
146
|
require_paths:
|
147
147
|
- lib
|
@@ -156,9 +156,9 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
156
156
|
- !ruby/object:Gem::Version
|
157
157
|
version: '0'
|
158
158
|
requirements: []
|
159
|
-
rubyforge_project:
|
160
|
-
rubygems_version: 2.
|
161
|
-
signing_key:
|
159
|
+
rubyforge_project:
|
160
|
+
rubygems_version: 2.6.4
|
161
|
+
signing_key:
|
162
162
|
specification_version: 4
|
163
163
|
summary: HTTP(s) client to SMS Aero API
|
164
164
|
test_files:
|
@@ -181,5 +181,3 @@ test_files:
|
|
181
181
|
- spec/operations/delete_phone_spec.rb
|
182
182
|
- spec/operations/send_sms_spec.rb
|
183
183
|
- spec/spec_helper.rb
|
184
|
-
- spec/support/en.yml
|
185
|
-
has_rdoc:
|