avm 0.48.0 → 0.50.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: 6154966f958a3a20d945e50d0adfa863e2cdc4347a387d1cc438693dd2bafe4d
4
- data.tar.gz: 851e61bcad1cf7ce2d4ff29786abb52ea9421ce0954f504b339ca54f9482cf2c
3
+ metadata.gz: 47575dee73ad5721c2ef69d1c6edb61a7b59f61f6fb61052e59d0382df258ec4
4
+ data.tar.gz: e7ac9159bce593101db01a63fbb890f6a22a899f278cc23f4049f99f9938a158
5
5
  SHA512:
6
- metadata.gz: 91cfb8131fa8053b3819582a957899c1b7957fe709513cb4cba5032c66bf45540a8ea376b6838a3651913481696efef9c841e0f621d5992f5de85760836fb15f
7
- data.tar.gz: 56cf053b8f7a9a2790a5a60deec1e8336c00c5909ee3bf944947a7ff1365987ddf95f5bbe75c24fbe1a863ce7847fd00611949b8363083b878fbe8ecb108fdc6
6
+ metadata.gz: ba4d0decd31a62c03ef96f66a91e19e7753ef3482808390dd9b4281d23ba5a061d1d35ab9d484de30602237935dde705ad672cfb1b18eff3c8bfdef1044c00e4
7
+ data.tar.gz: a6f11d49400b9e181741966cda6c140227972e10f34da65546674ffe6432385529e969413584540aa6340e744a532b1d5ad2812d057c0255f0a6b78697a73dbb
@@ -8,7 +8,6 @@ require 'avm/launcher/context/instance_discovery'
8
8
  require 'avm/launcher/context/settings'
9
9
  require 'avm/launcher/paths/logical'
10
10
  require 'avm/launcher/project'
11
- require 'avm/tools/self'
12
11
 
13
12
  module Avm
14
13
  module Launcher
@@ -43,6 +42,10 @@ module Avm
43
42
  @recache = false
44
43
  end
45
44
 
45
+ def fs_object_id
46
+ root.real.variableize
47
+ end
48
+
46
49
  def instance(name)
47
50
  instances.find { |i| i.name == name }
48
51
  end
@@ -66,7 +69,7 @@ module Avm
66
69
  end
67
70
 
68
71
  def default_cache_root
69
- ::Avm::Tools::Self.application.cache_dir.join('launcher')
72
+ fs_cache.path
70
73
  end
71
74
 
72
75
  def default_option(key)
@@ -78,7 +81,7 @@ module Avm
78
81
  end
79
82
 
80
83
  def default_settings_file
81
- ::Avm::Tools::Self.application.config_dir.join('launcher.yaml')
84
+ ::File.join(::EacFs::Contexts.config.current.path, 'launcher.yaml')
82
85
  end
83
86
 
84
87
  def projects_uncached
@@ -1,6 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- require 'avm/projects/stereotypes'
4
3
  require 'avm/launcher/paths/real'
5
4
  require 'avm/launcher/stereotype'
6
5
 
@@ -35,8 +35,6 @@ module Avm
35
35
  internal_check
36
36
  rescue ::Avm::Launcher::Errors::Base => e
37
37
  ::Avm::Launcher::Publish::CheckResult.blocked("Error: #{e}")
38
- rescue ::Avm::Launcher::Git::Error => e
39
- ::Avm::Launcher::Publish::CheckResult.blocked("Git error: #{e}")
40
38
  end
41
39
  end
42
40
  end
@@ -7,11 +7,7 @@ module Avm
7
7
  module Launcher
8
8
  module Stereotype
9
9
  class << self
10
- attr_reader :stereotypes
11
-
12
10
  def included(base)
13
- @stereotypes ||= []
14
- @stereotypes << base
15
11
  base.extend(ClassMethods)
16
12
  end
17
13
 
@@ -22,6 +18,10 @@ module Avm
22
18
  def nogit_stereotypes
23
19
  stereotypes - git_stereotypes
24
20
  end
21
+
22
+ def stereotypes
23
+ ::Avm::Registry.launcher_stereotypes.available
24
+ end
25
25
  end
26
26
 
27
27
  module ClassMethods
@@ -0,0 +1,9 @@
1
+ # frozen_string_literal: true
2
+
3
+ require 'eac_ruby_utils/core_ext'
4
+
5
+ module Avm
6
+ module LauncherStereotypes
7
+ require_sub __FILE__
8
+ end
9
+ end
@@ -0,0 +1,11 @@
1
+ # frozen_string_literal: true
2
+
3
+ require 'avm/registry/with_path'
4
+ require 'eac_ruby_utils/core_ext'
5
+
6
+ module Avm
7
+ module Registry
8
+ class LauncherStereotypes < ::Avm::Registry::WithPath
9
+ end
10
+ end
11
+ end
data/lib/avm/registry.rb CHANGED
@@ -7,8 +7,8 @@ module Avm
7
7
  module Registry
8
8
  require_sub __FILE__
9
9
  enable_listable
10
- lists.add_symbol :category, :application_stereotypes, :instances, :runners, :scms,
11
- :source_generators, :sources
10
+ lists.add_symbol :category, :application_stereotypes, :instances, :launcher_stereotypes,
11
+ :runners, :scms, :source_generators, :sources
12
12
 
13
13
  class << self
14
14
  enable_simple_cache
