lib/god.rb in god-0.13.0 vs lib/god.rb in god-0.13.1
- old
+ new
@@ -1,6 +1,10 @@
-$:.unshift File.dirname(__FILE__) # For use/testing when no gem is installed
+# Bail out before loading anything unless this flag is set.
+#
+# We are doing this to guard against bundler autoloading because there is
+# no value in loading god in most processes.
+if $load_god
# core
require 'stringio'
require 'fileutils'
@@ -149,11 +153,11 @@
end
end
module God
# The String version number for this package.
- VERSION = '0.13.0'
+ VERSION = '0.13.1'
# The Integer number of lines of backlog to keep for the logger.
LOG_BUFFER_SIZE_DEFAULT = 100
# An Array of directory paths to be used as the default PID file directory.
@@ -724,11 +728,11 @@
end
# private
# Match a shortened pattern against a list of String candidates.
- # The pattern is expanded into a regular expression by
+ # The pattern is expanded into a regular expression by
# inserting .* between each character.
#
# pattern - The String containing the abbreviation.
# list - The Array of Strings to match against.
#
@@ -753,6 +757,8 @@
# start god, if $run is false, exit normally.
#
# Returns nothing.
at_exit do
God.at_exit if $run
+end
+
end