Commit a896489c authored by Laurent Briais's avatar Laurent Briais

Merge branch '21-options-brought-by-plugins-not-available-if-not-within-project' into 'master'

Resolve "Options brought by plugins not available if not within project tree"

Closes #21

See merge request !25
parents c5f8cef0 849f3440
Pipeline #97823573 passed with stage
in 1 minute and 6 seconds
...@@ -63,7 +63,7 @@ module PowerStencil ...@@ -63,7 +63,7 @@ module PowerStencil
end end
def setup_climatic(cmd_line_args) def setup_climatic(cmd_line_args)
::UltraCommandLine.slop_options[:suppress_errors] = true ::UltraCommandLine.permissive_mode = true
mngr = Climatic::ConfigLayers::CommandLineLayer.build_command_line_manager base_commands_definition_file mngr = Climatic::ConfigLayers::CommandLineLayer.build_command_line_manager base_commands_definition_file
Climatic.bootstrap cmd_line_args: cmd_line_args, command_manager: mngr Climatic.bootstrap cmd_line_args: cmd_line_args, command_manager: mngr
mngr.commands.each do |command| mngr.commands.each do |command|
......
...@@ -44,6 +44,8 @@ module PowerStencil ...@@ -44,6 +44,8 @@ module PowerStencil
initialize_gem_plugins initialize_gem_plugins
initialize_local_plugins initialize_local_plugins
require_plugins_entry_points require_plugins_entry_points
# Here all the command line options are known. We can turn the slop "permissive mode" back to default
::UltraCommandLine.permissive_mode = false
command_line_manager.definition_hash_to_commands command_line_manager.definition_hash_to_commands
register_plugins_processors register_plugins_processors
end end
......
...@@ -25,7 +25,7 @@ Gem::Specification.new do |spec| ...@@ -25,7 +25,7 @@ Gem::Specification.new do |spec|
spec.add_development_dependency 'rake', '~> 10.0' spec.add_development_dependency 'rake', '~> 10.0'
spec.add_development_dependency 'rspec', '~> 3.0' spec.add_development_dependency 'rspec', '~> 3.0'
spec.add_dependency 'climatic', '~> 0.2.37' spec.add_dependency 'climatic', '~> 0.2.38'
spec.add_dependency 'dir_glob_ignore', '~> 0.3' spec.add_dependency 'dir_glob_ignore', '~> 0.3'
spec.add_dependency 'universe_compiler', '~> 0.5.6' spec.add_dependency 'universe_compiler', '~> 0.5.6'
spec.add_dependency 'pry' spec.add_dependency 'pry'
......
...@@ -16,7 +16,7 @@ ...@@ -16,7 +16,7 @@
# This is the name of the method called after the files are detemplatized. This method has # This is the name of the method called after the files are detemplatized. This method has
# to be a module method in the `plugin_module` module. # to be a module method in the `plugin_module` module.
:build: post_build_hook :post_build: post_build_hook
# If a dsl module is declared it will be injected in the DSL available in the shell or templates # If a dsl module is declared it will be injected in the DSL available in the shell or templates
:dsl: Sample::Dsl::SampleDsl :dsl: Sample::Dsl::SampleDsl
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment