teracyhq-incubator / teracy-dev-core

teracy-dev-core extension
MIT License
1 stars 6 forks source link

variables processor should support boolean value #38

Closed hoatle closed 6 years ago

hoatle commented 6 years ago

config:

variables:
  my_extension_enabled: false

teracy-dev:
    - _id: "entry-my-extension"
      path:
        extension: project/teracy-dev-my-extension
      location:
        git: git@github.com:org/project.git
        branch: develop
      require_version: ">= 0.1.0-SNAPSHOT"
      enabled: "%{my_extension_enabled}"

Expected: it should work as normal as my_extension_enabled: "false"

Actual: error

/Users/hoatle/my-dev/extensions/teracy-dev-core/lib/teracy-dev-core/processors/variables.rb:15:in `match'
/Users/hoatle/my-dev/extensions/teracy-dev-core/lib/teracy-dev-core/processors/variables.rb:15:in `block in process'
/Users/hoatle/my-dev/extensions/teracy-dev-core/lib/teracy-dev-core/processors/variables.rb:14:in `each'
/Users/hoatle/my-dev/extensions/teracy-dev-core/lib/teracy-dev-core/processors/variables.rb:14:in `process'
/Users/hoatle/my-dev/lib/teracy-dev/processors/manager.rb:33:in `block in process'
/Users/hoatle/my-dev/lib/teracy-dev/processors/manager.rb:32:in `each'
/Users/hoatle/my-dev/lib/teracy-dev/processors/manager.rb:32:in `process'
/Users/hoatle/my-dev/lib/teracy-dev/loader.rb:134:in `process'
/Users/hoatle/my-dev/lib/teracy-dev/loader.rb:103:in `build_settings'
/Users/hoatle/my-dev/lib/teracy-dev/loader.rb:33:in `start'
/Users/hoatle/my-dev/lib/teracy-dev.rb:31:in `<module:TeracyDev>'
/Users/hoatle/my-dev/lib/teracy-dev.rb:10:in `<top (required)>'
/opt/vagrant/embedded/lib/ruby/2.4.0/rubygems/core_ext/kernel_require.rb:55:in `require'
/opt/vagrant/embedded/lib/ruby/2.4.0/rubygems/core_ext/kernel_require.rb:55:in `require'
/Users/hoatle/my-dev/Vagrantfile:21:in `<top (required)>'
/opt/vagrant/embedded/gems/2.1.5/gems/vagrant-2.1.5/lib/vagrant/config/loader.rb:239:in `load'
/opt/vagrant/embedded/gems/2.1.5/gems/vagrant-2.1.5/lib/vagrant/config/loader.rb:239:in `block in procs_for_path'
/opt/vagrant/embedded/gems/2.1.5/gems/vagrant-2.1.5/lib/vagrant/config.rb:53:in `block in capture_configures'
/opt/vagrant/embedded/gems/2.1.5/gems/vagrant-2.1.5/lib/vagrant/config.rb:48:in `synchronize'
/opt/vagrant/embedded/gems/2.1.5/gems/vagrant-2.1.5/lib/vagrant/config.rb:48:in `capture_configures'
/opt/vagrant/embedded/gems/2.1.5/gems/vagrant-2.1.5/lib/vagrant/config/loader.rb:237:in `procs_for_path'
/opt/vagrant/embedded/gems/2.1.5/gems/vagrant-2.1.5/lib/vagrant/config/loader.rb:223:in `procs_for_source'
/opt/vagrant/embedded/gems/2.1.5/gems/vagrant-2.1.5/lib/vagrant/config/loader.rb:67:in `block in set'
/opt/vagrant/embedded/gems/2.1.5/gems/vagrant-2.1.5/lib/vagrant/config/loader.rb:61:in `each'
/opt/vagrant/embedded/gems/2.1.5/gems/vagrant-2.1.5/lib/vagrant/config/loader.rb:61:in `set'
/opt/vagrant/embedded/gems/2.1.5/gems/vagrant-2.1.5/lib/vagrant/environment.rb:488:in `config_loader'
/opt/vagrant/embedded/gems/2.1.5/gems/vagrant-2.1.5/lib/vagrant/environment.rb:793:in `vagrantfile'
/opt/vagrant/embedded/gems/2.1.5/gems/vagrant-2.1.5/lib/vagrant/environment.rb:178:in `initialize'
/opt/vagrant/embedded/gems/2.1.5/gems/vagrant-2.1.5/bin/vagrant:144:in `new'
/opt/vagrant/embedded/gems/2.1.5/gems/vagrant-2.1.5/bin/vagrant:144:in `<main>'
Vagrant failed to initialize at a very early stage:

There was an error loading a Vagrantfile. The file being loaded
and the error message are shown below. This is usually caused by
a syntax error.

Path: /Users/hoatle/my-dev/Vagrantfile
Line number: 15
Message: TypeError: no implicit conversion of false into String