@@ -0,0 +1,19 @@
1
+ # frozen_string_literal: true
2
+
3
+ require 'eac_ruby_utils/core_ext'
4
+ require 'tmpdir'
5
+
6
+ module Avm
7
+ module Rspec
8
+ module Setup
9
+ module Launcher
10
+ def temp_launcher_context(settings_file = nil)
11
+ settings_file ||= temp_file
12
+ ::Avm::Launcher::Context.current = ::Avm::Launcher::Context.new(
13
+ projects_root: ::Dir.mktmpdir, settings_file: settings_file, cache_root: ::Dir.mktmpdir
14
+ )
15
+ end
16
+ end
17
+ end
18
+ end
19
+ end
@@ -1,14 +1,18 @@
1
1
  # frozen_string_literal: true
2
2
 
3
+ require 'avm/rspec/source_generator'
3
4
  require 'eac_ruby_utils/core_ext'
4
5
 
5
6
  module Avm
6
7
  module Rspec
7
8
  module Setup
9
+ require_sub __FILE__
8
10
  EXAMPLES = %w[entries_values in_avm_registry not_in_avm_registry].freeze
9
11
 
10
12
  def self.extended(obj)
11
13
  obj.setup_examples
14
+ obj.rspec_config.include(::Avm::Rspec::Setup::Launcher)
15
+ obj.rspec_config.include(::Avm::Rspec::SourceGenerator)
12
16
  end
13
17
 
14
18
  def setup_examples
@@ -0,0 +1,16 @@
1
+ # frozen_string_literal: true
2
+
3
+ require 'eac_ruby_utils/core_ext'
4
+
5
+ module Avm
6
+ module Rspec
7
+ module SourceGenerator
8
+ # @return [Avm::Sources::Base]
9
+ def avm_source(stereotype_name, options = {})
10
+ target_path ||= options.delete(:target_path) || temp_dir.join('generated_app')
11
+ ::Avm::Registry.source_generators.detect(stereotype_name, target_path, options).perform
12
+ ::Avm::Registry.sources.detect(target_path)
13
+ end
14
+ end
15
+ end
16
+ end
data/lib/avm/version.rb CHANGED
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Avm
4
- VERSION = '0.48.0'
4
+ VERSION = '0.50.0'
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: avm
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.48.0
4
+ version: 0.50.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: 2022-10-11 00:00:00.000000000 Z
11
+ date: 2022-10-16 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: eac_cli
@@ -84,14 +84,14 @@ dependencies:
84
84
  requirements:
85
85
  - - "~>"
86
86
  - !ruby/object:Gem::Version
87
- version: '0.104'
87
+ version: '0.105'
88
88
  type: :runtime
89
89
  prerelease: false
90
90
  version_requirements: !ruby/object:Gem::Requirement
91
91
  requirements:
92
92
  - - "~>"
93
93
  - !ruby/object:Gem::Version
94
- version: '0.104'
94
+ version: '0.105'
95
95
  - !ruby/object:Gem::Dependency
96
96
  name: eac_templates
97
97
  requirement: !ruby/object:Gem::Requirement
@@ -180,6 +180,34 @@ dependencies:
180
180
  - - "~>"
181
181
  - !ruby/object:Gem::Version
182
182
  version: 0.14.1
183
+ - !ruby/object:Gem::Dependency
184
+ name: avm-eac_ruby_base1
185
+ requirement: !ruby/object:Gem::Requirement
186
+ requirements:
187
+ - - "~>"
188
+ - !ruby/object:Gem::Version
189
+ version: '0.24'
190
+ type: :development
191
+ prerelease: false
192
+ version_requirements: !ruby/object:Gem::Requirement
193
+ requirements:
194
+ - - "~>"
195
+ - !ruby/object:Gem::Version
196
+ version: '0.24'
197
+ - !ruby/object:Gem::Dependency
198
+ name: avm-git
199
+ requirement: !ruby/object:Gem::Requirement
200
+ requirements:
201
+ - - "~>"
202
+ - !ruby/object:Gem::Version
203
+ version: '0.7'
204
+ type: :development
205
+ prerelease: false
206
+ version_requirements: !ruby/object:Gem::Requirement
207
+ requirements:
208
+ - - "~>"
209
+ - !ruby/object:Gem::Version
210
+ version: '0.7'
183
211
  - !ruby/object:Gem::Dependency
184
212
  name: eac_ruby_gem_support
185
213
  requirement: !ruby/object:Gem::Requirement
@@ -283,6 +311,7 @@ files:
283
311
  - lib/avm/launcher/publish/base.rb
284
312
  - lib/avm/launcher/publish/check_result.rb
285
313
  - lib/avm/launcher/stereotype.rb
314
+ - lib/avm/launcher_stereotypes.rb
286
315
  - lib/avm/path_string.rb
287
316
  - lib/avm/registry.rb
288
317
  - lib/avm/registry/application_stereotypes.rb
@@ -290,6 +319,7 @@ files:
290
319
  - lib/avm/registry/application_stereotypes/stereotype_builder.rb
291
320
  - lib/avm/registry/from_gems.rb
292
321
  - lib/avm/registry/instances.rb
322
+ - lib/avm/registry/launcher_stereotypes.rb
293
323
  - lib/avm/registry/runners.rb
294
324
  - lib/avm/registry/scms.rb
295
325
  - lib/avm/registry/source_generators.rb
@@ -299,9 +329,11 @@ files:
299
329
  - lib/avm/result.rb
300
330
  - lib/avm/rspec.rb
301
331
  - lib/avm/rspec/setup.rb
332
+ - lib/avm/rspec/setup/launcher.rb
302
333
  - lib/avm/rspec/shared_examples/entries_values.rb
303
334
  - lib/avm/rspec/shared_examples/in_avm_registry.rb
304
335
  - lib/avm/rspec/shared_examples/not_in_avm_registry.rb
336
+ - lib/avm/rspec/source_generator.rb
305
337
  - lib/avm/runners/base.rb
306
338
  - lib/avm/scms/base.rb
307
339
  - lib/avm/scms/commit.rb