Skip to content
This repository has been archived by the owner on Nov 23, 2018. It is now read-only.

Upgraded mime-types, fixed url underscores, fix blank? not defined #15

Closed
wants to merge 1 commit into from

Conversation

drsharp
Copy link

@drsharp drsharp commented Dec 8, 2014

DO NOT MERGE....

Hi!

You probably don't want to merge this PR outright, but I hope it gives you some ideas. I had to fork your repo and make these changes to get them to work for a project I'm working on. The issues were:

  1. it's a Ruby only system (not Rails), so ".blank?" isn't defined.
  2. We have some S3 buckets that pre-date their requirement to NOT use underscores. The URI.parse() method was blowing up with URLs that have underscores. Turns out the uri object is only needed to pull out the host and port for the connect, and otherwise the req_klass just connects to the URL string, so the changes here allowed it to work even if there are underscores in the subdomain (which can happen with older S3 buckets)
  3. The mime-types change is probably not necessary. I had a Bundler error early on, but it seems to work fine with 1.19 or 2.4.3, so that part isn't important.

Anyway, if you like, I can clean up #1 and #2 so that they are merge-able... i.e. not just check for nil but also check for empty... maybe something like: self.region.to_s.empty? which would work if self.region is nil or self.region is an empty string.

@drsharp
Copy link
Author

drsharp commented Dec 18, 2014

BTW, rorra's PR covers the .blank? issue. So really the only change that matters is supporting S3 buckets that pre-date the requirement to not use underscores. If that matters, I can update this PR to just be that.

@c-r c-r closed this Aug 13, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants