eac_tools 0.18.0 → 0.19.0

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: baba23c169953217d7ae8fb843f6e6ba92026ea05912703fbdaa96d928e26441
4
- data.tar.gz: ba6447143ad6a2549e67d876df792093af9de18a54ca960068e7ab066d5e261d
3
+ metadata.gz: f682e3e2b625d82f32da7855fb153e206693a1c0d4c934e0bb9b16216b2f7998
4
+ data.tar.gz: 7cfa294cbdec42a2f1ad21199d2a744ccff5afc7e0c85714dd6685ee146781b4
5
5
  SHA512:
6
- metadata.gz: e4a52a8b9facf9631f73dce00eebdf34332096e7b69557d9421b5dbe24e349189f906ef5ac4bbaf3dd61d772a0f8aa095c579ef1e023af45c5616c504e865e92
7
- data.tar.gz: 28e74a110919a42cad8431eb7893c1e740768f9d4a0ef1a2a486a6cc867d6839a5907a6d122d7183c72b53e618d321f65eb331ca2bfd9810d15de15eaf2d81b1
6
+ metadata.gz: 1743063c5a1e76873664826ccfdf0fdb4c78ff668098a4ee1c8da4a8312f43b9e88694f37e0011d394045065572165376a486a9a4cdeef0538fae441f38e7df8
7
+ data.tar.gz: 592727978f8b7902f25bc4b03252871dd80ef62611feb5fd0377ae822d6b379ea0c0ae2d050920a455b38ab40625fd67805f23d95209e674f060670e48b7c4fd
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- eac_tools (0.18.0)
4
+ eac_tools (0.19.0)
5
5
  avm (~> 0.35)
6
6
  avm-eac_asciidoctor_base0 (~> 0.4)
7
7
  avm-eac_generic_base0 (~> 0.5)
@@ -10,9 +10,9 @@ PATH
10
10
  avm-eac_rails_base1 (~> 0.4, >= 0.4.2)
11
11
  avm-eac_redmine_base0 (~> 0.11)
12
12
  avm-eac_redmine_plugin_base0 (~> 0.3)
13
- avm-eac_ruby_base1 (~> 0.15)
13
+ avm-eac_ruby_base1 (~> 0.16)
14
14
  avm-eac_webapp_base0 (~> 0.3, >= 0.3.1)
15
- avm-eac_wordpress_base0 (~> 0.1)
15
+ avm-eac_wordpress_base0 (~> 0.1, >= 0.1.1)
16
16
  avm-tools (~> 0.131)
17
17
  eac_ruby_utils (~> 0.98)
18
18
 
@@ -80,7 +80,7 @@ PATH
80
80
  PATH
81
81
  remote: sub/avm-eac_ruby_base1
82
82
  specs:
83
- avm-eac_ruby_base1 (0.15.0)
83
+ avm-eac_ruby_base1 (0.16.0)
84
84
  avm (~> 0.34)
85
85
  avm-eac_generic_base0 (~> 0.2)
86
86
  eac_ruby_utils (~> 0.95, >= 0.95.1)
@@ -243,7 +243,7 @@ GEM
243
243
  eac_templates (0.3.1)
244
244
  eac_config (~> 0.5)
245
245
  eac_ruby_utils (~> 0.64)
246
- faraday (1.10.0)
246
+ faraday (1.10.1)
247
247
  faraday-em_http (~> 1.0)
248
248
  faraday-em_synchrony (~> 1.0)
249
249
  faraday-excon (~> 1.1)
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module EacTools
4
- VERSION = '0.18.0'
4
+ VERSION = '0.19.0'
5
5
  end
