mydrive / capistrano-deploytags

Add timestamped Git tags for each environment on deployment
BSD 2-Clause "Simplified" License
123 stars 20 forks source link

Make UTC optional #25

Closed matiaskorhonen closed 9 years ago

matiaskorhonen commented 9 years ago

We have a team that's based entirely in a single timezone, so using UTC for the deploy tags just makes things more confusing for us.

This PR adds an option to opt for local time timestamps instead of UTC (and changes the default time format to include the relevant timezone).

gavinheavyside commented 9 years ago

Seems fine to me, thanks!

relistan commented 9 years ago

Nice addition. A test around this behavior would be good.

matiaskorhonen commented 9 years ago

I would have normally written a test, but was put off by the complete lack of existing tests…

» rspec spec
*

Pending:
  Capistrano::Deploytags capistrano-spec doesn't support Capistrano 3
    # Not yet implemented
    # ./spec/capistrano_deploy_tags_spec.rb:4

Finished in 0.00032 seconds (files took 0.24751 seconds to load)
1 example, 0 failures, 1 pending
relistan commented 9 years ago

My apologies @matiaskorhonen, I forgot that when it was refactored for Cap 3, capistrano-spec no longer worked and @gavinheavyside had to disable all the tests. :( You are correct, sorry about that.

gavinheavyside commented 9 years ago

Yep, cap 3 was a complete rewrite which broke compatibility with capistrano-spec. I haven't been able to find anything approximating capistrano-spec for cap 3. Any volunteers to write it? :smile:

gavinheavyside commented 9 years ago

https://github.com/technicalpickles/capistrano-spec/issues/22

matiaskorhonen commented 9 years ago

Could you folks cut a new version of the gem with these changes?

gavinheavyside commented 9 years ago

Just pushed as v1.0.1 https://rubygems.org/gems/capistrano-deploytags/versions/1.0.1

matiaskorhonen commented 9 years ago

Cheers!