power_stencil 0.6.1 → 0.6.2

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
  SHA1:
3
- metadata.gz: 687808cf09467280d9b69cc408051a26c27910f1
4
- data.tar.gz: 30ab8477a45c06b3263b8eaeeabf013b8641830c
3
+ metadata.gz: 4ab896eb3e63889b7f9a855ee1ae4a740fdafc73
4
+ data.tar.gz: cf42d440b67e74edcba8d9569fafc3d04d877757
5
5
  SHA512:
6
- metadata.gz: 6839ca4af2d78718eaf88c378c424109f9bc5f8cab5ef1ab944ee01a1a437fcb85304638c2d46196f8690d502cee40698416caaa0ef1492676363ee0220db2a5
7
- data.tar.gz: f448a6a57f64bd209f9682f94581ad9fbd19433ad51a46e8fd6bbcc6aeaadedb4de5a6d1bccd21b1833eba6f4e0ffb94061acbc677360d131d6cff77ba7fa6f2
6
+ metadata.gz: 810213cbbb8dc1d9913031da7a90c77e9c2a7f2a453e5492bc051857ca33b9f8087f0d171991ae1d9a2ae147bead8dd25e3767dc81c6af9f5d0508e72918b992
7
+ data.tar.gz: a564943c393aac1c084afa0f8c8d0685cb7c0be204ed35545b622fe0b90d13fa82b329ef266ba5481ba18865daedcf595c64ef95f6d5993afaf2dbda257eff1e
@@ -20,6 +20,15 @@ Builds
20
20
 
21
21
  You build a [buildable] entity by issuing `power_stencil build <entity_type>/<entity_name>`. If you try to build an entity which is not buildable, the process fail with an error message.
22
22
 
23
+ **:information_source: You can get the list of buildable entities in your repository by issuing a `power_stencil build --list`:**
24
+
25
+ ```
26
+ $ power_stencil build --list
27
+ - 'simple_exec' (buildable by 'PowerStencil core' and provided by 'PowerStencil core').
28
+ ```
29
+
30
+ We will see later in the [templates] part what to do with this `simple_exec` entity type.
31
+
23
32
  Let's describe a bit more in detail what this build process is:
24
33
 
25
34
  ![entity-build-flow]
@@ -32,7 +41,7 @@ I guess you understood this is not a "real" _compilation_ process we are discuss
32
41
 
33
42
  The mechanism of the compilation is coming from the [universe_compiler] Gem, but the two following features are the ones you really need to understand.
34
43
 
35
- :information_source: The compilation process can be applied to any entity, ie it doesn't need to be [buildable] (see in next paragraph how to run the compilation). But an entity needs to be [buildable] to use `power_stencil build` which corresponds actually to _compilation_ + _detemplatization_.
44
+ :information_source: The compilation process is actually applied to all entities, ie it doesn't need to be [buildable] (see in next paragraph how to run the compilation). But an entity needs to be [buildable] to use `power_stencil build` which corresponds actually to _compilation_ + _detemplatization_.
36
45
 
37
46
  ## Extending an entity
38
47
 
@@ -58,8 +58,8 @@ $ power_stencil info
58
58
  PROJECT REPORT
59
59
  --------------------------------------------------------------------------------
60
60
  General information:
61
- - Project required version: 0.2.18
62
- - PowerStencil version: 0.2.18
61
+ - Project required version: 0.6.1
62
+ - PowerStencil version: 0.6.1
63
63
  --------------------------------------------------------------------------------
64
64
  Paths:
65
65
  - Project root path: '/tmp/tst2'
@@ -75,12 +75,12 @@ PROJECT REPORT
75
75
  - project_config: 1
76
76
  --------------------------------------------------------------------------------
77
77
  Available entity types:
