Bugfix
- Fixed a bug where calling
.contentson a truly empty folder would causeSystemStackError.
Changes
- Moved the script to generate an access token inside the gem itself so that it can now be called with
Pcloud::Client.generate_access_token - Opened up the dependency requirements for HTTParty
Bugfix
- Added a missing
require "time"statement that resulted in errors for folks building and testing the gem locally. This should not affect production behavior.
Bugfix
- When passing the optipnal
recursive: trueonPcloud::Folder#findorPcloud::Folder#find_bymethods to load all the folders contents recursively in v0.2.4, recursive contents were not correctly parsed into objects. This release fixes that bug so that the recursive file tree is allPcloud::FileandPcloud::Folderobjects.
Changes
- You can now specify
recursive: trueonPcloud::Folder#findandPcloud::Folder#find_bymethods to load all the folders contents recursively. Note that this may result in long request times for folders with many items in them. - You can now configure the pCloud API read and connect timeouts via a new
timeout_secondsargument toPcloud::Client.configure(). The previous way to set this value via aPCLOUD_API_TIMEOUT_SECONDSenvironment variable continues to work as before.
Changes
Pcloud::File'suploadmethod no longer requires a:filenameparam, since pCloud just reads it off of the file object and ignores the param anyway- Both
Pcloud::FileandPcloud::Folder'supdateandupdate!methods now allow either partial paths (starting and ending with slashes) or full paths. This is a little more dangerous if you specify a full path and you meant partial, but it's a reasonable use case to support.
Changes
- After adding GitHub actions, I discovered that the gem did not in fact work on all the versions of Ruby that I had thought it supported. This update makes some small tweaks to bring support to Ruby 2.4 then updates the
.gemspecto clarify that 2.3 is not in fact supported. All current users of the gem should see no behavior changes as a result of this update 👍🏻
Changes
- Simplifying the errors returned from
Pcloud::FolderandPcloud::File. This is purely a cleanup release, unless your client is explicitly checking error strings there should be no noticeable behavior change 👍🏻
New
- An
.exists?method has been added toPcloud::FolderandPcloud::File - The
.find_bymethod onPcloud::FolderandPcloud::Filecan now be called with either:idor:pathparameters.- NOTE: pCloud treats
:idwith precedence, so an error will be raised if the method is called with both parameters at once. (Allowing precedence in a method like this would likely feel like unexpected behavior, so my intention was to make it immediately obvious to the end user.)
- NOTE: pCloud treats
Changes
- The
created_atandmodified_attimestamps onPcloud::FolderandPcloud::Fileare now returned as RubyTimeobjects (specificallyTZInfo::TimeWithOffset).- NOTE: if you were previously parsing the string timestamps out into time objects, you may see errors like
no implicit conversion of TZInfo::TimeWithOffset into String
- NOTE: if you were previously parsing the string timestamps out into time objects, you may see errors like
- Some error class names and messages have been cleaned up for additional clarity and consistency.
Initial release 🍰 🎉