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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: ac0a64d3ed7f56d7527f21bd3d827e504623e49dfc7beb4d0584faa538a33e26
4
- data.tar.gz: d743696b387e4bef1c0799786e84d1034eb89eb539b9bc0b4c858970eb7851db
3
+ metadata.gz: f3f26b0210df64425354daf7e5d9ac10dcb0aecbb51b00f9079ac5dc1ff5e8e2
4
+ data.tar.gz: 7a1ee3b449c30d1ad515d28359aaf8b8a15442bb995a6797a12bce30eba61a25
5
5
  SHA512:
6
- metadata.gz: 79f00f9a091a4a6392d296daaf0f3929d4e72b75d61f156a9d85fbaed0aa20a3768e178df4d9dcfdec01e29eb467e21feb0ee9b53f40bba7f8c58b54e080a654
7
- data.tar.gz: 39ba20d1d841d414b791354ff364d638ed231806db5dfd32b4d6b5faf9f37048d7594d94637f0ab333a0c92895335303f95f50776efdd833cd42c62681c5e14b
6
+ metadata.gz: 11a4f7ec4a34de508424eceb46f9d3358d3b9e11e1b5f0fcf9375169dc6df8a50193fdbe9891069b0b5e0adb7fa88181a0f04246774afa88e47dd19b5d96645c
7
+ data.tar.gz: 3607982ce6d014d551c92a323b308143b6b02e473fbb03dddf8c8a8768aeafade90a5a6dbae49cecef16c5037e6555651383c2b9c3a8893e1d505d7a6e3d57af
data/Gemfile CHANGED
@@ -8,7 +8,5 @@ group :oracle do
8
8
  gem 'ruby-oci8'
9
9
  end
10
10
 
11
- gem 'httpclient', git: 'https://github.com/livelink/httpclient.git'
12
-
13
11
  local_gemfile = ::File.join(::File.dirname(__FILE__), 'Gemfile.local')
14
12
  eval_gemfile local_gemfile if ::File.exist?(local_gemfile)
@@ -1,36 +1,21 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- require 'active_support/concern'
4
- require 'active_support/core_ext/string'
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
- extend ::ActiveSupport::Concern
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
- res = http_client.post(url, *post_args)
32
- check_request_result(url, res)
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)
@@ -2,13 +2,13 @@
2
2
 
3
3
  require 'avmtrf1/red/client'
4
4
  require 'avmtrf1/red/helper'
5
- require 'eac_ruby_utils/simple_cache'
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
- include ::EacRubyUtils::SimpleCache
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
- attr_reader :client, :metadados
23
-
22
+ # @!method initialize(client, metadados)
24
23
  # @param client [Avmtrf1::Red::Client]
25
24
  # @param metadados [Hash]
26
- def initialize(client, metadados)
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, put_file_args(file_path))
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
@@ -2,6 +2,6 @@
2
2
 
3
3
  module Avmtrf1
4
4
  module Tools
5
- VERSION = '0.39.5'
5
+ VERSION = '0.39.6'
6
6
  end
7
7
  end
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.5
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-19 00:00:00.000000000 Z
11
+ date: 2023-06-23 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: aranha-selenium