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

Commit

Permalink
Merge pull request #100 from hw-cookbooks/develop
Browse files Browse the repository at this point in the history
omnibus_updater 1.0.6
  • Loading branch information
Aaron Baer committed Feb 12, 2016
2 parents 9bc9530 + 1b3f255 commit 70fafda
Show file tree
Hide file tree
Showing 6 changed files with 48 additions and 3 deletions.
8 changes: 8 additions & 0 deletions .kitchen.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
---
driver_plugin: vagrant
platforms:
- name: ubuntu-14.04
driver_config:
require_chef_omnibus: '11.14'
box: ubuntu1404
- name: ubuntu-12.04
driver_config:
require_chef_omnibus: '11.14'
Expand All @@ -9,6 +13,10 @@ platforms:
driver_config:
require_chef_omnibus: '11.14'
box: ubuntu1004
- name: centos-7.0
driver_config:
require_chef_omnibus: '11.14'
box: centos70
- name: centos-6.4
driver_config:
require_chef_omnibus: '11.14'
Expand Down
10 changes: 10 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,13 @@
v1.0.6
======
* Get rid of warnings about defined constant
* update Chef download url
* Updates supported versions
* require chef/rest
* use Chef::Mash explicitly
* Define the Chef::Mash constant if not provided by chef
* add test suites for ubuntu 14.04 and centos 7

v1.0.4
======
* file_cache_path path to store chef-client
Expand Down
13 changes: 13 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,19 @@ Chef package into your system if you are currently running
via gem install, and it can keep your omnibus install up
to date.

Supports
========

- redhat
- centos
- amazon
- scientific
- oracle
- debian
- ubuntu
- mac_os_x
- solaris

Usage
=====

Expand Down
12 changes: 10 additions & 2 deletions libraries/omnitrucker.rb
Original file line number Diff line number Diff line change
Expand Up @@ -17,13 +17,21 @@
# limitations under the License.
#

require "chef/rest"
require "chef/mash"
require "net/http"

unless(Chef.constants.include?(:Mash))
Chef::Mash = Mash
end

module OmnibusTrucker
class << self
URL_MAP = {
:p => :platform, :pv => :platform_version, :m => :machine,
:v => :version, :prerelease => :prerelease,
:nightlies => :nightlies
}
} unless defined?(URL_MAP)

def build_url(*opts)
args = node = nil
Expand All @@ -48,7 +56,7 @@ def build_url(*opts)
end

def collect_attributes(node, args={})
set = Mash[
set = Chef::Mash[
[:platform_family, :platform, :platform_version].map do |k|
[k, args[k] || node[k]]
end
Expand Down
6 changes: 5 additions & 1 deletion metadata.rb
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,8 @@
license "Apache 2.0"
description "Chef omnibus package updater and installer"
long_description IO.read(File.join(File.dirname(__FILE__), 'README.md'))
version "1.0.4"
version "1.0.6"

%w(redhat centos amazon scientific oracle debian ubuntu mac_os_x solaris).each do |plat|
supports plat
end
2 changes: 2 additions & 0 deletions recipes/default.rb
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,8 @@
Chef::Log.warn 'Omnibus updater disabled via `disabled` attribute'
elsif(node[:platform] == 'debian' && Gem::Version.new(node[:platform_version]) < Gem::Version.new('6.0.0'))
Chef::Log.warn 'Omnibus updater does not support Debian 5'
elsif(node[:platform] == 'raspbian')
Chef::Log.warn 'Omnibus updater does not support Raspbian'
else
include_recipe 'omnibus_updater::downloader'
include_recipe 'omnibus_updater::installer'
Expand Down

0 comments on commit 70fafda

Please sign in to comment.