Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Merge pull request #52 from luke-gru/defaults_method

Change defaults (private) method.
  • Loading branch information...
commit 04ffbef4d482c17e4b78b99c2fddcab34873be10 2 parents 627ac48 + a017df6
Andre Arko authored
Showing with 2 additions and 3 deletions.
  1. +2 −3 lib/gist.rb
View
5 lib/gist.rb
@@ -220,12 +220,11 @@ def auth
# gist.extension - string
def defaults
extension = config("gist.extension")
- extension = nil if extension && extension.empty?
return {
"private" => config("gist.private"),
"browse" => config("gist.browse"),
- "extension" => extension,
+ "extension" => extension
}
end
@@ -237,7 +236,7 @@ def defaults
# return something useful or nil
def config(key)
env_key = ENV[key.upcase.gsub(/\./, '_')]
- return env_key if env_key and not env_key.empty?
+ return env_key if env_key and not env_key.strip.empty?
str_to_bool `git config --global #{key}`.strip
end
Please sign in to comment.
Something went wrong with that request. Please try again.