commit 85bf37f5011711ac3e482a487783f45f9dac6715
Author: Stephen Benjamin <stbenjam@redhat.com>
Date:   Mon Aug 10 13:33:52 2015 -0400

    Add foreman_remote_execution

diff --git a/plugins/ruby-foreman-remote-execution/debian/changelog b/plugins/ruby-foreman-remote-execution/debian/changelog
new file mode 100644
index 000000000..d41ccf6f7
--- /dev/null
+++ b/plugins/ruby-foreman-remote-execution/debian/changelog
@@ -0,0 +1,5 @@
+ruby-foreman-remote-execution (0.0.1) unstable; urgency=low
+
+  * Initial Release.
+
+ -- Stephen Benjamin <stephen@redhat.com>  Mon, 10 Aug 2015 17:29:00 +0000
diff --git a/plugins/ruby-foreman-remote-execution/debian/compat b/plugins/ruby-foreman-remote-execution/debian/compat
new file mode 100644
index 000000000..45a4fb75d
--- /dev/null
+++ b/plugins/ruby-foreman-remote-execution/debian/compat
@@ -0,0 +1 @@
+8
diff --git a/plugins/ruby-foreman-remote-execution/debian/control b/plugins/ruby-foreman-remote-execution/debian/control
new file mode 100644
index 000000000..5c9c5251a
--- /dev/null
+++ b/plugins/ruby-foreman-remote-execution/debian/control
@@ -0,0 +1,13 @@
+Source: ruby-foreman-remote-execution
+Section: ruby
+Priority: extra
+Maintainer: Stephen Benjamin <stephen@redhat.com>
+Build-Depends: debhelper (>= 8.0.0), foreman-assets (>= 1.9.0~rc3), foreman (>= 1.9.0~rc3), foreman-sqlite3 (>= 1.9.0~rc3), ruby-foreman-tasks (>= 0.7.3), ruby-foreman-tasks (<< 0.8.0)
+Standards-Version: 3.9.3
+Homepage: https://github.com/theforeman/foreman_remote_execution
+
+Package: ruby-foreman-remote-execution
+Architecture: all
+Depends: ${misc:Depends}, bundler, foreman (>= 1.9.0~rc3), ruby-foreman-tasks (>= 0.7.3), ruby-foreman-tasks (<< 0.8.0)
+Description: Foreman Remote Execution Plugin
+  A plugin bringing remote execution to the Foreman, completing the config management functionality with remote management functionality
diff --git a/plugins/ruby-foreman-remote-execution/debian/copyright b/plugins/ruby-foreman-remote-execution/debian/copyright
new file mode 100644
index 000000000..ffe5e51fa
--- /dev/null
+++ b/plugins/ruby-foreman-remote-execution/debian/copyright
@@ -0,0 +1,33 @@
+Format: http://www.debian.org/doc/packaging-manuals/copyright-format/1.0/
+Upstream-Name: ruby-foreman-remote-execution
+Source: https://github.com/theforeman/foreman_remote_execution
+
+Files: *
+Copyright: 2012-2013 Red Hat Inc. <foreman-dev@googlegroups.com>
+License: GPL-3.0+
+
+Files: debian/*
+Copyright: 2013 Red Hat Inc. <foreman-dev@googlegroups.com>
+License: GPL-3.0+
+
+License: GPL-3.0+
+ This program 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 3 of the License, or
+ (at your option) any later version.
+ .
+ This package 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, see <http://www.gnu.org/licenses/>.
+ .
+ On Debian systems, the complete text of the GNU General
+ Public License version 3 can be found in "/usr/share/common-licenses/GPL-3".
+
+# Please also look if there are files or directories which have a
+# different copyright/license attached and list them here.
+# Please avoid to pick license terms that are more restrictive than the
+# packaged work, as it may make Debian's contributions unacceptable upstream.
diff --git a/plugins/ruby-foreman-remote-execution/debian/gem.list b/plugins/ruby-foreman-remote-execution/debian/gem.list
new file mode 100644
index 000000000..ae5025a7d
--- /dev/null
+++ b/plugins/ruby-foreman-remote-execution/debian/gem.list
@@ -0,0 +1,2 @@
+# list of gem urls to download via Jenkins, space separated
+GEMS="https://rubygems.org/downloads/foreman_remote_execution-0.0.1.gem"
diff --git a/plugins/ruby-foreman-remote-execution/debian/install b/plugins/ruby-foreman-remote-execution/debian/install
new file mode 100644
index 000000000..a038b9fc8
--- /dev/null
+++ b/plugins/ruby-foreman-remote-execution/debian/install
@@ -0,0 +1,4 @@
+foreman_remote_execution.rb           usr/share/foreman/bundler.d
+cache                                 usr/share/foreman/vendor
+foreman_remote_execution              var/lib/foreman/public/assets
+apipie-cache/foreman_remote_execution var/lib/foreman/public/apipie-cache/plugin
diff --git a/plugins/ruby-foreman-remote-execution/debian/postinst b/plugins/ruby-foreman-remote-execution/debian/postinst
new file mode 100644
index 000000000..5d4f5a6dc
--- /dev/null
+++ b/plugins/ruby-foreman-remote-execution/debian/postinst
@@ -0,0 +1,59 @@
+#!/bin/sh
+# postinst script for foreman-*
+#
+# see: dh_installdeb(1)
+
+if [ ! -z "${DEBUG}" ]; then
+  set -x
+else
+  set -e
+fi
+
+. /usr/share/debconf/confmodule
+
+LOGFILE='/var/log/foreman-install.log'
+PLUGIN='foreman_remote_execution'
+
+# if this script aborts with an error dpkg can
+# hang if daemons have been started
+trap db_stop EXIT
+
+BUNDLE=bundle
+[ -h /usr/bin/foreman-ruby ] && BUNDLE="/usr/bin/foreman-ruby /usr/bin/bundle"
+
+# Update gems
+export HOME=/usr/share/foreman
+cd /usr/share/foreman
+if [ ! -z "${DEBUG}" ]; then
+  if $BUNDLE show $PLUGIN >/dev/null 2>&1; then
+    $BUNDLE update $PLUGIN --local
+  else
+    $BUNDLE install --local --no-prune
+  fi
+else
+  if $BUNDLE show $PLUGIN >/dev/null 2>&1; then
+    $BUNDLE update $PLUGIN --local 2>&1 >> $LOGFILE
+  else
+    $BUNDLE install --local --no-prune 2>&1 >> $LOGFILE
+  fi
+fi
+
+# DB migrate/seed after install
+if [ -f /usr/share/foreman/config/database.yml ]; then
+  if [ ! -z "${DEBUG}" ]; then
+    /usr/sbin/foreman-rake db:migrate || true
+    /usr/sbin/foreman-rake db:seed || true
+    /usr/sbin/foreman-rake apipie:cache:index || true
+  else
+    /usr/sbin/foreman-rake db:migrate >> $LOGFILE 2>&1 || true
+    /usr/sbin/foreman-rake db:seed >> $LOGFILE 2>&1 || true
+    /usr/sbin/foreman-rake apipie:cache:index >> $LOGFILE 2>&1 || true
+  fi
+fi
+
+# Own all the core files
+chown -Rf foreman:foreman '/usr/share/foreman'
+
+#DEBHELPER#
+
+exit 0
diff --git a/plugins/ruby-foreman-remote-execution/debian/rules b/plugins/ruby-foreman-remote-execution/debian/rules
new file mode 100755
index 000000000..07dab6b75
--- /dev/null
+++ b/plugins/ruby-foreman-remote-execution/debian/rules
@@ -0,0 +1,30 @@
+#!/usr/bin/make -f
+# -*- makefile -*-
+# Sample debian/rules that uses debhelper.
+# This file was originally written by Joey Hess and Craig Small.
+# As a special exception, when this file is copied by dh-make into a
+# dh-make output file, you may use that output file without restriction.
+# This special exception was added by Craig Small in version 0.37 of dh-make.
+
+# Uncomment this to turn on verbose mode.
+#export DH_VERBOSE=1
+
+PLUGIN = foreman_remote_execution
+
+build:
+	cp cache/* /usr/share/foreman/vendor/cache/
+	cp $(PLUGIN).rb /usr/share/foreman/bundler.d/
+	cd /usr/share/foreman && ( \
+		bundle install --local && \
+		bundle exec rake plugin:assets:precompile[$(PLUGIN)] RAILS_ENV=production && \
+		bundle exec rake db:migrate RAILS_ENV=development && \
+		bundle exec rake plugin:apipie:cache[$(PLUGIN)] cache_part=resources \
+			OUT=/var/lib/foreman/public/apipie-cache/plugin/$(PLUGIN) RAILS_ENV=development \
+	)
+	GEM_PATH=$$(cd /usr/share/foreman && bundle show $(PLUGIN)) && \
+		cp -rp $${GEM_PATH}/public/assets/$(PLUGIN) ./
+	[ -e apipie-cache ] || mkdir apipie-cache/
+	cp -rp /var/lib/foreman/public/apipie-cache/plugin/$(PLUGIN) ./apipie-cache/
+
+%:
+	dh $@ 
diff --git a/plugins/ruby-foreman-remote-execution/debian/source/format b/plugins/ruby-foreman-remote-execution/debian/source/format
new file mode 100644
index 000000000..89ae9db8f
--- /dev/null
+++ b/plugins/ruby-foreman-remote-execution/debian/source/format
@@ -0,0 +1 @@
+3.0 (native)
diff --git a/plugins/ruby-foreman-remote-execution/foreman_remote_execution.rb b/plugins/ruby-foreman-remote-execution/foreman_remote_execution.rb
new file mode 100644
index 000000000..da2042d54
--- /dev/null
+++ b/plugins/ruby-foreman-remote-execution/foreman_remote_execution.rb
@@ -0,0 +1 @@
+gem 'foreman_remote_execution', '0.0.1'
