eac_tools 0.13.0 → 0.14.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: 5bf2ba914845ef4487ca80e47097879d283ece113e6cbe0863a9f54920b605d7
4
- data.tar.gz: b9c45a9db9dba67f8c742bf689a1b267480c40b8312ec066dfe25aabf8f66ec6
3
+ metadata.gz: d8e33f3e6179cddcf3aaa81d8bed6e2396944fb81bc6064ebaaf2101301db2ff
4
+ data.tar.gz: 6217ef998e5b4222b90295be158905905e12573cf1d83ace772a70325de003c4
5
5
  SHA512:
6
- metadata.gz: de155498ec4b29e4391433f4fe3fb5a9509f15f92d5b4106b1e402026e7349d3887bb4b75bedf96bcb22281ba606149bd17be4ba67dad2d3bb4c741dc4f2a237
7
- data.tar.gz: 0e738279dd36f46a1bc247d71fb2165ad0b5537e7050874a3705ee3b85c0b353e490535b3e74c7d6960ac17df6c0a8ab9c5f5ad371a7de7a524ad266faae4e6c
6
+ metadata.gz: 49ab7e7819b789a1b13fb29c86c93f8b11c36f5b7d7b4ccc7e42aa62e211b5989c6f1fc5e04db2fa39266cbbb192286ad444ee55d0be1e31e7977895376418d5
7
+ data.tar.gz: 4cd10a7625697c078772c15883487e35644986a5bccaff9a06e4ad0f5467fffe82db0ab17aa404dfd3245112bf1c5f924bd247cbe361614ba5021cd0156902f0
data/Gemfile.lock CHANGED
@@ -1,13 +1,13 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- eac_tools (0.13.0)
4
+ eac_tools (0.14.0)
5
5
  avm-eac_generic_base0 (~> 0.4)
6
6
  avm-eac_rails_base0 (~> 0.6, >= 0.6.1)
7
7
  avm-eac_rails_base1 (~> 0.4, >= 0.4.2)
8
8
  avm-eac_redmine_base0 (~> 0.11)
9
9
  avm-eac_redmine_plugin_base0 (~> 0.3)
10
- avm-eac_ruby_base1 (~> 0.11)
10
+ avm-eac_ruby_base1 (~> 0.12)
11
11
  avm-tools (~> 0.127)
12
12
  eac_ruby_utils (~> 0.97)
13
13
 
@@ -57,7 +57,7 @@ PATH
57
57
  PATH
58
58
  remote: sub/avm-eac_ruby_base1
59
59
  specs:
60
- avm-eac_ruby_base1 (0.11.0)
60
+ avm-eac_ruby_base1 (0.12.0)
61
61
  avm (~> 0.26)
62
62
  avm-eac_generic_base0 (~> 0.2)
63
63
  eac_ruby_utils (~> 0.95, >= 0.95.1)
@@ -82,7 +82,7 @@ PATH
82
82
  PATH
83
83
  remote: sub/avm
84
84
  specs:
85
- avm (0.31.0)
85
+ avm (0.32.0)
86
86
  eac_cli (~> 0.27, >= 0.27.6)
87
87
  eac_config (~> 0.10)
88
88
  eac_docker (~> 0.3)
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module EacTools
4
- VERSION = '0.13.0'
4
+ VERSION = '0.14.0'
5
5
  end
@@ -6,11 +6,11 @@ module Avm
6
6
  module AutoValues
7
7
  module Admin
8
8
  def auto_admin_email
9
- inherited_entry_value(::Avm::Instances::EntryKeys::HOST_ID, 'admin.email')
9
+ inherited_entry_value(::Avm::Instances::EntryKeys::INSTALL_ID, 'admin.email')
10
10
  end
11
11
 
12
12
  def auto_admin_name
13
- inherited_entry_value(::Avm::Instances::EntryKeys::HOST_ID, 'admin.name')
13
+ inherited_entry_value(::Avm::Instances::EntryKeys::INSTALL_ID, 'admin.name')
14
14
  end
