avm-apps 0.2.1 → 0.5.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: eeb648dd2ea6795a63a773e9d68d5adfc68ca0caec7b2e23d59386d39a743b22
4
- data.tar.gz: 1be55161ac58ed831dbec83be9f10ff3eec8195a4d9d4bdbce55c480f5ade7f2
3
+ metadata.gz: 6658d95cf6b9a020db7ed798f387feccd4e73060f7d85b23e039526b1fce7a06
4
+ data.tar.gz: 6b71f87b0358f6f3aea1a1831c519b841fc3d2c35bf4361732a249bc44aed49f
5
5
  SHA512:
6
- metadata.gz: 411b358eb1882d4d5893f3f5ecb244b98172d43b726a3ce1d6921ee07819c761777118b7dd511014e77a55024d1822dcf8be210bb8b254245d113971858c866c
7
- data.tar.gz: 38e3093ad78f87d3db11d4e67e9597845beb294fa12c9c0b482d2d3fa00e5198bfe6b516adb53463ab30c67de6da91ae7eff6942e0e600e0e8f5598d3778e978
6
+ metadata.gz: 6ca1a0924f058b4711d7e05dc941c8fd7c58cac015fea8c60c24b9664b91f05d5e6da12f1389d9e28d8896441aa0260ccb9d15c22f816cfc051b56825f401c63
7
+ data.tar.gz: 864302926b697fcf1216012333f63268b766a3e27741d392d05585f00adac6f7d60f0ef520a412b0dd377af6ca9e1f12ea90a0708fda41d5fb36005bd70bf61a
@@ -2,6 +2,6 @@
2
2
 
3
3
  module Avm
4
4
  module Apps
5
- VERSION = '0.2.1'
5
+ VERSION = '0.5.0'
6
6
  end
7
7
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: avm-apps
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.1
4
+ version: 0.5.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Eduardo H. Bogoni
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2021-05-23 00:00:00.000000000 Z
11
+ date: 2021-09-25 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: eac_ruby_utils
@@ -16,20 +16,14 @@ dependencies:
16
16
  requirements:
17
17
  - - "~>"
18
18
  - !ruby/object:Gem::Version
19
- version: '0.58'
20
- - - ">="
21
- - !ruby/object:Gem::Version
22
- version: 0.58.1
19
+ version: '0.67'
23
20
  type: :runtime
24
21
  prerelease: false
25
22
  version_requirements: !ruby/object:Gem::Requirement
26
23
  requirements:
27
24
  - - "~>"
28
25
  - !ruby/object:Gem::Version
29
- version: '0.58'
30
- - - ">="
31
- - !ruby/object:Gem::Version
32
- version: 0.58.1
26
+ version: '0.67'
33
27
  - !ruby/object:Gem::Dependency
34
28
  name: eac_ruby_gem_support
35
29
  requirement: !ruby/object:Gem::Requirement
@@ -51,13 +45,6 @@ extensions: []
51
45
  extra_rdoc_files: []
52
46
  files:
53
47
  - lib/avm/apps.rb
54
- - lib/avm/apps/jobs.rb
55
- - lib/avm/apps/jobs/base.rb
56
- - lib/avm/apps/jobs/variables_source.rb
57
- - lib/avm/apps/sources/configuration.rb
58
- - lib/avm/apps/sources/configuration/_locale.rb
59
- - lib/avm/apps/sources/configuration/_rubocop.rb
60
- - lib/avm/apps/sources/configuration/_tests.rb
61
48
  - lib/avm/apps/version.rb
62
49
  homepage:
63
50
  licenses: []
@@ -77,8 +64,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
77
64
  - !ruby/object:Gem::Version
78
65
  version: '0'
79
66
  requirements: []
80
- rubygems_version: 3.0.9
67
+ rubygems_version: 3.1.6
81
68
  signing_key:
82
69
  specification_version: 4
83
- summary: AVM components for applications.
70
+ summary: 'DEPRECATED: use gem "avm" instead.'
84
71
  test_files: []
@@ -1,64 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- require 'avm/apps/jobs/variables_source'
4
- require 'eac_ruby_utils/core_ext'
5
-
6
- module Avm
7
- module Apps
8
- module Jobs
9
- module Base
10
- common_concern do
11
- include ::ActiveSupport::Callbacks
12
-
13
- enable_speaker
14
- enable_simple_cache
15
- enable_listable
16
- common_constructor :instance, :options, default: [{}] do
17
- if option_list.present?
18
- self.options = option_list.hash_keys_validate!(options.symbolize_keys)
19
- end
20
- end
21
- define_callbacks(*jobs)
22
- end
23
-
24
- module ClassMethods
25
- def jobs
26
- const_get('JOBS').dup
27
- end
28
- end
29
-
30
- module InstanceMethods
31
- def option_list
32
- nil
33
- end
34
-
35
- def run
36
- start_banner if respond_to?(:start_banner)
37
- run_jobs
38
- ::Avm::Result.success('Done!')
39
- rescue ::Avm::Result::Error => e
40
- e.to_result
41
- end
42
-
43
- def variables_source
44
- ::Avm::Apps::Jobs::VariablesSource.new(self, instance)
45
- end
46
-
47
- protected
48
-
49
- def run_jobs
50
- jobs.each do |job|
51
- run_callbacks job do
52
- send(job)
53
- end
54
- end
55
- end
56
-
57
- def jobs
58
- self.class.jobs
59
- end
60
- end
61
- end
62
- end
63
- end
64
- end
@@ -1,24 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- require 'eac_ruby_utils/core_ext'
4
-
5
- module Avm
6
- module Apps
7
- module Jobs
8
- class VariablesSource
9
- common_constructor :job, :instance
10
-
11
- def read_entry(path, options = {})
12
- entry_from_job(path) || instance.read_entry(path, options)
13
- end
14
-
15
- private
16
-
17
- def entry_from_job(path)
18
- method = path.gsub('.', '_').underscore
19
- return job.send(method) if job.respond_to?(method, true)
20
- end
21
- end
22
- end
23
- end
24
- end
data/lib/avm/apps/jobs.rb DELETED
@@ -1,11 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- require 'eac_ruby_utils/core_ext'
4
-
5
- module Avm
6
- module Apps
7
- module Jobs
8
- require_sub __FILE__
9
- end
10
- end
11
- end
@@ -1,18 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- require 'avm/patches/eac_ruby_gems_utils/gem'
4
- require 'i18n'
5
-
6
- module Avm
7
- module Apps
8
- module Sources
9
- class Configuration < ::EacConfig::OldConfigs
10
- LOCALE_KEY = :locale
11
-
12
- def locale
13
- read_entry(LOCALE_KEY) || ::I18n.default_locale
14
- end
15
- end
16
- end
17
- end
18
- end
@@ -1,26 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- module Avm
4
- module Apps
5
- module Sources
6
- class Configuration < ::EacConfig::OldConfigs
7
- RUBOCOP_COMMAND_KEY = 'ruby.rubocop.command'
8
- RUBOCOP_GEMFILE_KEY = 'ruby.rubocop.gemfile'
9
-
10
- def rubocop_command
11
- read_command(RUBOCOP_COMMAND_KEY)
12
- end
13
-
14
- def rubocop_gemfile
15
- gemfile_path = read_entry(RUBOCOP_GEMFILE_KEY)
16
- return nil if gemfile_path.blank?
17
-
18
- gemfile_path = gemfile_path.to_pathname.expand_path(storage_path.parent)
19
- return gemfile_path if gemfile_path.file?
20
-
21
- raise "Gemfile path \"#{gemfile_path}\" does not exist or is not a file"
22
- end
23
- end
24
- end
25
- end
26
- end
@@ -1,29 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- require 'avm/patches/eac_ruby_gems_utils/gem'
4
-
5
- module Avm
6
- module Apps
7
- module Sources
8
- class Configuration < ::EacConfig::OldConfigs
9
- BUNDLE_TEST_COMMAND_KEY = 'test.bundle_command'
10
- TEST_COMMAND_KEY = 'test.command'
11
-
12
- def any_test_command
13
- bundle_test_command || test_command
14
- end
15
-
16
- def test_command
17
- read_command(TEST_COMMAND_KEY)
18
- end
19
-
20
- def bundle_test_command
21
- read_entry(BUNDLE_TEST_COMMAND_KEY).if_present do |v|
22
- args = v.is_a?(::Enumerable) ? v.map(&:to_s) : ::Shellwords.split(v)
23
- ::EacRubyGemsUtils::Gem.new(::File.dirname(storage_path)).bundle(*args).chdir_root
24
- end
25
- end
26
- end
27
- end
28
- end
29
- end
@@ -1,57 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- require 'eac_config/old_configs'
4
- require 'eac_ruby_utils/core_ext'
5
- require 'yaml'
6
-
7
- module Avm
8
- module Apps
9
- module Sources
10
- class Configuration < ::EacConfig::OldConfigs
11
- require_sub __FILE__
12
-
13
- FILENAMES = %w[.avm.yml .avm.yaml].freeze
14
-
15
- class << self
16
- def find_by_path(path)
17
- path = ::Pathname.new(path.to_s) unless path.is_a?(::Pathname)
18
- internal_find_path(path.expand_path)
19
- end
20
-
21
- def find_in_path(path)
22
- absolute_pathname = path.to_pathname.expand_path
23
- if absolute_pathname.directory?
24
- FILENAMES.each do |filename|
25
- file = absolute_pathname.join(filename)
26
- return new(file) if file.exist?
27
- end
28
- end
29
- nil
30
- end
31
-
32
- private
33
-
34
- def internal_find_path(absolute_pathname)
35
- r = find_in_path(absolute_pathname)
36
- return r if r.present?
37
-
38
- internal_find_path(absolute_pathname.dirname) unless absolute_pathname.root?
39
- end
40
- end
41
-
42
- def initialize(path)
43
- super(nil, storage_path: path)
44
- end
45
-
46
- # Utility to read a configuration as a [EacRubyUtils::Envs::Command].
47
- # @return [EacRubyUtils::Envs::Command]
48
- def read_command(key)
49
- read_entry(key).if_present do |v|
50
- args = v.is_a?(::Enumerable) ? v.map(&:to_s) : ::Shellwords.split(v)
51
- ::EacRubyUtils::Envs.local.command(args).chdir(::File.dirname(storage_path))
52
- end
53
- end
54
- end
55
- end
56
- end
57
- end