Add functionality required for deploying pasteup via magenta #96

Merged
merged 2 commits into from May 14, 2013

Conversation

Projects
None yet
3 participants
Owner

sihil commented May 13, 2013

  • More flexible cache-control settings based on pattern matching of key name
  • Ability to lookup target bucket via a specified resource
Add functionality required for deploying pasteup via magenta
 - More flexible cache-control settings based on pattern matching of key name
 - Ability to lookup target bucket via a specified resource
- val totalSize = filesToCopy.map(_.length).fold(0L)(_ + _)
+ lazy val totalSize = filesToCopy.map(_.length).fold(0L)(_ + _)
@bmjames

bmjames May 13, 2013

Contributor

I think .fold(0L)(_ + _) could be replaced with .sum

+ override val bucket = "bucket"
+ }
+
+ task.requests.find(_.getFile == fileOne).map{ file =>
@bmjames

bmjames May 13, 2013

Contributor

Seeing test assertions made inside a map (or foreach etc) raises a little red flag for me. Do you always expect these optional values to be defined? If not then why is the test not deterministic? If they should always be defined, then I would make that unambiguous. In a contrived test case like this I think .get is an acceptable way to do that.

ahume commented May 14, 2013

Looks good - happy to test with a Pasteup build once it's merged.

sihil added a commit that referenced this pull request May 14, 2013

Merge pull request #96 from guardian/sh-s3-upload-pasteup
Add functionality required for deploying pasteup via magenta

@sihil sihil merged commit c0dba16 into master May 14, 2013

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment