obbistrano 1.1.50 → 1.1.51

Sign up to get free protection for your applications and to get access to all the features.
@@ -134,9 +134,18 @@ Capistrano::Configuration.instance(:must_exist).load do
134
134
 
135
135
  task :deploy_check, :roles =>[:web] do
136
136
  fetch "repository" rescue abort "You have not specified a repository for this application"
137
+ git_copy if deploy_via=="copy"
137
138
  git_deploy if repository.include? "git"
138
139
  svn_deploy if repository.include? "svn"
139
140
  end
141
+
142
+ task :git_copy, :roles=>[:web] do
143
+ Dir.mkdir("tmp/deploy_cache") rescue ""
144
+ system("git clone --depth 1 #{repository} tmp/deploy_cache/" )
145
+ system("cd tmp/deploy_cache/ && git checkout -b #{branch} origin/#{branch}" )
146
+ upload "tmp/deploy_cache/", "#{deploy_to}", :via => :scp, :recursive=>true
147
+ FileUtils.rm_rf 'tmp/deploy_cache'
148
+ end
140
149
 
141
150
  task :git_deploy, :roles =>[:web] do
142
151
  logger.level = 2
@@ -374,7 +383,7 @@ Capistrano::Configuration.instance(:must_exist).load do
374
383
  set :user_to_add, "#{user}"
375
384
  set :passwd_to_add, "#{password}"
376
385
  with_user("root", "#{root_pass}") do
377
- run "useradd -p `openssl passwd #{passwd_to_add}` #{user_to_add}"
386
+ run "useradd -m -r -p `openssl passwd #{passwd_to_add}` #{user_to_add}"
378
387
  run "chmod -R 0755 /home/#{user_to_add}"
379
388
  end
380
389
  end
@@ -2,7 +2,7 @@
2
2
 
3
3
  Gem::Specification.new do |s|
4
4
  s.name = %q{obbistrano}
5
- s.version = "1.1.50"
5
+ s.version = "1.1.51"
6
6
  s.authors = ["Ross Riley", "One Black Bear"]
7
7
  s.date = Time.now
8
8
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: obbistrano
3
3
  version: !ruby/object:Gem::Version
4
- hash: 119
4
+ hash: 117
5
5
  prerelease: false
6
6
  segments:
7
7
  - 1
8
8
  - 1
9
- - 50
10
- version: 1.1.50
9
+ - 51
10
+ version: 1.1.51
11
11
  platform: ruby
12
12
  authors:
13
13
  - Ross Riley
@@ -16,7 +16,7 @@ autorequire:
16
16
  bindir: bin
17
17
  cert_chain: []
18
18
 
19
- date: 2010-10-01 00:00:00 +01:00
19
+ date: 2010-11-25 00:00:00 +00:00
20
20
  default_executable:
21
21
  dependencies:
22
22
  - !ruby/object:Gem::Dependency