subtain_pack 1.0.0 → 1.3.2
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 +4 -4
- data/bin/arch +1 -0
- data/bin/ash +1 -0
- data/bin/base64 +1 -0
- data/bin/bbconfig +1 -0
- data/bin/busybox +0 -0
- data/bin/cat +1 -0
- data/bin/chattr +1 -0
- data/bin/chgrp +1 -0
- data/bin/chmod +1 -0
- data/bin/chown +1 -0
- data/bin/cp +1 -0
- data/bin/date +1 -0
- data/bin/dd +1 -0
- data/bin/df +1 -0
- data/bin/dmesg +1 -0
- data/bin/dnsdomainname +1 -0
- data/bin/dumpkmap +1 -0
- data/bin/echo +1 -0
- data/bin/ed +1 -0
- data/bin/egrep +1 -0
- data/bin/false +1 -0
- data/bin/fatattr +1 -0
- data/bin/fdflush +1 -0
- data/bin/fgrep +1 -0
- data/bin/fsync +1 -0
- data/bin/getopt +1 -0
- data/bin/grep +1 -0
- data/bin/gunzip +1 -0
- data/bin/gzip +1 -0
- data/bin/hostname +1 -0
- data/bin/ionice +1 -0
- data/bin/iostat +1 -0
- data/bin/ipcalc +1 -0
- data/bin/kbd_mode +1 -0
- data/bin/kill +1 -0
- data/bin/link +1 -0
- data/bin/linux32 +1 -0
- data/bin/linux64 +1 -0
- data/bin/ln +1 -0
- data/bin/login +1 -0
- data/bin/ls +1 -0
- data/bin/lsattr +1 -0
- data/bin/lzop +1 -0
- data/bin/makemime +1 -0
- data/bin/mkdir +1 -0
- data/bin/mknod +1 -0
- data/bin/mktemp +1 -0
- data/bin/more +1 -0
- data/bin/mount +1 -0
- data/bin/mountpoint +1 -0
- data/bin/mpstat +1 -0
- data/bin/mv +1 -0
- data/bin/netstat +1 -0
- data/bin/nice +1 -0
- data/bin/pidof +0 -0
- data/bin/ping +1 -0
- data/bin/ping6 +1 -0
- data/bin/pipe_progress +1 -0
- data/bin/printenv +1 -0
- data/bin/ps +0 -0
- data/bin/pwait +0 -0
- data/bin/pwd +1 -0
- data/bin/reformime +1 -0
- data/bin/rev +1 -0
- data/bin/rm +1 -0
- data/bin/rmdir +1 -0
- data/bin/run-parts +1 -0
- data/bin/sed +1 -0
- data/bin/setpriv +1 -0
- data/bin/setserial +1 -0
- data/bin/sh +1 -0
- data/bin/slabtop +0 -0
- data/bin/sleep +1 -0
- data/bin/stat +1 -0
- data/bin/stty +1 -0
- data/bin/su +1 -0
- data/bin/sync +1 -0
- data/bin/tar +1 -0
- data/bin/tload +0 -0
- data/bin/touch +1 -0
- data/bin/true +1 -0
- data/bin/umount +1 -0
- data/bin/uname +1 -0
- data/bin/usleep +1 -0
- data/bin/vmstat +0 -0
- data/bin/w +0 -0
- data/bin/watch +0 -0
- data/bin/zcat +1 -0
- data/lib/apk/db/installed +3582 -0
- data/lib/apk/db/lock +0 -0
- data/lib/apk/db/scripts.tar +0 -0
- data/lib/apk/db/triggers +2 -0
- data/lib/ld-musl-x86_64.so.1 +0 -0
- data/lib/libapk.so.3.12.0 +0 -0
- data/lib/libc.musl-x86_64.so.1 +1 -0
- data/lib/libcrypto.so.1.1 +0 -0
- data/lib/libprocps.so.8 +1 -0
- data/lib/libprocps.so.8.0.3 +0 -0
- data/lib/libssl.so.1.1 +0 -0
- data/lib/libz.so +1 -0
- data/lib/libz.so.1 +1 -0
- data/lib/libz.so.1.2.12 +0 -0
- data/lib/sysctl.d/00-alpine.conf +40 -0
- metadata +119 -30
- data/LICENSE +0 -28
- data/README.md +0 -68
- data/lib/apimatic_calculator/api_helper.rb +0 -10
- data/lib/apimatic_calculator/client.rb +0 -44
- data/lib/apimatic_calculator/configuration.rb +0 -92
- data/lib/apimatic_calculator/controllers/base_controller.rb +0 -66
- data/lib/apimatic_calculator/controllers/simple_calculator_controller.rb +0 -31
- data/lib/apimatic_calculator/exceptions/api_exception.rb +0 -10
- data/lib/apimatic_calculator/http/http_call_back.rb +0 -10
- data/lib/apimatic_calculator/http/http_method_enum.rb +0 -10
- data/lib/apimatic_calculator/http/http_request.rb +0 -10
- data/lib/apimatic_calculator/http/http_response.rb +0 -10
- data/lib/apimatic_calculator/models/base_model.rb +0 -62
- data/lib/apimatic_calculator/models/operation_type_enum.rb +0 -29
- data/lib/apimatic_calculator/utilities/date_time_helper.rb +0 -11
- data/lib/apimatic_calculator/utilities/file_wrapper.rb +0 -16
- data/lib/apimatic_calculator.rb +0 -39
- data/test/controllers/controller_test_base.rb +0 -29
- data/test/controllers/test_simple_calculator_controller.rb +0 -35
- data/test/http_response_catcher.rb +0 -19
@@ -1,62 +0,0 @@
|
|
1
|
-
# apimatic_calculator
|
2
|
-
#
|
3
|
-
# This file was automatically generated by APIMATIC v2.0
|
4
|
-
# ( https://apimatic.io ).
|
5
|
-
|
6
|
-
module ApimaticCalculator
|
7
|
-
# Base model.
|
8
|
-
class BaseModel < CoreLibrary::BaseModel
|
9
|
-
# Returns a Hash representation of the current object.
|
10
|
-
def to_hash
|
11
|
-
# validating the model being serialized
|
12
|
-
self.class.validate(self) if self.class.respond_to?(:validate)
|
13
|
-
|
14
|
-
hash = {}
|
15
|
-
instance_variables.each do |name|
|
16
|
-
value = instance_variable_get(name)
|
17
|
-
name = name[1..]
|
18
|
-
key = self.class.names.key?(name) ? self.class.names[name] : name
|
19
|
-
optional_fields = self.class.optionals
|
20
|
-
nullable_fields = self.class.nullables
|
21
|
-
if value.nil?
|
22
|
-
next unless nullable_fields.include?(name)
|
23
|
-
|
24
|
-
if !optional_fields.include?(name) && !nullable_fields.include?(name)
|
25
|
-
raise ArgumentError,
|
26
|
-
"`#{name}` cannot be nil in `#{self.class}`. Please specify a valid value."
|
27
|
-
end
|
28
|
-
end
|
29
|
-
|
30
|
-
hash[key] = nil
|
31
|
-
unless value.nil?
|
32
|
-
if respond_to?("to_custom_#{name}")
|
33
|
-
if (value.instance_of? Array) || (value.instance_of? Hash)
|
34
|
-
params = [hash, key]
|
35
|
-
hash[key] = send("to_custom_#{name}", *params)
|
36
|
-
else
|
37
|
-
hash[key] = send("to_custom_#{name}")
|
38
|
-
end
|
39
|
-
elsif respond_to?("to_union_type_#{name}")
|
40
|
-
hash[key] = send("to_union_type_#{name}")
|
41
|
-
elsif value.instance_of? Array
|
42
|
-
hash[key] = value.map { |v| v.is_a?(BaseModel) ? v.to_hash : v }
|
43
|
-
elsif value.instance_of? Hash
|
44
|
-
hash[key] = {}
|
45
|
-
value.each do |k, v|
|
46
|
-
hash[key][k] = v.is_a?(BaseModel) ? v.to_hash : v
|
47
|
-
end
|
48
|
-
else
|
49
|
-
hash[key] = value.is_a?(BaseModel) ? value.to_hash : value
|
50
|
-
end
|
51
|
-
end
|
52
|
-
end
|
53
|
-
hash
|
54
|
-
end
|
55
|
-
|
56
|
-
# Returns a JSON representation of the curent object.
|
57
|
-
def to_json(options = {})
|
58
|
-
hash = to_hash
|
59
|
-
hash.to_json(options)
|
60
|
-
end
|
61
|
-
end
|
62
|
-
end
|
@@ -1,29 +0,0 @@
|
|
1
|
-
# apimatic_calculator
|
2
|
-
#
|
3
|
-
# This file was automatically generated by APIMATIC v2.0
|
4
|
-
# ( https://apimatic.io ).
|
5
|
-
|
6
|
-
module ApimaticCalculator
|
7
|
-
# Possible operators are sum, subtract, multiply, divide
|
8
|
-
class OperationTypeEnum
|
9
|
-
OPERATION_TYPE_ENUM = [
|
10
|
-
# Represents the sum operator
|
11
|
-
SUM = 'SUM'.freeze,
|
12
|
-
|
13
|
-
# Represents the subtract operator
|
14
|
-
SUBTRACT = 'SUBTRACT'.freeze,
|
15
|
-
|
16
|
-
# Represents the multiply operator
|
17
|
-
MULTIPLY = 'MULTIPLY'.freeze,
|
18
|
-
|
19
|
-
# Represents the divide operator
|
20
|
-
DIVIDE = 'DIVIDE'.freeze
|
21
|
-
].freeze
|
22
|
-
|
23
|
-
def self.validate(value)
|
24
|
-
return false if value.nil?
|
25
|
-
|
26
|
-
OPERATION_TYPE_ENUM.include?(value)
|
27
|
-
end
|
28
|
-
end
|
29
|
-
end
|
@@ -1,11 +0,0 @@
|
|
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 < CoreLibrary::DateTimeHelper
|
10
|
-
end
|
11
|
-
end
|
@@ -1,16 +0,0 @@
|
|
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 < CoreLibrary::FileWrapper
|
9
|
-
# The constructor.
|
10
|
-
# @param [File] file The file to be sent in the request.
|
11
|
-
# @param [string] content_type The content type of the provided file.
|
12
|
-
def initialize(file, content_type: 'application/octet-stream')
|
13
|
-
super
|
14
|
-
end
|
15
|
-
end
|
16
|
-
end
|
data/lib/apimatic_calculator.rb
DELETED
@@ -1,39 +0,0 @@
|
|
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
|
-
|
9
|
-
require 'apimatic_core_interfaces'
|
10
|
-
require 'apimatic_core'
|
11
|
-
require 'apimatic_faraday_client_adapter'
|
12
|
-
|
13
|
-
require_relative 'apimatic_calculator/api_helper'
|
14
|
-
require_relative 'apimatic_calculator/client'
|
15
|
-
|
16
|
-
# Utilities
|
17
|
-
require_relative 'apimatic_calculator/utilities/file_wrapper'
|
18
|
-
require_relative 'apimatic_calculator/utilities/date_time_helper'
|
19
|
-
|
20
|
-
# Http
|
21
|
-
require_relative 'apimatic_calculator/http/http_call_back'
|
22
|
-
require_relative 'apimatic_calculator/http/http_method_enum'
|
23
|
-
require_relative 'apimatic_calculator/http/http_request'
|
24
|
-
require_relative 'apimatic_calculator/http/http_response'
|
25
|
-
|
26
|
-
# Logger
|
27
|
-
|
28
|
-
# Models
|
29
|
-
require_relative 'apimatic_calculator/models/base_model'
|
30
|
-
require_relative 'apimatic_calculator/models/operation_type_enum'
|
31
|
-
|
32
|
-
# Exceptions
|
33
|
-
require_relative 'apimatic_calculator/exceptions/api_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'
|
@@ -1,29 +0,0 @@
|
|
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 '../http_response_catcher'
|
13
|
-
|
14
|
-
class ControllerTestBase < Minitest::Test
|
15
|
-
parallelize_me!
|
16
|
-
include ApimaticCalculator
|
17
|
-
include CoreLibrary
|
18
|
-
|
19
|
-
# Create configuration and set any test parameters
|
20
|
-
def create_configuration
|
21
|
-
Configuration.new(http_callback: HttpResponseCatcher.new)
|
22
|
-
end
|
23
|
-
|
24
|
-
# Initializes the base test controller
|
25
|
-
def setup_class
|
26
|
-
_config = create_configuration
|
27
|
-
@client = Client.new(config: _config)
|
28
|
-
end
|
29
|
-
end
|
@@ -1,35 +0,0 @@
|
|
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
|
-
setup_class
|
12
|
-
@controller = @client.simple_calculator
|
13
|
-
@response_catcher = @controller.http_call_back
|
14
|
-
end
|
15
|
-
|
16
|
-
# Check if multiplication works
|
17
|
-
def test_multiply
|
18
|
-
# Parameters for the API call
|
19
|
-
options = {}
|
20
|
-
options['operation'] = 'MULTIPLY'
|
21
|
-
options['x'] = 4
|
22
|
-
options['y'] = 5
|
23
|
-
|
24
|
-
# Perform the API call through the SDK function
|
25
|
-
result = @controller.get_calculate(options)
|
26
|
-
|
27
|
-
# Test response code
|
28
|
-
assert_equal(200, @response_catcher.response.status_code)
|
29
|
-
|
30
|
-
# Test whether the captured response is as we expected
|
31
|
-
refute_nil(result)
|
32
|
-
assert_equal('20', @response_catcher.response.raw_body)
|
33
|
-
end
|
34
|
-
|
35
|
-
end
|
@@ -1,19 +0,0 @@
|
|
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
|
-
|