avm 0.52.0 → 0.54.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/rspec/setup/source_generator.rb +22 -0
- data/lib/avm/rspec/setup.rb +4 -4
- data/lib/avm/rspec/shared_examples/avm_source_generated.rb +23 -0
- data/lib/avm/scms/commit.rb +8 -0
- data/lib/avm/version.rb +1 -1
- metadata +14 -13
- data/lib/avm/rspec/source_generator.rb +0 -16
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: a52ddaff3ca8d1d8b6923f5774a840e96579753deda0e37ed836c3d3de7139f4
|
4
|
+
data.tar.gz: 03eb845b333bb37eddc9f59ed29a408e145b2a8ad26038e3ffde44f66801e9c4
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: f44830cf5abc31bea03038ab8e551fc1202a6abb715af17ef3bdcbce6e26086adb3782749a861f420e7fc9c370bf110c9ba1d2a4d28e24ca24405b17249b8870
|
7
|
+
data.tar.gz: c8e0b4282562b0dbadcc48c31730f2e976711612cd1d6e712f49db360140ca566b0e30894d3150ecf765762240dd80b8446fb06715c34c41849834d25589c1c1
|
@@ -0,0 +1,22 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require 'eac_ruby_utils/core_ext'
|
4
|
+
|
5
|
+
module Avm
|
6
|
+
module Rspec
|
7
|
+
module Setup
|
8
|
+
module SourceGenerator
|
9
|
+
DEFAULT_TARGET_BASENAME = 'generated_app'
|
10
|
+
|
11
|
+
# @return [Avm::Sources::Base]
|
12
|
+
def avm_source(stereotype_name, options = {})
|
13
|
+
options = options.dup
|
14
|
+
target_basename ||= options.delete(:target_basename) || DEFAULT_TARGET_BASENAME
|
15
|
+
target_path ||= options.delete(:target_path) || temp_dir.join(target_basename)
|
16
|
+
::Avm::Registry.source_generators.detect(stereotype_name, target_path, options).perform
|
17
|
+
::Avm::Registry.sources.detect(target_path)
|
18
|
+
end
|
19
|
+
end
|
20
|
+
end
|
21
|
+
end
|
22
|
+
end
|
data/lib/avm/rspec/setup.rb
CHANGED
@@ -1,19 +1,19 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
|
-
require 'avm/rspec/source_generator'
|
3
|
+
require 'avm/rspec/setup/source_generator'
|
4
4
|
require 'eac_ruby_utils/core_ext'
|
5
5
|
|
6
6
|
module Avm
|
7
7
|
module Rspec
|
8
8
|
module Setup
|
9
9
|
require_sub __FILE__
|
10
|
-
EXAMPLES = %w[avm_file_formats_with_fixtures entries_values
|
11
|
-
not_in_avm_registry].freeze
|
10
|
+
EXAMPLES = %w[avm_file_formats_with_fixtures avm_source_generated entries_values
|
11
|
+
in_avm_registry not_in_avm_registry].freeze
|
12
12
|
|
13
13
|
def self.extended(obj)
|
14
14
|
obj.setup_examples
|
15
15
|
obj.rspec_config.include(::Avm::Rspec::Setup::Launcher)
|
16
|
-
obj.rspec_config.include(::Avm::Rspec::SourceGenerator)
|
16
|
+
obj.rspec_config.include(::Avm::Rspec::Setup::SourceGenerator)
|
17
17
|
end
|
18
18
|
|
19
19
|
def setup_examples
|
@@ -0,0 +1,23 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require 'eac_fs/comparator'
|
4
|
+
require 'eac_ruby_utils/core_ext'
|
5
|
+
|
6
|
+
::RSpec.shared_examples 'avm_source_generated' do |spec_file, stereotype, options = {}|
|
7
|
+
fixtures_dir = ::Pathname.new('base_spec_files').expand_path(::File.dirname(spec_file))
|
8
|
+
|
9
|
+
fixtures_dir.children.select(&:directory?).each do |target_dir|
|
10
|
+
context "when target is \"#{target_dir.basename}\"" do
|
11
|
+
let(:source) { avm_source(stereotype, options.merge(target_basename: target_dir.basename)) }
|
12
|
+
|
13
|
+
it do
|
14
|
+
expect(fs_comparator.build(source.path)).to eq(fs_comparator.build(target_dir))
|
15
|
+
end
|
16
|
+
end
|
17
|
+
end
|
18
|
+
|
19
|
+
# @return [EacFs::Comparato]
|
20
|
+
def fs_comparator
|
21
|
+
::EacFs::Comparator.new.rename_file('.gitignore', '_gitignore')
|
22
|
+
end
|
23
|
+
end
|
data/lib/avm/scms/commit.rb
CHANGED
@@ -12,6 +12,14 @@ module Avm
|
|
12
12
|
raise_abstract_method __method__
|
13
13
|
end
|
14
14
|
|
15
|
+
def deploy_to_env_path(_target_env, _target_path)
|
16
|
+
raise_abstract_method __method__
|
17
|
+
end
|
18
|
+
|
19
|
+
def id
|
20
|
+
raise_abstract_method __method__
|
21
|
+
end
|
22
|
+
|
15
23
|
# @param other [Avm::Scms::Commit]
|
16
24
|
# @return [Avm::Scms::Commit]
|
17
25
|
def merge_with(_other)
|
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.54.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-29 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: aranha-parsers
|
@@ -84,20 +84,14 @@ dependencies:
|
|
84
84
|
requirements:
|
85
85
|
- - "~>"
|
86
86
|
- !ruby/object:Gem::Version
|
87
|
-
version: '0.
|
88
|
-
- - ">="
|
89
|
-
- !ruby/object:Gem::Version
|
90
|
-
version: 0.12.3
|
87
|
+
version: '0.13'
|
91
88
|
type: :runtime
|
92
89
|
prerelease: false
|
93
90
|
version_requirements: !ruby/object:Gem::Requirement
|
94
91
|
requirements:
|
95
92
|
- - "~>"
|
96
93
|
- !ruby/object:Gem::Version
|
97
|
-
version: '0.
|
98
|
-
- - ">="
|
99
|
-
- !ruby/object:Gem::Version
|
100
|
-
version: 0.12.3
|
94
|
+
version: '0.13'
|
101
95
|
- !ruby/object:Gem::Dependency
|
102
96
|
name: eac_git
|
103
97
|
requirement: !ruby/object:Gem::Requirement
|
@@ -118,14 +112,20 @@ dependencies:
|
|
118
112
|
requirements:
|
119
113
|
- - "~>"
|
120
114
|
- !ruby/object:Gem::Version
|
121
|
-
version: '0.
|
115
|
+
version: '0.106'
|
116
|
+
- - ">="
|
117
|
+
- !ruby/object:Gem::Version
|
118
|
+
version: 0.106.1
|
122
119
|
type: :runtime
|
123
120
|
prerelease: false
|
124
121
|
version_requirements: !ruby/object:Gem::Requirement
|
125
122
|
requirements:
|
126
123
|
- - "~>"
|
127
124
|
- !ruby/object:Gem::Version
|
128
|
-
version: '0.
|
125
|
+
version: '0.106'
|
126
|
+
- - ">="
|
127
|
+
- !ruby/object:Gem::Version
|
128
|
+
version: 0.106.1
|
129
129
|
- !ruby/object:Gem::Dependency
|
130
130
|
name: eac_templates
|
131
131
|
requirement: !ruby/object:Gem::Requirement
|
@@ -369,11 +369,12 @@ files:
|
|
369
369
|
- lib/avm/rspec.rb
|
370
370
|
- lib/avm/rspec/setup.rb
|
371
371
|
- lib/avm/rspec/setup/launcher.rb
|
372
|
+
- lib/avm/rspec/setup/source_generator.rb
|
372
373
|
- lib/avm/rspec/shared_examples/avm_file_formats_with_fixtures.rb
|
374
|
+
- lib/avm/rspec/shared_examples/avm_source_generated.rb
|
373
375
|
- lib/avm/rspec/shared_examples/entries_values.rb
|
374
376
|
- lib/avm/rspec/shared_examples/in_avm_registry.rb
|
375
377
|
- lib/avm/rspec/shared_examples/not_in_avm_registry.rb
|
376
|
-
- lib/avm/rspec/source_generator.rb
|
377
378
|
- lib/avm/runners/base.rb
|
378
379
|
- lib/avm/scms/base.rb
|
379
380
|
- lib/avm/scms/commit.rb
|
@@ -1,16 +0,0 @@
|
|
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
|