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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: fdf410ad50fc28f563f44d7749d96e6a1d0c55a3
4
- data.tar.gz: cdbbbb1536558b11a8d58f070785e0a67802bc75
3
+ metadata.gz: 4085b518c9a9df7ed562ce3b9b4af7e9bafc4d18
4
+ data.tar.gz: c4f2d81c67a6bf2085b4013b160bf03743e6eaf2
5
5
  SHA512:
6
- metadata.gz: 1cb59cd8f2900d1f72ca3ceeedfc41bcd75dce2f265f2d6316f4ba312d0204c21e2b36ad90463d111c2f4ef3261dc7119c8ea32b34f66653a496e9ebb3a51fb3
7
- data.tar.gz: 71563a2b0af8242313d0f38b6b2e6eb684869d162e0cd1aa68c412fc798f52d076c472d61aa023c4dcc7e171407326c8fb3395bbfc9ae5f2ab268e6752b24adb
6
+ metadata.gz: 88343afc18f9b4018cf8bdf9f45ac1f57a25f838ca41e7734221768bdabbec6a85791272fb8c1e84c5401ebbc7529927b40dfd191bf9630515b2c5cfb2aee0a9
7
+ data.tar.gz: ca6cc12bd5f7ba6b50b8f4d239a32726e0d61b6d8f0d4b733edc18adf1f5c9f63ec1aacd7b91c2cc986a64801bca2810dea2eacfd41b8f576d8770d9a9f55937
@@ -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
@@ -0,0 +1,7 @@
1
+ ---
2
+ en:
3
+ evil:
4
+ client:
5
+ sms_aero:
6
+ send_sms:
7
+ missed_address: "You must provide either email (to:) or group (group:) as an address of SMS message (not both)"
@@ -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(:address_given) { !to ^ !group }
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) }
@@ -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
- @__options__.respond_to? name
13
+ __options__.respond_to? name
10
14
  end
11
15
 
12
16
  def method_missing(*args, &block)
13
- respond_to_missing?(*args) ? @__options__.send(*args, &block) : super
17
+ respond_to_missing?(*args) ? __options__.send(*args, &block) : super
14
18
  end
15
19
  end
@@ -1,6 +1,6 @@
1
1
  Gem::Specification.new do |gem|
2
2
  gem.name = "sms_aero"
3
- gem.version = "0.1.0"
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", "~> 1.1"
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"
@@ -17,7 +17,3 @@ RSpec.configure do |config|
17
17
  example.run
18
18
  end
19
19
  end
20
-
21
- I18n.available_locales = %i[en]
22
- I18n.locale = :en
23
- I18n.load_path = %w[spec/support/en.yml]
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.0
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-08-11 00:00:00.000000000 Z
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: '1.1'
20
- type: :runtime
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: '1.1'
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
- type: :development
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
- type: :development
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
- type: :development
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
- type: :development
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.5.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:
@@ -1,8 +0,0 @@
1
- ---
2
- en:
3
- evil:
4
- client:
5
- errors:
6
- sms_aero:
7
- send_sms:
8
- address_given: "You should send SMS to either a group or a phone (not to both)"