78
- - Type 'base_entity' --> PowerStencil::SystemEntityDefinitions::ProjectEntity
79
- - Type 'entity_override' --> UniverseCompiler::Entity::Override
80
- - Type 'plugin_definition' --> PowerStencil::SystemEntityDefinitions::Plugin (template-template path: '/opt/rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/gems/power_stencil-0.2.18/etc/templates/plugin_definition')
81
- - Type 'process_descriptor' --> PowerStencil::SystemEntityDefinitions::ProcessDescriptor
82
- - Type 'project_config' --> PowerStencil::SystemEntityDefinitions::ProjectConfig
83
- - Type 'simple_exec' --> PowerStencil::SystemEntityDefinitions::SimpleExec (template-template path: '/opt/rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/gems/power_stencil-0.2.18/etc/templates/simple_exec')
78
+ - Type 'base_entity' --> PowerStencil::SystemEntityDefinitions::ProjectEntity (provided by 'PowerStencil core')
79
+ - Type 'entity_override' --> UniverseCompiler::Entity::Override (provided by 'PowerStencil core')
80
+ - Type 'plugin_definition' --> PowerStencil::SystemEntityDefinitions::Plugin (provided by 'PowerStencil core') template-template path: '/opt/rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/gems/power_stencil-0.6.1/etc/templates/plugin_definition'
81
+ - Type 'process_descriptor' --> PowerStencil::SystemEntityDefinitions::ProcessDescriptor (provided by 'PowerStencil core')
82
+ - Type 'project_config' --> PowerStencil::SystemEntityDefinitions::ProjectConfig (provided by 'PowerStencil core')
83
+ - Type 'simple_exec' --> PowerStencil::SystemEntityDefinitions::SimpleExec (provided by 'PowerStencil core') template-template path: '/opt/rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/gems/power_stencil-0.6.1/etc/templates/simple_exec'
84
84
  ```
85
85
 
86
86
  It provides a lot of information about the project, but let's focus on the `Entities` and `Available entity types` parts of the report.
@@ -178,20 +178,23 @@ We have seen the `power_stencil info` returns (among other) the number of entiti
178
178
  $ power_stencil check
179
179
  RAW ENTITIES
180
180
  'base_entity/my_1st_entity':
181
- - Storage path: '/tmp/tst2/.ps_project/entities/base_entity/my_1st_entity.yaml'
182
- - Status : Valid
183
- - Buildable : false
181
+ - Storage path : '/tmp/tst2/.ps_project/entities/base_entity/my_1st_entity.yaml'
182
+ - Provided by : 'PowerStencil core'
183
+ - Status : Valid
184
+ - Buildable : false
184
185
  'base_entity/my_2nd_entity':
185
- - Storage path: '/tmp/tst2/.ps_project/entities/base_entity/my_2nd_entity.yaml'
186
- - Status : Valid
187
- - Buildable : false
186
+ - Storage path : '/tmp/tst2/.ps_project/entities/base_entity/my_2nd_entity.yaml'
187
+ - Provided by : 'PowerStencil core'
188
+ - Status : Valid
189
+ - Buildable : false
188
190
  'project_config/Project Config':
189
- - Storage path: ''
190
- - Status : Valid
191
- - Buildable : false
191
+ - Storage path : ''
192
+ - Provided by : 'PowerStencil core'
193
+ - Status : Valid
194
+ - Buildable : false
192
195
  ```
193
196
 
194
- The goal of this command is normally to check the validity of entities, but it brings as well extra information like if the entity is _buildable_ or even where it is stored in the repository.
197
+ The goal of this command is normally to check the validity of entities, but it brings as well extra information like if the entity is _buildable_ or even where it is stored in the repository or if is provided by the core system (PowerStencil core) or a plugin.
195
198
 
