Git Product home page Git Product logo

chef-community-zero's Introduction

Community Zero

Gem Version Build Status

Description

Based largely off of Chef Zero, Community Zero is an in-memory Chef Community Site that can be useful for testing. It IS intended to be simple, API compliant, easy to run and test. It is NOT intended to be secure, scalable, performant, scalable, persistent, or production-ready. It does not authentication or authorization (it will never throw a 400, 401, or 403). It does not persist data.

Because Community Zero run in memory, it's super fast and lightweight. This makes it perfect for testing against a "real" Community Site without mocking the entire Internet.

Installation

The server can be installed as a Ruby Gem:

$ gem install community-zero

If you're using bundler, add community-zero as a development dependency:

group :development do
  gem 'community-zero'
end

Or in a .gemspec:

s.add_development_dependency 'community-zero'

You can also clone the source repository and install it using rake install.

Usage

The primary use is an in-memory fake Community site for testing. Here's a simple example:

require 'community_zero/rspec'

This will create a server in the background and give you some nice hooks for accessing the data store to create and manipulate objects for testing. The best example tests are the cucumber tests packaged in the features directory.

Valid Options

You may currently pass the following options to the initializer:

  • host - the host to run on
  • port - the port to run on

CLI (Command Line)

If you don't want to use Community Zero as a library, you can start it using the included executable:

$ community-zero

Note, this will run in the foreground.

Run community-zero --help to see a list of the supported flags and options:

Usage: community-zero [ARGS]
    -H, --host HOST                  Host to bind to (default: 0.0.0.0)
    -p, --port PORT                  Port to listen on (default: 3389)
    -h, --help                       Show this message
        --version                    Show version

License and Copyright

  • Copyright 2013 Seth Vargo
  • Copyright 2013 Opscode, Inc.

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

chef-community-zero's People

Contributors

btm avatar tas50 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.