summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xbin/leap2
-rw-r--r--lib/leap_cli.rb16
-rw-r--r--lib/leap_cli/commands/deploy.rb4
-rw-r--r--lib/leap_cli/core_ext/boolean.rb (renamed from lib/core_ext/boolean.rb)0
-rw-r--r--lib/leap_cli/core_ext/hash.rb (renamed from lib/core_ext/hash.rb)0
-rw-r--r--lib/leap_cli/core_ext/json.rb (renamed from lib/core_ext/json.rb)0
-rw-r--r--lib/leap_cli/core_ext/nil.rb (renamed from lib/core_ext/nil.rb)0
-rw-r--r--lib/leap_cli/core_ext/string.rb (renamed from lib/core_ext/string.rb)0
-rw-r--r--lib/leap_cli/core_ext/yaml.rb (renamed from lib/core_ext/yaml.rb)0
-rw-r--r--lib/leap_cli/lib_ext/capistrano_connections.rb (renamed from lib/lib_ext/capistrano_connections.rb)0
-rw-r--r--lib/leap_cli/lib_ext/gli.rb (renamed from lib/lib_ext/gli.rb)0
-rw-r--r--lib/leap_cli/override/json.rb (renamed from lib/override/json.rb)0
-rw-r--r--lib/leap_cli/util/remote_command.rb2
-rw-r--r--lib/lib_ext/markdown_document_listener.rb122
14 files changed, 13 insertions, 133 deletions
diff --git a/bin/leap b/bin/leap
index c39da1c..512201c 100755
--- a/bin/leap
+++ b/bin/leap
@@ -29,7 +29,7 @@ end
require 'gli'
require 'highline'
require 'forwardable'
-require 'lib_ext/gli' # our custom extensions to gli
+require 'leap_cli/lib_ext/gli' # our custom extensions to gli
#
# Typically, GLI and Highline methods are loaded into the global namespace.
diff --git a/lib/leap_cli.rb b/lib/leap_cli.rb
index 557350b..f07fd25 100644
--- a/lib/leap_cli.rb
+++ b/lib/leap_cli.rb
@@ -5,8 +5,8 @@ end
$ruby_version = RUBY_VERSION.split('.').collect{ |i| i.to_i }.extend(Comparable)
-# ensure leap_cli/lib/overrides has the highest priority
-$:.unshift(File.expand_path('../override',__FILE__))
+# ensure lib/leap_cli/overrides has the highest priority
+$:.unshift(File.expand_path('../leap_cli/override',__FILE__))
# for a few gems, things will break if using earlier versions.
# enforce the compatible versions here:
@@ -20,12 +20,12 @@ require 'leap_cli/version'
require 'leap_cli/exceptions'
require 'leap_cli/leapfile'
-require 'core_ext/hash'
-require 'core_ext/boolean'
-require 'core_ext/nil'
-require 'core_ext/string'
-require 'core_ext/json'
-require 'core_ext/yaml'
+require 'leap_cli/core_ext/hash'
+require 'leap_cli/core_ext/boolean'
+require 'leap_cli/core_ext/nil'
+require 'leap_cli/core_ext/string'
+require 'leap_cli/core_ext/json'
+require 'leap_cli/core_ext/yaml'
require 'leap_cli/log'
require 'leap_cli/path'
diff --git a/lib/leap_cli/commands/deploy.rb b/lib/leap_cli/commands/deploy.rb
index 6589837..90807db 100644
--- a/lib/leap_cli/commands/deploy.rb
+++ b/lib/leap_cli/commands/deploy.rb
@@ -73,7 +73,9 @@ module LeapCli
end
end
end
-
+ if !Util.exit_status.nil? && Util.exit_status != 0
+ log :warning, "puppet did not finish successfully."
+ end
end
end
diff --git a/lib/core_ext/boolean.rb b/lib/leap_cli/core_ext/boolean.rb
index 9b617b2..9b617b2 100644
--- a/lib/core_ext/boolean.rb
+++ b/lib/leap_cli/core_ext/boolean.rb
diff --git a/lib/core_ext/hash.rb b/lib/leap_cli/core_ext/hash.rb
index 7df33b2..7df33b2 100644
--- a/lib/core_ext/hash.rb
+++ b/lib/leap_cli/core_ext/hash.rb
diff --git a/lib/core_ext/json.rb b/lib/leap_cli/core_ext/json.rb
index 1a82bd9..1a82bd9 100644
--- a/lib/core_ext/json.rb
+++ b/lib/leap_cli/core_ext/json.rb
diff --git a/lib/core_ext/nil.rb b/lib/leap_cli/core_ext/nil.rb
index 05ca98f..05ca98f 100644
--- a/lib/core_ext/nil.rb
+++ b/lib/leap_cli/core_ext/nil.rb
diff --git a/lib/core_ext/string.rb b/lib/leap_cli/core_ext/string.rb
index 07af8e5..07af8e5 100644
--- a/lib/core_ext/string.rb
+++ b/lib/leap_cli/core_ext/string.rb
diff --git a/lib/core_ext/yaml.rb b/lib/leap_cli/core_ext/yaml.rb
index bb0b5c9..bb0b5c9 100644
--- a/lib/core_ext/yaml.rb
+++ b/lib/leap_cli/core_ext/yaml.rb
diff --git a/lib/lib_ext/capistrano_connections.rb b/lib/leap_cli/lib_ext/capistrano_connections.rb
index c46455f..c46455f 100644
--- a/lib/lib_ext/capistrano_connections.rb
+++ b/lib/leap_cli/lib_ext/capistrano_connections.rb
diff --git a/lib/lib_ext/gli.rb b/lib/leap_cli/lib_ext/gli.rb
index f9b03be..f9b03be 100644
--- a/lib/lib_ext/gli.rb
+++ b/lib/leap_cli/lib_ext/gli.rb
diff --git a/lib/override/json.rb b/lib/leap_cli/override/json.rb
index a7ae328..a7ae328 100644
--- a/lib/override/json.rb
+++ b/lib/leap_cli/override/json.rb
diff --git a/lib/leap_cli/util/remote_command.rb b/lib/leap_cli/util/remote_command.rb
index 16d2b22..10a5ca8 100644
--- a/lib/leap_cli/util/remote_command.rb
+++ b/lib/leap_cli/util/remote_command.rb
@@ -120,7 +120,7 @@ module LeapCli; module Util; module RemoteCommand
@capistrano_enabled ||= begin
require 'capistrano'
require 'capistrano/cli'
- require 'lib_ext/capistrano_connections'
+ require 'leap_cli/lib_ext/capistrano_connections'
require 'leap_cli/remote/leap_plugin'
require 'leap_cli/remote/puppet_plugin'
require 'leap_cli/remote/rsync_plugin'
diff --git a/lib/lib_ext/markdown_document_listener.rb b/lib/lib_ext/markdown_document_listener.rb
deleted file mode 100644
index 55026e9..0000000
--- a/lib/lib_ext/markdown_document_listener.rb
+++ /dev/null
@@ -1,122 +0,0 @@
-require 'stringio'
-require 'gli/commands/help_modules/arg_name_formatter'
-
-#
-# adaption of RdocDocumentListener to use Markdown
-# see http://rtomayko.github.com/ronn/ronn-format.7
-#
-
-module GLI
- module Commands
- class MarkdownDocumentListener
-
- def initialize(global_options,options,arguments)
- @io = STDOUT #File.new(File.basename($0) + ".rdoc",'w')
- @nest = ''
- @arg_name_formatter = GLI::Commands::HelpModules::ArgNameFormatter.new
- end
-
- def beginning
- end
-
- # Called when processing has completed
- def ending
- #@io.close
- end
-
- # Gives you the program description
- def program_desc(desc)
- @io.puts "== #{File.basename($0)} - #{desc}"
- @io.puts
- end
-
- def program_long_desc(desc)
- @io.puts desc
- @io.puts
- end
-
- # Gives you the program version
- def version(version)
- @io.puts "v#{version}"
- @io.puts
- end
-
- def options
- if @nest.size == 0
- @io.puts "=== Global Options"
- else
- @io.puts "#{@nest}=== Options"
- end
- end
-
- # Gives you a flag in the current context
- def flag(name,aliases,desc,long_desc,default_value,arg_name,must_match,type)
- invocations = ([name] + Array(aliases)).map { |_| add_dashes(_) }.join('|')
- usage = "#{invocations} #{arg_name || 'arg'}"
- @io.puts "#{@nest}=== #{usage}"
- @io.puts
- @io.puts String(desc).strip
- @io.puts
- @io.puts "[Default Value] #{default_value || 'None'}"
- @io.puts "[Must Match] #{must_match.to_s}" unless must_match.nil?
- @io.puts String(long_desc).strip
- @io.puts
- end
-
- # Gives you a switch in the current context
- def switch(name,aliases,desc,long_desc,negetable)
- if negetable
- name = "[no-]#{name}" if name.to_s.length > 1
- aliases = aliases.map { |_| _.to_s.length > 1 ? "[no-]#{_}" : _ }
- end
- invocations = ([name] + aliases).map { |_| add_dashes(_) }.join('|')
- @io.puts "#{@nest}=== #{invocations}"
- @io.puts String(desc).strip
- @io.puts
- @io.puts String(long_desc).strip
- @io.puts
- end
-
- def end_options
- end
-
- def commands
- @io.puts "#{@nest}=== Commands"
- @nest = "#{@nest}="
- end
-
- # Gives you a command in the current context and creates a new context of this command
- def command(name,aliases,desc,long_desc,arg_name,arg_options)
- @io.puts "#{@nest}=== Command: <tt>#{([name] + aliases).join('|')} #{@arg_name_formatter.format(arg_name,arg_options)}</tt>"
- @io.puts String(desc).strip
- @io.puts
- @io.puts String(long_desc).strip
- @nest = "#{@nest}="
- end
-
- # Ends a command, and "pops" you back up one context
- def end_command(name)
- @nest.gsub!(/=$/,'')
- end
-
- # Gives you the name of the current command in the current context
- def default_command(name)
- @io.puts "[Default Command] #{name}" unless name.nil?
- end
-
- def end_commands
- @nest.gsub!(/=$/,'')
- end
-
- private
-
- def add_dashes(name)
- name = "-#{name}"
- name = "-#{name}" if name.length > 2
- name
- end
-
-
- end
- end
-end