poise / application_ruby

Development repository for Opscode Cookbook application_ruby
Apache License 2.0
124 stars 153 forks source link

Correct bug in example relating to git usage #90

Closed JCotton1123 closed 7 years ago

JCotton1123 commented 7 years ago

The git resource uses the name as the default location to checkout the code.

coderanger commented 7 years ago

No, this is correct if you use application_git. It does some fancy magic for the shortcut.

JCotton1123 commented 7 years ago

Interesting. Seems like the magic is broken in some way b/c I followed the example to the t and it resulted in an error with the below resource def (notice the destination):

    git("git@github.com:turnstylecycle/themedream.git") do
      action [:sync]
      retries 0
      retry_delay 2
      default_guard_interpreter :default
      destination "git@github.com:turnstylecycle/themedream.git"
      enable_checkout true
      revision "HEAD"
      remote "origin"
      checkout_branch "deploy"
      declared_type :git
      cookbook_name "turnstyle-appserver"
      recipe_name "_themedream"
    end
coderanger commented 7 years ago

Add depends 'application_git' to your cookbook metadata. You would see the resource name in there be application_git if it was enabled (though it wouldn't error so you wouldn't see it :).

JCotton1123 commented 7 years ago

Thanks. It might be worth adding this as a note to README.