-
Notifications
You must be signed in to change notification settings - Fork 0
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
Update hidden files flag #56
Conversation
jayamala17
commented
Aug 5, 2024
•
edited
Loading
edited
- To Support hidden file scenario while validating it using BagIt, detect hidden flag is added
- Changes are made to validate hidden files by enabling detect hidden flag.
- Updated rexml version to 3.3.4 to handle security vulnerability (https://github.com/mlibrary/bag-courier/security/dependabot)
lib/bag_adapter.rb
Outdated
ValidationResult.new(is_valid: is_valid, error_message: nil) | ||
else | ||
ValidationResult.new( | ||
is_valid: is_valid, | ||
error_message: @bag.errors.full_messages.join(", ") | ||
) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should this be this instead? Not sure.
ValidationResult.new(is_valid: is_valid, error_message: nil) | |
else | |
ValidationResult.new( | |
is_valid: is_valid, | |
error_message: @bag.errors.full_messages.join(", ") | |
) | |
ValidationResult.new( | |
is_valid: is_valid, | |
error_message: is_valid ? nil : @bag.errors.full_messages.join(", ") | |
) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
is_valid would be false always so wont be nil. I feel we dont need this check.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Well, I was wondering whether we could just use the conditional with error_message
. My suggestion might be messed up, hold on.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Like this, remove the outer conditional, just use a ternary with message. https://github.com/mlibrary/bag-courier/pull/56/files#r1705968354
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We can leave it the way it is, just wondering what you thought.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
sorry i got confused with unified lines. Now i got it. I think it will more readable and concise to have it this way which will handle both the condition.
Co-authored-by: Sam Sciolla <35741256+ssciolla@users.noreply.github.com>
…patcher, BagCourier, and uses