sqmk/puppet-elasticsearch — pull request #7 by mikekamornikov (2013-11-22 09:31:56+00:00)
Title: update Modulefile to resolve librarian-puppet dependencies

`librarian-puppet` fails to resolve dependencies
---

Explicitly setting valid dependency fixes the issue for me.

`provision/puppet/Puppetfile`:
```sh
forge "http://forge.puppetlabs.com"
mod "puppetlabs/stdlib"
mod "puppetlabs/apt"
mod "puppetlabs/mysql"
mod "jfryman/nginx", :git => "https://github.com/jfryman/puppet-nginx.git"
mod "maestrodev/wget", :git => "https://github.com/maestrodev/puppet-wget.git"
mod "jippy/php", :git => "https://github.com/jippi/puppet-php.git"
mod "puppetlabs/java"
mod "sqmk/elasticsearch", :git => "https://github.com/sqmk/puppet-elasticsearch.git"
```

`librarian-puppet`:
```sh
# directory in which librarian-puppet should manage its modules directory
PUPPET_DIR=/etc/puppet/

if [[ ! -d "$PUPPET_DIR" ]]; then
mkdir -p "$PUPPET_DIR"
echo "Created directory $PUPPET_DIR"
fi

cp "/vagrant/provision/puppet/Puppetfile" "$PUPPET_DIR"
echo "Copied Puppetfile"

echo 'Installing librarian-puppet'
gem install librarian-puppet > /dev/null
echo 'Finished installing librarian-puppet'

echo 'Running initial librarian-puppet'
cd "$PUPPET_DIR" && librarian-puppet install --clean > /dev/null
echo 'Finished running initial librarian-puppet'
```

The error should be similar to this one:
```sh
/var/lib/gems/1.8/gems/librarian-puppet-0.9.9/lib/librarian/puppet/requirement.rb:23:in `range_requirement?': undefined method `match' for nil:NilClass (NoMethodError)
from /var/lib/gems/1.8/gems/librarian-puppet-0.9.9/lib/librarian/puppet/requirement.rb:11:in `gem_requirement'
from /var/lib/gems/1.8/gems/librarian-puppet-0.9.9/lib/librarian/puppet/source/git.rb:103:in `fetch_dependencies'
from /var/lib/gems/1.8/gems/puppet-3.1.1/lib/puppet/module_tool/modulefile.rb:15:in `map'
from /var/lib/gems/1.8/gems/librarian-puppet-0.9.9/lib/librarian/puppet/source/git.rb:102:in `each'
from /var/lib/gems/1.8/gems/librarian-puppet-0.9.9/lib/librarian/puppet/source/git.rb:102:in `map'
from /var/lib/gems/1.8/gems/librarian-puppet-0.9.9/lib/librarian/puppet/source/git.rb:102:in `fetch_dependencies'
from /var/lib/gems/1.8/gems/librarian-puppet-0.9.9/vendor/librarian/lib/librarian/manifest.rb:113:in `fetch_dependencies!'
from /var/lib/gems/1.8/gems/librarian-puppet-0.9.9/vendor/librarian/lib/librarian/manifest.rb:105:in `fetched_dependencies'
from /var/lib/gems/1.8/gems/librarian-puppet-0.9.9/vendor/librarian/lib/librarian/manifest.rb:69:in `dependencies'
from /var/lib/gems/1.8/gems/librarian-puppet-0.9.9/vendor/librarian/lib/librarian/resolver/implementation.rb:67:in `recursive_resolve'
from /var/lib/gems/1.8/gems/librarian-puppet-0.9.9/vendor/librarian/lib/librarian/resolver/implementation.rb:103:in `scope'
from /var/lib/gems/1.8/gems/librarian-puppet-0.9.9/vendor/librarian/lib/librarian/resolver/implementation.rb:64:in `recursive_resolve'
from /var/lib/gems/1.8/gems/librarian-puppet-0.9.9/vendor/librarian/lib/librarian/resolver/implementation.rb:60:in `each'
from /var/lib/gems/1.8/gems/librarian-puppet-0.9.9/vendor/librarian/lib/librarian/resolver/implementation.rb:60:in `recursive_resolve'
from /var/lib/gems/1.8/gems/librarian-puppet-0.9.9/vendor/librarian/lib/librarian/resolver/implementation.rb:103:in `scope'
from /var/lib/gems/1.8/gems/librarian-puppet-0.9.9/vendor/librarian/lib/librarian/resolver/implementation.rb:59:in `recursive_resolve'
from /var/lib/gems/1.8/gems/librarian-puppet-0.9.9/vendor/librarian/lib/librarian/resolver/implementation.rb:103:in `scope'
from /var/lib/gems/1.8/gems/librarian-puppet-0.9.9/vendor/librarian/lib/librarian/resolver/implementation.rb:42:in `recursive_resolve'
from /var/lib/gems/1.8/gems/librarian-puppet-0.9.9/vendor/librarian/lib/librarian/resolver/implementation.rb:20:in `resolve'
from /var/lib/gems/1.8/gems/librarian-puppet-0.9.9/vendor/librarian/lib/librarian/resolver.rb:18:in `resolve'
from /var/lib/gems/1.8/gems/librarian-puppet-0.9.9/vendor/librarian/lib/librarian/action/resolve.rb:25:in `run'
from /var/lib/gems/1.8/gems/librarian-puppet-0.9.9/vendor/librarian/lib/librarian/cli.rb:161:in `resolve!'
from /var/lib/gems/1.8/gems/librarian-puppet-0.9.9/vendor/librarian/lib/librarian/cli.rb:103:in `update'
from /var/lib/gems/1.8/gems/thor-0.17.0/lib/thor/task.rb:27:in `__send__'
from /var/lib/gems/1.8/gems/thor-0.17.0/lib/thor/task.rb:27:in `run'
from /var/lib/gems/1.8/gems/thor-0.17.0/lib/thor/invocation.rb:120:in `invoke_task'
from /var/lib/gems/1.8/gems/thor-0.17.0/lib/thor.rb:344:in `dispatch'
from /var/lib/gems/1.8/gems/thor-0.17.0/lib/thor/base.rb:434:in `start'
from /var/lib/gems/1.8/gems/librarian-puppet-0.9.9/vendor/librarian/lib/librarian/cli.rb:29:in `bin!'
from /var/lib/gems/1.8/gems/librarian-puppet-0.9.9/bin/librarian-puppet:9
from /usr/local/bin/librarian-puppet:19:in `load'
from /usr/local/bin/librarian-puppet:19
```

---
More info:
https://github.com/rodjek/librarian-puppet/issues/111
https://github.com/rodjek/librarian-puppet/pull/94