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 +4 -4
- data/lib/avm/launcher/context.rb +6 -3
- data/lib/avm/launcher/paths/logical.rb +0 -1
- data/lib/avm/launcher/publish/base.rb +0 -2
- data/lib/avm/launcher/stereotype.rb +4 -4
- data/lib/avm/launcher_stereotypes.rb +9 -0
- data/lib/avm/registry/launcher_stereotypes.rb +11 -0
- data/lib/avm/registry.rb +2 -2
- data/lib/avm/rspec/setup/launcher.rb +19 -0
- data/lib/avm/rspec/setup.rb +4 -0
- data/lib/avm/rspec/source_generator.rb +16 -0
- data/lib/avm/version.rb +1 -1
- metadata +36 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 47575dee73ad5721c2ef69d1c6edb61a7b59f61f6fb61052e59d0382df258ec4
|
4
|
+
data.tar.gz: e7ac9159bce593101db01a63fbb890f6a22a899f278cc23f4049f99f9938a158
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: ba4d0decd31a62c03ef96f66a91e19e7753ef3482808390dd9b4281d23ba5a061d1d35ab9d484de30602237935dde705ad672cfb1b18eff3c8bfdef1044c00e4
|
7
|
+
data.tar.gz: a6f11d49400b9e181741966cda6c140227972e10f34da65546674ffe6432385529e969413584540aa6340e744a532b1d5ad2812d057c0255f0a6b78697a73dbb
|
data/lib/avm/launcher/context.rb
CHANGED
@@ -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
|
-
|
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
|
-
::
|
84
|
+
::File.join(::EacFs::Contexts.config.current.path, 'launcher.yaml')
|
82
85
|
end
|
83
86
|
|
84
87
|
def projects_uncached
|
@@ -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
|
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, :
|
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
|
data/lib/avm/rspec/setup.rb
CHANGED
@@ -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
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.
|
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
|
+
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.
|
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.
|
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
|