Permalink
Browse files

Initial Commit

  • Loading branch information...
adamhjk committed Mar 6, 2008
0 parents commit b5117775e86cff40399187b6292c98fba9dc5034
@@ -0,0 +1,5 @@
=== 1.0.0 / 2008-03-05
* 1 major enhancement
* Birthday!
@@ -0,0 +1,7 @@
History.txt
Manifest.txt
README.txt
Rakefile
bin/marionette
lib/marionette.rb
test/test_marionette.rb
@@ -0,0 +1,44 @@
= marionette
* http://oss.hjksolutions.com/marionette
== DESCRIPTION:
Marionette is a configuration management tool inspired by Puppet.
== FEATURES/PROBLEMS:
* Uses a Ruby DSL in place of the puppet language
* Drastically simpler implementation
== SYNOPSIS:
FIX (code sample of usage)
== REQUIREMENTS:
* FIX (list of requirements)
== INSTALL:
* FIX (sudo gem install, anything else)
== LICENSE:
Marionette - A configuration management system
Copyright 2008 HJK Solutions
This program and entire repository is free software; you can
redistribute it and/or modify it under the terms of the GNU
General Public License as published by the Free Software
Foundation; either version 2 of the License, or any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
@@ -0,0 +1,21 @@
# -*- ruby -*-
require 'rubygems'
require 'hoe'
require './lib/marionette.rb'
require './tasks/rspec.rb'
# require Dir[File.join(File.dirname(__FILE__), 'tasks/**/*.rb')].sort.each do |lib|
# require lib
# end
Hoe.new('marionette', Marionette::VERSION) do |p|
p.rubyforge_name = 'marionette'
p.author = 'Adam Jacob'
p.email = 'adam@hjksolutions.com'
p.summary = 'A configuration management system'
p.description = p.paragraphs_of('README.txt', 2..5).join("\n\n")
p.url = p.paragraphs_of('README.txt', 0).first.split(/\n/)[1..-1]
p.changes = p.paragraphs_of('History.txt', 0..1).join("\n\n")
end
# vim: syntax=Ruby
No changes.
@@ -0,0 +1,26 @@
# Author:: Adam Jacob (<adam@hjksolutions.com>)
# Copyright:: Copyright (c) 2008 HJK Solutions, LLC
# License:: GNU General Public License version 2 or later
#
# This program and entire repository is free software; you can
# redistribute it and/or modify it under the terms of the GNU
# General Public License as published by the Free Software
# Foundation; either version 2 of the License, or any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
#
require 'rubygems'
Dir[File.join(File.dirname(__FILE__), 'marionette/**/*.rb')].sort.each { |lib| require lib }
class Marionette
VERSION = '0.0.1'
end
@@ -0,0 +1,24 @@
# Author:: Adam Jacob (<adam@hjksolutions.com>)
# Copyright:: Copyright (c) 2008 HJK Solutions, LLC
# License:: GNU General Public License version 2 or later
#
# This program and entire repository is free software; you can
# redistribute it and/or modify it under the terms of the GNU
# General Public License as published by the Free Software
# Foundation; either version 2 of the License, or any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
#
class Marionette
module Helper
end
end
@@ -0,0 +1,87 @@
# Author:: Adam Jacob (<adam@hjksolutions.com>)
# Copyright:: Copyright (c) 2008 HJK Solutions, LLC
# License:: GNU General Public License version 2 or later
#
# This program and entire repository is free software; you can
# redistribute it and/or modify it under the terms of the GNU
# General Public License as published by the Free Software
# Foundation; either version 2 of the License, or any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
#
require 'yaml'
class Marionette
class Resource
attr_accessor :before, :require, :notify, :subscribe, :tag
def initialize(name)
@name = name
@tag = Array.new
@alias = nil
@noop = nil
@tag = nil
@before = nil
@require = nil
@notify = nil
@subscribe = nil
@tag = nil
end
def name
@name
end
def name=(name)
raise ArgumentError, "name must be a string!" unless name.kind_of?(String)
@name = name
end
def alias
@alias
end
def alias=(alias_name)
raise ArgumentError, "alias must be a string!" unless alias_name.kind_of?(String)
@alias = alias_name
end
def noop
@noop
end
def noop=(tf)
raise ArgumentError, "noop must be true or false!" unless tf == true || tf == false
@noop = tf
end
def tag
@tag
end
def tag=(args)
if args.kind_of?(Array)
args.each do |t|
@tag << t
end
else
@tag << args
end
@tag
end
def valid?()
return false unless self.name
true
end
end
end
@@ -0,0 +1,66 @@
# Author:: Adam Jacob (<adam@hjksolutions.com>)
# Copyright:: Copyright (c) 2008 HJK Solutions, LLC
# License:: GNU General Public License version 2 or later
#
# This program and entire repository is free software; you can
# redistribute it and/or modify it under the terms of the GNU
# General Public License as published by the Free Software
# Foundation; either version 2 of the License, or any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
#
class Marionette
class Resource
class File < Marionette::Resource
attr_accessor :backup, :checksum, :ensure, :force, :group, :ignore, :links,
:mode, :owner, :path, :purge, :recurse, :replace, :target
def initialize(name)
super(name)
@backup = true
@checksum = "md5sum"
end
def backup
@backup
end
def backup=(arg)
case arg
when true
@backup = true
when false
@backup = false
when Integer
@backup = arg
else
raise ArgumentError, "backup must be true, false, or a number!"
end
end
def checksum
@checksum
end
def checksum=(arg)
case arg
when "md5sum"
@checksum = arg
when "mtime"
@checksum = arg
else
raise ArgumentError, "checksum must be md5sum or mtime!"
end
end
end
end
end
@@ -0,0 +1,20 @@
# Author:: Adam Jacob (<adam@hjksolutions.com>)
# Copyright:: Copyright (c) 2008 HJK Solutions, LLC
# License:: GNU General Public License version 2 or later
#
# This program and entire repository is free software; you can
# redistribute it and/or modify it under the terms of the GNU
# General Public License as published by the Free Software
# Foundation; either version 2 of the License, or any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
#
require File.join(File.dirname(__FILE__), "..", "lib", "marionette")
@@ -0,0 +1,26 @@
# Author:: Adam Jacob (<adam@hjksolutions.com>)
# Copyright:: Copyright (c) 2008 HJK Solutions, LLC
# License:: GNU General Public License version 2 or later
#
# This program and entire repository is free software; you can
# redistribute it and/or modify it under the terms of the GNU
# General Public License as published by the Free Software
# Foundation; either version 2 of the License, or any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
#
require File.join(File.dirname(__FILE__), "..", "spec_helper")
describe Marionette do
it "should have a version defined" do
Marionette::VERSION.should match(/(\d+)\.(\d+)\.(\d+)/)
end
end
Oops, something went wrong.

0 comments on commit b511777

Please sign in to comment.