laurilehmijoki / s3_website

Manage an S3 website: sync, deliver via CloudFront, benefit from advanced S3 website features.
Other
2.24k stars 186 forks source link

Adds config-dir as option to `cfg apply` #124

Closed Ross-Hunter closed 10 years ago

Ross-Hunter commented 10 years ago

push allows a user to set a config-directory, which is great for having a staging and production environment. However, cfg apply does not support this same thing. This PR fixes that.

I am in a situation where I have different configs for staging and production, but shared credentials (through .env). This means I need to run the command from the root, but my config files need to live in different directories (config/production, config/staging). I am actually editing my configs frequently (redirects mostly), so this adds a lot of utility for that use case.

I would love to add tests to this, but I don't know the first thing about Scala. I have just made edits to my local version of this gem in order to test (and I've been using it daily). However I have not been able to successfully build my own version of this gem because of the following error.

s3_website at /Users/vox/adonit/s3_website did not have a valid gemspec.
This prevents bundler from installing bins or native extensions, but that may not affect its functionality.
The validation message from Rubygems was:
  ["resources/s3_website.jar.md5"] are not files

It's possible (and likely) that I'm just doing something wrong. Thanks for the gem!

laurilehmijoki commented 10 years ago

Will the following tip solve your problem? https://github.com/laurilehmijoki/s3_website/issues/120#issuecomment-58381525

Ross-Hunter commented 10 years ago

That looks like one way to do it, however I think I would rather have separate files rather than one big one with conditionals in it.

laurilehmijoki commented 10 years ago

I agree with your reasoning.

I just released this pull request in the version 2.6.0. Thank you for contributing!