avmtrf1-tools 0.39.5 → 0.39.7

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: 3ff10204c30ec6cd792506a13db51d8fc7460eb9e86b17832596808f32f6e17d
4
+ data.tar.gz: 1ccf217dbdb39e3b5249a04a5cba1abc103cb7a9573a77823fff7be433b6f6ea
5
5
  SHA512:
6
- metadata.gz: 79f00f9a091a4a6392d296daaf0f3929d4e72b75d61f156a9d85fbaed0aa20a3768e178df4d9dcfdec01e29eb467e21feb0ee9b53f40bba7f8c58b54e080a654
7
- data.tar.gz: 39ba20d1d841d414b791354ff364d638ed231806db5dfd32b4d6b5faf9f37048d7594d94637f0ab333a0c92895335303f95f50776efdd833cd42c62681c5e14b
6
+ metadata.gz: 8bb6a402eecd5eec3a2addaa090f700b48c4bd7d95385e9661a1102429d4284f3d3715f88a67520288c8df43684b7e00fa6685d3bc6422f81feda21dd019998f
7
+ data.tar.gz: 258fd349764cb1cf8ae5f37375bb8954840a74fab6a54dc871071b2b63bfe84bb25c67d69e622728445035d52bf9522886e7d127d5ffeee992246532fbf66c5b
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)
@@ -2,6 +2,7 @@
2
2
 
3
3
  require 'eac_ruby_utils/core_ext'
4
4
  require 'avm/docker/image'
5
+ require 'avmtrf1/tools/version'
5
6
  require 'eac_templates/sources/from_all_gems'
6
7
 
7
8
  module Avmtrf1
@@ -11,6 +12,27 @@ module Avmtrf1
11
12
 
12
13
  common_constructor :registry, :platform_version
13
14
 
15
+ APT_SETUP = <<CODE
16
+ ENV DEBIAN_FRONTEND=noninteractive
17
+ RUN apt-get -y update
18
+ RUN apt-get -y dist-upgrade
19
+ CODE
20
+ DEBIAN_STRETCH_FIX_SOURCES = <<CODE
21
+ RUN echo 'deb http://security.debian.org/debian-security stable-security/updates main' > /etc/apt/sources.list
22
+ RUN echo 'deb http://archive.debian.org/debian stretch main' >> /etc/apt/sources.list
23
+ CODE
24
+ DEBIAN_STRETCH_APT_SETUP = DEBIAN_STRETCH_FIX_SOURCES + APT_SETUP
25
+
26
+ # @return [String]
27
+ def apt_setup
28
+ APT_SETUP
29
+ end
30
+
31
+ # @return [String]
32
+ def debian_stretch_apt_setup
33
+ DEBIAN_STRETCH_APT_SETUP
34
+ end
35
+
14
36
  def platform_stereotype_tag
15
37
  self.class.name.split('::')[-2].underscore.dasherize
16
38
  end
@@ -5,6 +5,10 @@ require 'avmtrf1/docker/image'
5
5
  module Avmtrf1
6
6
  module NodeJs
7
7
  class DockerImage < ::Avmtrf1::Docker::Image
8
+ # @return [String]
9
+ def apt_setup
10
+ debian_stretch_apt_setup.gsub('-y dist-upgrade', '-y --allow-unauthenticated dist-upgrade')
11
+ end
8
12
  end
9
13
  end
10
14
  end
@@ -11,7 +11,6 @@ module Avmtrf1
11
11
  enable_abstract_methods
12
12
  abstract_methods :mcrypt_install, :xdebug_pecl_package
13
13
 
14
- DEFAULT_BEFORE_CODE = ''
15
14
  GD_OPTIONS = %w[--with-gd --with-webp-dir --with-jpeg-dir --with-png-dir --with-zlib-dir
16
15
  --with-xpm-dir --with-freetype-dir].freeze
17
16
  PLATFORM_STEREOTYPE_TAG = 'php'
@@ -23,11 +22,6 @@ module Avmtrf1
23
22
  end
24
23
  end
25
24
 
26
- # @return [String]
27
- def before_code
28
- DEFAULT_BEFORE_CODE
29
- end
30
-
31
25
  # @return [String]
32
26
  def php_dist_curl_args
33
27
  '-sS "https://www.php.net/distributions/php-$PHP_VERSION.tar.gz"'
@@ -7,10 +7,6 @@ module Avmtrf1
7
7
  module Php
8
8
  module DockerImages
9
9
  class V5 < ::Avmtrf1::Php::DockerImages::Base
10
- BEFORE_CODE = <<CODE
11
- RUN echo 'deb http://security.debian.org/debian-security stable-security/updates main' > /etc/apt/sources.list
12
- RUN echo 'deb http://archive.debian.org/debian stretch main' >> /etc/apt/sources.list
13
- CODE
14
10
  MCRYPT_INSTALL = <<~CODE
15
11
  RUN docker-php-ext-install mcrypt
16
12
  CODE
@@ -28,8 +24,8 @@ RUN cd /tmp && \
28
24
  CODE
29
25
 
30
26
  # @return [String]
31
- def before_code
32
- BEFORE_CODE
27
+ def apt_setup
28
+ debian_stretch_apt_setup
33
29
  end
34
30
 
35
31
  # @return [String]
@@ -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.7'
6
6
  end
7
7
  end
@@ -1,6 +1,20 @@
1
1
  # base image
2
2
  FROM node:%%PLATFORM_VERSION%%
3
3
 
4
+ %%APT_SETUP%%
5
+
6
+ # ASDF - 0.12.0
7
+ ENV ASDF_DIR='/opt/asdf'
8
+ ENV ASDF_PACKAGE='https://github.com/asdf-vm/asdf/archive/816195d615427b033a7426a4fb4d7fac4cf2d791.tar.gz'
9
+ RUN mkdir -p "${ASDF_DIR}"
10
+ RUN wget -qO- "${ASDF_PACKAGE}" | tar -xzf - --strip-components 1 -C "${ASDF_DIR}"
11
+
12
+ # Python
13
+ ENV PYTHON_VERSION='3.6.15'
14
+ RUN "${ASDF_DIR}/bin/asdf" plugin add python
15
+ RUN "${ASDF_DIR}/bin/asdf" install python "${PYTHON_VERSION}"
16
+ RUN "${ASDF_DIR}/bin/asdf" global python "${PYTHON_VERSION}"
17
+
4
18
  # Inicializador
5
19
  RUN mkdir '/auxiliary'
6
20
  RUN mkdir '/auxiliary/eac-bash-lib'
@@ -10,6 +10,7 @@ done
10
10
  export AUX_ROOT="$( cd -P "$( dirname "$SOURCE" )" >/dev/null 2>&1 && pwd )"
11
11
 
12
12
  source "$AUX_ROOT/lib.sh"
13
+ source "${ASDF_DIR}/asdf.sh"
13
14
 
14
15
  # Caminho raiz da aplicação
15
16
  path_set 'APP_ROOT' '/' '/app'
@@ -1,11 +1,6 @@
1
1
  FROM php:%%PLATFORM_VERSION%%-apache
2
2
 
3
- %%BEFORE_CODE%%
4
-
5
- # Base ubuntu
6
- ENV DEBIAN_FRONTEND=noninteractive
7
- RUN apt-get -y update
8
- RUN apt-get -y dist-upgrade
3
+ %%APT_SETUP%%
9
4
 
10
5
  # Apache HTTP
11
6
  RUN a2enmod rewrite
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.7
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-28 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: aranha-selenium