Git Product home page Git Product logo

guard-puppet-lint's People

Contributors

alister avatar dkerwin avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

guard-puppet-lint's Issues

Could not load 'guard/puppet-lint' when initializing puppet-lint

Hi there,

I've tried to follow the below steps to configure guard with the puppet-lint plugin but unfortunately it fails over and over with the below error:

10:07:26 - ERROR - Could not load 'guard/puppet-lint' or '~/.guard/templates/puppet-lint' or find class Guard::Puppetlint

Current setup:

/Users/victor/.rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/gems/guard-puppet-lint-0.2.0

bundle show guard
/Users/victor/.rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/gems/guard-2.14.0

gem --version
2.5.1

bundle --version
Bundler version 1.13.6

ruby --version
ruby 2.3.1p112 (2016-04-26 revision 54768) [x86_64-darwin15]

rbenv --version
rbenv 1.0.0

cat Guardfile 
# A sample Guardfile
# More info at https://github.com/guard/guard#readme

## Uncomment and set this to only include directories you want to watch
# directories %w(app lib config test spec features) \
#  .select{|d| Dir.exists?(d) ? d : UI.warning("Directory #{d} does not exist")}

## Note: if you are using the `directories` clause above and you are not
## watching the project directory ('.'), then you will want to move
## the Guardfile to a watched dir and symlink it back, e.g.
#
#  $ mkdir config
#  $ mv Guardfile config/
#  $ ln -s config/Guardfile .
#
# and, you'll have to watch "config/Guardfile" instead of "Guardfile"

# Note: The cmd option is now required due to the increasing number of ways
#       rspec may be run, below are examples of the most common uses.
#  * bundler: 'bundle exec rspec'
#  * bundler binstubs: 'bin/rspec'
#  * spring: 'bin/rspec' (This will use spring if running and you have
#                          installed the spring binstubs per the docs)
#  * zeus: 'zeus rspec' (requires the server to be started separately)
#  * 'just' rspec: 'rspec'

Full stacktrace:

