• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

puppetlabs / pdk / 1648
92%

Build:
DEFAULT BRANCH: master
Ran 08 May 2018 11:55PM UTC
Jobs 1
Files 65
Run time 4s
Badge
Embed ▾
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

pending completion
1648

push

travis-ci

bmjen
Change Metadata.from_file to reliably raise (#503)

* Change Metadata.from_file to reliably raise

When no `metadata.json` exists, `File.file?` can throw nasty exceptions:
```
david@davids:~/git/pdk$ ./bin/pdk bundle list
Traceback (most recent call last):
	11: from ./bin/pdk:29:in `<main>'
	10: from ./bin/pdk:29:in `load'
	 9: from /home/david/git/pdk/exe/pdk:6:in `<top (required)>'
	 8: from /home/david/git/pdk/lib/pdk/cli.rb:18:in `run'
	 7: from /home/david/gems/ruby/2.5.0/gems/cri-2.10.1/lib/cri/command.rb:287:in `run'
	 6: from /home/david/gems/ruby/2.5.0/gems/cri-2.10.1/lib/cri/command.rb:269:in `run'
	 5: from /home/david/gems/ruby/2.5.0/gems/cri-2.10.1/lib/cri/command.rb:329:in `run_this'
	 4: from /home/david/git/pdk/lib/pdk/cli/bundle.rb:24:in `block (2 levels) in <module:CLI>'
	 3: from /home/david/git/pdk/lib/pdk/cli/util.rb:96:in `puppet_from_opts_or_env'
	 2: from /home/david/git/pdk/lib/pdk/util/puppet_version.rb:86:in `from_module_metadata'
	 1: from /home/david/git/pdk/lib/pdk/module/metadata.rb:48:in `from_file'
/home/david/git/pdk/lib/pdk/module/metadata.rb:48:in `file?': no implicit conversion of nil into String (TypeError)
david@davids:~/git/pdk$ 
```

* (MAINT) Guard against sending nil to PDK::Module::Metadata.from_file

If a module doesn't have metadata.json, the .find_upwards helper will
return nil. We shouldn't send nil to the metadata helper but if we do it
should handle it more gracefully.

* (MAINT) Handle no metadata.json when calculating Puppet/Ruby version

PDK::Util::PuppetVersion.from_module_metadata now issues a warning and
returns nil if the module does not have a metadata.json file.

* (MAINT) Add unit tests for new metadata behavior

* (FIXUP) Make convert acceptance tests use same template as generate

The `pdk convert` acceptance tests were not specifying a --template-url
which caused them to fall back to reading whatever template-url was
specified in the users answers file... (continued)

2582 of 2781 relevant lines covered (92.84%)

12.61 hits per line

Jobs
ID Job ID Ran Files Coverage
4 1648.4 (2.4.3, CHECK=spec:coverage) 08 May 2018 11:55PM UTC 0
92.84
Travis Job 1648.4
Source Files on build 1648
Detailed source file information is not available for this build.
  • Back to Repo
  • Travis Build #1648
  • 78a7f0d3 on github
  • Prev Build on master (#1642)
  • Next Build on master (#1649)
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc