Class: Jekyll::VersionPlugin::Tag::SystemWrapper
- Inherits:
-
Object
- Object
- Jekyll::VersionPlugin::Tag::SystemWrapper
- Defined in:
- lib/jekyll_version_plugin.rb
Overview
A wrapper around system calls; mock/stub this in testing
Instance Method Summary collapse
Instance Method Details
#command_succeeded? ⇒ Boolean
21 22 23 |
# File 'lib/jekyll_version_plugin.rb', line 21 def command_succeeded? !$?.nil? && $?.success? end |
#git_repo? ⇒ Boolean
25 26 27 |
# File 'lib/jekyll_version_plugin.rb', line 25 def git_repo? system("git rev-parse") end |
#run(command) ⇒ Object
17 18 19 |
# File 'lib/jekyll_version_plugin.rb', line 17 def run(command) `#{command}` end |