apimatic_calculator_test_ruby 1.0.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 +7 -0
- data/LICENSE +28 -0
- data/README.md +110 -0
- data/lib/apimatic_calculator/api_helper.rb +449 -0
- data/lib/apimatic_calculator/client.rb +35 -0
- data/lib/apimatic_calculator/configuration.rb +115 -0
- data/lib/apimatic_calculator/controllers/base_controller.rb +59 -0
- data/lib/apimatic_calculator/controllers/simple_calculator_controller.rb +45 -0
- data/lib/apimatic_calculator/exceptions/api_exception.rb +20 -0
- data/lib/apimatic_calculator/exceptions/validation_exception.rb +18 -0
- data/lib/apimatic_calculator/http/faraday_client.rb +98 -0
- data/lib/apimatic_calculator/http/http_call_back.rb +24 -0
- data/lib/apimatic_calculator/http/http_client.rb +123 -0
- data/lib/apimatic_calculator/http/http_method_enum.rb +13 -0
- data/lib/apimatic_calculator/http/http_request.rb +54 -0
- data/lib/apimatic_calculator/http/http_response.rb +29 -0
- data/lib/apimatic_calculator/models/base_model.rb +58 -0
- data/lib/apimatic_calculator/models/operation_type_enum.rb +23 -0
- data/lib/apimatic_calculator/utilities/date_time_helper.rb +156 -0
- data/lib/apimatic_calculator/utilities/file_wrapper.rb +16 -0
- data/lib/apimatic_calculator.rb +39 -0
- data/test/controllers/controller_test_base.rb +21 -0
- data/test/controllers/test_simple_calculator_controller.rb +34 -0
- data/test/http_response_catcher.rb +19 -0
- data/test/test_helper.rb +94 -0
- metadata +239 -0
@@ -0,0 +1,156 @@
|
|
1
|
+
# apimatic_calculator
|
2
|
+
#
|
3
|
+
# This file was automatically generated by APIMATIC v2.0
|
4
|
+
# ( https://apimatic.io ).
|
5
|
+
|
6
|
+
require 'date'
|
7
|
+
module ApimaticCalculator
|
8
|
+
# A utility that supports dateTime conversion to different formats
|
9
|
+
class DateTimeHelper
|
10
|
+
# Safely converts a DateTime object into a rfc1123 format string
|
11
|
+
# @param [DateTime] The DateTime object
|
12
|
+
# @return [String] The rfc1123 formatted datetime string
|
13
|
+
def self.to_rfc1123(date_time)
|
14
|
+
date_time&.httpdate
|
15
|
+
end
|
16
|
+
|
17
|
+
# Safely converts a map of DateTime objects into a map of rfc1123 format string
|
18
|
+
# @param [hash] a map of DateTime objects
|
19
|
+
# @return [hash] a map of rfc1123 formatted datetime string
|
20
|
+
def self.to_rfc1123_map(date_time, hash, key)
|
21
|
+
return if date_time.nil?
|
22
|
+
|
23
|
+
hash[key] = {}
|
24
|
+
date_time.each do |k, v|
|
25
|
+
hash[key][k] =
|
26
|
+
if v.is_a?(BaseModel)
|
27
|
+
v.to_hash
|
28
|
+
else
|
29
|
+
v.is_a?(DateTime) ? DateTimeHelper.to_rfc1123(v) : v
|
30
|
+
end
|
31
|
+
end
|
32
|
+
hash[key]
|
33
|
+
end
|
34
|
+
|
35
|
+
# Safely converts an array of DateTime objects into an array of rfc1123 format string
|
36
|
+
# @param [Array] an array of DateTime objects
|
37
|
+
# @return [Array] an array of rfc1123 formatted datetime string
|
38
|
+
def self.to_rfc1123_array(date_time, hash, key)
|
39
|
+
return if date_time.nil?
|
40
|
+
|
41
|
+
hash[key] = date_time.map do |v|
|
42
|
+
if v.is_a?(BaseModel)
|
43
|
+
v.to_hash
|
44
|
+
else
|
45
|
+
v.is_a?(DateTime) ? DateTimeHelper.to_rfc1123(v) : v
|
46
|
+
end
|
47
|
+
end
|
48
|
+
end
|
49
|
+
|
50
|
+
# Safely converts a DateTime object into a unix format string
|
51
|
+
# @param [DateTime] The DateTime object
|
52
|
+
# @return [String] The unix formatted datetime string
|
53
|
+
def self.to_unix(date_time)
|
54
|
+
date_time.to_time.utc.to_i unless date_time.nil?
|
55
|
+
end
|
56
|
+
|
57
|
+
# Safely converts a map of DateTime objects into a map of unix format string
|
58
|
+
# @param [hash] a map of DateTime objects
|
59
|
+
# @return [hash] a map of unix formatted datetime string
|
60
|
+
def self.to_unix_map(date_time, hash, key)
|
61
|
+
return if date_time.nil?
|
62
|
+
|
63
|
+
hash[key] = {}
|
64
|
+
date_time.each do |k, v|
|
65
|
+
hash[key][k] =
|
66
|
+
if v.is_a?(BaseModel)
|
67
|
+
v.to_hash
|
68
|
+
else
|
69
|
+
v.is_a?(DateTime) ? DateTimeHelper.to_unix(v) : v
|
70
|
+
end
|
71
|
+
end
|
72
|
+
hash[key]
|
73
|
+
end
|
74
|
+
|
75
|
+
# Safely converts an array of DateTime objects into a map of unix format string
|
76
|
+
# @param [hash] an array of DateTime objects
|
77
|
+
# @return [hash] an array of unix formatted datetime string
|
78
|
+
def self.to_unix_array(date_time, hash, key)
|
79
|
+
return if date_time.nil?
|
80
|
+
|
81
|
+
hash[key] = date_time.map do |v|
|
82
|
+
if v.is_a?(BaseModel)
|
83
|
+
v.to_hash
|
84
|
+
else
|
85
|
+
v.is_a?(DateTime) ? DateTimeHelper.to_unix(v) : v
|
86
|
+
end
|
87
|
+
end
|
88
|
+
end
|
89
|
+
|
90
|
+
# Safely converts a DateTime object into a rfc3339 format string
|
91
|
+
# @param [DateTime] The DateTime object
|
92
|
+
# @return [String] The rfc3339 formatted datetime string
|
93
|
+
def self.to_rfc3339(date_time)
|
94
|
+
date_time&.rfc3339
|
95
|
+
end
|
96
|
+
|
97
|
+
# Safely converts a map of DateTime objects into a map of rfc1123 format string
|
98
|
+
# @param [hash] a map of DateTime objects
|
99
|
+
# @return [hash] a map of rfc1123 formatted datetime string
|
100
|
+
def self.to_rfc3339_map(date_time, hash, key)
|
101
|
+
return if date_time.nil?
|
102
|
+
|
103
|
+
hash[key] = {}
|
104
|
+
date_time.each do |k, v|
|
105
|
+
hash[key][k] =
|
106
|
+
if v.is_a?(BaseModel)
|
107
|
+
v.to_hash
|
108
|
+
else
|
109
|
+
v.is_a?(DateTime) ? DateTimeHelper.to_rfc3339(v) : v
|
110
|
+
end
|
111
|
+
end
|
112
|
+
hash[key]
|
113
|
+
end
|
114
|
+
|
115
|
+
# Safely converts an array of DateTime objects into an array of rfc1123 format string
|
116
|
+
# @param [Array] an array of DateTime objects
|
117
|
+
# @return [Array] an array of rfc1123 formatted datetime string
|
118
|
+
def self.to_rfc3339_array(date_time, hash, key)
|
119
|
+
return if date_time.nil?
|
120
|
+
|
121
|
+
hash[key] = date_time.map do |v|
|
122
|
+
if v.is_a?(BaseModel)
|
123
|
+
v.to_hash
|
124
|
+
else
|
125
|
+
v.is_a?(DateTime) ? DateTimeHelper.to_rfc3339(v) : v
|
126
|
+
end
|
127
|
+
end
|
128
|
+
end
|
129
|
+
|
130
|
+
# Safely converts a rfc1123 format string into a DateTime object
|
131
|
+
# @param [String] The rfc1123 formatted datetime string
|
132
|
+
# @return [DateTime] A DateTime object
|
133
|
+
def self.from_rfc1123(date_time)
|
134
|
+
DateTime.httpdate(date_time)
|
135
|
+
end
|
136
|
+
|
137
|
+
# Safely converts a unix format string into a DateTime object
|
138
|
+
# @param [String] The unix formatted datetime string
|
139
|
+
# @return [DateTime] A DateTime object
|
140
|
+
def self.from_unix(date_time)
|
141
|
+
Time.at(date_time.to_i).utc.to_datetime
|
142
|
+
end
|
143
|
+
|
144
|
+
# Safely converts a rfc3339 format string into a DateTime object
|
145
|
+
# @param [String] The rfc3339 formatted datetime string
|
146
|
+
# @return [DateTime] A DateTime object
|
147
|
+
def self.from_rfc3339(date_time)
|
148
|
+
# missing timezone information
|
149
|
+
if date_time.end_with?('Z') || date_time.index('+')
|
150
|
+
DateTime.rfc3339(date_time)
|
151
|
+
else
|
152
|
+
DateTime.rfc3339("#{date_time}Z")
|
153
|
+
end
|
154
|
+
end
|
155
|
+
end
|
156
|
+
end
|
@@ -0,0 +1,16 @@
|
|
1
|
+
# apimatic_calculator
|
2
|
+
#
|
3
|
+
# This file was automatically generated by APIMATIC v2.0
|
4
|
+
# ( https://apimatic.io ).
|
5
|
+
|
6
|
+
module ApimaticCalculator
|
7
|
+
# A utility to allow users to set the content-type for files
|
8
|
+
class FileWrapper
|
9
|
+
attr_reader :content_type, :file
|
10
|
+
|
11
|
+
def initialize(file, content_type: 'application/octet-stream')
|
12
|
+
@file = file
|
13
|
+
@content_type = content_type
|
14
|
+
end
|
15
|
+
end
|
16
|
+
end
|
@@ -0,0 +1,39 @@
|
|
1
|
+
# apimatic_calculator
|
2
|
+
#
|
3
|
+
# This file was automatically generated by APIMATIC v2.0
|
4
|
+
# ( https://apimatic.io ).
|
5
|
+
|
6
|
+
require 'date'
|
7
|
+
require 'json'
|
8
|
+
require 'faraday'
|
9
|
+
require 'certifi'
|
10
|
+
require 'logging'
|
11
|
+
|
12
|
+
require_relative 'apimatic_calculator/api_helper'
|
13
|
+
require_relative 'apimatic_calculator/client'
|
14
|
+
|
15
|
+
# Utilities
|
16
|
+
require_relative 'apimatic_calculator/utilities/file_wrapper'
|
17
|
+
require_relative 'apimatic_calculator/utilities/date_time_helper'
|
18
|
+
|
19
|
+
# Http
|
20
|
+
require_relative 'apimatic_calculator/http/http_call_back'
|
21
|
+
require_relative 'apimatic_calculator/http/http_client'
|
22
|
+
require_relative 'apimatic_calculator/http/faraday_client'
|
23
|
+
require_relative 'apimatic_calculator/http/http_method_enum'
|
24
|
+
require_relative 'apimatic_calculator/http/http_request'
|
25
|
+
require_relative 'apimatic_calculator/http/http_response'
|
26
|
+
|
27
|
+
# Models
|
28
|
+
require_relative 'apimatic_calculator/models/base_model'
|
29
|
+
require_relative 'apimatic_calculator/models/operation_type_enum'
|
30
|
+
|
31
|
+
# Exceptions
|
32
|
+
require_relative 'apimatic_calculator/exceptions/api_exception'
|
33
|
+
require_relative 'apimatic_calculator/exceptions/validation_exception'
|
34
|
+
|
35
|
+
require_relative 'apimatic_calculator/configuration'
|
36
|
+
|
37
|
+
# Controllers
|
38
|
+
require_relative 'apimatic_calculator/controllers/base_controller'
|
39
|
+
require_relative 'apimatic_calculator/controllers/simple_calculator_controller'
|
@@ -0,0 +1,21 @@
|
|
1
|
+
# apimatic_calculator
|
2
|
+
#
|
3
|
+
# This file was automatically generated by APIMATIC v2.0
|
4
|
+
# ( https://apimatic.io ).
|
5
|
+
|
6
|
+
require 'json'
|
7
|
+
require 'minitest/autorun'
|
8
|
+
require 'minitest/hell'
|
9
|
+
require 'minitest/pride'
|
10
|
+
require 'minitest/proveit'
|
11
|
+
require 'apimatic_calculator'
|
12
|
+
require_relative '../test_helper'
|
13
|
+
require_relative '../http_response_catcher'
|
14
|
+
|
15
|
+
class ControllerTestBase < Minitest::Test
|
16
|
+
parallelize_me!
|
17
|
+
include ApimaticCalculator
|
18
|
+
|
19
|
+
# Create configuration and set any test parameters
|
20
|
+
CONFIG = Configuration.new
|
21
|
+
end
|
@@ -0,0 +1,34 @@
|
|
1
|
+
# apimatic_calculator
|
2
|
+
#
|
3
|
+
# This file was automatically generated by APIMATIC v2.0
|
4
|
+
# ( https://apimatic.io ).
|
5
|
+
|
6
|
+
require_relative 'controller_test_base'
|
7
|
+
|
8
|
+
class SimpleCalculatorControllerTests < ControllerTestBase
|
9
|
+
# Called only once for the class before any test has executed
|
10
|
+
def setup
|
11
|
+
@response_catcher = HttpResponseCatcher.new
|
12
|
+
@controller = SimpleCalculatorController.new CONFIG, http_call_back: @response_catcher
|
13
|
+
end
|
14
|
+
|
15
|
+
# Check if multiplication works
|
16
|
+
def test_multiply()
|
17
|
+
# Parameters for the API call
|
18
|
+
options = {}
|
19
|
+
options['operation'] = 'MULTIPLY'
|
20
|
+
options['x'] = 4
|
21
|
+
options['y'] = 5
|
22
|
+
|
23
|
+
# Perform the API call through the SDK function
|
24
|
+
result = @controller.get_calculate(options)
|
25
|
+
|
26
|
+
# Test response code
|
27
|
+
assert_equal(200, @response_catcher.response.status_code)
|
28
|
+
|
29
|
+
# Test whether the captured response is as we expected
|
30
|
+
refute_nil(result)
|
31
|
+
assert_equal('20', @response_catcher.response.raw_body)
|
32
|
+
end
|
33
|
+
|
34
|
+
end
|
@@ -0,0 +1,19 @@
|
|
1
|
+
# apimatic_calculator
|
2
|
+
#
|
3
|
+
# This file was automatically generated by APIMATIC v2.0
|
4
|
+
# ( https://apimatic.io ).
|
5
|
+
|
6
|
+
class HttpResponseCatcher < ApimaticCalculator::HttpCallBack
|
7
|
+
attr_accessor :response
|
8
|
+
|
9
|
+
def on_before_request(request)
|
10
|
+
end
|
11
|
+
|
12
|
+
# Catching the response
|
13
|
+
def on_after_response(response)
|
14
|
+
@response = response
|
15
|
+
end
|
16
|
+
end
|
17
|
+
|
18
|
+
|
19
|
+
|
data/test/test_helper.rb
ADDED
@@ -0,0 +1,94 @@
|
|
1
|
+
# apimatic_calculator
|
2
|
+
#
|
3
|
+
# This file was automatically generated by APIMATIC v2.0
|
4
|
+
# ( https://apimatic.io ).
|
5
|
+
|
6
|
+
require 'tempfile'
|
7
|
+
require 'open-uri'
|
8
|
+
|
9
|
+
class TestHelper
|
10
|
+
|
11
|
+
@cache = Hash.new
|
12
|
+
|
13
|
+
# Class method to compare the received headers with the expected headers.
|
14
|
+
# @param [Hash] A hash of expected headers (keys in lower case).
|
15
|
+
# @param [Hash] A hash of received headers.
|
16
|
+
# @param [Boolean, optional] A flag which determines if we allow extra headers.
|
17
|
+
def self.match_headers(expected_headers,
|
18
|
+
received_headers,
|
19
|
+
allow_extra: true)
|
20
|
+
return false if ((received_headers.length < expected_headers.length) ||
|
21
|
+
((allow_extra == false) && (received_headers.length > expected_headers.length)))
|
22
|
+
|
23
|
+
received_headers = Hash[received_headers.map{|k, v| [k.to_s.downcase, v]}]
|
24
|
+
expected_headers.each do |e_key, e_value|
|
25
|
+
return false unless received_headers.key?(e_key)
|
26
|
+
return false if ((e_value != nil) &&
|
27
|
+
(e_value != received_headers[e_key]))
|
28
|
+
end
|
29
|
+
|
30
|
+
return true
|
31
|
+
end
|
32
|
+
|
33
|
+
# Class method to compare the received body with the expected body.
|
34
|
+
# @param [Dynamic] The expected body.
|
35
|
+
# @param [Dynamic] The received body.
|
36
|
+
# @param [Boolean, optional] A flag which determines if we check values in dictionaries.
|
37
|
+
# @param [Boolean, optional] A flag which determines if we check the order of array elements.
|
38
|
+
# @param [Boolean, optional] A flag which determines if we check the count of array elements.
|
39
|
+
def self.match_body(expected_body,
|
40
|
+
received_body,
|
41
|
+
check_values: false,
|
42
|
+
check_order: false,
|
43
|
+
check_count: false)
|
44
|
+
if expected_body.instance_of? Hash
|
45
|
+
return false unless received_body.instance_of? Hash
|
46
|
+
for key in expected_body.keys
|
47
|
+
return false unless received_body.keys.include? key
|
48
|
+
if check_values or expected_body[key].instance_of? Hash
|
49
|
+
return false unless TestHelper.match_body(expected_body[key],
|
50
|
+
received_body[key],
|
51
|
+
check_values: check_values,
|
52
|
+
check_order: check_order,
|
53
|
+
check_count: check_count)
|
54
|
+
end
|
55
|
+
end
|
56
|
+
elsif expected_body.instance_of? Array
|
57
|
+
return false unless received_body.instance_of? Array
|
58
|
+
if check_count == true && (expected_body.length != received_body.length)
|
59
|
+
return false
|
60
|
+
else
|
61
|
+
previous_matches = Array.new
|
62
|
+
expected_body.each.with_index do |expected_element, i|
|
63
|
+
matches = (received_body.map.with_index do |received_element, j|
|
64
|
+
j if TestHelper.match_body(expected_element,
|
65
|
+
received_element,
|
66
|
+
check_values: check_values,
|
67
|
+
check_order: check_order,
|
68
|
+
check_count: check_count)
|
69
|
+
end).compact
|
70
|
+
return false if matches.length == 0
|
71
|
+
if check_order == true
|
72
|
+
return false if (i != 0 && matches.map{|x| previous_matches.map{|y| y > x}.all?}.all?)
|
73
|
+
previous_matches = matches
|
74
|
+
end
|
75
|
+
end
|
76
|
+
end
|
77
|
+
elsif expected_body != received_body
|
78
|
+
return false
|
79
|
+
end
|
80
|
+
return true
|
81
|
+
end
|
82
|
+
|
83
|
+
# Class method which takes a URL, downloads the file (if not already downloaded
|
84
|
+
# for this test session) and returns the path of the file.
|
85
|
+
# @param [String] The URL of the required file.
|
86
|
+
def self.get_file(url)
|
87
|
+
unless @cache.keys.include? url
|
88
|
+
@cache[url] = Tempfile.new('APIMatic')
|
89
|
+
@cache[url].binmode
|
90
|
+
@cache[url].write(URI.open(url, {ssl_ca_cert: Certifi.where}).read)
|
91
|
+
end
|
92
|
+
return @cache[url].path
|
93
|
+
end
|
94
|
+
end
|
metadata
ADDED
@@ -0,0 +1,239 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: apimatic_calculator_test_ruby
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 1.0.0
|
5
|
+
platform: ruby
|
6
|
+
authors:
|
7
|
+
- APIMatic SDK Generator
|
8
|
+
autorequire:
|
9
|
+
bindir: bin
|
10
|
+
cert_chain: []
|
11
|
+
date: 2023-01-03 00:00:00.000000000 Z
|
12
|
+
dependencies:
|
13
|
+
- !ruby/object:Gem::Dependency
|
14
|
+
name: logging
|
15
|
+
requirement: !ruby/object:Gem::Requirement
|
16
|
+
requirements:
|
17
|
+
- - "~>"
|
18
|
+
- !ruby/object:Gem::Version
|
19
|
+
version: '2.3'
|
20
|
+
type: :runtime
|
21
|
+
prerelease: false
|
22
|
+
version_requirements: !ruby/object:Gem::Requirement
|
23
|
+
requirements:
|
24
|
+
- - "~>"
|
25
|
+
- !ruby/object:Gem::Version
|
26
|
+
version: '2.3'
|
27
|
+
- !ruby/object:Gem::Dependency
|
28
|
+
name: faraday
|
29
|
+
requirement: !ruby/object:Gem::Requirement
|
30
|
+
requirements:
|
31
|
+
- - "~>"
|
32
|
+
- !ruby/object:Gem::Version
|
33
|
+
version: '2.0'
|
34
|
+
- - ">="
|
35
|
+
- !ruby/object:Gem::Version
|
36
|
+
version: 2.0.1
|
37
|
+
type: :runtime
|
38
|
+
prerelease: false
|
39
|
+
version_requirements: !ruby/object:Gem::Requirement
|
40
|
+
requirements:
|
41
|
+
- - "~>"
|
42
|
+
- !ruby/object:Gem::Version
|
43
|
+
version: '2.0'
|
44
|
+
- - ">="
|
45
|
+
- !ruby/object:Gem::Version
|
46
|
+
version: 2.0.1
|
47
|
+
- !ruby/object:Gem::Dependency
|
48
|
+
name: faraday-follow_redirects
|
49
|
+
requirement: !ruby/object:Gem::Requirement
|
50
|
+
requirements:
|
51
|
+
- - "~>"
|
52
|
+
- !ruby/object:Gem::Version
|
53
|
+
version: '0.2'
|
54
|
+
type: :runtime
|
55
|
+
prerelease: false
|
56
|
+
version_requirements: !ruby/object:Gem::Requirement
|
57
|
+
requirements:
|
58
|
+
- - "~>"
|
59
|
+
- !ruby/object:Gem::Version
|
60
|
+
version: '0.2'
|
61
|
+
- !ruby/object:Gem::Dependency
|
62
|
+
name: faraday-multipart
|
63
|
+
requirement: !ruby/object:Gem::Requirement
|
64
|
+
requirements:
|
65
|
+
- - "~>"
|
66
|
+
- !ruby/object:Gem::Version
|
67
|
+
version: '1.0'
|
68
|
+
type: :runtime
|
69
|
+
prerelease: false
|
70
|
+
version_requirements: !ruby/object:Gem::Requirement
|
71
|
+
requirements:
|
72
|
+
- - "~>"
|
73
|
+
- !ruby/object:Gem::Version
|
74
|
+
version: '1.0'
|
75
|
+
- !ruby/object:Gem::Dependency
|
76
|
+
name: faraday-gzip
|
77
|
+
requirement: !ruby/object:Gem::Requirement
|
78
|
+
requirements:
|
79
|
+
- - "~>"
|
80
|
+
- !ruby/object:Gem::Version
|
81
|
+
version: '0.1'
|
82
|
+
type: :runtime
|
83
|
+
prerelease: false
|
84
|
+
version_requirements: !ruby/object:Gem::Requirement
|
85
|
+
requirements:
|
86
|
+
- - "~>"
|
87
|
+
- !ruby/object:Gem::Version
|
88
|
+
version: '0.1'
|
89
|
+
- !ruby/object:Gem::Dependency
|
90
|
+
name: faraday-retry
|
91
|
+
requirement: !ruby/object:Gem::Requirement
|
92
|
+
requirements:
|
93
|
+
- - "~>"
|
94
|
+
- !ruby/object:Gem::Version
|
95
|
+
version: '1.0'
|
96
|
+
type: :runtime
|
97
|
+
prerelease: false
|
98
|
+
version_requirements: !ruby/object:Gem::Requirement
|
99
|
+
requirements:
|
100
|
+
- - "~>"
|
101
|
+
- !ruby/object:Gem::Version
|
102
|
+
version: '1.0'
|
103
|
+
- !ruby/object:Gem::Dependency
|
104
|
+
name: faraday-net_http_persistent
|
105
|
+
requirement: !ruby/object:Gem::Requirement
|
106
|
+
requirements:
|
107
|
+
- - "~>"
|
108
|
+
- !ruby/object:Gem::Version
|
109
|
+
version: '2.0'
|
110
|
+
type: :runtime
|
111
|
+
prerelease: false
|
112
|
+
version_requirements: !ruby/object:Gem::Requirement
|
113
|
+
requirements:
|
114
|
+
- - "~>"
|
115
|
+
- !ruby/object:Gem::Version
|
116
|
+
version: '2.0'
|
117
|
+
- !ruby/object:Gem::Dependency
|
118
|
+
name: certifi
|
119
|
+
requirement: !ruby/object:Gem::Requirement
|
120
|
+
requirements:
|
121
|
+
- - "~>"
|
122
|
+
- !ruby/object:Gem::Version
|
123
|
+
version: '2018.1'
|
124
|
+
- - ">="
|
125
|
+
- !ruby/object:Gem::Version
|
126
|
+
version: 2018.01.18
|
127
|
+
type: :runtime
|
128
|
+
prerelease: false
|
129
|
+
version_requirements: !ruby/object:Gem::Requirement
|
130
|
+
requirements:
|
131
|
+
- - "~>"
|
132
|
+
- !ruby/object:Gem::Version
|
133
|
+
version: '2018.1'
|
134
|
+
- - ">="
|
135
|
+
- !ruby/object:Gem::Version
|
136
|
+
version: 2018.01.18
|
137
|
+
- !ruby/object:Gem::Dependency
|
138
|
+
name: faraday-http-cache
|
139
|
+
requirement: !ruby/object:Gem::Requirement
|
140
|
+
requirements:
|
141
|
+
- - "~>"
|
142
|
+
- !ruby/object:Gem::Version
|
143
|
+
version: '2.2'
|
144
|
+
type: :runtime
|
145
|
+
prerelease: false
|
146
|
+
version_requirements: !ruby/object:Gem::Requirement
|
147
|
+
requirements:
|
148
|
+
- - "~>"
|
149
|
+
- !ruby/object:Gem::Version
|
150
|
+
version: '2.2'
|
151
|
+
- !ruby/object:Gem::Dependency
|
152
|
+
name: minitest
|
153
|
+
requirement: !ruby/object:Gem::Requirement
|
154
|
+
requirements:
|
155
|
+
- - "~>"
|
156
|
+
- !ruby/object:Gem::Version
|
157
|
+
version: '5.14'
|
158
|
+
- - ">="
|
159
|
+
- !ruby/object:Gem::Version
|
160
|
+
version: 5.14.1
|
161
|
+
type: :development
|
162
|
+
prerelease: false
|
163
|
+
version_requirements: !ruby/object:Gem::Requirement
|
164
|
+
requirements:
|
165
|
+
- - "~>"
|
166
|
+
- !ruby/object:Gem::Version
|
167
|
+
version: '5.14'
|
168
|
+
- - ">="
|
169
|
+
- !ruby/object:Gem::Version
|
170
|
+
version: 5.14.1
|
171
|
+
- !ruby/object:Gem::Dependency
|
172
|
+
name: minitest-proveit
|
173
|
+
requirement: !ruby/object:Gem::Requirement
|
174
|
+
requirements:
|
175
|
+
- - "~>"
|
176
|
+
- !ruby/object:Gem::Version
|
177
|
+
version: '1.0'
|
178
|
+
type: :development
|
179
|
+
prerelease: false
|
180
|
+
version_requirements: !ruby/object:Gem::Requirement
|
181
|
+
requirements:
|
182
|
+
- - "~>"
|
183
|
+
- !ruby/object:Gem::Version
|
184
|
+
version: '1.0'
|
185
|
+
description: Simple calculator API hosted on APIMATIC
|
186
|
+
email:
|
187
|
+
- support@apimatic.io
|
188
|
+
executables: []
|
189
|
+
extensions: []
|
190
|
+
extra_rdoc_files: []
|
191
|
+
files:
|
192
|
+
- LICENSE
|
193
|
+
- README.md
|
194
|
+
- lib/apimatic_calculator.rb
|
195
|
+
- lib/apimatic_calculator/api_helper.rb
|
196
|
+
- lib/apimatic_calculator/client.rb
|
197
|
+
- lib/apimatic_calculator/configuration.rb
|
198
|
+
- lib/apimatic_calculator/controllers/base_controller.rb
|
199
|
+
- lib/apimatic_calculator/controllers/simple_calculator_controller.rb
|
200
|
+
- lib/apimatic_calculator/exceptions/api_exception.rb
|
201
|
+
- lib/apimatic_calculator/exceptions/validation_exception.rb
|
202
|
+
- lib/apimatic_calculator/http/faraday_client.rb
|
203
|
+
- lib/apimatic_calculator/http/http_call_back.rb
|
204
|
+
- lib/apimatic_calculator/http/http_client.rb
|
205
|
+
- lib/apimatic_calculator/http/http_method_enum.rb
|
206
|
+
- lib/apimatic_calculator/http/http_request.rb
|
207
|
+
- lib/apimatic_calculator/http/http_response.rb
|
208
|
+
- lib/apimatic_calculator/models/base_model.rb
|
209
|
+
- lib/apimatic_calculator/models/operation_type_enum.rb
|
210
|
+
- lib/apimatic_calculator/utilities/date_time_helper.rb
|
211
|
+
- lib/apimatic_calculator/utilities/file_wrapper.rb
|
212
|
+
- test/controllers/controller_test_base.rb
|
213
|
+
- test/controllers/test_simple_calculator_controller.rb
|
214
|
+
- test/http_response_catcher.rb
|
215
|
+
- test/test_helper.rb
|
216
|
+
homepage: https://apimatic.io
|
217
|
+
licenses:
|
218
|
+
- MIT
|
219
|
+
metadata: {}
|
220
|
+
post_install_message:
|
221
|
+
rdoc_options: []
|
222
|
+
require_paths:
|
223
|
+
- lib
|
224
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
225
|
+
requirements:
|
226
|
+
- - ">="
|
227
|
+
- !ruby/object:Gem::Version
|
228
|
+
version: '2.6'
|
229
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
230
|
+
requirements:
|
231
|
+
- - ">="
|
232
|
+
- !ruby/object:Gem::Version
|
233
|
+
version: '0'
|
234
|
+
requirements: []
|
235
|
+
rubygems_version: 3.3.26
|
236
|
+
signing_key:
|
237
|
+
specification_version: 4
|
238
|
+
summary: apimatic_calculator
|
239
|
+
test_files: []
|