While trying to use the PDK on Windows (instead of using a Linux VM for development), I've come across a few hitches:1) 'rake' is not available as a command (it is accessible via $env:DEVKIT_BASEDIR/private/private\ruby\2.1.9\bin\rake though)2) 'rspec' is not available as a command3) errors related to file paths (seems to be an old Windows-related issue): Parameter path failed on File[/tftpboot]: File paths must be fully qualified, not '/tftpboot' at line 4Are there any workarounds for these?
(BTW: Initially I had a standard Ruby 2.1 install in my PATH - that caused a lot of trouble too.)
--
You received this message because you are subscribed to the Google Groups "Puppet Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to puppet-users+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/puppet-users/238147f7-36e6-4a8f-998e-4f2570e68c91%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
<why does google groups insist on quoting every message?? - snip>
Hi DavidThanks for pointing out 'pdk bundle' - it does provide what I was looking for. It is however a bit noisy (but that's not a big deal):PS> pdk bundle exec -- rspec .\spec\classes\apg_base_spec.rb.Finished in 7.81 seconds (files took 1.85 seconds to load)1 example, 0 failuresC:/Program Files/Puppet Labs/DevelopmentKit/share/cache/ruby/2.1.0/gems/puppet-5.0.1-x64-mingw32/lib/puppet/util/windows/api_types.rb:6: warning: already initialized constant FFI::WIN32_FALSEC:/Program Files/Puppet Labs/DevelopmentKit/share/cache/ruby/2.1.0/gems/facter-2.5.0-x64-mingw32/lib/facter/util/windows/api_types.rb:5: warning: previous definition of WIN32_FALSE was hereC:/Program Files/Puppet Labs/DevelopmentKit/share/cache/ruby/2.1.0/gems/puppet-5.0.1-x64-mingw32/lib/puppet/util/windows/api_types.rb:9: warning: already initialized constant FFI::ERROR_SUCCESSC:/Program Files/Puppet Labs/DevelopmentKit/share/cache/ruby/2.1.0/gems/facter-2.5.0-x64-mingw32/lib/facter/util/windows/api_types.rb:8: warning: previous definition of ERROR_SUCCESS was hereC:/Program Files/Puppet Labs/DevelopmentKit/share/cache/ruby/2.1.0/gems/puppet-5.0.1-x64-mingw32/lib/puppet/util/windows/api_types.rb:21: warning: already initialized constant FFI::Pointer::NULL_HANDLEC:/Program Files/Puppet Labs/DevelopmentKit/share/cache/ruby/2.1.0/gems/facter-2.5.0-x64-mingw32/lib/facter/util/windows/api_types.rb:20: warning: previous definition of NULL_HANDLE was here!! spec/fixtures/modules/rimcdm already exists and is not a symlink
The things that I use 'rake' and 'rspec' for are:> rspec spec/classes/some_class_spec.rb # to run a single unit test instead of all tests
> rake spec_prep # to update fixtures> rake spec_standalone # to run tests without updating fixtures
I'm working on refactoring an over-sized module; that's why being able to do quick tests is important to me.
I'm using the version of rspec-puppet bundled with the PDK - it appears to be version 2.6.7:PS> pdk bundle exec -- rspec --debug...# C:/Program Files/Puppet Labs/DevelopmentKit/share/cache/ruby/2.1.0/gems/rspec-puppet-2.6.7/lib/rspec-puppet/monkey_patches.rb:273:in `require'...
...
--
You received this message because you are subscribed to the Google Groups "Puppet Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to puppet-users+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/puppet-users/8fad49d4-5efd-44c2-b3c0-49627c21d329%40googlegroups.com.
<snip>
On 17 August 2017 at 12:11, Peter Faller <pgfa...@gmail.com> wrote:Hi DavidThanks for pointing out 'pdk bundle' - it does provide what I was looking for. It is however a bit noisy (but that's not a big deal):PS> pdk bundle exec -- rspec .\spec\classes\apg_base_spec.rb.Finished in 7.81 seconds (files took 1.85 seconds to load)1 example, 0 failuresC:/Program Files/Puppet Labs/DevelopmentKit/share/cache/ruby/2.1.0/gems/puppet-5.0.1-x64-mingw32/lib/puppet/util/windows/api_types.rb:6: warning: already initialized constant FFI::WIN32_FALSEC:/Program Files/Puppet Labs/DevelopmentKit/share/cache/ruby/2.1.0/gems/facter-2.5.0-x64-mingw32/lib/facter/util/windows/api_types.rb:5: warning: previous definition of WIN32_FALSE was hereC:/Program Files/Puppet Labs/DevelopmentKit/share/cache/ruby/2.1.0/gems/puppet-5.0.1-x64-mingw32/lib/puppet/util/windows/api_types.rb:9: warning: already initialized constant FFI::ERROR_SUCCESSC:/Program Files/Puppet Labs/DevelopmentKit/share/cache/ruby/2.1.0/gems/facter-2.5.0-x64-mingw32/lib/facter/util/windows/api_types.rb:8: warning: previous definition of ERROR_SUCCESS was hereC:/Program Files/Puppet Labs/DevelopmentKit/share/cache/ruby/2.1.0/gems/puppet-5.0.1-x64-mingw32/lib/puppet/util/windows/api_types.rb:21: warning: already initialized constant FFI::Pointer::NULL_HANDLEC:/Program Files/Puppet Labs/DevelopmentKit/share/cache/ruby/2.1.0/gems/facter-2.5.0-x64-mingw32/lib/facter/util/windows/api_types.rb:20: warning: previous definition of NULL_HANDLE was here!! spec/fixtures/modules/rimcdm already exists and is not a symlinkThis is now tracked in https://tickets.puppetlabs.com/browse/FACT-1733, but the underlying problem is https://tickets.puppetlabs.com/browse/FACT-1542 , which will require some time to resolve.
The things that I use 'rake' and 'rspec' for are:> rspec spec/classes/some_class_spec.rb # to run a single unit test instead of all tests> rake spec_prep # to update fixtures> rake spec_standalone # to run tests without updating fixtures
I'm working on refactoring an over-sized module; that's why being able to do quick tests is important to me.I'm using the version of rspec-puppet bundled with the PDK - it appears to be version 2.6.7:PS> pdk bundle exec -- rspec --debug...# C:/Program Files/Puppet Labs/DevelopmentKit/share/cache/ruby/2.1.0/gems/rspec-puppet-2.6.7/lib/rspec-puppet/monkey_patches.rb:273:in `require'...That's interesting. In the scientific sense. Is there a way you could share the module, or a reduced example that repro's the issue?Cheers, David
--
You received this message because you are subscribed to the Google Groups "Puppet Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to puppet-users+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/puppet-users/CALF7fHYmecRp5ZcYAfiAZZXJZZsi3dr9YjdMSFJQJga5GnX0mg%40mail.gmail.com.