You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I think this is personal taste so I would not count this as an issue, but here is my doubt:
AWS::S3::S3Object.exists?( "", "mybucket")
I don't think this should return true because there is no S3Object.
I understand the logic behind it as the URL exists, this is the address of the bucket itself.
But in the way it is accessed here, it does not make much sense.
Especially when the find method raises an error:
AWS::S3::S3Object.find( "", "mybucket") #=> NoMethodError: undefined method `-' for nil:NilClass
At least both should be consistent in terms of failure-or-not.
Also I understand that looking for a blank filename is stupid, but it makes sense if the name is generated.
I personally encountered this while building some tests/specs.
My test was originally having nil as a filename and it raises an error so I thought I could just pass it through Nil#to_s and that is when I had my test failing while it was imho correct.
What do you guys think about that?
I'm looking forward to hearing your opinion.
Thank you for reading
Mig
The text was updated successfully, but these errors were encountered:
Hello,
I think this is personal taste so I would not count this as an issue, but here is my doubt:
I don't think this should return
true
because there is no S3Object.I understand the logic behind it as the URL exists, this is the address of the bucket itself.
But in the way it is accessed here, it does not make much sense.
Especially when the
find
method raises an error:At least both should be consistent in terms of failure-or-not.
Also I understand that looking for a blank filename is stupid, but it makes sense if the name is generated.
I personally encountered this while building some tests/specs.
My test was originally having
nil
as a filename and it raises an error so I thought I could just pass it throughNil#to_s
and that is when I had my test failing while it was imho correct.What do you guys think about that?
I'm looking forward to hearing your opinion.
Thank you for reading
Mig
The text was updated successfully, but these errors were encountered: