Permalink
Browse files

Merge pull request #14 from gido/master

Rename symlink task to create_symlink + old symlink task display a warning.
  • Loading branch information...
2 parents 1ff5f3e + d1312ed commit c9d4acc8bd419b255e9b4df4332ac297df4730ee @leehambley leehambley committed Apr 2, 2013
Showing with 56 additions and 8 deletions.
  1. +0 −3 .gitignore
  2. +15 −5 lib/railsless-deploy.rb
  3. +41 −0 railsless-deploy.gemspec
View
@@ -1,3 +0,0 @@
-*.gem
-*.gemspec
-pkg/*
View
@@ -61,10 +61,10 @@ def _cset(name, *args, &block)
_cset(:run_method) { fetch(:use_sudo, true) ? :sudo : :run }
- # some tasks, like symlink, need to always point at the latest release, but
+ # some tasks, like create_symlink, need to always point at the latest release, but
# they can also (occassionally) be called standalone. In the standalone case,
# the timestamped release_path will be inaccurate, since the directory won't
- # actually exist. This variable lets tasks like symlink work either in the
+ # actually exist. This variable lets tasks like create_symlink work either in the
# standalone case, or during deployment.
_cset(:latest_release) { exists?(:deploy_timestamped) ? release_path : current_release }
@@ -174,7 +174,7 @@ def try_runner(*args)
desc <<-DESC
Copies your project and updates the symlink. It does this in a \
- transaction, so that if either `update_code' or `symlink' fail, all \
+ transaction, so that if either `update_code' or `create_symlink' fail, all \
changes made to the remote servers will be rolled back, leaving your \
system in the same state it was in before `update' was invoked. Usually, \
you will want to call `deploy' instead of `update', but `update' can be \
@@ -183,7 +183,7 @@ def try_runner(*args)
task :update do
transaction do
update_code
- symlink
+ create_symlink
end
end
@@ -233,7 +233,7 @@ def try_runner(*args)
deploy, including `restart') or the 'update' task (which does everything \
except `restart').
DESC
- task :symlink, :except => { :no_release => true } do
+ task :create_symlink, :except => { :no_release => true } do
on_rollback do
if previous_release
run "rm -f #{current_path}; ln -s #{previous_release} #{current_path}; true"
@@ -246,6 +246,16 @@ def try_runner(*args)
end
desc <<-DESC
+ Deprecated. Use `deploy:create_symlink` instead.
+ DESC
+ task :symlink, :except => { :no_release => true } do
+ warn "[Deprecation Warning] This API has changed, please use `deploy:create_symlink` instead of" \
+ " `deploy:symlink`."
+
+ create_symlink
+ end
+
+ desc <<-DESC
Copy files to the currently deployed version. This is useful for updating \
files piecemeal, such as when you need to quickly deploy only a single \
file. Some files, such as updated templates, images, or stylesheets, \
View
@@ -0,0 +1,41 @@
+# Generated by jeweler
+# DO NOT EDIT THIS FILE DIRECTLY
+# Instead, edit Jeweler::Tasks in Rakefile, and run 'rake gemspec'
+# -*- encoding: utf-8 -*-
+
+Gem::Specification.new do |s|
+ s.name = "railsless-deploy"
+ s.version = "1.0.2"
+
+ s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
+ s.authors = ["Lee Hambley"]
+ s.date = "2012-09-21"
+ s.description = "Replacement for the rails deploy strategy which ships with Capistrano, allows you to deploy any platform with ease; some people have had huge success with this deploying rails projects where they needed to customise their deploy strategy beyond the code which ships with the Capistrano gem."
+ s.email = "lee.hambley@gmail.com"
+ s.extra_rdoc_files = [
+ "LICENSE.markdown",
+ "README.markdown"
+ ]
+ s.files = [
+ "CHANGELOG.markdown",
+ "LICENSE.markdown",
+ "README.markdown",
+ "Rakefile",
+ "VERSION",
+ "lib/railsless-deploy.rb"
+ ]
+ s.homepage = "http://github.com/leehambley/railsless-deploy/"
+ s.require_paths = ["lib"]
+ s.rubygems_version = "1.8.23"
+ s.summary = "Replacement for the default Capistrano tasks, designed to make life easier for PHP/Perl/Python developers"
+
+ if s.respond_to? :specification_version then
+ s.specification_version = 3
+
+ if Gem::Version.new(Gem::VERSION) >= Gem::Version.new('1.2.0') then
+ else
+ end
+ else
+ end
+end
+

0 comments on commit c9d4acc

Please sign in to comment.