power_stencil 0.3.3 → 0.3.4

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: dcd80aee0e9932a4fe819203fff8699c949eaa24
4
- data.tar.gz: 7495afdc4abbf4c5c09a728b352ba8868d9851c0
3
+ metadata.gz: 00447c56d525ad327510d4ab6b5cf535ad719514
4
+ data.tar.gz: 1e26b3268e7f07f2821fa727b8aa8f2a35f33f03
5
5
  SHA512:
6
- metadata.gz: b22d036ea9744681e4c838133790e91fc08e14ebfc09cc1980549516ec83dcd47469b800ce9c3d599055b0dbebe1caeeecf59190563b5ca3c39626c1928cad6b
7
- data.tar.gz: e0825248d461ca674ed3c4714b6d33a890d1b0110aa4dc1ea0f948da99c0b80a481c880b79381057bdb0b19959567294abe1e4ac9b0df141c6b099d94064a672
6
+ metadata.gz: e901b9f2723a58bc60bfefd3b40a4408b68e42304a37b974fb6012380971d0544f58af2b4ba8082f839c15cba1e7449d8e9d5e04bfcb6a6d720308493631cae9
7
+ data.tar.gz: ce6ee809c4ce173acdd1219a861954968f399e62dbf3ced1d771d7ca739004532b4aed9a9041f63c91a7cd76ed83e0d88754662c517aa5c9dee70735eda1135e
@@ -5,22 +5,28 @@ module PowerStencil
5
5
 
6
6
  include PowerStencil::Project::Paths
7
7
 
8
+ PROJECT_CONFIG_PRIORITY = 2000
9
+ USER_CONFIG_PRIORITY = 2010
10
+ PLUGIN_CONFIG_PRIORITY_MIN = 1000
11
+
8
12
  attr_reader :plugin_priority_count
9
13
 
14
+
10
15
  def load_project_specific_config
11
16
  # Optional config files should have less priority than the command line layer
12
- add_optional_config_layer project_versioned_config_file, 'versioned project config file', 70
13
- add_optional_config_layer project_personal_config_file, 'personal project config file', 900
17
+ add_optional_config_layer project_versioned_config_file, 'versioned project config file', PROJECT_CONFIG_PRIORITY
18
+ add_optional_config_layer project_personal_config_file, 'personal project config file', USER_CONFIG_PRIORITY
14
19
  end
15
20
 
21
+
16
22
  def add_plugin_config(plugin_name)
17
23
  yaml_file = plugin_config_specific_file plugin_name
18
24
  priority = if priority.nil?
19
- 200
25
+ PLUGIN_CONFIG_PRIORITY_MIN
20
26
  else
21
27
  plugin_priority_count + 1
22
28
  end
23
-
29
+ raise PowerStencil::Error, 'Too many plugins !!' if priority >= PROJECT_CONFIG_PRIORITY
24
30
  add_optional_config_layer yaml_file, "'#{plugin_name}' plugin specific config", priority
25
31
  @plugin_priority_count ||= 0
26
32
  @plugin_priority_count += 1
@@ -1,3 +1,3 @@
1
1
  module PowerStencil
2
- VERSION = '0.3.3'.freeze
2
+ VERSION = '0.3.4'.freeze
3
3
  end
@@ -37,6 +37,7 @@ If your shell is not completing the command:
37
37
  If you use rbenv: `rbenv rehash`
38
38
  If you use zsh : `rehash`
39
39
 
40
- Feel free to report issues: https://gitlab.com/tools4devops/power_stencil/issues
40
+ Full documentation here : #{spec.homepage}/blob/master/README.md
41
+ Feel free to report issues: #{spec.homepage}/issues
41
42
  }
42
43
  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.3.3
4
+ version: 0.3.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Laurent B.
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2019-08-29 00:00:00.000000000 Z
11
+ date: 2019-08-30 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -263,10 +263,11 @@ homepage: https://gitlab.com/tools4devops/power_stencil
263
263
  licenses:
264
264
  - MIT
265
265
  metadata: {}
266
- post_install_message: "\nThank you for installing PowerStencil 0.3.3 !\nFrom the command
266
+ post_install_message: "\nThank you for installing PowerStencil 0.3.4 !\nFrom the command
267
267
  line you can run `power_stencil --help`\nIf your shell is not completing the command:\n
268
- \ If you use rbenv: `rbenv rehash`\n If you use zsh : `rehash`\n\nFeel free to
269
- report issues: https://gitlab.com/tools4devops/power_stencil/issues\n "
268
+ \ If you use rbenv: `rbenv rehash`\n If you use zsh : `rehash`\n\nFull documentation
269
+ here : https://gitlab.com/tools4devops/power_stencil/blob/master/README.md\nFeel
270
+ free to report issues: https://gitlab.com/tools4devops/power_stencil/issues\n "
270
271
  rdoc_options: []
271
272
  require_paths:
272
273
  - lib