• Stars
    star
    243
  • Rank 160,324 (Top 4 %)
  • Language
    Ruby
  • License
    MIT License
  • Created over 9 years ago
  • Updated 5 months ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Optimist is a commandline option parser for Ruby that just gets out of your way.

optimist

http://manageiq.github.io/optimist/

Gem Version CI Code Climate Coverage Status

Documentation

Description

Optimist is a commandline option parser for Ruby that just gets out of your way. One line of code per option is all you need to write. For that, you get a nice automatically-generated help page, robust option parsing, and sensible defaults for everything you don't specify.

Features

  • Dirt-simple usage.
  • Single file. Throw it in lib/ if you don't want to make it a Rubygem dependency.
  • Sensible defaults. No tweaking necessary, much tweaking possible.
  • Support for long options, short options, subcommands, and automatic type validation and conversion.
  • Automatic help message generation, wrapped to current screen width.

Requirements

  • A burning desire to write less code.

Install

  • gem install optimist

Synopsis

require 'optimist'
opts = Optimist::options do
  opt :monkey, "Use monkey mode"                    # flag --monkey, default false
  opt :name, "Monkey name", :type => :string        # string --name <s>, default nil
  opt :num_limbs, "Number of limbs", :default => 4  # integer --num-limbs <i>, default to 4
end

p opts # a hash: { :monkey=>false, :name=>nil, :num_limbs=>4, :help=>false }

License

Copyright © 2008-2014 William Morgan.

Copyright © 2014 Red Hat, Inc.

Optimist is released under the MIT License.

More Repositories

1

manageiq

ManageIQ Open-Source Management Platform
Ruby
1,300
star
2

kubeclient

A Ruby client for Kubernetes REST API
Ruby
413
star
3

guides

ManageIQ guides and developer documentation
Shell
110
star
4

integration_tests

ManageIQ integration tests
Python
69
star
5

manageiq-pods

ManageIQ on Kubernetes and OpenShift
Go
49
star
6

manageiq-ui-classic

Classic UI of ManageIQ
Ruby
49
star
7

manageiq-documentation

Documentation for the ManageIQ Management Platform
Ruby
37
star
8

linux_admin

LinuxAdmin is a module to simplify management of linux systems.
Ruby
27
star
9

manageiq-ui-service

Service UI for ManageIQ
JavaScript
23
star
10

manageiq.org

Website for the ManageIQ Management Platform
HTML
22
star
11

manageiq-providers-vmware

ManageIQ plugin for the VMware vSphere and vCloud providers.
Ruby
21
star
12

manageiq-schema

SQL schema and database migrations for ManageIQ
Ruby
20
star
13

manageiq-api

ManageIQ API
Ruby
20
star
14

manageiq-providers-amazon

ManageIQ plugin for the Amazon AWS provider.
Ruby
19
star
15

bundler-inject

A bundler plugin that allows extension of a project with personal and overridden gems
Ruby
19
star
16

ui-components

Angular UI Components for ManageIQ
TypeScript
16
star
17

manageiq-providers-lenovo

ManageIQ plugin for the Lenovo XClarity provider.
Ruby
16
star
18

miq_bot

ManageIQ Bot
Ruby
16
star
19

ovirt

Ovirt provides a simple Object Oriented interface to the REST API of oVirt and RHEV-M servers
Ruby
16
star
20

azure-armrest

Ruby interface for Azure using the new REST API
Ruby
15
star
21

polisher

Polisher is a Ruby module and set of utilities aimed to assisting the post-publishing packaging process for Ruby gems and applications.
Ruby
14
star
22

manageiq-content

Default ManageIQ content
Ruby
13
star
23

manageiq-consumption

Consumption for ManageIQ
Ruby
13
star
24

manageiq-api-client-python

Python
12
star
25

manageiq-providers-openstack

ManageIQ plugin for the OpenStack provider.
Ruby
12
star
26

manageiq-api-client

Ruby client library to the ManageIQ REST API
Ruby
11
star
27

manageiq-design

Design documents and UX mockups for ManageIQ
HTML
11
star
28

manageiq-automation_engine

Automation engine for ManageIQ
Ruby
11
star
29

manageiq-v2v

ManageIQ plugin for v2v transformations
JavaScript
10
star
30

manageiq-appliance-build

Scripts to build ManageIQ appliances
Ruby
10
star
31

manageiq-rpm_build

Code to build RPMs for ManageIQ appliances and container images
Ruby
10
star
32

manageiq-providers-ansible_tower

ManageIQ plugin for the Ansible Tower provider.
Ruby
9
star
33

awesome_spawn

AwesomeSpawn is a module that provides some useful features over Ruby's Kernel.spawn.
Ruby
9
star
34

activerecord-virtual_attributes

Ruby
8
star
35

manageiq-providers-hawkular

ManageIQ plugin for the Hawkular provider
8
star
36

manageiq-providers-azure

ManageIQ plugin for the Microsoft Azure provider.
Ruby
8
star
37

ansible-tower-pods

Ansible Tower in OpenShift
Shell
7
star
38

manageiq-providers-oracle_cloud

ManageIQ Provider for Oracle Cloud
Ruby
7
star
39

ansible-manageiq-automate

Ansible role to modify the ManageIQ automate workspace
Python
7
star
40

manageiq-providers-kubernetes

ManageIQ plugin for the Kubernetes provider.
Ruby
7
star
41

manageiq-appliance

System files for the ManageIQ appliance.
Shell
7
star
42

manageiq-providers-google

