capybara-screenshot icon indicating copy to clipboard operation
capybara-screenshot copied to clipboard

before_save callbacks?

Open cycomachead opened this issue 6 years ago • 3 comments

It would be helpful if there were a before_save callback, that way if you're using something like Timecop you can call Timecop.return and get a normal time for the screenshots.

There might be other uses too. :)

cycomachead avatar Jul 10 '17 23:07 cycomachead

Good idea. @cycomachead fancy a PR?

mattheworiordan avatar Jul 12 '17 08:07 mattheworiordan

I'll take a stab, sure. I'll be travelling soon for a couple weeks, so it might be a while.

cycomachead avatar Jul 12 '17 08:07 cycomachead

Hi both. Just wondering if this progressed at all?

I've been hitting an issue with S3 rejecting screenshot uploads.

Aws::S3::Errors::RequestTimeTooSkewed:
            The difference between the request time and the current time is too large.

cf. https://github.com/aws/aws-sdk-ruby/issues/1727

In short, it seems like S3 rejects the uploads because the Ruby clock is way out of sync with real life.

I think it could be fixed by doing what the OP says.

nruth avatar Apr 27 '19 15:04 nruth