Module: Ronin::Core::Git
- Defined in:
- lib/ronin/core/git.rb
Class Method Summary collapse
-
.config_value(name) ⇒ string?
Queries a git configuration value.
-
.github_user ⇒ String?
Queries the git
github.user
variable from~/.gitconfig
. -
.user_email ⇒ String?
Queries the git
user.email
variable from~/.gitconfig
. -
.user_name ⇒ String?
Queries the git
user.name
variable from~/.gitconfig
.
Class Method Details
.config_value(name) ⇒ string?
Queries a git configuration value.
64 65 66 67 68 69 70 |
# File 'lib/ronin/core/git.rb', line 64 def self.config_value(name) output = `git config #{name}`.chomp if output.empty? then nil else output end end |
.github_user ⇒ String?
Queries the git github.user
variable from ~/.gitconfig
.
51 52 53 |
# File 'lib/ronin/core/git.rb', line 51 def self.github_user config_value('github.user') end |
.user_email ⇒ String?
Queries the git user.email
variable from ~/.gitconfig
.
41 42 43 |
# File 'lib/ronin/core/git.rb', line 41 def self.user_email config_value('user.email') end |
.user_name ⇒ String?
Queries the git user.name
variable from ~/.gitconfig
.
31 32 33 |
# File 'lib/ronin/core/git.rb', line 31 def self.user_name config_value('user.name') end |