New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix a few bugs when using the fog deployer with a path specified #351

Merged
merged 1 commit into from Nov 26, 2013

Conversation

Projects
None yet
2 participants
@36degrees
Contributor

36degrees commented Nov 18, 2013

A few fixes for the fog deployer when using a path. In our particular use case we are deploying documentation for our different environments (staging, production) to separate prefixes in a single S3 bucket.

  • Correctly compose the key for the file (path/to/file rather than pathto/file)
  • Fix a bug where all files outside of the path get deleted when you deploy
  • Fix a bug where fog throws a warning about "Unrecognized arguments: path"

I attempted to write tests for test_run_delete_stray when a path is set, but as the local fog provider doesn't have any concept of prefixes this wasn't possible. If you have any idea how this could be tested I'd be more than happy to implement it.

Fix a few bugs when using the fog deployer with a path specified
- Correctly compose the key for the file (path/to/file rather than pathto/file)
- Fix a bug where all files outside of the path get deleted when you deploy
- Fix a bug where fog throws a warning about "Unrecognized arguments: path"
@ddfreyne

This comment has been minimized.

Show comment
Hide comment
@ddfreyne

ddfreyne Nov 26, 2013

Member

Cool stuff, thanks!

It is pretty inconvenient that the local provider does not support prefixes. I can’t think of a way to test this properly. Maybe the local fog provider should be adjusted and take a prefix into account, but I don’t know whether the fog maintainers will accept such a change since it would probably break backwards compatibility.

I’ll merge the PR, but if you come up with a nice test, you’re always welcome to send another PR. :)

Member

ddfreyne commented Nov 26, 2013

Cool stuff, thanks!

It is pretty inconvenient that the local provider does not support prefixes. I can’t think of a way to test this properly. Maybe the local fog provider should be adjusted and take a prefix into account, but I don’t know whether the fog maintainers will accept such a change since it would probably break backwards compatibility.

I’ll merge the PR, but if you come up with a nice test, you’re always welcome to send another PR. :)

ddfreyne added a commit that referenced this pull request Nov 26, 2013

Merge pull request #351 from 36degrees/release-3.6.x
Fix a few bugs when using the fog deployer with a path specified

@ddfreyne ddfreyne merged commit c46f1aa into nanoc:release-3.6.x Nov 26, 2013

@36degrees 36degrees deleted the 36degrees:release-3.6.x branch Nov 26, 2013

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