Skip to content
This repository has been archived by the owner on Aug 17, 2023. It is now read-only.

Commit

Permalink
Merge pull request #7 from glassfalcon/pr-for-le-patrick
Browse files Browse the repository at this point in the history
Added option to hide the commit message
  • Loading branch information
Patrick Camacho committed May 10, 2016
2 parents 59bfc7a + 4330d87 commit 97eee31
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 1 deletion.
4 changes: 4 additions & 0 deletions lib/lolcommits/plugins/loltext.rb
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,10 @@ def self.name

# enabled by default (if no configuration exists)
def enabled?
# Added by Felix
# we have to access the configuration for the snapgit plugin here
config = runner.config.read_configuration if runner
return false unless config["snapgit"]["show_commit_messages"]
!configured? || super
end

Expand Down
7 changes: 6 additions & 1 deletion lib/lolcommits/plugins/snapgit.rb
Original file line number Diff line number Diff line change
Expand Up @@ -107,6 +107,9 @@ def configure_auth!
print "\n4) Your Gravatar password: "
gravatar_password = STDIN.gets.strip.downcase.to_s

print "\n5) Do you want to show the commit message on the picture? This is recommended for open source projects (y/n) "
show_commit_messages = (STDIN.gets.strip == "y")

puts ''
puts '------------------------------'
puts 'Successfully set up snapgit'
Expand All @@ -115,7 +118,8 @@ def configure_auth!
'access_token' => access_token.token,
'secret' => access_token.secret,
'email' => gravatar_email,
'password' => gravatar_password
'password' => gravatar_password,
'show_commit_messages' => show_commit_messages
}
end
# rubocop:enable Metrics/MethodLength
Expand All @@ -125,6 +129,7 @@ def configured?
!configuration['enabled'].nil? &&
configuration['access_token'] &&
configuration['secret'] &&
# configuration['show_commit_messages'] && # we don't do that, since it might be false
configuration['email'] &&
configuration['password']
end
Expand Down

0 comments on commit 97eee31

Please sign in to comment.