avm-tools 0.63.0 → 0.64.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 1565797abcceccaa3a466abb16694b514ae9773b151142ad27628a0d344a6c2b
|
4
|
+
data.tar.gz: a2756806ed389c2d141a9d038cdb6a55aaa28c9747768cac97bb32ca27b49962
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 5d895b6ceef334e3b439291f2c2eed9477cc738864fede0f4426d0f7040768febf4759b3cc2267fa0ee34eb18301e8c0066e29b5c1a02b952fcacd7f711c91bd
|
7
|
+
data.tar.gz: 812e64910a913c855562bcea3f61aabf441cfafbd7a0af8e356dc217f66451f12361d30507343dbab2b56898313d319880d51bf59893ca11cab6c1d29ed90682
|
@@ -80,6 +80,7 @@ module Avm
|
|
80
80
|
|
81
81
|
def publish?(stereotype)
|
82
82
|
return false unless stereotype.publish_class
|
83
|
+
return false unless options.stereotype_publishable?(stereotype)
|
83
84
|
|
84
85
|
filter = ::EacLauncher::Context.current.publish_options[:stereotype]
|
85
86
|
filter.blank? ? true : filter == stereotype.name.demodulize
|
@@ -0,0 +1,51 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require 'eac_ruby_utils/core_ext'
|
4
|
+
|
5
|
+
module Avm
|
6
|
+
module Launcher
|
7
|
+
module Instances
|
8
|
+
class Settings
|
9
|
+
DEFAULT_CURRENT_REVISION = 'origin/master'
|
10
|
+
DEFAULT_PUBLISH_REMOTE = 'publish'
|
11
|
+
PUBLISHABLE_KEY = :publishable
|
12
|
+
|
13
|
+
common_constructor :data do
|
14
|
+
self.data = (data.is_a?(Hash) ? data : {}).with_indifferent_access
|
15
|
+
end
|
16
|
+
|
17
|
+
def git_current_revision
|
18
|
+
data[__method__] || DEFAULT_CURRENT_REVISION
|
19
|
+
end
|
20
|
+
|
21
|
+
def git_publish_remote
|
22
|
+
data[__method__] || DEFAULT_PUBLISH_REMOTE
|
23
|
+
end
|
24
|
+
|
25
|
+
def publishable?
|
26
|
+
!!publishable_value
|
27
|
+
end
|
28
|
+
|
29
|
+
def stereotype_publishable?(stereotype)
|
30
|
+
return publishable? unless publishable_value.is_a?(::Hash)
|
31
|
+
|
32
|
+
parse_publishable_value(publishable_value[stereotype.stereotype_name], true)
|
33
|
+
end
|
34
|
+
|
35
|
+
private
|
36
|
+
|
37
|
+
def publishable_value
|
38
|
+
parse_publishable_value(data[PUBLISHABLE_KEY], false)
|
39
|
+
end
|
40
|
+
|
41
|
+
def parse_publishable_value(value, hash_to_true)
|
42
|
+
return value.with_indifferent_access if !hash_to_true && value.is_a?(::Hash)
|
43
|
+
return true if value.nil? || value == true
|
44
|
+
return false if value == false
|
45
|
+
|
46
|
+
!!value
|
47
|
+
end
|
48
|
+
end
|
49
|
+
end
|
50
|
+
end
|
51
|
+
end
|
data/lib/avm/tools/version.rb
CHANGED
@@ -1,8 +1,8 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
|
+
require 'avm/launcher/instances/settings'
|
3
4
|
require 'eac_ruby_utils/simple_cache'
|
4
5
|
require 'yaml'
|
5
|
-
require 'eac_launcher/instances/settings'
|
6
6
|
|
7
7
|
module EacLauncher
|
8
8
|
class Context
|
@@ -18,7 +18,7 @@ module EacLauncher
|
|
18
18
|
end
|
19
19
|
|
20
20
|
def instance_settings(instance)
|
21
|
-
::
|
21
|
+
::Avm::Launcher::Instances::Settings.new(value(['Instances', instance.name]))
|
22
22
|
end
|
23
23
|
|
24
24
|
private
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: avm-tools
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.64.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Esquilo Azul Company
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2020-08-
|
11
|
+
date: 2020-08-19 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: aranha-parsers
|
@@ -373,6 +373,7 @@ files:
|
|
373
373
|
- lib/avm/launcher/errors/non_project.rb
|
374
374
|
- lib/avm/launcher/instances/base.rb
|
375
375
|
- lib/avm/launcher/instances/base/cache.rb
|
376
|
+
- lib/avm/launcher/instances/settings.rb
|
376
377
|
- lib/avm/local_projects.rb
|
377
378
|
- lib/avm/local_projects/instance.rb
|
378
379
|
- lib/avm/local_projects/jobs/update.rb
|
@@ -516,7 +517,6 @@ files:
|
|
516
517
|
- lib/eac_launcher/instances.rb
|
517
518
|
- lib/eac_launcher/instances/error.rb
|
518
519
|
- lib/eac_launcher/instances/runner_helper.rb
|
519
|
-
- lib/eac_launcher/instances/settings.rb
|
520
520
|
- lib/eac_launcher/paths.rb
|
521
521
|
- lib/eac_launcher/paths/logical.rb
|
522
522
|
- lib/eac_launcher/paths/real.rb
|
@@ -1,23 +0,0 @@
|
|
1
|
-
# frozen_string_literal: true
|
2
|
-
|
3
|
-
module EacLauncher
|
4
|
-
module Instances
|
5
|
-
class Settings
|
6
|
-
def initialize(data)
|
7
|
-
@data = ActiveSupport::HashWithIndifferentAccess.new(data.is_a?(Hash) ? data : {})
|
8
|
-
end
|
9
|
-
|
10
|
-
def git_current_revision
|
11
|
-
@data[__method__] || 'origin/master'
|
12
|
-
end
|
13
|
-
|
14
|
-
def git_publish_remote
|
15
|
-
@data[__method__] || 'publish'
|
16
|
-
end
|
17
|
-
|
18
|
-
def publishable?
|
19
|
-
@data.key?(:publishable) ? @data[:publishable] : true
|
20
|
-
end
|
21
|
-
end
|
22
|
-
end
|
23
|
-
end
|