ManageIQ plugin for the Google GCE provider.
Ruby
7
star
43

vmware_web_service

A ruby interface to Vmware Web Services SDK
Ruby
7
star
44

manageiq-graphql

The GraphQL API for ManageIQ
Ruby
6
star
45

manageiq-performance

Perfomance Utils and Benchmarking for the ManageIQ application
Ruby
6
star
46

query_relation

Provides an ActiveRecord::Relation-like DSL to non-SQL backends
Ruby
5
star
47

manageiq-providers-ibm_cloud

ManageIQ plugin for the IBM Cloud provider
Ruby
5
star
48

manageiq-providers-ovirt

ManageIQ plugin for the oVirt provider.
Ruby
5
star
49

manageiq-messaging

Ruby
5
star
50

manageiq-release

Tools for releasing new branches and tags of ManageIQ
Ruby
5
star
51

manageiq-providers-openshift

ManageIQ plugin for the OpenShift provider
Ruby
5
star
52

more_core_extensions

MoreCoreExtensions are a set of core extensions beyond those provided by ActiveSupport.
Ruby
5
star
53

manageiq-v2v-conversion_host

Python
5
star
54

manageiq-vagrant-dev

Vagrantfile and scripts so you can start a developer environment
Shell
5
star
55

manageiq-providers-redfish

ManageIQ plugin for the Redfish provider
Ruby
5
star
56

manageiq-providers-kubevirt

ManageIQ plugin for the Kubevirt provider.
Ruby
4
star
57

binary_struct

BinaryStruct is a class for dealing with binary structured data.
Ruby
4
star
58

manageiq-providers-ibm_power_hmc

ManageIQ plugin for the IBM Power HMC provider.
Ruby
4
star
59

active_bugzilla

An ActiveRecord-like interface to the Bugzilla API
Ruby
4
star
60

manageiq-providers-foreman

ManageIQ plugin for the Foreman provider.
Ruby
4
star
61

virtfs

Ruby
4
star
62

virtfs-xfs

An XFS based filesystem module for VirtFS
Ruby
4
star
63

manageiq-providers-autosde

Ruby
4
star
64

manageiq-cross_repo-tests

ManageIQ cross-repository testing framework tests
Ruby
4
star
65

manageiq-vcloud-docs

Ruby
4
star
66

ansible-manageiq-vmdb

Ansible role to query and modify ManageIQ vmdb objects
Python
4
star
67

pg-dsn_parser

A parser for PostgreSQL DSNs
Ruby
4
star
68

manageiq-smartstate

Ruby
4
star
69

ffi-vix_disk_lib

Ruby FFI Binding to VMware VixDiskLib.
Ruby
4
star
70

manageiq-providers-nuage

ManageIQ plugin for the Nuage provider.
Ruby
4
star
71

pg-logical_replication

Ruby
4
star
72

httpd_configmap_generator

Scripts used in httpd containers for configuring authentication
Ruby
3
star
73

ovirt_metrics

OvirtMetrics is an ActiveRecord-based gem for reading the oVirt History database.
Ruby
3
star
74

manageiq-api-mock

Mock API for ManageIQ
JavaScript
3
star
75

depot.manageiq.org

Ruby
3
star
76

manageiq-cross_repo

ManageIQ cross-repository testing framework
Ruby
3
star
77

container-embedded-ansible

Ansible docker image for the ManageIQ podified application
Dockerfile
3
star
78

manageiq-providers-dummy_provider

ManageIQ plugin for the DummyProvider provider
Ruby
3
star
79

manageiq-gems-pending

Gems Pending to be extracted for ManageIQ project.
Ruby
3
star
80

font-fabulous

A fabulous iconset packaged as a font
SCSS
3
star
81

manageiq-postgres_ha_admin

ManageIQ appliance application that coordinates PostgreSQL database failover
Ruby
3
star
82

manageiq-network_discovery

Ruby
3
star
83

manageiq-providers-ibm_power_vc

IBM PowerVC Provider for ManageIQ based on ManageIQ OpenStack provider.
Ruby
3
star
84

pg-pglogical

A ruby gem for configuring and using pglogical
Ruby
3
star
85

manageiq-appliance_console

The console for the ManageIQ appliances.
Ruby
2
star
86

virtfs-fat32

Ruby
2
star
87

azure-signature

A Ruby library for generating Azure storage signatures
Ruby
2
star
88

manageiq-ui-admin

Admin UI for ManageIQ
2
star
89

container-postgresql

Container with PostgreSQL and built on ubi9, for ManageIQ.
Shell
2
star
90

miq_tools_services

Shared services for ManageIQ tools and applications
Ruby
2
star
91

sprint_statistics

Ruby
2
star
92

manageiq-loggers

Loggers for ManageIQ projects
Ruby
2
star
93

virt_disk

Ruby
2
star
94

manageiq-ui-scaffold

A base framework for future UIs on the ManageIQ platform
JavaScript
2
star
95

manageiq-providers-nsxt

ManageIQ plugin for the VMware NSX-T provider.
Ruby
2
star
96

linux_block_device

Ruby module to interact with block devices on Linux platforms.
Ruby
2
star
97

manageiq-providers-ibm_terraform

Ruby
2
star
98

manageiq-providers-cisco_intersight

ManageIQ provider for Cisco Intersight
Ruby
2
star
99

memory_buffer

Ruby module to create memory buffers on Linux and Mac platforms.
Ruby
2
star
100

slp

Ruby binding to OpenSLP (Service Location Protocol) library.
C
2
star