@@ -0,0 +1,84 @@
1
+ # frozen_string_literal: true
2
+
3
+ require 'eac_cli/core_ext'
4
+
5
+ module Avm
6
+ module EacRubyBase1
7
+ module Sources
8
+ module Runners
9
+ class Bundler
10
+ class GemfileLocal
11
+ runner_with :help do
12
+ bool_opt '-w', '--write', 'Write the Gemfile.local file.'
13
+ end
14
+
15
+ def run
16
+ start_banner
17
+ run_bundle
18
+ siblings_banner
19
+ write_gemfile_local
20
+ end
21
+
22
+ private
23
+
24
+ def gemfile_local_path
25
+ the_source.path.join('Gemfile.local')
26
+ end
27
+
28
+ def gemfile_local_content
29
+ siblings.map { |s| sibling_gemfile_local_line(s) }.join
30
+ end
31
+
32
+ def run_bundle
33
+ the_source.bundle.execute!
34
+ rescue ::RuntimeError
35
+ the_source.bundle('update').execute!
36
+ end
37
+
38
+ def sibling_gemfile_local_line(sibling)
39
+ ["gem '#{sibling.gem_name}'",
40
+ "path: ::File.expand_path('" +
41
+ sibling.path.relative_path_from(the_source.path).to_path +
42
+ "', __dir__)"].join(', ') + "\n"
43
+ end
44
+
45
+ def start_banner
46
+ runner_context.call(:source_banner)
47
+ infov 'Parent', the_source.parent
48
+ end
49
+
50
+ def siblings_banner
51
+ infov 'Siblings', siblings.count
52
+ siblings.each do |sibling|
53
+ infov ' * ', sibling.relative_path
54
+ end
55
+ end
56
+
57
+ def write_gemfile_local
58
+ return unless parsed.write?
59
+
60
+ infom "Writing #{gemfile_local_path}..."
61
+ gemfile_local_path.write(gemfile_local_content)
62
+ end
63
+
64
+ def siblings_uncached
65
+ the_source.parent.if_present([]) do |v|
66
+ v.subs.select { |sub| dependency_sub?(sub) }
67
+ end
68
+ end
69
+
70
+ def the_source
71
+ runner_context.call(:source)
72
+ end
73
+
74
+ def dependency_sub?(sub)
75
+ sub.is_a?(::Avm::EacRubyBase1::Sources::Base) &&
76
+ sub.gem_name != the_source.gem_name &&
77
+ the_source.gemfile_lock_gem_version(sub.gem_name).present?
78
+ end
79
+ end
80
+ end
81
+ end
82
+ end
83
+ end
84
+ end
@@ -2,6 +2,6 @@
2
2
 
3
3
  module Avm
4
4
  module EacRubyBase1
5
- VERSION = '0.15.0'
5
+ VERSION = '0.16.0'
6
6
  end
7
7
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: eac_tools
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.18.0
4
+ version: 0.19.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Put here the authors
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2022-08-06 00:00:00.000000000 Z
11
+ date: 2022-08-08 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: avm
@@ -140,14 +140,14 @@ dependencies:
140
140
  requirements:
141
141
  - - "~>"
142
142
  - !ruby/object:Gem::Version
143
- version: '0.15'
143
+ version: '0.16'
144
144
  type: :runtime
145
145
  prerelease: false
146
146
  version_requirements: !ruby/object:Gem::Requirement
147
147
  requirements:
148
148
  - - "~>"
149
149
  - !ruby/object:Gem::Version
150
- version: '0.15'
150
+ version: '0.16'
151
151
  - !ruby/object:Gem::Dependency
152
152
  name: avm-eac_webapp_base0
153
153
  requirement: !ruby/object:Gem::Requirement
@@ -175,6 +175,9 @@ dependencies:
175
175
  - - "~>"
176
176
  - !ruby/object:Gem::Version
177
177
  version: '0.1'
178
+ - - ">="
179
+ - !ruby/object:Gem::Version
180
+ version: 0.1.1
178
181
  type: :runtime
179
182
  prerelease: false
180
183
  version_requirements: !ruby/object:Gem::Requirement
@@ -182,6 +185,9 @@ dependencies:
182
185
  - - "~>"
183
186
  - !ruby/object:Gem::Version
184
187
  version: '0.1'
188
+ - - ">="
189
+ - !ruby/object:Gem::Version
190
+ version: 0.1.1
185
191
  - !ruby/object:Gem::Dependency
186
192
  name: avm-tools
187
193
  requirement: !ruby/object:Gem::Requirement
@@ -450,6 +456,7 @@ files:
450
456
  - sub/avm-eac_ruby_base1/lib/avm/eac_ruby_base1/sources/base/version_bump.rb
451
457
  - sub/avm-eac_ruby_base1/lib/avm/eac_ruby_base1/sources/runners.rb
452
458
  - sub/avm-eac_ruby_base1/lib/avm/eac_ruby_base1/sources/runners/bundler.rb
459
+ - sub/avm-eac_ruby_base1/lib/avm/eac_ruby_base1/sources/runners/bundler/gemfile_local.rb
453
460
  - sub/avm-eac_ruby_base1/lib/avm/eac_ruby_base1/sources/runners/bundler/incompatible.rb
454
461
  - sub/avm-eac_ruby_base1/lib/avm/eac_ruby_base1/sources/tests.rb
455
462
  - sub/avm-eac_ruby_base1/lib/avm/eac_ruby_base1/sources/tests/base.rb