sprinkle-tool / sprinkle

Sprinkle is a software provisioning tool you can use to build remote servers with. eg. to install a Rails, or Sinatra stack on a brand new slice directly after its been created
https://github.com/sprinkle-tool/sprinkle
MIT License
1.15k stars 138 forks source link

Capistrano 3.0 #171

Closed dekz closed 11 years ago

dekz commented 11 years ago

Capistrano 3.0 has been released, which is incompatible with sprinkle 0.7.6.x, the most evident feature missing is 'capistrano/cli'.

Gemspec should probably lock down Capistrano to version 2.0. s.add_runtime_dependency(%q<capistrano>, ["~> 2.5.5"]) Instead of using >= 2.5.5.

Temporary workarounds with bundler, add gem "capistrano", '~>2.5.5' to users Gemfile.

I think you're more leading towards running :ssh directly which means making it work with 3.0 might be a waste of time.

joshgoebel commented 11 years ago

We'll pin this to ~> 2.5.5 for now as you suggest. I need to review a few other issues then I'll push an update.

ledermann commented 11 years ago

The latest capistrano 2 is 2.15.5, so it would be better to exclude version 3 this way:

gem "capistrano", '~> 2.5' or gem "capistrano", '>= 2.5.5', '< 3'

instead of

gem "capistrano", '~> 2.5.5'

Currently, a very old capistrano version is required by sprinkle.

joshgoebel commented 11 years ago

Are you using it with 2.15.5 without any issues?

ledermann commented 11 years ago

@yyyc514 So far I have no issues with 2.15.5

joshgoebel commented 11 years ago

Feel free to send a pull request with a bump to ~ 2.5 then if you want.

dekz commented 11 years ago

~> 2.5 should allow >= 2.5 and < 3.0

ledermann commented 11 years ago

@dekz Before Capistrano 3.0 was released, there was the requirement >= 2.5.5. So changing it to ~> 2.5 would allow 2.5.0 too, so I think [ ">= 2.5.5", '< 3' ] is the right way.

dekz commented 11 years ago

@ledermann You're completely right. +1

NovapaX commented 10 years ago

This is bad. I'm working with delivery :ssh and this prevents me from using capistrano 3 in my project.

I tried to write a capistrano 3 actor, but did not succeed yet. For now I just define my hosts for sprinkle and capistrano separately. Capistrano and sprinkle should use a Rolefile (just like a Gemfile or Procfile) or something to define hosts and roles for different environments....

joshgoebel commented 10 years ago

For simple setups (with Cap) you just drop Sprinkle right in on top of Cap and it gets your roles from Capistrano... if you want to use a Rolefile with your capistrano there is no reason sprinkle wouldn't work with that.

Its' still pinned to 2 because the changes are quite large.

Why does using the :ssh agent prevent you from using Cap 3?

NovapaX commented 10 years ago

It's just a dependency problem in my gemfile. I want Capistrano 3. And Sprinkle doesn't want it. And then Bundler doesn't know what to do anymore :-)

joshgoebel commented 10 years ago

And if you remove sprinkle from your Gemfile and just have it available locally as a utility?

NovapaX commented 10 years ago

Yes that would work indeed. For now I forked and applied some other customizations. But I think Sprinkle shouldn't require Capistrano anyway because you can use it without it without Capistrano anyway (via delivery :ssh)

joshgoebel commented 10 years ago

I'd be willing to accept a patch that removed capistrano from the requirements and then Kernel#required capistrano only when needed... again the built in Cap support would only work with Cap 2, not Cap 3 but that would allow one to use a newer version of Capistrano in a projects Gemfile.