
Security News
Rspack Introduces Rslint, a TypeScript-First Linter Written in Go
Rspack launches Rslint, a fast TypeScript-first linter built on typescript-go, joining in on the trend of toolchains creating their own linters.
This is still under active development and is subject to change
Conman is a simple server configuration management library. The core concepts are around:
Ingredients should ensure that they are idempotent. Public Recipes may include setting up a LAMP system for example.
gem install conman
Our ingredient library can be found at: github.com/moocode/ingredients
An ingredient is a simple Ruby Class whose name ends with Ingredient and (optionally) subclasses Ingredient. The Ingredient superclass just provides some helper methods if you wish to use them. Because they are just Ruby classes they can be tested using any test framework you like. See our ingredients repository for some examples.
class FileIngredient < Ingredient
def create(options={})
`touch #{options[:path]}` unless exists? :path => options[:path]
end
def exists?(options={})
File.exists? options[:path]
end
end
class MyRecipe < Recipe
file :create, :path => '/tmp/foo.txt'
end
conman ships with a binary for running your recipes. It takes a path to a folder of ingredients and a recipe file:
conman -i /path/to/ingredients /path/to/recipes/my_recipe.rb
Alternatively you can run them from a script (handy for testing)
Conman.init :ingredients => '/path/to/ingredients/'
Conman.run '/path/to/recipes/my_recipe.rb'
Here's an example of a TestUnit test for an ingredient:
require 'test/unit'
require 'rubygems'
require 'mocha'
require 'conman'
class FileIngredientTest < Test::Unit::TestCase
def setup
@@conman ||= Conman.init(:ingredients => '/path/to/ingredients/file.rb')
@file = FileIngredient.new
end
def test_create
FileIngredient.any_instance.expects(:create).returns('touch /tmp/moo.txt')
@file.create :path => '/tmp/moo.txt'
end
end
First you need to install all the pre-requisites (ruby, rubygems, conman, git-core)
apt-get install ruby git-core -y
ruby -v
cd /tmp
wget http://rubyforge.org/frs/download.php/70696/rubygems-1.3.7.tgz
tar zxf rubygems-1.3.7.tgz
cd rubygems-1.3.7
sudo ruby setup.rb --no-ri --no-rdoc
cd /tmp
rm -rf rubygems-1.3.7
ln -sf /usr/bin/gem1.8 /usr/bin/gem
gem -v
gem install conman
FAQs
Unknown package
We found that conman demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Rspack launches Rslint, a fast TypeScript-first linter built on typescript-go, joining in on the trend of toolchains creating their own linters.
Security News
Hacker Demonstrates How Easy It Is To Steal Data From Popular Password Managers
Security News
Oxlint’s new preview brings type-aware linting powered by typescript-go, combining advanced TypeScript rules with native-speed performance.