avmtrf1-tools 0.39.5 → 0.39.6
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile +0 -2
- data/lib/avmtrf1/red/helper.rb +5 -20
- data/lib/avmtrf1/red/profile.rb +5 -18
- data/lib/avmtrf1/tools/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: f3f26b0210df64425354daf7e5d9ac10dcb0aecbb51b00f9079ac5dc1ff5e8e2
|
4
|
+
data.tar.gz: 7a1ee3b449c30d1ad515d28359aaf8b8a15442bb995a6797a12bce30eba61a25
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 11a4f7ec4a34de508424eceb46f9d3358d3b9e11e1b5f0fcf9375169dc6df8a50193fdbe9891069b0b5e0adb7fa88181a0f04246774afa88e47dd19b5d96645c
|
7
|
+
data.tar.gz: 3607982ce6d014d551c92a323b308143b6b02e473fbb03dddf8c8a8768aeafade90a5a6dbae49cecef16c5037e6555651383c2b9c3a8893e1d505d7a6e3d57af
|
data/Gemfile
CHANGED
data/lib/avmtrf1/red/helper.rb
CHANGED
@@ -1,36 +1,21 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
|
-
require '
|
4
|
-
require '
|
5
|
-
require 'eac_ruby_utils/patches/module/speaker'
|
3
|
+
require 'eac_envs/http/request'
|
4
|
+
require 'eac_ruby_utils/core_ext'
|
6
5
|
require 'erb'
|
7
|
-
require 'httpclient'
|
8
6
|
require 'nokogiri'
|
9
7
|
|
10
8
|
module Avmtrf1
|
11
9
|
module Red
|
12
10
|
module Helper
|
13
|
-
|
14
|
-
|
15
|
-
included do
|
11
|
+
common_concern do
|
16
12
|
enable_speaker
|
17
13
|
end
|
18
14
|
|
19
|
-
def http_client
|
20
|
-
@http_client ||= ::HTTPClient.new
|
21
|
-
end
|
22
|
-
|
23
|
-
def check_request_result(url, result)
|
24
|
-
return if result.status == 200
|
25
|
-
|
26
|
-
raise "#{url} returned #{result.status}\n#{result.body}"
|
27
|
-
end
|
28
|
-
|
29
15
|
def post(url, *post_args)
|
30
16
|
infom "Requesting \"#{url}\""
|
31
|
-
|
32
|
-
|
33
|
-
res.body
|
17
|
+
::EacEnvs::Http::Request.new.url(url.to_s).verb(:post).body_data(post_args.first).response
|
18
|
+
.body_str_or_raise
|
34
19
|
end
|
35
20
|
|
36
21
|
def post_xml(url_suffix, xml_body)
|
data/lib/avmtrf1/red/profile.rb
CHANGED
@@ -2,13 +2,13 @@
|
|
2
2
|
|
3
3
|
require 'avmtrf1/red/client'
|
4
4
|
require 'avmtrf1/red/helper'
|
5
|
-
require 'eac_ruby_utils/
|
5
|
+
require 'eac_ruby_utils/core_ext'
|
6
6
|
|
7
7
|
module Avmtrf1
|
8
8
|
module Red
|
9
9
|
class Profile
|
10
10
|
include ::Avmtrf1::Red::Helper
|
11
|
-
|
11
|
+
enable_simple_cache
|
12
12
|
|
13
13
|
class << self
|
14
14
|
def by_ini_profile(ini_profile)
|
@@ -19,14 +19,10 @@ module Avmtrf1
|
|
19
19
|
end
|
20
20
|
end
|
21
21
|
|
22
|
-
|
23
|
-
|
22
|
+
# @!method initialize(client, metadados)
|
24
23
|
# @param client [Avmtrf1::Red::Client]
|
25
24
|
# @param metadados [Hash]
|
26
|
-
|
27
|
-
@client = client
|
28
|
-
@metadados = metadados.dup.freeze
|
29
|
-
end
|
25
|
+
common_constructor :client, :metadados
|
30
26
|
|
31
27
|
def put_file(file_path)
|
32
28
|
auth_url = client.authorization_url
|
@@ -39,16 +35,7 @@ module Avmtrf1
|
|
39
35
|
private
|
40
36
|
|
41
37
|
def put_file_request(auth_url, file_path)
|
42
|
-
post(auth_url,
|
43
|
-
end
|
44
|
-
|
45
|
-
def put_file_args(file_path)
|
46
|
-
{
|
47
|
-
body: put_file_body(file_path),
|
48
|
-
header: {
|
49
|
-
'Content-Type' => 'multipart/form-data'
|
50
|
-
}
|
51
|
-
}
|
38
|
+
post(auth_url, put_file_body(file_path))
|
52
39
|
end
|
53
40
|
|
54
41
|
def metadados_file_path_uncached
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: avmtrf1-tools
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.39.
|
4
|
+
version: 0.39.6
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Eduardo H. Bogoni
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2023-06-
|
11
|
+
date: 2023-06-23 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: aranha-selenium
|