Created
May 15, 2011 18:34
-
-
Save jedi4ever/973412 to your computer and use it in GitHub Desktop.
Patch to take mcollective gitcode and turn it into a gem for mcollective-client
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# -*- encoding: utf-8 -*- | |
Gem::Specification.new do |s| | |
s.name = "mcollective-client" | |
s.version = "1.0.2" | |
s.platform = Gem::Platform::RUBY | |
s.authors = ["RI Pienaar"] | |
s.email = ["[email protected]"] | |
s.homepage = "https://github.com/puppetlabs/marionette-collective" | |
s.summary = %q{Mcollective client} | |
s.description = %q{Interact with mcollective} | |
s.required_rubygems_version = ">= 1.3.6" | |
s.rubyforge_project = "mcollective-client" | |
s.bindir = '.' | |
s.add_dependency "stomp" | |
s.files = `git ls-files`.split("\n") | |
s.executables = `git ls-files`.split("\n").map{|f| f =~ /^mc-(.*)/ ? "mc-"+$1 : nil}.compact | |
s.require_path = 'lib' | |
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/Rakefile b/Rakefile | |
index 805f1cd..ecf5c52 100644 | |
--- a/Rakefile | |
+++ b/Rakefile | |
@@ -17,6 +17,10 @@ ENV["RPM_VERSION"] ? CURRENT_VERSION = ENV["RPM_VERSION"] : CURRENT_VERSION = PR | |
ENV["BUILD_NUMBER"] ? CURRENT_RELEASE = ENV["BUILD_NUMBER"] : CURRENT_RELEASE = PROJ_RELEASE | |
ENV["DEB_DISTRIBUTION"] ? PKG_DEB_DISTRIBUTION = ENV["DEB_DISTRIBUTION"] : PKG_DEB_DISTRIBUTION = "unstable" | |
+require 'bundler' | |
+require 'bundler/setup' | |
+Bundler::GemHelper.install_tasks | |
+ | |
CLEAN.include(["build", "doc"]) | |
def announce(msg='') | |
diff --git a/lib/mcollective/config.rb b/lib/mcollective/config.rb | |
index 8574472..ec40fc2 100644 | |
--- a/lib/mcollective/config.rb | |
+++ b/lib/mcollective/config.rb | |
@@ -50,6 +50,10 @@ module MCollective | |
when "loglevel" | |
@loglevel = val | |
when "libdir" | |
+ # Add libdir plugins from gem | |
+ gem_libdir=File.expand_path(File.join(__FILE__,'..','..','..','lib')) | |
+ gem_plugindir=File.expand_path(File.join(__FILE__,'..','..','..','plugins')) | |
+ val=val+":"+gem_libdir+":"+gem_plugindir | |
paths = val.split(/:/) | |
paths.each do |path| | |
@libdir << path | |
@@ -57,6 +61,7 @@ module MCollective | |
$LOAD_PATH << path | |
end | |
end | |
+ | |
when "identity" | |
@identity = val | |
when "color" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Install
now the rake command has extra tasks (see rake -T)
Issues:
Gotcha/Tip:(thx @ripienaar)