test_joska 1.1.9 → 1.2.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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 7685da7b1cc5d1948d0004a15d002a0b0805c6942884828b08e95049504410a9
4
- data.tar.gz: 390cc69bc0384d34a32fe5e856c81b3821d70e902aa1126f04af849b7d64295f
3
+ metadata.gz: bd32319caa01c2a28db076e38b41da9e4b0c45750b2c90ae50ac1574cc3edda7
4
+ data.tar.gz: e041a9dce6de356bab78b11a82903d1bb23f44d85f67c6dc75459d54cd89b772
5
5
  SHA512:
6
- metadata.gz: fdce034f579003cc95736a0e2a4f163bae6e98e30f0af3cbfdcdae3b46ca27d957469a502da42484382d53d63dd6bba13dd85117d3c87c206725234c132e292b
7
- data.tar.gz: f844c4e462362f4ee0a806aeab0b992e3a21825eb0000d18c2cd22d5e79e19313a971186ff7bc826a86c9f07677159a5aca6157691a35648474cd6a1a72e09d1
6
+ metadata.gz: 6d316c15b37d4bd5a9277c0d720e0d2321f99887d8c2ddae6099084bc5b2062c743f87750081ec4ed2a9dc48a732b04573533f8e37f193148ab51007cd1d7930
7
+ data.tar.gz: 28da79c8af0afd68cb7ff2ace63458e308be2415494797e3881586b9b5d6e30b38e676e3344375715d889ea3bccf901060649e79a919f4cd615cb600265e5cc6
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- test_joska (1.1.9)
4
+ test_joska (1.2.0)
5
5
 
6
6
  GEM
7
7
  remote: https://rubygems.org/
@@ -106,6 +106,40 @@ module TestJoska
106
106
  @@url_log = ""
107
107
 
108
108
  end
109
+
110
+ def customRequest(method, product, path, query, payload=nil, header=nil, endpoint=nil)
111
+
112
+ endpoint = @@standard_endpoint if !endpoint
113
+
114
+ header = standard_header if !header
115
+
116
+ url = "#{URL[product]["base"][endpoint]}#{path}"
117
+
118
+ if query
119
+
120
+ query.keys.each do |key| url = "#{url}#{key}=#{query[key]}&" end
121
+
122
+ url.chomp('&')
123
+
124
+ end
125
+
126
+ res = ""
127
+
128
+ p url if @@verbose
129
+
130
+ begin
131
+
132
+ RestClient::Request.execute(method: method, url: url, headers: header, payload: payload, timeout: 90) do |response| res = response end
133
+
134
+ rescue StandardError => error
135
+
136
+ res = error
137
+
138
+ end
139
+
140
+ return res
141
+
142
+ end
109
143
 
110
144
  def request(method, product, type, details=nil, payload=nil, header=nil, endpoint=nil)
111
145
 
@@ -1,3 +1,3 @@
1
1
  module TestJoska
2
- VERSION = "1.1.9"
2
+ VERSION = "1.2.0"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: test_joska
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.1.9
4
+ version: 1.2.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Lucas Diogo Dovas