196
199
  :information_source: You can notice that the `project_config` entity has no storage path, the reason being [it is not persisted](#default-entity-types) in the entities repository (its content actually comes from config files outside of the repository).
197
200
 
@@ -203,13 +206,15 @@ By default `power_stencil check` will check all entities in the repository but y
203
206
  $ power_stencil check base_entity/my_1st_entity 'project_config/Project Config'
204
207
  RAW ENTITIES
205
208
  'base_entity/my_1st_entity':
206
- - Storage path: '/tmp/tst2/.ps_project/entities/base_entity/my_1st_entity.yaml'
207
- - Status : Valid
208
- - Buildable : false
209
+ - Storage path : '/tmp/tst2/.ps_project/entities/base_entity/my_1st_entity.yaml'
210
+ - Provided by : 'PowerStencil core'
211
+ - Status : Valid
212
+ - Buildable : false
209
213
  'project_config/Project Config':
210
- - Storage path: ''
211
- - Status : Valid
212
- - Buildable : false
214
+ - Storage path : ''
215
+ - Provided by : 'PowerStencil core'
216
+ - Status : Valid
217
+ - Buildable : false
213
218
  ```
214
219
  Another possibility is to check a list of objects using a regular expression (applied to the ID of an entity, ie `<entity_type</<entity_name>`) by using the `--regexp` option:
215
220
 
@@ -217,13 +222,15 @@ Another possibility is to check a list of objects using a regular expression (ap
217
222
  $ power_stencil check base_ --regexp
218
223
  RAW ENTITIES
219
224
  'base_entity/my_1st_entity':
220
- - Storage path: '/tmp/tst2/.ps_project/entities/base_entity/my_1st_entity.yaml'
221
- - Status : Valid
222
- - Buildable : false
225
+ - Storage path : '/tmp/tst2/.ps_project/entities/base_entity/my_1st_entity.yaml'
226
+ - Provided by : 'PowerStencil core'
227
+ - Status : Valid
228
+ - Buildable : false
223
229
  'base_entity/my_2nd_entity':
224
- - Storage path: '/tmp/tst2/.ps_project/entities/base_entity/my_2nd_entity.yaml'
225
- - Status : Valid
226
- - Buildable : false
230
+ - Storage path : '/tmp/tst2/.ps_project/entities/base_entity/my_2nd_entity.yaml'
231
+ - Provided by : 'PowerStencil core'
232
+ - Status : Valid
233
+ - Buildable : false
227
234
  ```
228
235
 
229
236
  ## Querying and graphing entities
@@ -336,9 +343,10 @@ Created 'base_entity/dev_entity'
336
343
  $ power_stencil check base_entity/dev_entity
337
344
  RAW ENTITIES
338
345
  'base_entity/dev_entity':
339
- - Storage path: '/tmp/tst2/.ps_project/user_entities/base_entity/dev_entity.yaml'
340
- - Status : Valid
341
- - Buildable : false
346
+ - Storage path : '/tmp/tst2/.ps_project/user_entities/base_entity/dev_entity.yaml'
347
+ - Provided by : 'PowerStencil core'
348
+ - Status : Valid
349
+ - Buildable : false
342
350
  ```
343
351
  You can notice where the YAML file has been created.
344
352
 
@@ -487,13 +495,13 @@ $ power_stencil info
487
495
  .
488
496
  --------------------------------------------------------------------------------
489
497
  Available entity types:
490
- - Type 'base_entity' --> PowerStencil::SystemEntityDefinitions::ProjectEntity
498
+ - Type 'base_entity' --> PowerStencil::SystemEntityDefinitions::ProjectEntity (provided by 'PowerStencil core')
491
499
  - Type 'custom_entity' --> MyCustomEntity
492
- - Type 'entity_override' --> UniverseCompiler::Entity::Override
493
- - Type 'plugin_definition' --> PowerStencil::SystemEntityDefinitions::Plugin (template-template path: '/opt/rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/gems/power_stencil-0.2.18/etc/templates/plugin_definition')
494
- - Type 'process_descriptor' --> PowerStencil::SystemEntityDefinitions::ProcessDescriptor
495
- - Type 'project_config' --> PowerStencil::SystemEntityDefinitions::ProjectConfig
496
- - Type 'simple_exec' --> PowerStencil::SystemEntityDefinitions::SimpleExec (template-template path: '/opt/rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/gems/power_stencil-0.2.18/etc/templates/simple_exec')
500
+ - Type 'entity_override' --> UniverseCompiler::Entity::Override (provided by 'PowerStencil core')
501
+ - Type 'plugin_definition' --> PowerStencil::SystemEntityDefinitions::Plugin (provided by 'PowerStencil core') template-template path: '/opt/rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/gems/power_stencil-0.6.1/etc/templates/plugin_definition'
502
+ - Type 'process_descriptor' --> PowerStencil::SystemEntityDefinitions::ProcessDescriptor (provided by 'PowerStencil core')
503
+ - Type 'project_config' --> PowerStencil::SystemEntityDefinitions::ProjectConfig (provided by 'PowerStencil core')
504
+ - Type 'simple_exec' --> PowerStencil::SystemEntityDefinitions::SimpleExec (provided by 'PowerStencil core') template-template path: '/opt/rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/gems/power_stencil-0.6.1/etc/templates/simple_exec'
497
505
  ```
498
506
  You see that the `custom_entity` type appeared in the list. Need another proof ?
499
507
  ```shell
@@ -503,9 +511,10 @@ Created 'custom_entity/my_1st_custom_entity'
503
511
  $ power_stencil check cust -r
504
512
  RAW ENTITIES
505
513
  'custom_entity/my_1st_custom_entity':
506
- - Storage path: '/tmp/tst2/.ps_project/entities/custom_entity/my_1st_custom_entity.yaml'
507
- - Status : Valid
508
- - Buildable : false
514
+ - Storage path : '/tmp/tst2/.ps_project/entities/custom_entity/my_1st_custom_entity.yaml'
515
+ - Provided by : 'PowerStencil core'
516
+ - Status : Valid
517
+ - Buildable : false
509
518
 
510
519
  $ power_stencil get custom_entity/my_1st_custom_entity --raw
511
520
  --- !ruby/object:MyCustomEntity
@@ -206,6 +206,7 @@ we can check using `power_stencil check myplugin_entity/test`:
206
206
  $ power_stencil check myplugin_entity/test
207
207
  'myplugin_entity/test':
208
208
  - Storage path : '/tmp/demo/.ps_project/entities/myplugin_entity/test.yaml'
209
+ - Provided by : plugin 'myplugin'
209
210
  - Templates path : '/tmp/demo/myplugin_entity/test'
210
211
  - Status : Valid
211
212
  - Buildable : true
@@ -43,6 +43,7 @@ $ power_stencil check simple_exec/demo_templates
43
43
  RAW ENTITIES
44
44
  'simple_exec/demo_templates':
45
45
  - Storage path : '/tmp/tst3/.ps_project/entities/simple_exec/demo_templates.yaml'
46
+ - Provided by : 'PowerStencil core'
46
47
  - Templates path : '/tmp/tst3/simple_exec/demo_templates'
47
48
  - Status : Valid
48
49
  - Buildable : true
@@ -15,8 +15,21 @@ module PowerStencil
15
15
  if config[:'supported-builds']
16
16
  project.engine.available_entities_hash.select do |_, klass|
17
17
  klass.respond_to?(:buildable?) and klass.buildable?
18
- end .each do |entity_type, _|
19
- puts " - '#{entity_type}'"
18
+ end .each do |entity_type, entity_class|
19
+ builder = entity_class.buildable_by.empty? ? "'#{PowerStencil.name}'" : "plugin '#{entity_class.buildable_by}'"
20
+
21
+ source_provider = entity_class.entity_type_source_provider
22
+ source_provider_display = if source_provider == PowerStencil
23
+ "'#{source_provider.name}'"
24
+ elsif source_provider == project
25
+ "project '#{source_provider.name}'"
26
+ elsif source_provider.is_a? PowerStencil::Plugins::Base
27
+ "plugin '#{source_provider.name}'"
28
+ else
29
+ raise PowerStencil::Error, "Unidentified source provider for #{entity_class} !"
30
+ end
31
+
32
+ puts " - '#{entity_type}' (buildable by #{builder} and provided by #{source_provider_display})."
20
33
  end
21
34
  return
22
35
  end
@@ -23,6 +23,18 @@ module PowerStencil
23
23
  sorted_targets.map do |entity|
24
24
  entity_info = [" '#{entity.as_path}':"]
25
25
  entity_info << " - Storage path : '#{entity.source_uri}'"
26
+
27
+ source_provider = entity.class.entity_type_source_provider
28
+ source_provider_display = if source_provider == PowerStencil
29
+ "'#{source_provider.name}'"
30
+ elsif source_provider == project
31
+ "project '#{source_provider.name}'"
32
+ elsif source_provider.is_a? PowerStencil::Plugins::Base
33
+ "plugin '#{source_provider.name}'"
34
+ else
35
+ raise PowerStencil::Error, "Unidentified source provider for #{entity.class} !"
36
+ end
37
+ entity_info << " - Provided by : #{source_provider_display}"
26
38
  entity_info << " - Templates path : '#{entity.templates_path}'" if entity.respond_to? :templates_path
27
39
  entity_info << " - Status : #{entity.valid? ? 'Valid' : 'INVALID !'} "
28
40
  entity_info << " - Buildable : #{entity.buildable?}"
@@ -25,10 +25,10 @@ module PowerStencil
25
25
  else
26
26
  puts "#{project.plugins.size} plugin#{project.plugins.size == 1 ? '' : 's'} found to be used in this project."
27
27
  end
28
- project.plugins.each do |plugin_name, plugin_def|
29
- puts " - #{plugin_name} (in '#{plugin_def.entry_point_path}')"
28
+ project.plugins.each do |_, plugin|
29
+ puts " - #{plugin.name} (in '#{plugin.plugin_path}')"
30
30
  if config[:verbose]
31
- plugin_def.capabilities.each do |name, value|
31
+ plugin.capabilities.each do |name, value|
32
32
  puts " #{name}: #{value}"
33
33
  end
34
34
  end
@@ -7,7 +7,7 @@ module PowerStencil
7
7
 
8
8
  include PowerStencil::Utils::SecureRequire
9
9
 
10
- def require_definition_files(files_or_dirs)
10
+ def require_definition_files(files_or_dirs, source)
11
11
  required_files = []
12
12
  files_or_dirs.each do |file_or_dir|
13
13
  if File.directory? file_or_dir and File.readable? file_or_dir
@@ -21,21 +21,30 @@ module PowerStencil
21
21
  next
22
22
  end
23
23
  # This is a ruby library or there is something wrong
24
- securely_require file_or_dir
25
- # unless securely_require file_or_dir
26
- # logger.warn "While trying to load definition files, found that '#{file_or_dir}' has a problem. Ignored..."
27
- # end
24
+ securely_require_with_entity_class_detection file_or_dir, source
25
+
28
26
  end
29
- required_files.sort!.each {|file| securely_require file, fail_on_error: true}
27
+ required_files.sort!.each { |file| securely_require_with_entity_class_detection file, source }
30
28
  required_files
31
29
  end
32
30
 
33
31
  private
34
32
 
35
33
  def load_system_entities_definition
36
- require_definition_files [SYSTEM_ENTITY_DEFINITION_ENTRY_POINT]
34
+ require_definition_files [SYSTEM_ENTITY_DEFINITION_ENTRY_POINT], PowerStencil
37
35
  end
38
36
 
37
+ def securely_require_with_entity_class_detection(entity_definition_file_path, source)
38
+ before = PowerStencil::Engine::EntitiesHandling.all_types
39
+ securely_require entity_definition_file_path, fail_on_error: true
40
+ after = PowerStencil::Engine::EntitiesHandling.all_types
41
+ after.reject { |k, _| before.keys.include? k }
42
+ .each do |_, plugin_entity_class|
43
+ plugin_entity_class.instance_eval do
44
+ @entity_type_source_provider = source
45
+ end
46
+ end
47
+ end
39
48
  end
40
49
 
41
50
  end
@@ -36,7 +36,7 @@ module PowerStencil
36
36
  if Dir.exist? dir and File.readable? dir
37
37
  logger.info 'Loading project specific entity definitions.'
38
38
  $LOAD_PATH << dir
39
- require_definition_files [dir]
39
+ require_definition_files [dir], project
40
40
  end
41
41
  end
42
42
 
@@ -8,6 +8,10 @@ module PowerStencil
8
8
 
9
9
  include Climatic::Proxy
10
10
 
11
+ def name
12
+ 'PowerStencil core'
13
+ end
14
+
11
15
  def bootstrap(cmd_line_args = ARGV.dup)
12
16
  setup_climatic cmd_line_args
13
17
  logger.debug 'Starting PowerStencil initialization...'
@@ -6,9 +6,24 @@ module PowerStencil
6
6
  def require_plugin_entity_definitions
7
7
  return unless capabilities[:entity_definitions]
8
8
  logger.info "Requiring '#{self.name}' plugin entity definitions..."
9
+ securely_require_with_entity_class_detection
10
+ end
11
+
12
+
13
+ private
14
+
15
+ def securely_require_with_entity_class_detection
16
+ before = PowerStencil::Engine::EntitiesHandling.all_types
9
17
  plugin_definition[:entity_definitions].each do |entity_definition_file_path|
10
18
  securely_require entity_definition_file_path, fail_on_error: true
11
19
  end
20
+ after = PowerStencil::Engine::EntitiesHandling.all_types
21
+ after.reject { |k, _| before.keys.include? k }.each do |_, plugin_entity_class|
22
+ plugin = self
23
+ plugin_entity_class.instance_eval do
24
+ @entity_type_source_provider = plugin
25
+ end
26
+ end
12
27
  end
13
28
 
14
29
  end
@@ -21,6 +21,7 @@ module PowerStencil
21
21
  $LOAD_PATH << plugin_root_path
22
22
  securely_require entry_point_path unless plugin_definition[:plugin_module].nil?
23
23
  rescue LoadError => e
24
+ @entry_point_path = nil
24
25
  logger.warn "As plugin '#{name}' code is invalid, removing '#{plugin_root_path}' from LOAD_PATH"
25
26
  $LOAD_PATH.delete plugin_root_path
26
27
  end
@@ -34,6 +34,10 @@ module PowerStencil
34
34
 
35
35
  attr_reader :engine, :entity_engine
36
36
 
37
+ def name
38
+ File.dirname project_config_root
39
+ end
40
+
37
41
  def initialize(search_from_path: Dir.pwd)
38
42
  initialize_paths search_from_path
39
43
  load_project_specific_config
@@ -60,7 +60,20 @@ module PowerStencil
60
60
  .sort{ |a,b| a.first <=> b.first }
61
61
  .each do |type, klass|
62
62
  msg = "Type '#{type}' --> #{klass}"
63
- msg << " (template-template path: '#{entity_type_templates[type]}')" unless entity_type_templates[type].nil?
63
+
64
+ source_provider = klass.entity_type_source_provider
65
+ source_provider_display = if source_provider == PowerStencil
66
+ "'#{source_provider.name}'"
67
+ elsif source_provider == self
68
+ "project '#{source_provider.name}'"
69
+ elsif source_provider.is_a? PowerStencil::Plugins::Base
70
+ "plugin '#{source_provider.name}'"
71
+ else
72
+ raise PowerStencil::Error, "Unidentified source provider for #{klass} !"
73
+ end
74
+
75
+ msg << " (provided by #{source_provider_display})"
76
+ msg << " template-template path: '#{entity_type_templates[type]}'" unless entity_type_templates[type].nil?
64
77
  report << msg
65
78
  end
66
79
  report
@@ -3,6 +3,7 @@
3
3
 
4
4
  require 'power_stencil/system_entity_definitions/non_persistent'
5
5
  require 'power_stencil/system_entity_definitions/has_associated_files'
6
+ require 'power_stencil/system_entity_definitions/source_provider'
6
7
  require 'power_stencil/system_entity_definitions/buildable'
7
8
  require 'power_stencil/system_entity_definitions/entity_project_common'
8
9
 
@@ -1,5 +1,6 @@
1
1
  class UniverseCompiler::Entity::Override
2
2
 
3
+ extend PowerStencil::SystemEntityDefinitions::SourceProvider
3
4
  extend PowerStencil::SystemEntityDefinitions::Buildable
4
5
  include PowerStencil::SystemEntityDefinitions::EntityProjectCommon
5
6
 
@@ -3,7 +3,7 @@ module PowerStencil
3
3
 
4
4
  module EntityProjectCommon
5
5
 
6
- def save(uri = source_uri, raise_error: true, force_save: false, force_files_generation: false )
6
+ def save(uri = source_uri, raise_error: true, force_save: false, force_files_generation: false )
7
7
  super(source_uri, raise_error: raise_error, force_save: force_save)
8
8
  unless PowerStencil.project.entity_type_templates[type].nil?
9
9
  PowerStencil.project.generate_entity_dir_for_entity self, force: force_files_generation
@@ -3,6 +3,7 @@ module PowerStencil
3
3
 
4
4
  class ProjectEntity < UniverseCompiler::Entity::Base
5
5
 
6
+ extend PowerStencil::SystemEntityDefinitions::SourceProvider
6
7
  extend PowerStencil::SystemEntityDefinitions::Buildable
7
8
  include PowerStencil::SystemEntityDefinitions::EntityProjectCommon
8
9
 
@@ -9,7 +9,7 @@ module PowerStencil
9
9
 
10
10
  entity_type :simple_exec
11
11
 
12
- buildable_by ''
12
+ buildable
13
13
 
14
14
  has_one :process_descriptor, name: :post_process
15
15
  not_null :post_process
@@ -0,0 +1,15 @@
1
+ module PowerStencil
2
+ module SystemEntityDefinitions
3
+
4
+ module SourceProvider
5
+
6
+ DEFAULT_PROVIDER = PowerStencil
7
+
8
+ def entity_type_source_provider
9
+ @entity_type_source_provider ||= DEFAULT_PROVIDER
10
+ end
11
+
12
+ end
13
+
14
+ end
15
+ end
@@ -1,3 +1,3 @@
1
1
  module PowerStencil
2
- VERSION = '0.6.1'.freeze
2
+ VERSION = '0.6.2'.freeze
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: power_stencil
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.6.1
4
+ version: 0.6.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Laurent Briais
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2019-10-27 00:00:00.000000000 Z
11
+ date: 2019-10-28 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -257,6 +257,7 @@ files:
257
257
  - lib/power_stencil/system_entity_definitions/project_config.rb
258
258
  - lib/power_stencil/system_entity_definitions/project_entity.rb
259
259
  - lib/power_stencil/system_entity_definitions/simple_exec.rb
260
+ - lib/power_stencil/system_entity_definitions/source_provider.rb
260
261
  - lib/power_stencil/utils/directory_processor.rb
261
262
  - lib/power_stencil/utils/file_edit.rb
262
263
  - lib/power_stencil/utils/file_helper.rb
@@ -275,7 +276,7 @@ metadata:
275
276
  documentation_uri: https://gitlab.com/tools4devops/power_stencil/blob/master/README.md
276
277
  source_code_uri: https://gitlab.com/tools4devops/power_stencil
277
278
  homepage_uri: https://powerstencil.brizone.org/
278
- post_install_message: "\nThank you for installing PowerStencil 0.6.1 !\nFrom the command
279
+ post_install_message: "\nThank you for installing PowerStencil 0.6.2 !\nFrom the command
279
280
  line you can run `power_stencil --help`\nIf your shell is not completing the command:\n
280
281
  \ If you use rbenv: `rbenv rehash`\n If you use zsh : `rehash`\n\nOfficial Website
281
282
  \ : https://powerstencil.brizone.org/\nFull documentation here : https://gitlab.com/tools4devops/power_stencil/blob/master/README.md\nFeel