From 97dbcf5e25390fbc96c4c9ad3c158f563d2ccbf8 Mon Sep 17 00:00:00 2001 From: James Couball Date: Wed, 3 Jan 2024 15:52:48 -0800 Subject: [PATCH] Make updates resulting from doc review (#38) Updates resulting from doc review Add documentation link the in the gemspec Make minor documentation changes for clarity --- lib/process_executer.rb | 5 +++-- lib/process_executer/options.rb | 7 ++++--- process_executer.gemspec | 1 + 3 files changed, 8 insertions(+), 5 deletions(-) diff --git a/lib/process_executer.rb b/lib/process_executer.rb index f7e166d..c0e97f7 100644 --- a/lib/process_executer.rb +++ b/lib/process_executer.rb @@ -12,7 +12,8 @@ module ProcessExecuter # Execute the specified command as a subprocess and return the exit status # - # This method blocks until the command has terminated. + # This is a convenience method that calls Process.spawn and blocks until the + # command has terminated. # # The command will be send the SIGKILL signal if it does not terminate within # the specified timeout. @@ -38,7 +39,7 @@ module ProcessExecuter # documentation for valid command and options # # @see ProcessExecuter::Options#initialize See ProcessExecuter::Options#initialize - # for additional options that may be specified + # for options that may be specified # # @param command [Array] the command to execute # @param options_hash [Hash] the options to use when exectuting the command diff --git a/lib/process_executer/options.rb b/lib/process_executer/options.rb index a180f8a..74dcb92 100644 --- a/lib/process_executer/options.rb +++ b/lib/process_executer/options.rb @@ -27,13 +27,14 @@ class Options close_others chdir ].freeze - # These options are allowed but should NOT be passed to `Process.spawn` + # These options are allowed by `ProcessExecuter.spawn` but should NOT be passed + # to `Process.spawn` # NON_SPAWN_OPTIONS = %i[ timeout ].freeze - # Any `SPAWN_OPTIONS`` set to this value will not be passed to `Process.spawn` + # Any `SPAWN_OPTIONS` set to `NOT_SET` will not be passed to `Process.spawn` # NOT_SET = :not_set @@ -76,7 +77,7 @@ class Options # @param options [Hash] Process.spawn options plus additional options listed below. # # See [Process.spawn](https://ruby-doc.org/core/Process.html#method-c-spawn) - # for a list of valid. + # for a list of valid options that can be passed to `Process.spawn`. # # @option options [Integer, Float, nil] :timeout # Number of seconds to wait for the process to terminate. Any number diff --git a/process_executer.gemspec b/process_executer.gemspec index 9b3c0c0..63d7345 100644 --- a/process_executer.gemspec +++ b/process_executer.gemspec @@ -19,6 +19,7 @@ Gem::Specification.new do |spec| spec.metadata['homepage_uri'] = spec.homepage spec.metadata['source_code_uri'] = 'https://github.com/main-branch/process_executer' spec.metadata['changelog_uri'] = 'https://rubydoc.info/gems/process_executer/file/CHANGELOG.md' + spec.metadata['documentation_uri'] = "https://rubydoc.info/gems/process_executer/#{ProcessExecuter::VERSION}" # Specify which files should be added to the gem when it is released. # The `git ls-files -z` loads the files in the RubyGem that have been added into git.