Skip to content
This repository has been archived by the owner on Apr 7, 2018. It is now read-only.

Commit

Permalink
fix 1.2.0 no implicit conversion of nil to string. fixes #123
Browse files Browse the repository at this point in the history
  • Loading branch information
spion06 committed Aug 19, 2016
1 parent af07170 commit 5c0696a
Show file tree
Hide file tree
Showing 6 changed files with 24 additions and 4 deletions.
5 changes: 5 additions & 0 deletions Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -10,3 +10,8 @@ gem 'tomlrb'
gem 'rake'
gem 'stove'
gem 'community_cookbook_releaser'
gem 'chefspec'
gem 'berkshelf'
gem 'test-kitchen'
gem 'foodcritic'
gem 'cookstyle'
6 changes: 3 additions & 3 deletions libraries/omnitrucker.rb
Original file line number Diff line number Diff line change
Expand Up @@ -26,9 +26,9 @@
module OmnibusTrucker
class << self
URL_MAP = {
p: 'platform', pv: 'platform_version', m: 'machine',
v: 'version', prerelease: 'prerelease',
nightlies: 'nightlies'
p: :platform, pv: :platform_version, m: :machine,
v: :version, prerelease: :prerelease,
nightlies: :nightlies
}.freeze unless defined?(URL_MAP)

def build_url(*opts)
Expand Down
2 changes: 1 addition & 1 deletion metadata.rb
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
license 'Apache 2.0'
description 'Chef omnibus package updater and installer'
long_description IO.read(File.join(File.dirname(__FILE__), 'README.md'))
version '1.2.0'
version '1.2.1'

%w(redhat centos amazon scientific oracle debian ubuntu mac_os_x solaris windows).each do |os|
supports os
Expand Down
1 change: 1 addition & 0 deletions recipes/downloader.rb
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@
prerelease: node['omnibus_updater']['preview']
), node
)
raise 'Did not find path' if remote_path.nil?
end

if remote_path
Expand Down
12 changes: 12 additions & 0 deletions spec/default_spec.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
require 'spec_helper'

describe 'omnibus_updater::default' do
let(:chef_run) do
ChefSpec::ServerRunner.new(platform: 'redhat', version: '7.0') do |node, server|
end.converge(described_recipe)
end

it 'should complie without any errors' do
expect { chef_run }.to_not raise_error
end
end
2 changes: 2 additions & 0 deletions spec/spec_helper.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
require 'chefspec'
require 'chefspec/berkshelf'

0 comments on commit 5c0696a

Please sign in to comment.