Module: GitFeats::Config
Constant Summary collapse
- CONFIG_USER_CMD =
"git config --global github.user"
- CONFIG_KEY_CMD =
"git config --global feats.key"
Instance Method Summary collapse
-
#exists? ⇒ Boolean
Check if config exists and is configured properly.
-
#key ⇒ Object
Returns the config value for api key.
-
#name ⇒ Object
Returns the config value for username.
Instance Method Details
#exists? ⇒ Boolean
Check if config exists and is configured properly
20 21 22 |
# File 'lib/git-feats/config.rb', line 20 def exists? !name.empty? && !key.empty? end |
#key ⇒ Object
Returns the config value for api key
15 16 17 |
# File 'lib/git-feats/config.rb', line 15 def key @key ||= `#{CONFIG_KEY_CMD}`.chomp end |
#name ⇒ Object
Returns the config value for username
10 11 12 |
# File 'lib/git-feats/config.rb', line 10 def name @name ||= `#{CONFIG_USER_CMD}`.chomp end |