tenios-api 1.0.2 → 1.0.3

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
  SHA256:
3
- metadata.gz: 355929e91b4ce16cc94d0bdc54c87b155f04c8a48d9c3ecc599eb8ff62d98c38
4
- data.tar.gz: 0f9a953d42796beb4d85ba29259665b868883c368de8a91c79e7dbf56d247faa
3
+ metadata.gz: 3136d521c83234370c1b3c1fb2052b4f8367d5e051604403b300975057d7f6e7
4
+ data.tar.gz: 4da46b1698c6595ec64c44865ae95b01343a9c5c2a74b488d794686ad1960483
5
5
  SHA512:
6
- metadata.gz: c51c611dc912bfa859d03cc55a78217f6509c8fe8bf6da1a7d2ade5c6bb886e0cb4ed7a635a7f3e994f116ed4d743d4be85cea87f12f927c0b324866393a040c
7
- data.tar.gz: 47a989077a4f6987b6e073553e163b952998c40e880a31ac553f3c83f17a394e642e995bcee1fe2bd48192d1fc8dde405bcd9c5abbe1c0aae64583271e8d9ebd
6
+ metadata.gz: a16b1dc2248f2d9da25b14b86e55570b1baf026d6e8c91072a0cbe4b35962847595bfbfe644022292f518f96c94ead36de3a2dc4b49a66d4de60cb1d69285935
7
+ data.tar.gz: 76a02116be72f08b426fe13466b87e0ac8984cc4f6722c1523e3b2d63ef0b9a284437699cdcac8c53069750a52708b62f62e33078a69b49b864e7ce2705e9071
data/CHANGELOG.md CHANGED
@@ -8,6 +8,15 @@
8
8
  ### Security
9
9
  ### Misc
10
10
 
11
+ ## [1.0.3] - 2020-02-16
12
+
13
+ ### Misc
14
+
15
+ * Better gem description
16
+ * Drop zeitwerk (ran into some issues in a Rails app 😕)
17
+
18
+ [1.0.3]: https://github.com/carwow/deals_service_client/compare/v1.0.2...v1.0.3
19
+
11
20
  ## [1.0.2] - 2020-02-13
12
21
 
13
22
  ### Misc
data/README.md CHANGED
@@ -1,6 +1,6 @@
1
1
  # Tenios API Client ☎️
2
2
 
3
- HTTP client for [Tenios API].
3
+ Ruby client for [Tenios API].
4
4
 
5
5
  [Tenios API]: https://www.tenios.de/doc-topic/voice-api
6
6
 
data/lib/tenios-api.rb CHANGED
@@ -1,9 +1,3 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- require "zeitwerk"
4
-
5
- Zeitwerk::Loader.for_gem.tap do |loader|
6
- loader.ignore "#{__dir__}/tenios-api.rb"
7
- loader.inflector.inflect "api" => "API"
8
- loader.setup
9
- end
3
+ require "tenios/api"
data/lib/tenios/api.rb ADDED
@@ -0,0 +1,9 @@
1
+ # frozen_string_literal: true
2
+
3
+ require "tenios/api/client"
4
+
5
+ module Tenios
6
+ module API
7
+ autoload :Version, "tenios/api/version"
8
+ end
9
+ end
@@ -14,21 +14,24 @@ module Tenios
14
14
  @http_client = build_http_client(url)
15
15
  end
16
16
 
17
- def call_detail_records
18
- CallDetailRecords.new(self)
17
+ class <<self
18
+ private
19
+
20
+ def endpoint(name, klass)
21
+ API.autoload klass, "tenios/api/#{name}"
22
+
23
+ class_eval <<~RUBY, __FILE__, __LINE__ + 1
24
+ def #{name}
25
+ @#{name} ||= #{klass}.new(self)
26
+ end
27
+ RUBY
28
+ end
19
29
  end
20
30
 
21
- def verification
22
- Verification.new(self)
23
- end
24
-
25
- def number
26
- Number.new(self)
27
- end
28
-
29
- def record_call
30
- RecordCall.new(self)
31
- end
31
+ endpoint :call_detail_records, :CallDetailRecords
32
+ endpoint :verification, :Verification
33
+ endpoint :number, :Number
34
+ endpoint :record_call, :RecordCall
32
35
 
33
36
  # @api private
34
37
  def post(path, **payload)
@@ -2,6 +2,6 @@
2
2
 
3
3
  module Tenios
4
4
  module API
5
- VERSION = "1.0.2"
5
+ VERSION = "1.0.3"
6
6
  end
7
7
  end
data/tenios-api.gemspec CHANGED
@@ -8,7 +8,7 @@ Gem::Specification.new do |spec|
8
8
  spec.authors = ["carwow Developers"]
9
9
  spec.email = ["developers@carwow.co.uk"]
10
10
  spec.summary = "Tenios API Client ☎️"
11
- spec.description = "Get Call Detail Records (CDRs) from Tenios API."
11
+ spec.description = "Ruby client for Tenios API."
12
12
  spec.homepage = "https://github.com/carwow/tenios-api-ruby"
13
13
  spec.license = "MIT"
14
14
 
@@ -24,7 +24,6 @@ Gem::Specification.new do |spec|
24
24
 
25
25
  spec.add_dependency "faraday", "~> 1.3"
26
26
  spec.add_dependency "faraday_middleware", "~> 1.0"
27
- spec.add_dependency "zeitwerk", "~> 2.4"
28
27
 
29
28
  spec.add_development_dependency "pry", "~> 0.14"
30
29
  spec.add_development_dependency "rake", "~> 13.0"
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: tenios-api
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.2
4
+ version: 1.0.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - carwow Developers
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2021-02-13 00:00:00.000000000 Z
11
+ date: 2021-02-16 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: faraday
@@ -38,20 +38,6 @@ dependencies:
38
38
  - - "~>"
39
39
  - !ruby/object:Gem::Version
40
40
  version: '1.0'
41
- - !ruby/object:Gem::Dependency
42
- name: zeitwerk
43
- requirement: !ruby/object:Gem::Requirement
44
- requirements:
45
- - - "~>"
46
- - !ruby/object:Gem::Version
47
- version: '2.4'
48
- type: :runtime
49
- prerelease: false
50
- version_requirements: !ruby/object:Gem::Requirement
51
- requirements:
52
- - - "~>"
53
- - !ruby/object:Gem::Version
54
- version: '2.4'
55
41
  - !ruby/object:Gem::Dependency
56
42
  name: pry
57
43
  requirement: !ruby/object:Gem::Requirement
@@ -108,7 +94,7 @@ dependencies:
108
94
  - - "~>"
109
95
  - !ruby/object:Gem::Version
110
96
  version: '0.12'
111
- description: Get Call Detail Records (CDRs) from Tenios API.
97
+ description: Ruby client for Tenios API.
112
98
  email:
113
99
  - developers@carwow.co.uk
114
100
  executables: []
@@ -126,6 +112,7 @@ files:
126
112
  - Rakefile
127
113
  - bin/console
128
114
  - lib/tenios-api.rb
115
+ - lib/tenios/api.rb
129
116
  - lib/tenios/api/call_detail_records.rb
130
117
  - lib/tenios/api/client.rb
131
118
  - lib/tenios/api/number.rb
@@ -159,7 +146,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
159
146
  - !ruby/object:Gem::Version
160
147
  version: '0'
161
148
  requirements: []
162
- rubygems_version: 3.2.3
149
+ rubygems_version: 3.1.4
163
150
  signing_key:
164
151
  specification_version: 4
165
152
  summary: Tenios API Client ☎️