guard init puppet-lint
Warning: you have a Gemfile, but you're not using bundler or RUBYGEMS_GEMDEPS
10:07:22 - ERROR - Could not load 'guard/puppet-lint' or '~/.guard/templates/puppet-lint' or find class Guard::Puppetlint
> [#] 

Any ideas?

Guard does not print puppet-lint errors

I finally got guard-puppet-lint installed.

When I set guard to watch a directory full of manifests, guard updates, but prints no warnings.

I made a module in /private/tmp/bar
I edited ./bar/manifests/init.pp

cat init.pp
class foo {
  #Intentional puppet lint errors to see if guard catches them
  package {'bar':
    ensure => absent
    name => "bar"
    }
}

Yet, all that is printed to the screen is [1]guard(main)> regardless if lint passes or not.

sowen@Spencers-MacBook-Pro:/tmp/bar$ bundle exec guard
10:55:30 - INFO - Guard is using TerminalTitle to send notifications.
10:55:30 - INFO - Guard is now watching at '/private/tmp/bar'
[1] guard(main)> 
[1] guard(main)> 
[1] guard(main)> 

10:56:14 - INFO - Bye bye...

It sounds like this project needs some love. Maybe it won't work with the version of puppet-lint that I am using (1.1.0). If so, a warning should be added to the README.md

Crash while trying to initialize

When I run guard-puppet-lint, it crashes

Using ruby 2.0.0 with rvm

sowen@Spencers-MacBook-Pro:~/Code/geppetto/puppet-gitlab$ ruby --version
ruby 2.0.0p481 (2014-05-08 revision 45883) [x86_64-darwin13.1.0]
sowen@Spencers-MacBook-Pro:~/Code/geppetto/puppet-gitlab$ gem install guard-puppet-lint
Fetching: guard-puppet-lint-0.2.0.gem (100%)
Successfully installed guard-puppet-lint-0.2.0
1 gem installed
------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- 16:32:29
sowen@Spencers-MacBook-Pro:~/Code/geppetto/puppet-gitlab$ guard init puppet-lint
/Users/sowen/.rvm/gems/ruby-2.0.0-p481/gems/guard-2.6.1/lib/guard/plugin/base.rb:53:in `read': No such file or directory - /Users/sowen/.rvm/gems/ruby-2.0.0-p481/gems/guard-puppet-lint-0.2.0/lib/guard/puppetlint/templates/Guardfile (Errno::ENOENT)
    from /Users/sowen/.rvm/gems/ruby-2.0.0-p481/gems/guard-2.6.1/lib/guard/plugin/base.rb:53:in `template'
    from /Users/sowen/.rvm/gems/ruby-2.0.0-p481/gems/guard-2.6.1/lib/guard/plugin_util.rb:129:in `block in add_to_guardfile'
    from /Users/sowen/.rvm/gems/ruby-2.0.0-p481/gems/guard-2.6.1/lib/guard/plugin_util.rb:126:in `open'
    from /Users/sowen/.rvm/gems/ruby-2.0.0-p481/gems/guard-2.6.1/lib/guard/plugin_util.rb:126:in `add_to_guardfile'
    from /Users/sowen/.rvm/gems/ruby-2.0.0-p481/gems/guard-2.6.1/lib/guard/guardfile/generator.rb:62:in `initialize_template'
    from /Users/sowen/.rvm/gems/ruby-2.0.0-p481/gems/guard-2.6.1/lib/guard/guardfile.rb:30:in `initialize_template'
    from /Users/sowen/.rvm/gems/ruby-2.0.0-p481/gems/guard-2.6.1/lib/guard/cli.rb:176:in `block in init'
    from /Users/sowen/.rvm/gems/ruby-2.0.0-p481/gems/guard-2.6.1/lib/guard/cli.rb:175:in `each'
    from /Users/sowen/.rvm/gems/ruby-2.0.0-p481/gems/guard-2.6.1/lib/guard/cli.rb:175:in `init'
    from /Users/sowen/.rvm/gems/ruby-2.0.0-p481/gems/thor-0.19.1/lib/thor/command.rb:27:in `run'
    from /Users/sowen/.rvm/gems/ruby-2.0.0-p481/gems/thor-0.19.1/lib/thor/invocation.rb:126:in `invoke_command'
    from /Users/sowen/.rvm/gems/ruby-2.0.0-p481/gems/thor-0.19.1/lib/thor.rb:359:in `dispatch'
    from /Users/sowen/.rvm/gems/ruby-2.0.0-p481/gems/thor-0.19.1/lib/thor/base.rb:440:in `start'
    from /Users/sowen/.rvm/gems/ruby-2.0.0-p481/gems/guard-2.6.1/bin/guard:6:in `<top (required)>'
    from /Users/sowen/.rvm/gems/ruby-2.0.0-p481/bin/guard:23:in `load'
    from /Users/sowen/.rvm/gems/ruby-2.0.0-p481/bin/guard:23:in `<main>'
    from /Users/sowen/.rvm/gems/ruby-2.0.0-p481/bin/ruby_executable_hooks:15:in `eval'
    from /Users/sowen/.rvm/gems/ruby-2.0.0-p481/bin/ruby_executable_hooks:15:in `<main>'

notifications of failing parser do not work

Hi!

I just created a small fix that allows to send notifications of a not compiling catalog for Puppet 3.0.1. You need to add the redirection of stderr to stdout and adapt your string to strip out the "Error: ..." message.

    if options[:syntax_check]
      parser_messages = `puppet parser validate  #{file} --color=false 2>&1`.split("\n")
      parser_messages.reject! { |s| s =~ /puppet help parser validate/ }
      parser_messages.map! { |s| s.gsub 'Error: Could not parse for environment production:', '' }
      messages += prepend_filename(parser_messages, file)
    end

Best Regards,

Daniel

README bug

gem guard guard-puppet-lint

Should be:

gem install guard guard-puppet-lint

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.