15
15
  end
16
16
  end
@@ -61,7 +61,7 @@ module Avm
61
61
  def database_auto_common(suffix)
62
62
  database_key = ::Avm::Instances::EntryKeys.const_get("database_#{suffix}".upcase)
63
63
  inherited_entry_value(::Avm::Instances::EntryKeys::DATABASE_ID, database_key) ||
64
- inherited_entry_value(::Avm::Instances::EntryKeys::HOST_ID, database_key)
64
+ inherited_entry_value(::Avm::Instances::EntryKeys::INSTALL_ID, database_key)
65
65
  end
66
66
 
67
67
  def database_port_by_system
@@ -8,29 +8,30 @@ module Avm
8
8
  module AutoValues
9
9
  module Filesystem
10
10
  def auto_fs_path
11
- inherited_entry_value(::Avm::Instances::EntryKeys::HOST_ID,
11
+ inherited_entry_value(::Avm::Instances::EntryKeys::INSTALL_ID,
12
12
  ::Avm::Instances::EntryKeys::FS_PATH) { |v| v + '/' + id }
13
13
  end
14
14
 
15
15
  def auto_data_fs_path
16
- inherited_entry_value(::Avm::Instances::EntryKeys::HOST_ID,
16
+ inherited_entry_value(::Avm::Instances::EntryKeys::INSTALL_ID,
17
17
  ::Avm::Instances::EntryKeys::DATA_FS_PATH) { |v| v + '/' + id }
18
18
  end
19
19
 
20
20
  def auto_fs_url
21
- auto_fs_url_with_ssh || auto_fs_url_without_ssh
21
+ auto_fs_url_with_install || auto_fs_url_without_install
22
22
  end
23
23
 
24
- def auto_fs_url_with_ssh
25
- read_entry_optional('ssh.url').if_present do |ssh_url|
24
+ def auto_fs_url_with_install
25
+ read_entry_optional(::Avm::Instances::EntryKeys::INSTALL_URL)
26
+ .if_present do |install_url|
26
27
  read_entry_optional('fs_path').if_present do |fs_path|
27
- "#{ssh_url}#{fs_path}"
28
+ "#{install_url}#{fs_path}"
28
29
  end
29
30
  end
30
31
  end
31
32
 
32
- def auto_fs_url_without_ssh
33
- return nil if read_entry_optional('ssh.url').present?
33
+ def auto_fs_url_without_install
34
+ return nil if read_entry_optional(::Avm::Instances::EntryKeys::INSTALL_URL).present?
34
35
 
35
36
  read_entry_optional('fs_path').if_present do |fs_path|
36
37
  "file://#{fs_path}"
@@ -12,22 +12,22 @@ module Avm
12
12
  end
13
13
 
14
14
  def auto_install_hostname
15
- inherited_entry_value(::Avm::Instances::EntryKeys::HOST_ID,
15
+ inherited_entry_value(::Avm::Instances::EntryKeys::INSTALL_ID,
16
16
  ::Avm::Instances::EntryKeys::INSTALL_HOSTNAME)
17
17
  end
18
18
 
19
19
  def auto_install_port
20
- inherited_entry_value(::Avm::Instances::EntryKeys::HOST_ID,
20
+ inherited_entry_value(::Avm::Instances::EntryKeys::INSTALL_ID,
21
21
  ::Avm::Instances::EntryKeys::INSTALL_PORT) || 22
22
22
  end
23
23
 
24
24
  def auto_install_username
25
- inherited_entry_value(::Avm::Instances::EntryKeys::HOST_ID,
25
+ inherited_entry_value(::Avm::Instances::EntryKeys::INSTALL_ID,
26
26
  ::Avm::Instances::EntryKeys::INSTALL_USERNAME)
27
27
  end
28
28
 
29
29
  def auto_install_url
30
- inherited_entry_value(::Avm::Instances::EntryKeys::HOST_ID,
30
+ inherited_entry_value(::Avm::Instances::EntryKeys::INSTALL_ID,
31
31
  ::Avm::Instances::EntryKeys::INSTALL_URL) ||
32
32
  auto_install_url_by_parts
33
33
  end
@@ -17,9 +17,9 @@ module Avm
17
17
  end
18
18
 
19
19
  def auto_mailer_id
20
- inherited_entry_value(::Avm::Instances::EntryKeys::HOST_ID,
20
+ inherited_entry_value(::Avm::Instances::EntryKeys::INSTALL_ID,
21
21
  ::Avm::Instances::EntryKeys::MAILER_ID) ||
22
- read_entry_optional(::Avm::Instances::EntryKeys::HOST_ID)
22
+ read_entry_optional(::Avm::Instances::EntryKeys::INSTALL_ID)
23
23
  end
24
24
 
25
25
  private
@@ -6,7 +6,7 @@ module Avm
6
6
  module AutoValues
7
7
  module Ruby
8
8
  def auto_ruby_version
9
- inherited_entry_value(::Avm::Instances::EntryKeys::HOST_ID, 'ruby.version')
9
+ inherited_entry_value(::Avm::Instances::EntryKeys::INSTALL_ID, 'ruby.version')
10
10
  end
11
11
  end
12
12
  end
@@ -8,12 +8,12 @@ module Avm
8
8
  module AutoValues
9
9
  module System
10
10
  def auto_system_username
11
- inherited_entry_value(::Avm::Instances::EntryKeys::HOST_ID, 'system.username') ||
12
- read_entry_optional('ssh.username')
11
+ inherited_entry_value(::Avm::Instances::EntryKeys::INSTALL_ID, 'system.username') ||
12
+ read_entry_optional(::Avm::Instances::EntryKeys::INSTALL_USERNAME)
13
13
  end
14
14
 
15
15
  def auto_system_groupname
16
- inherited_entry_value(::Avm::Instances::EntryKeys::HOST_ID, 'system.groupname') ||
16
+ inherited_entry_value(::Avm::Instances::EntryKeys::INSTALL_ID, 'system.groupname') ||
17
17
  read_entry_optional('system.username')
18
18
  end
19
19
  end
@@ -1,15 +1,14 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- require 'eac_ruby_utils/require_sub'
4
- ::EacRubyUtils.require_sub(__FILE__)
3
+ require 'eac_ruby_utils/core_ext'
5
4
 
6
5
  module Avm
7
6
  module Instances
8
7
  class Base
9
8
  module AutoValues
10
- extend ::ActiveSupport::Concern
9
+ require_sub __FILE__
11
10
 
12
- included do
11
+ common_concern do
13
12
  %w[Admin Data Database Filesystem Install Mailer Ruby Source System Web]
14
13
  .each do |class_name|
15
14
  include const_get(class_name)
@@ -51,11 +51,11 @@ module Avm
51
51
  end
52
52
 
53
53
  def host_env_uncached
54
- access = read_entry(:access, list: ::Avm::Instances::Base.lists.access.values)
55
- case access
54
+ install_uri = entry(::Avm::Instances::EntryKeys::INSTALL_URL).value.to_uri
55
+ case install_uri.scheme
56
56
  when 'local' then ::EacRubyUtils::Envs.local
57
- when 'ssh' then ::EacRubyUtils::Envs.ssh(read_entry('ssh.url'))
58
- else raise("Unmapped access value: \"#{access}\"")
57
+ when 'ssh' then ::EacRubyUtils::Envs.ssh(install_uri)
58
+ else raise("Unmapped access value: \"#{install_uri}\"")
59
59
  end
60
60
  end
61
61
 
@@ -44,12 +44,12 @@ module Avm
44
44
  end
45
45
 
46
46
  {
47
- '' => %w[data_fs_path fs_path host_id name source_instance_id],
47
+ '' => %w[data_fs_path fs_path name source_instance_id],
48
48
  admin: URI_FIELDS + %w[api_key],
49
49
  database: URI_FIELDS + %w[id limit name system timeout extra],
50
50
  docker: %w[registry],
51
51
  fs: %w[url],
52
- install: URI_FIELDS,
52
+ install: URI_FIELDS + %w[id],
53
53
  mailer: {
54
54
  '' => %w[id from reply_to],
55
55
  smtp: URI_FIELDS + %w[address domain authentication openssl_verify_mode starttls_auto tls]
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Avm
4
- VERSION = '0.31.0'
4
+ VERSION = '0.32.0'
5
5
  end
@@ -13,56 +13,56 @@ RSpec.describe ::Avm::Instances::Base do
13
13
  .stub_eac_config_node(self, ::File.join(__dir__, 'base_spec_configs_storage.yml'))
14
14
 
15
15
  describe '#read_entry' do
16
- context 'when a auto value is requested' do
17
- {
18
- 'app_0' => {
19
- fs_path: '/fs_root/app_0',
20
- data_fs_path: '/data_fs_root/app_0',
21
- ::Avm::Instances::EntryKeys::DATABASE_NAME => 'app_0',
22
- ::Avm::Instances::EntryKeys::DATABASE_USERNAME => 'user1',
23
- ::Avm::Instances::EntryKeys::DATABASE_PASSWORD => 'pass1',
24
- ::Avm::Instances::EntryKeys::DATABASE_HOSTNAME => 'database.net',
25
- ::Avm::Instances::EntryKeys::DATABASE_PORT => 5432,
26
- ::Avm::Instances::EntryKeys::INSTALL_HOSTNAME => 'myhost.com',
27
- ::Avm::Instances::EntryKeys::INSTALL_USERNAME => 'myuser',
28
- ::Avm::Instances::EntryKeys::INSTALL_URL => 'ssh://otheruser@otherhost.com'
29
- },
30
- 'app_2' => {
31
- ::Avm::Instances::EntryKeys::DATABASE_HOSTNAME => '127.0.0.1',
32
- ::Avm::Instances::EntryKeys::SOURCE_INSTANCE_ID => 'app_dev'
33
- },
34
- 'app_3' => {
35
- ::Avm::Instances::EntryKeys::DATABASE_SYSTEM => 'postgresql',
36
- ::Avm::Instances::EntryKeys::DATABASE_NAME => 'app_1_db',
37
- ::Avm::Instances::EntryKeys::DATABASE_USERNAME => 'user1',
38
- ::Avm::Instances::EntryKeys::DATABASE_PASSWORD => 'pass1',
39
- ::Avm::Instances::EntryKeys::DATABASE_HOSTNAME => 'database.net',
40
- ::Avm::Instances::EntryKeys::DATABASE_PORT => 5432,
41
- ::Avm::Instances::EntryKeys::MAILER_ID => 'mailer_0',
42
- ::Avm::Instances::EntryKeys::MAILER_FROM => 'noreply@example.net',
43
- ::Avm::Instances::EntryKeys::MAILER_REPLY_TO => nil,
44
- ::Avm::Instances::EntryKeys::MAILER_SMTP_ADDRESS => 'smtp.example.net',
45
- ::Avm::Instances::EntryKeys::MAILER_SMTP_PORT => '587',
46
- ::Avm::Instances::EntryKeys::MAILER_SMTP_DOMAIN => 'example.net',
47
- ::Avm::Instances::EntryKeys::MAILER_SMTP_USERNAME => 'a_user',
48
- ::Avm::Instances::EntryKeys::MAILER_SMTP_PASSWORD => 'a_secret',
49
- ::Avm::Instances::EntryKeys::MAILER_SMTP_AUTHENTICATION => 'plain',
50
- ::Avm::Instances::EntryKeys::MAILER_SMTP_STARTTLS_AUTO => 'true'
51
- },
52
- 'mailer_0' => {
53
- ::Avm::Instances::EntryKeys::MAILER_FROM => 'noreply@example.net',
54
- ::Avm::Instances::EntryKeys::MAILER_REPLY_TO => '',
55
- ::Avm::Instances::EntryKeys::MAILER_SMTP_ADDRESS => 'smtp.example.net',
56
- ::Avm::Instances::EntryKeys::MAILER_SMTP_PORT => '587',
57
- ::Avm::Instances::EntryKeys::MAILER_SMTP_DOMAIN => 'example.net',
58
- ::Avm::Instances::EntryKeys::MAILER_SMTP_USERNAME => 'a_user',
59
- ::Avm::Instances::EntryKeys::MAILER_SMTP_PASSWORD => 'a_secret',
60
- ::Avm::Instances::EntryKeys::MAILER_SMTP_AUTHENTICATION => 'plain',
61
- ::Avm::Instances::EntryKeys::MAILER_SMTP_STARTTLS_AUTO => 'true'
62
- }
63
- }.each do |instance_id, values|
64
- values.each do |input, expected|
65
- it "read entry #{instance_id}.#{input} should return \"#{expected}\"" do
16
+ {
17
+ 'app_0' => {
18
+ fs_path: '/fs_root/app_0',
19
+ data_fs_path: '/data_fs_root/app_0',
20
+ ::Avm::Instances::EntryKeys::DATABASE_NAME => 'app_0',
21
+ ::Avm::Instances::EntryKeys::DATABASE_USERNAME => 'user1',
22
+ ::Avm::Instances::EntryKeys::DATABASE_PASSWORD => 'pass1',
23
+ ::Avm::Instances::EntryKeys::DATABASE_HOSTNAME => 'database.net',
24
+ ::Avm::Instances::EntryKeys::DATABASE_PORT => 5432,
25
+ ::Avm::Instances::EntryKeys::INSTALL_HOSTNAME => 'myhost.com',
26
+ ::Avm::Instances::EntryKeys::INSTALL_USERNAME => 'myuser',
27
+ ::Avm::Instances::EntryKeys::INSTALL_URL => 'ssh://otheruser@otherhost.com'
28
+ },
29
+ 'app_2' => {
30
+ ::Avm::Instances::EntryKeys::DATABASE_HOSTNAME => '127.0.0.1',
31
+ ::Avm::Instances::EntryKeys::SOURCE_INSTANCE_ID => 'app_dev'
32
+ },
33
+ 'app_3' => {
34
+ ::Avm::Instances::EntryKeys::DATABASE_SYSTEM => 'postgresql',
35
+ ::Avm::Instances::EntryKeys::DATABASE_NAME => 'app_1_db',
36
+ ::Avm::Instances::EntryKeys::DATABASE_USERNAME => 'user1',
37
+ ::Avm::Instances::EntryKeys::DATABASE_PASSWORD => 'pass1',
38
+ ::Avm::Instances::EntryKeys::DATABASE_HOSTNAME => 'database.net',
39
+ ::Avm::Instances::EntryKeys::DATABASE_PORT => 5432,
40
+ ::Avm::Instances::EntryKeys::MAILER_ID => 'mailer_0',
41
+ ::Avm::Instances::EntryKeys::MAILER_FROM => 'noreply@example.net',
42
+ ::Avm::Instances::EntryKeys::MAILER_REPLY_TO => nil,
43
+ ::Avm::Instances::EntryKeys::MAILER_SMTP_ADDRESS => 'smtp.example.net',
44
+ ::Avm::Instances::EntryKeys::MAILER_SMTP_PORT => '587',
45
+ ::Avm::Instances::EntryKeys::MAILER_SMTP_DOMAIN => 'example.net',
46
+ ::Avm::Instances::EntryKeys::MAILER_SMTP_USERNAME => 'a_user',
47
+ ::Avm::Instances::EntryKeys::MAILER_SMTP_PASSWORD => 'a_secret',
48
+ ::Avm::Instances::EntryKeys::MAILER_SMTP_AUTHENTICATION => 'plain',
49
+ ::Avm::Instances::EntryKeys::MAILER_SMTP_STARTTLS_AUTO => 'true'
50
+ },
51
+ 'mailer_0' => {
52
+ ::Avm::Instances::EntryKeys::MAILER_FROM => 'noreply@example.net',
53
+ ::Avm::Instances::EntryKeys::MAILER_REPLY_TO => '',
54
+ ::Avm::Instances::EntryKeys::MAILER_SMTP_ADDRESS => 'smtp.example.net',
55
+ ::Avm::Instances::EntryKeys::MAILER_SMTP_PORT => '587',
56
+ ::Avm::Instances::EntryKeys::MAILER_SMTP_DOMAIN => 'example.net',
57
+ ::Avm::Instances::EntryKeys::MAILER_SMTP_USERNAME => 'a_user',
58
+ ::Avm::Instances::EntryKeys::MAILER_SMTP_PASSWORD => 'a_secret',
59
+ ::Avm::Instances::EntryKeys::MAILER_SMTP_AUTHENTICATION => 'plain',
60
+ ::Avm::Instances::EntryKeys::MAILER_SMTP_STARTTLS_AUTO => 'true'
61
+ }
62
+ }.each do |instance_id, values|
63
+ values.each do |input, expected|
64
+ context "when a auto value is requested for \"#{instance_id}.#{input}\"" do
65
+ it ".read_entry should return \"#{expected}\"" do
66
66
  expect(described_class.by_id(instance_id).read_entry(input)).to eq(expected)
67
67
  end
68
68
  end
@@ -1,10 +1,12 @@
1
1
  ---
2
2
  app_0:
3
- host_id: app_1
3
+ install:
4
+ id: app_1
4
5
  app_1:
5
6
  fs_path: /fs_root
6
7
  data_fs_path: /data_fs_root
7
- host_id: app_2
8
+ install:
9
+ id: app_2
8
10
  database:
9
11
  name: app_1_db
10
12
  username: user1
@@ -0,0 +1,62 @@
1
+ # frozen_string_literal: true
2
+
3
+ require 'eac_ruby_utils/core_ext'
4
+
5
+ module Avm
6
+ module EacRubyBase1
7
+ module Rubygems
8
+ class Gemspec
9
+ class AddOrReplaceGemLine
10
+ enable_method_class
11
+ common_constructor :sender, :gem_name, :gem_specs
12
+ delegate :lines, to: :sender
13
+
14
+ DEPENDENCY_PREFIX = ' s.add_dependency'
15
+
16
+ def existing_gem_line_index
17
+ lines.index { |line| line.start_with?(gem_line_prefix) }
18
+ end
19
+
20
+ def result
21
+ if existing_gem_line_index.present?
22
+ replace_line
23
+ else
24
+ add_line
25
+ end
26
+ end
27
+
28
+ def add_line
29
+ lines.insert(add_line_index, new_gem_line)
30
+ end
31
+
32
+ def add_line_index
33
+ (gems_lines_start_index..(lines.count - 1)).each do |e|
34
+ return e if new_gem_line < lines[e]
35
+ end
36
+ lines.count
37
+ end
38
+
39
+ def gems_lines_start_index
40
+ lines.index { |line| line.start_with?(DEPENDENCY_PREFIX) } || lines.count
41
+ end
42
+
43
+ def new_gem_line
44
+ ([gem_line_prefix] + quoted_gem_specs).join(', ')
45
+ end
46
+
47
+ def gem_line_prefix
48
+ "#{DEPENDENCY_PREFIX} '#{gem_name}'"
49
+ end
50
+
51
+ def replace_line
52
+ lines[existing_gem_line_index] = new_gem_line
53
+ end
54
+
55
+ def quoted_gem_specs
56
+ gem_specs.map { |gem_spec| "'#{gem_spec}'" }
57
+ end
58
+ end
59
+ end
60
+ end
61
+ end
62
+ end
@@ -0,0 +1,19 @@
1
+ # frozen_string_literal: true
2
+
3
+ require 'eac_ruby_utils/core_ext'
4
+
5
+ module Avm
6
+ module EacRubyBase1
7
+ module Rubygems
8
+ class Gemspec
9
+ class Dependency
10
+ common_constructor :gemspec, :gem_name
11
+
12
+ def version_specs=(version_specs)
13
+ gemspec.add_or_replace_gem_line(gem_name, version_specs)
14
+ end
15
+ end
16
+ end
17
+ end
18
+ end
19
+ end
@@ -0,0 +1,42 @@
1
+ # frozen_string_literal: true
2
+
3
+ require 'eac_ruby_utils/core_ext'
4
+
5
+ module Avm
6
+ module EacRubyBase1
7
+ module Rubygems
8
+ class Gemspec
9
+ require_sub __FILE__, require_dependency: true
10
+
11
+ DEPENDENCY_LINE_PARSER = /s\.add_dependency\s*'(\S+)'/.to_parser { |m| m[1] }
12
+
13
+ class << self
14
+ def from_file(path)
15
+ new(path.read.each_line.map(&:rstrip))
16
+ end
17
+ end
18
+
19
+ common_constructor :lines
20
+
21
+ # @return [Avm::EacRubyBase1::Bundler::Gemfile::Dependency]
22
+ def dependency(gem_name)
23
+ ::Avm::EacRubyBase1::Rubygems::Gemspec::Dependency.new(self, gem_name)
24
+ end
25
+
26
+ # @return [Array<Avm::EacRubyBase1::Bundler::Gemfile::Dependency>]
27
+ def dependencies
28
+ lines.lazy.map { |line| DEPENDENCY_LINE_PARSER.parse(line) }.reject(&:blank?)
29
+ .map { |gem_name| dependency(gem_name) }.to_a
30
+ end
31
+
32
+ def write(path)
33
+ path.to_pathname.write(to_text)
34
+ end
35
+
36
+ def to_text
37
+ lines.map { |line| "#{line}\n" }.join
38
+ end
39
+ end
40
+ end
41
+ end
42
+ end
@@ -2,6 +2,6 @@
2
2
 
3
3
  module Avm
4
4
  module EacRubyBase1
5
- VERSION = '0.11.0'
5
+ VERSION = '0.12.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.13.0
4
+ version: 0.14.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-01 00:00:00.000000000 Z
11
+ date: 2022-08-03 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: avm-eac_generic_base0
@@ -98,14 +98,14 @@ dependencies:
98
98
  requirements:
99
99
  - - "~>"
100
100
  - !ruby/object:Gem::Version
101
- version: '0.11'
101
+ version: '0.12'
102
102
  type: :runtime
103
103
  prerelease: false
104
104
  version_requirements: !ruby/object:Gem::Requirement
105
105
  requirements:
106
106
  - - "~>"
107
107
  - !ruby/object:Gem::Version
108
- version: '0.11'
108
+ version: '0.12'
109
109
  - !ruby/object:Gem::Dependency
110
110
  name: avm-tools
111
111
  requirement: !ruby/object:Gem::Requirement
@@ -304,6 +304,9 @@ files:
304
304
  - sub/avm-eac_ruby_base1/lib/avm/eac_ruby_base1/rubocop/envvar.rb
305
305
  - sub/avm-eac_ruby_base1/lib/avm/eac_ruby_base1/rubocop/gemfile.rb
306
306
  - sub/avm-eac_ruby_base1/lib/avm/eac_ruby_base1/rubygems.rb
307
+ - sub/avm-eac_ruby_base1/lib/avm/eac_ruby_base1/rubygems/gemspec.rb
308
+ - sub/avm-eac_ruby_base1/lib/avm/eac_ruby_base1/rubygems/gemspec/add_or_replace_gem_line.rb
309
+ - sub/avm-eac_ruby_base1/lib/avm/eac_ruby_base1/rubygems/gemspec/dependency.rb
307
310
  - sub/avm-eac_ruby_base1/lib/avm/eac_ruby_base1/rubygems/version_file.rb
308
311
  - sub/avm-eac_ruby_base1/lib/avm/eac_ruby_base1/sources.rb
309
312
  - sub/avm-eac_ruby_base1/lib/avm/eac_ruby_base1/sources/base.rb