Class: Config
- Inherits:
-
Object
- Object
- Config
- Defined in:
- lib/config.rb
Constant Summary collapse
- REMOTE_NOT_FOUND =
"Can't find owner and repository. Make sure the remote name is correctly set on the configuration file.\n"
Class Method Summary collapse
Class Method Details
.get_owner_and_repo ⇒ Object
19 20 21 22 |
# File 'lib/config.rb', line 19 def get_owner_and_repo url = `git config --get remote.#{remote}.url`.strip url[/:(.*)\.git/, 1] || raise(REMOTE_NOT_FOUND) end |
.remote ⇒ Object
15 16 17 |
# File 'lib/config.rb', line 15 def remote config['remote'] end |
.token ⇒ Object
11 12 13 |
# File 'lib/config.rb', line 11 def token config['token'] end |
.user ⇒ Object
7 8 9 |
# File 'lib/config.rb', line 7 def user config['user'] end |