eac_tools 0.59.0 → 0.60.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile.lock +50 -50
- data/lib/eac_tools/version.rb +1 -1
- data/sub/aranha-parsers/aranha-parsers.gemspec +2 -5
- data/sub/aranha-parsers/lib/aranha/parsers/source_address/hash_http_base.rb +13 -22
- data/sub/aranha-parsers/lib/aranha/parsers/source_address/http_get.rb +6 -12
- data/sub/aranha-parsers/lib/aranha/parsers/version.rb +1 -1
- data/sub/aranha-parsers/spec/lib/aranha/parsers/source_address/detect_sub_spec.rb +32 -0
- data/sub/aranha-parsers/spec/lib/aranha/parsers/source_address/detect_sub_spec_files/hash_http_get.source.yml +6 -0
- data/sub/aranha-parsers/spec/lib/aranha/parsers/source_address/detect_sub_spec_files/hash_http_get.target.yaml +10 -0
- data/sub/aranha-parsers/spec/lib/aranha/parsers/source_address/detect_sub_spec_files/hash_http_post.source.yml +5 -0
- data/sub/aranha-parsers/spec/lib/aranha/parsers/source_address/detect_sub_spec_files/hash_http_post.target.yaml +12 -0
- data/sub/aranha-parsers/spec/lib/aranha/parsers/source_address/detect_sub_spec_files/http_get.source.yml +1 -0
- data/sub/aranha-parsers/spec/lib/aranha/parsers/source_address/detect_sub_spec_files/http_get.target.yaml +10 -0
- data/sub/avm/avm.gemspec +1 -1
- data/sub/avm/lib/avm/data/package/build_directory.rb +28 -0
- data/sub/avm/lib/avm/data/package/dump.rb +10 -8
- data/sub/avm/lib/avm/data/package/load.rb +8 -11
- data/sub/avm/lib/avm/data/package.rb +3 -0
- data/sub/avm/lib/avm/data/unit.rb +5 -0
- data/sub/avm/lib/avm/instances/data/files_unit.rb +8 -1
- data/sub/avm/lib/avm/version.rb +1 -1
- data/sub/avm-eac_asciidoctor_base0/avm-eac_asciidoctor_base0.gemspec +1 -1
- data/sub/avm-eac_asciidoctor_base0/lib/avm/eac_asciidoctor_base0/instances/base.rb +0 -1
- data/sub/avm-eac_asciidoctor_base0/lib/avm/eac_asciidoctor_base0/instances/build/document/breadcrumbs_macro_value.rb +59 -0
- data/sub/avm-eac_asciidoctor_base0/lib/avm/eac_asciidoctor_base0/instances/build/document/child_docs_macro_value.rb +1 -3
- data/sub/avm-eac_asciidoctor_base0/lib/avm/eac_asciidoctor_base0/instances/build/document/header_lines.rb +7 -1
- data/sub/avm-eac_asciidoctor_base0/lib/avm/eac_asciidoctor_base0/instances/build/document.rb +20 -1
- data/sub/avm-eac_asciidoctor_base0/lib/avm/eac_asciidoctor_base0/version.rb +1 -1
- data/sub/avm-eac_asciidoctor_base0/spec/lib/avm/eac_asciidoctor_base0/instances/build/document_spec.rb +58 -18
- data/sub/avm-eac_asciidoctor_base0/spec/lib/avm/eac_asciidoctor_base0/instances/build/document_spec_files/pre_processed_root_body.adoc +7 -2
- data/sub/avm-eac_asciidoctor_base0/spec/lib/avm/eac_asciidoctor_base0/instances/build_spec.rb +4 -20
- data/sub/avm-eac_asciidoctor_base0/spec/lib/avm/eac_asciidoctor_base0/sources/base_spec.rb +1 -6
- data/sub/avm-eac_asciidoctor_base0/spec/spec_helper/eac_asciidoctor_base0_stubs.rb +55 -0
- data/sub/avm-eac_asciidoctor_base0/spec/spec_helper.rb +3 -0
- data/sub/avm-eac_latex_base0/avm-eac_latex_base0.gemspec +3 -3
- data/sub/avm-eac_latex_base0/lib/avm/eac_latex_base0/instances/base.rb +0 -1
- data/sub/avm-eac_latex_base0/lib/avm/eac_latex_base0/version.rb +1 -1
- data/sub/avm-eac_php_base0/avm-eac_php_base0.gemspec +3 -3
- data/sub/avm-eac_php_base0/lib/avm/eac_php_base0/instances/base.rb +0 -1
- data/sub/avm-eac_php_base0/lib/avm/eac_php_base0/version.rb +1 -1
- data/sub/avm-eac_postgresql_base0/avm-eac_postgresql_base0.gemspec +2 -2
- data/sub/avm-eac_postgresql_base0/lib/avm/eac_postgresql_base0/instance/data_unit.rb +1 -1
- data/sub/avm-eac_postgresql_base0/lib/avm/eac_postgresql_base0/version.rb +1 -1
- data/sub/avm-eac_rails_base0/avm-eac_rails_base0.gemspec +1 -1
- data/sub/avm-eac_rails_base0/lib/avm/eac_rails_base0/instances/base.rb +11 -1
- data/sub/avm-eac_rails_base0/lib/avm/eac_rails_base0/version.rb +1 -1
- data/sub/avm-eac_rails_base1/avm-eac_rails_base1.gemspec +2 -2
- data/sub/avm-eac_rails_base1/lib/avm/eac_rails_base1/instances/base.rb +5 -0
- data/sub/avm-eac_rails_base1/lib/avm/eac_rails_base1/version.rb +1 -1
- data/sub/avm-eac_redmine_base0/avm-eac_redmine_base0.gemspec +2 -2
- data/sub/avm-eac_redmine_base0/lib/avm/eac_redmine_base0/instances/base.rb +5 -4
- data/sub/avm-eac_redmine_base0/lib/avm/eac_redmine_base0/version.rb +1 -1
- data/sub/avm-eac_webapp_base0/avm-eac_webapp_base0.gemspec +2 -2
- data/sub/avm-eac_webapp_base0/lib/avm/eac_webapp_base0/instances/base.rb +7 -12
- data/sub/avm-eac_webapp_base0/lib/avm/eac_webapp_base0/instances/deploy/{file_unit.rb → setup_files_unit.rb} +12 -3
- data/sub/avm-eac_webapp_base0/lib/avm/eac_webapp_base0/instances/deploy.rb +3 -4
- data/sub/avm-eac_webapp_base0/lib/avm/eac_webapp_base0/instances/runners/data/load.rb +2 -1
- data/sub/avm-eac_webapp_base0/lib/avm/eac_webapp_base0/version.rb +1 -1
- data/sub/avm-eac_wordpress_base0/avm-eac_wordpress_base0.gemspec +3 -3
- data/sub/avm-eac_wordpress_base0/lib/avm/eac_wordpress_base0/instances/base.rb +19 -1
- data/sub/avm-eac_wordpress_base0/lib/avm/eac_wordpress_base0/version.rb +1 -1
- metadata +55 -22
- data/sub/avm-eac_redmine_base0/lib/avm/eac_redmine_base0/instances/data_package.rb +0 -23
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: caa729c8c9185c74f20a11fa6c623e6269086f4b0b0afec40c60bcbaf638ff44
|
4
|
+
data.tar.gz: ea102dff8ac8f9a6ac3980e83b3167824414eec05e5af59738132b9af1b44f74
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 65027ae7f693a5b430cdfc0d1a904636d291f498eb8ecb96a4cc513b7205c4b64c0b8c16201d1045135f812586f7dded38985a62448ebbdabe33b4eb49a065b1
|
7
|
+
data.tar.gz: a75f1adcac0a950ea748418a5f8be220906c1c24f620826b1024e7d8f90bc36732ae0b2e4e8da5bc1c118aa072bdb40e0a2b697e55b506c2c1516ef75f88a97c
|
data/Gemfile.lock
CHANGED
@@ -1,21 +1,21 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
eac_tools (0.
|
5
|
-
avm (~> 0.
|
6
|
-
avm-eac_asciidoctor_base0 (~> 0.
|
4
|
+
eac_tools (0.60.1)
|
5
|
+
avm (~> 0.67)
|
6
|
+
avm-eac_asciidoctor_base0 (~> 0.18, >= 0.18.1)
|
7
7
|
avm-eac_generic_base0 (~> 0.12)
|
8
|
-
avm-eac_latex_base0 (~> 0.3)
|
9
|
-
avm-eac_php_base0 (~> 0.4, >= 0.4.
|
10
|
-
avm-eac_postgresql_base0 (~> 0.2, >= 0.2.
|
8
|
+
avm-eac_latex_base0 (~> 0.3, >= 0.3.1)
|
9
|
+
avm-eac_php_base0 (~> 0.4, >= 0.4.2)
|
10
|
+
avm-eac_postgresql_base0 (~> 0.2, >= 0.2.4)
|
11
11
|
avm-eac_python_base0 (~> 0.2, >= 0.2.1)
|
12
|
-
avm-eac_rails_base0 (~> 0.10)
|
13
|
-
avm-eac_rails_base1 (~> 0.8, >= 0.8.
|
14
|
-
avm-eac_redmine_base0 (~> 0.19)
|
12
|
+
avm-eac_rails_base0 (~> 0.10, >= 0.10.1)
|
13
|
+
avm-eac_rails_base1 (~> 0.8, >= 0.8.3)
|
14
|
+
avm-eac_redmine_base0 (~> 0.19, >= 0.19.1)
|
15
15
|
avm-eac_redmine_plugin_base0 (~> 0.4)
|
16
16
|
avm-eac_ruby_base1 (~> 0.30, >= 0.30.1)
|
17
|
-
avm-eac_webapp_base0 (~> 0.
|
18
|
-
avm-eac_wordpress_base0 (~> 0.3)
|
17
|
+
avm-eac_webapp_base0 (~> 0.15)
|
18
|
+
avm-eac_wordpress_base0 (~> 0.3, >= 0.3.1)
|
19
19
|
avm-git (~> 0.13, >= 0.13.1)
|
20
20
|
avm-tools (~> 0.145, >= 0.145.1)
|
21
21
|
eac_ruby_utils (~> 0.112)
|
@@ -23,23 +23,20 @@ PATH
|
|
23
23
|
PATH
|
24
24
|
remote: sub/aranha-parsers
|
25
25
|
specs:
|
26
|
-
aranha-parsers (0.17.
|
26
|
+
aranha-parsers (0.17.1)
|
27
27
|
activesupport (>= 4.0.0)
|
28
|
-
addressable (~> 2.8, >= 2.8.
|
28
|
+
addressable (~> 2.8, >= 2.8.3)
|
29
|
+
eac_envs-http (~> 0.3)
|
29
30
|
eac_ruby_utils (~> 0.112)
|
30
|
-
faraday (~> 2.7, >= 2.7.4)
|
31
|
-
faraday-follow_redirects (~> 0.3)
|
32
|
-
faraday-gzip (~> 0.1)
|
33
|
-
faraday-retry (~> 2.1)
|
34
31
|
nokogiri (~> 1.14, >= 1.14.2)
|
35
32
|
ofx-parser (~> 1.1)
|
36
33
|
|
37
34
|
PATH
|
38
35
|
remote: sub/avm-eac_asciidoctor_base0
|
39
36
|
specs:
|
40
|
-
avm-eac_asciidoctor_base0 (0.
|
37
|
+
avm-eac_asciidoctor_base0 (0.18.1)
|
41
38
|
asciidoctor (~> 2.0, >= 2.0.18)
|
42
|
-
avm-eac_webapp_base0 (~> 0.
|
39
|
+
avm-eac_webapp_base0 (~> 0.15)
|
43
40
|
eac_ruby_utils (~> 0.112)
|
44
41
|
os (~> 1.1, >= 1.1.4)
|
45
42
|
rouge (~> 3.30)
|
@@ -54,25 +51,25 @@ PATH
|
|
54
51
|
PATH
|
55
52
|
remote: sub/avm-eac_latex_base0
|
56
53
|
specs:
|
57
|
-
avm-eac_latex_base0 (0.3.
|
58
|
-
avm (~> 0.
|
59
|
-
avm-eac_webapp_base0 (~> 0.
|
60
|
-
eac_ruby_utils (~> 0.
|
54
|
+
avm-eac_latex_base0 (0.3.1)
|
55
|
+
avm (~> 0.67)
|
56
|
+
avm-eac_webapp_base0 (~> 0.15)
|
57
|
+
eac_ruby_utils (~> 0.112)
|
61
58
|
|
62
59
|
PATH
|
63
60
|
remote: sub/avm-eac_php_base0
|
64
61
|
specs:
|
65
|
-
avm-eac_php_base0 (0.4.
|
66
|
-
avm-eac_generic_base0 (~> 0.
|
67
|
-
avm-eac_webapp_base0 (~> 0.
|
68
|
-
eac_ruby_utils (~> 0.
|
62
|
+
avm-eac_php_base0 (0.4.2)
|
63
|
+
avm-eac_generic_base0 (~> 0.12)
|
64
|
+
avm-eac_webapp_base0 (~> 0.15)
|
65
|
+
eac_ruby_utils (~> 0.112)
|
69
66
|
|
70
67
|
PATH
|
71
68
|
remote: sub/avm-eac_postgresql_base0
|
72
69
|
specs:
|
73
|
-
avm-eac_postgresql_base0 (0.2.
|
74
|
-
avm (~> 0.
|
75
|
-
eac_ruby_utils (~> 0.
|
70
|
+
avm-eac_postgresql_base0 (0.2.4)
|
71
|
+
avm (~> 0.66, >= 0.66.1)
|
72
|
+
eac_ruby_utils (~> 0.112)
|
76
73
|
|
77
74
|
PATH
|
78
75
|
remote: sub/avm-eac_python_base0
|
@@ -84,26 +81,26 @@ PATH
|
|
84
81
|
PATH
|
85
82
|
remote: sub/avm-eac_rails_base0
|
86
83
|
specs:
|
87
|
-
avm-eac_rails_base0 (0.10.
|
88
|
-
avm-eac_rails_base1 (~> 0.8, >= 0.8.
|
84
|
+
avm-eac_rails_base0 (0.10.1)
|
85
|
+
avm-eac_rails_base1 (~> 0.8, >= 0.8.3)
|
89
86
|
eac_ruby_utils (~> 0.112)
|
90
87
|
|
91
88
|
PATH
|
92
89
|
remote: sub/avm-eac_rails_base1
|
93
90
|
specs:
|
94
|
-
avm-eac_rails_base1 (0.8.
|
95
|
-
avm (~> 0.
|
91
|
+
avm-eac_rails_base1 (0.8.3)
|
92
|
+
avm (~> 0.67)
|
96
93
|
avm-eac_ruby_base1 (~> 0.30, >= 0.30.1)
|
97
|
-
avm-eac_webapp_base0 (~> 0.
|
94
|
+
avm-eac_webapp_base0 (~> 0.15)
|
98
95
|
eac_ruby_utils (~> 0.112)
|
99
96
|
|
100
97
|
PATH
|
101
98
|
remote: sub/avm-eac_redmine_base0
|
102
99
|
specs:
|
103
|
-
avm-eac_redmine_base0 (0.19.
|
104
|
-
avm (~> 0.
|
100
|
+
avm-eac_redmine_base0 (0.19.1)
|
101
|
+
avm (~> 0.67)
|
105
102
|
avm-eac_generic_base0 (~> 0.12)
|
106
|
-
avm-eac_rails_base1 (~> 0.8, >= 0.8.
|
103
|
+
avm-eac_rails_base1 (~> 0.8, >= 0.8.3)
|
107
104
|
avm-eac_ubuntu_base0 (~> 0.4, >= 0.4.1)
|
108
105
|
curb (~> 0.9, >= 0.9.11)
|
109
106
|
eac_fs (~> 0.16)
|
@@ -137,10 +134,10 @@ PATH
|
|
137
134
|
PATH
|
138
135
|
remote: sub/avm-eac_webapp_base0
|
139
136
|
specs:
|
140
|
-
avm-eac_webapp_base0 (0.
|
141
|
-
avm (~> 0.
|
137
|
+
avm-eac_webapp_base0 (0.15.0)
|
138
|
+
avm (~> 0.67)
|
142
139
|
avm-eac_generic_base0 (~> 0.12)
|
143
|
-
avm-eac_postgresql_base0 (~> 0.2, >= 0.2.
|
140
|
+
avm-eac_postgresql_base0 (~> 0.2, >= 0.2.4)
|
144
141
|
avm-eac_ubuntu_base0 (~> 0.4, >= 0.4.1)
|
145
142
|
avm-files (~> 0.6)
|
146
143
|
eac_ruby_utils (~> 0.112)
|
@@ -148,10 +145,10 @@ PATH
|
|
148
145
|
PATH
|
149
146
|
remote: sub/avm-eac_wordpress_base0
|
150
147
|
specs:
|
151
|
-
avm-eac_wordpress_base0 (0.3.
|
152
|
-
avm (~> 0.
|
153
|
-
avm-eac_webapp_base0 (~> 0.
|
154
|
-
eac_ruby_utils (~> 0.
|
148
|
+
avm-eac_wordpress_base0 (0.3.1)
|
149
|
+
avm (~> 0.67)
|
150
|
+
avm-eac_webapp_base0 (~> 0.15)
|
151
|
+
eac_ruby_utils (~> 0.112)
|
155
152
|
|
156
153
|
PATH
|
157
154
|
remote: sub/avm-files
|
@@ -194,8 +191,8 @@ PATH
|
|
194
191
|
PATH
|
195
192
|
remote: sub/avm
|
196
193
|
specs:
|
197
|
-
avm (0.
|
198
|
-
aranha-parsers (~> 0.17)
|
194
|
+
avm (0.67.0)
|
195
|
+
aranha-parsers (~> 0.17, >= 0.17.1)
|
199
196
|
eac_cli (~> 0.30, >= 0.30.1)
|
200
197
|
eac_config (~> 0.12)
|
201
198
|
eac_docker (~> 0.7)
|
@@ -272,7 +269,7 @@ GEM
|
|
272
269
|
minitest (>= 5.1)
|
273
270
|
tzinfo (~> 2.0)
|
274
271
|
zeitwerk (~> 2.3)
|
275
|
-
addressable (2.8.
|
272
|
+
addressable (2.8.4)
|
276
273
|
public_suffix (>= 2.0.2, < 6.0)
|
277
274
|
asciidoctor (2.0.18)
|
278
275
|
ast (2.4.2)
|
@@ -283,11 +280,14 @@ GEM
|
|
283
280
|
parslet (~> 2.0)
|
284
281
|
curb (0.9.11)
|
285
282
|
diff-lcs (1.5.0)
|
286
|
-
eac_envs-http (0.
|
283
|
+
eac_envs-http (0.3.0)
|
287
284
|
eac_fs (~> 0.16)
|
288
285
|
eac_ruby_utils (~> 0.112)
|
289
286
|
faraday (~> 2.7, >= 2.7.4)
|
287
|
+
faraday-follow_redirects (~> 0.3)
|
288
|
+
faraday-gzip (~> 0.1)
|
290
289
|
faraday-multipart (~> 1.0, >= 1.0.4)
|
290
|
+
faraday-retry (~> 2.1)
|
291
291
|
eac_rest (0.7.3)
|
292
292
|
eac_envs-http (~> 0.2)
|
293
293
|
eac_fs (~> 0.16)
|
@@ -327,7 +327,7 @@ GEM
|
|
327
327
|
minitest (5.18.0)
|
328
328
|
multipart-post (2.3.0)
|
329
329
|
net-ssh (4.2.0)
|
330
|
-
nokogiri (1.14.
|
330
|
+
nokogiri (1.14.3-x86_64-linux)
|
331
331
|
racc (~> 1.4)
|
332
332
|
ofx-parser (1.1.0)
|
333
333
|
hpricot (>= 0.6)
|
data/lib/eac_tools/version.rb
CHANGED
@@ -13,12 +13,9 @@ Gem::Specification.new do |s|
|
|
13
13
|
s.files = Dir['{lib}/**/*']
|
14
14
|
|
15
15
|
s.add_dependency 'activesupport', '>= 4.0.0'
|
16
|
-
s.add_dependency 'addressable', '~> 2.8', '>= 2.8.
|
16
|
+
s.add_dependency 'addressable', '~> 2.8', '>= 2.8.3'
|
17
|
+
s.add_dependency 'eac_envs-http', '~> 0.3'
|
17
18
|
s.add_dependency 'eac_ruby_utils', '~> 0.112'
|
18
|
-
s.add_dependency 'faraday', '~> 2.7', '>= 2.7.4'
|
19
|
-
s.add_dependency 'faraday-follow_redirects', '~> 0.3'
|
20
|
-
s.add_dependency 'faraday-gzip', '~> 0.1'
|
21
|
-
s.add_dependency 'faraday-retry', '~> 2.1'
|
22
19
|
s.add_dependency 'nokogiri', '~> 1.14', '>= 1.14.2'
|
23
20
|
s.add_dependency 'ofx-parser', '~> 1.1'
|
24
21
|
|
@@ -2,10 +2,9 @@
|
|
2
2
|
|
3
3
|
require 'aranha/parsers/source_address/fetch_content_error'
|
4
4
|
require 'aranha/parsers/source_address/hash_http_base'
|
5
|
+
require 'eac_envs/http/error'
|
6
|
+
require 'eac_envs/http/request'
|
5
7
|
require 'eac_ruby_utils/core_ext'
|
6
|
-
require 'faraday'
|
7
|
-
require 'faraday/follow_redirects'
|
8
|
-
require 'faraday/gzip'
|
9
8
|
require 'yaml'
|
10
9
|
|
11
10
|
module Aranha
|
@@ -55,21 +54,11 @@ module Aranha
|
|
55
54
|
source.to_yaml
|
56
55
|
end
|
57
56
|
|
58
|
-
# @return [Faraday]
|
59
|
-
def faraday_connection
|
60
|
-
::Faraday.new do |f|
|
61
|
-
f.request :gzip
|
62
|
-
f.response :follow_redirects if follow_redirect?
|
63
|
-
end
|
64
|
-
end
|
65
|
-
|
66
57
|
def content
|
67
|
-
|
68
|
-
|
69
|
-
|
70
|
-
raise ::Aranha::Parsers::SourceAddress::FetchContentError.
|
71
|
-
"Get #{url} returned #{req.status.to_i}", req
|
72
|
-
)
|
58
|
+
request = http_request
|
59
|
+
request.response.body_str
|
60
|
+
rescue ::EacEnvs::Http::Error => e
|
61
|
+
raise ::Aranha::Parsers::SourceAddress::FetchContentError, e.message, request
|
73
62
|
end
|
74
63
|
|
75
64
|
def param(key, default_value)
|
@@ -82,11 +71,13 @@ module Aranha
|
|
82
71
|
|
83
72
|
private
|
84
73
|
|
85
|
-
|
86
|
-
|
87
|
-
|
88
|
-
|
89
|
-
|
74
|
+
# @return [EacEnvs::Http::Request]
|
75
|
+
def http_request
|
76
|
+
r = ::EacEnvs::Http::Request.new.verb(self.class.http_method).url(url)
|
77
|
+
r = headers.if_present(r) { |v| r.headers(v) }
|
78
|
+
r = body.if_present(r) { |v| r.body(v) }
|
79
|
+
r = r.follow_redirect(true) if follow_redirect?
|
80
|
+
r
|
90
81
|
end
|
91
82
|
end
|
92
83
|
end
|
@@ -2,8 +2,8 @@
|
|
2
2
|
|
3
3
|
require 'addressable'
|
4
4
|
require 'aranha/parsers/source_address/fetch_content_error'
|
5
|
-
require '
|
6
|
-
require '
|
5
|
+
require 'eac_envs/http/error'
|
6
|
+
require 'eac_envs/http/request'
|
7
7
|
|
8
8
|
module Aranha
|
9
9
|
module Parsers
|
@@ -39,16 +39,10 @@ module Aranha
|
|
39
39
|
end
|
40
40
|
|
41
41
|
def content
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
c = conn.get(url)
|
47
|
-
return c.body if c.status == 200
|
48
|
-
|
49
|
-
raise ::Aranha::Parsers::SourceAddress::FetchContentError.new(
|
50
|
-
"Get #{url} returned #{c.status.to_i}", c
|
51
|
-
)
|
42
|
+
request = ::EacEnvs::Http::Request.new.url(url).retry(true).follow_redirect(true)
|
43
|
+
request.response.body_str
|
44
|
+
rescue ::EacEnvs::Http::Error => e
|
45
|
+
raise ::Aranha::Parsers::SourceAddress::FetchContentError, e.message, request
|
52
46
|
end
|
53
47
|
|
54
48
|
def serialize
|
@@ -0,0 +1,32 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require 'aranha/parsers/source_address'
|
4
|
+
require 'eac_envs/http/rspec/echo_server'
|
5
|
+
require 'eac_ruby_utils/yaml'
|
6
|
+
|
7
|
+
::RSpec.describe ::Aranha::Parsers::SourceAddress do
|
8
|
+
describe '#detect_sub' do
|
9
|
+
let(:http_server) { ::EacEnvs::Http::Rspec::EchoServer.http }
|
10
|
+
|
11
|
+
around { |example| http_server.on_active(&example) }
|
12
|
+
|
13
|
+
include_examples 'source_target_fixtures', __FILE__
|
14
|
+
|
15
|
+
def source_data(source_file)
|
16
|
+
source = ::EacRubyUtils::Yaml.load_file(source_file)
|
17
|
+
url = source_url_get(source)
|
18
|
+
%w[scheme host port].each { |attr| url.send("#{attr}=", http_server.root_url.send(attr)) }
|
19
|
+
if source.is_a?(::Hash)
|
20
|
+
source[:url] = url.to_s
|
21
|
+
else
|
22
|
+
source = url.to_s
|
23
|
+
end
|
24
|
+
::JSON.parse(described_class.detect_sub(source).content)
|
25
|
+
end
|
26
|
+
|
27
|
+
# @return [Addressable::URI]
|
28
|
+
def source_url_get(source)
|
29
|
+
(source.is_a?(::Hash) ? source.fetch(:url) : source).to_uri
|
30
|
+
end
|
31
|
+
end
|
32
|
+
end
|
@@ -0,0 +1 @@
|
|
1
|
+
--- http://postdata.net
|
data/sub/avm/avm.gemspec
CHANGED
@@ -12,7 +12,7 @@ Gem::Specification.new do |s|
|
|
12
12
|
|
13
13
|
s.files = Dir['{lib}/**/*']
|
14
14
|
|
15
|
-
s.add_dependency 'aranha-parsers', '~> 0.17'
|
15
|
+
s.add_dependency 'aranha-parsers', '~> 0.17', '>= 0.17.1'
|
16
16
|
s.add_dependency 'eac_cli', '~> 0.30', '>= 0.30.1'
|
17
17
|
s.add_dependency 'eac_config', '~> 0.12'
|
18
18
|
s.add_dependency 'eac_docker', '~> 0.7'
|
@@ -0,0 +1,28 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require 'eac_ruby_utils/fs/temp'
|
4
|
+
require 'eac_ruby_utils/core_ext'
|
5
|
+
|
6
|
+
module Avm
|
7
|
+
module Data
|
8
|
+
class Package
|
9
|
+
module BuildDirectory
|
10
|
+
private
|
11
|
+
|
12
|
+
attr_writer :build_directory
|
13
|
+
|
14
|
+
# @return [EacRubyUtils::Fs::Temp::Directory]
|
15
|
+
def build_directory
|
16
|
+
@build_directory || raise('@build_directory is blank')
|
17
|
+
end
|
18
|
+
|
19
|
+
def on_build_directory
|
20
|
+
::EacRubyUtils::Fs::Temp.on_directory do |directory|
|
21
|
+
self.build_directory = directory
|
22
|
+
yield
|
23
|
+
end
|
24
|
+
end
|
25
|
+
end
|
26
|
+
end
|
27
|
+
end
|
28
|
+
end
|
@@ -1,5 +1,6 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
|
+
require 'avm/data/package/build_directory'
|
3
4
|
require 'avm/data/rotate'
|
4
5
|
require 'eac_ruby_utils/core_ext'
|
5
6
|
require 'minitar'
|
@@ -10,6 +11,7 @@ module Avm
|
|
10
11
|
class Dump
|
11
12
|
enable_speaker
|
12
13
|
enable_listable
|
14
|
+
include ::Avm::Data::Package::BuildDirectory
|
13
15
|
|
14
16
|
DEFAULT_EXPIRE_TIME = 1.day
|
15
17
|
DEFAULT_FILE_EXTENSION = '.tar'
|
@@ -45,8 +47,10 @@ module Avm
|
|
45
47
|
def run
|
46
48
|
raise "Cannot run: #{cannot_run_reason}" unless runnable?
|
47
49
|
|
48
|
-
|
49
|
-
|
50
|
+
package_file = on_build_directory do
|
51
|
+
dump_units_to_build_directory
|
52
|
+
create_package_file
|
53
|
+
end
|
50
54
|
rotate
|
51
55
|
move_download_to_final_dest(package_file)
|
52
56
|
end
|
@@ -100,15 +104,13 @@ module Avm
|
|
100
104
|
end
|
101
105
|
|
102
106
|
def dump_units_to_build_directory
|
103
|
-
|
104
|
-
package.dump_units_to_directory(dir)
|
105
|
-
dir
|
107
|
+
package.dump_units_to_directory(build_directory)
|
106
108
|
end
|
107
109
|
|
108
|
-
def create_package_file
|
110
|
+
def create_package_file
|
109
111
|
package_path = new_build_path
|
110
|
-
infom "Creating package \"#{package_path}\" from \"#{
|
111
|
-
Dir.chdir(
|
112
|
+
infom "Creating package \"#{package_path}\" from \"#{build_directory}\"..."
|
113
|
+
::Dir.chdir(build_directory.to_path) do
|
112
114
|
::Minitar.pack('.', File.open(::File.expand_path(package_path), 'wb'))
|
113
115
|
end
|
114
116
|
package_path
|
@@ -1,5 +1,6 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
|
+
require 'avm/data/package/build_directory'
|
3
4
|
require 'eac_ruby_utils/core_ext'
|
4
5
|
require 'minitar'
|
5
6
|
|
@@ -8,13 +9,9 @@ module Avm
|
|
8
9
|
class Package
|
9
10
|
class Load
|
10
11
|
enable_speaker
|
12
|
+
include ::Avm::Data::Package::BuildDirectory
|
11
13
|
|
12
|
-
|
13
|
-
|
14
|
-
def initialize(package, data_file_path)
|
15
|
-
@package = package
|
16
|
-
@data_file_path = data_file_path
|
17
|
-
end
|
14
|
+
common_constructor :package, :data_file_path
|
18
15
|
|
19
16
|
def runnable?
|
20
17
|
cannot_run_reason.blank?
|
@@ -29,8 +26,10 @@ module Avm
|
|
29
26
|
def run
|
30
27
|
raise "Cannot run: #{cannot_run_reason}" unless runnable?
|
31
28
|
|
32
|
-
|
33
|
-
|
29
|
+
on_build_directory do
|
30
|
+
extract_packages_to_build_directory
|
31
|
+
package.load_units_from_directory(build_directory)
|
32
|
+
end
|
34
33
|
end
|
35
34
|
|
36
35
|
def data_file_exist?
|
@@ -38,9 +37,7 @@ module Avm
|
|
38
37
|
end
|
39
38
|
|
40
39
|
def extract_packages_to_build_directory
|
41
|
-
|
42
|
-
::Minitar.unpack(data_file_path, dir)
|
43
|
-
dir
|
40
|
+
::Minitar.unpack(data_file_path, build_directory.to_path)
|
44
41
|
end
|
45
42
|
end
|
46
43
|
end
|
@@ -39,10 +39,17 @@ module Avm
|
|
39
39
|
instance_command('find', files_path, '-mindepth', 1, '-delete').execute!
|
40
40
|
end
|
41
41
|
|
42
|
+
# @return [Struct(:key, :subpath), nil]
|
43
|
+
def installation_files_data
|
44
|
+
return nil unless fs_path_subpath.relative?
|
45
|
+
|
46
|
+
::Struct.new(:key, :subpath).new(fs_path_subpath.basename.to_path, fs_path_subpath)
|
47
|
+
end
|
48
|
+
|
42
49
|
# @return [EacRubyUtils::Envs::Command]
|
43
50
|
def instance_command(*args)
|
44
51
|
args = ['sudo', '-Hu', sudo_user] + args if sudo_user.present?
|
45
|
-
instance.host_env.command(*args)
|
52
|
+
instance.host_env.command(*args).chdir('/')
|
46
53
|
end
|
47
54
|
|
48
55
|
# @return [String, nil]
|
data/sub/avm/lib/avm/version.rb
CHANGED
@@ -13,7 +13,7 @@ Gem::Specification.new do |s|
|
|
13
13
|
s.files = Dir['{lib,template}/**/*']
|
14
14
|
|
15
15
|
s.add_dependency 'asciidoctor', '~> 2.0', '>= 2.0.18'
|
16
|
-
s.add_dependency 'avm-eac_webapp_base0', '~> 0.
|
16
|
+
s.add_dependency 'avm-eac_webapp_base0', '~> 0.15'
|
17
17
|
s.add_dependency 'eac_ruby_utils', '~> 0.112'
|
18
18
|
s.add_dependency 'os', '~> 1.1', '>= 1.1.4'
|
19
19
|
s.add_dependency 'rouge', '~> 3.30'
|
@@ -9,7 +9,6 @@ module Avm
|
|
9
9
|
module EacAsciidoctorBase0
|
10
10
|
module Instances
|
11
11
|
class Base < ::Avm::EacWebappBase0::Instances::Base
|
12
|
-
FILES_UNITS = {}.freeze
|
13
12
|
AUTHOR_EMAIL_ENTRY_PATH = 'install.email'
|
14
13
|
AUTHOR_NAME_ENTRY_PATH = 'install.name'
|
15
14
|
AUTHOR_NAME_INITIALS_ENTRY_PATH = 'install.name_initials'
|