Project

omnijack

0.0
No commit activity in last 3 years
No release in over 3 years
There's a lot of open issues
A pallet jack to unload data from the Omnitruck
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies
 Project Readme

Gem Version Build Status Code Climate Coverage Status Dependency Status

Omnijack

A Ruby client interface to Chef's Omnitruck API.

Installation

Add this line to your application's Gemfile:

gem 'omnijack'

And then execute:

$ bundle

Or install it yourself as:

$ gem install omnijack

Usage

Getting Chef-DK project data from the official Chef API:

require 'omnijack'

chef_dk = Omnijack::Project::ChefDk.new

Getting Chef-DK package metadata (requires additional target platform information):

chef_dk = Omnijack::Project::ChefDk.new(platform: 'ubuntu',
                                        platform_version: '14.04',
                                        machine_arch: 'x86_64')
metadata = chef_dk.metadata

puts metadata

puts metadata.url
puts metadata.filename
puts metadata.md5
puts metadata.sha256
puts metadata.yolo
puts metadata.version
puts metadata.build

puts metadata[:url]
puts metadata[:filename]
puts metadata[:md5]
puts metadata[:sha256]
puts metadata[:yolo]
puts metadata[:version]
puts metadata[:build]

Getting Chef-DK project data from an unofficial Omnitruck API:

Omnijack::Project::ChefDk.new(
  base_url: 'https://some.custom.chef.api/endpoint'
)

Getting Chef-DK project data for a version other than the latest release:

Omnijack::Project::ChefDk.new(
  version: '1.2.3',
  prerelease: true,
  nightlies: true
)

Getting Chef project data:

Omnijack::Project::Chef.new

Getting the Chef project's list of packages:

list = Omnijack::Project::Chef.new.list
puts list.to_h

Getting the Chef project's platform mappings:

platforms = Omnijack::Project::Chef.new.platforms
puts platforms.to_h

Getting AngryChef project data:

Omnijack::Project::AngryChef.new

Getting Chef-Container project data:

Omnijack::Project::ChefContainer.new

Getting Chef Server project data:

Omnijack::Project::ChefServer.new

Contributing

  1. Fork it ( https://github.com/[my-github-username]/omnijack/fork )
  2. Create your feature branch (git checkout -b my-new-feature)
  3. Add tests for any new code and ensure all tests pass (rake)
  4. Commit your changes (git commit -am 'Add some feature')
  5. Push to the branch (git push origin my-new-feature)
  6. Create a new Pull Request