Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Assume default config is located at config/pitchfork.rb #147

Merged
merged 1 commit into from
Nov 12, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
# Unreleased

- Assume config file is located at `config/pitchfork.rb` if `-c` argument isn't provided.

# 0.16.0

- Use `exit!` for exiting the middle process when forking a new worker or mold.
Expand Down
2 changes: 1 addition & 1 deletion lib/pitchfork/configurator.rb
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ class Configurator
def initialize(defaults = {}) #:nodoc:
self.set = Hash.new(:unset)
@use_defaults = defaults.delete(:use_defaults)
self.config_file = defaults.delete(:config_file)
self.config_file = defaults.delete(:config_file) { "config/pitchfork.rb" if File.exist?("config/pitchfork.rb") }

set.merge!(DEFAULTS) if @use_defaults
defaults.each { |key, value| self.__send__(key, value) }
Expand Down
Loading