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

Hanami::Action::Config#root: don't check realpath existence #429

Merged
merged 1 commit into from
Sep 27, 2023
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: 1 addition & 1 deletion lib/hanami/action.rb
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ def self.gem_loader
cookie_options.to_h.compact
}
setting :root_directory, constructor: -> (dir) {
Pathname(File.expand_path(dir || Dir.pwd)).realpath
Pathname(File.expand_path(dir || Dir.pwd))
}
setting :public_directory, default: Config::DEFAULT_PUBLIC_DIRECTORY
setting :before_callbacks, default: Utils::Callbacks::Chain.new, mutable: true
Expand Down
6 changes: 0 additions & 6 deletions spec/unit/hanami/action/config_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -89,12 +89,6 @@
expect(config.root_directory).to be_a Pathname
expect(config.root_directory.to_s).to eq __dir__
end

it "raises an error when set with a non-existent directory" do
expect {
config.root_directory = "/non-existent"
}.to raise_error(StandardError)
end
end

describe "public_directory" do
Expand Down