codebase4 1.0.12 → 1.0.13

Sign up to get free protection for your applications and to get access to all the features.
Files changed (2) hide show
  1. data/lib/codebase/recipes.rb +14 -4
  2. metadata +4 -4
@@ -26,15 +26,25 @@ Capistrano::Configuration.instance(:must_exist).load do
26
26
  cmd << "-e #{environment}" if respond_to?(:environment)
27
27
 
28
28
  ## get the repo and project name etc...
29
- if fetch(:repository) =~ /git\@codebasehq.com\:(.+)\/(.+)\/(.+)\.git\z/
29
+ account, project, repo = nil, nil, nil
30
+ case fetch(:repository)
31
+ when /git\@codebasehq.com\:(.+)\/(.+)\/(.+)\.git\z/
32
+ account, project, repo = $1, $2, $3
33
+ when /ssh:\/\/.+\@codebasehq.com\/(.+)\/(.+)\/(.+)\.hg\z/
34
+ account, project, repo = $1, $2, $3
35
+ when /https?:\/\/.+\@(.+)\.codebasehq.com\/(.+)\/(.+)\.(?:hg|svn)\z/
36
+ account, project, repo = $1, $2, $3
37
+ when /https?:\/\/(?:.+\@)?(.+)\.svn\.codebasehq.com\/(.+?)\/(.+?)(?:\/.*)\z/
30
38
  account, project, repo = $1, $2, $3
31
- cmd << "-r #{project}:#{repo}"
32
- cmd << "-h #{account}.codebasehq.com"
33
- cmd << "--protocol https"
34
39
  else
35
40
  puts "! Repository path not supported by deployment logging"
36
41
  next
37
42
  end
43
+
44
+ cmd << "-r #{project}:#{repo}"
45
+ cmd << "-h #{account}.codebasehq.com"
46
+ cmd << "--protocol https"
47
+
38
48
  puts " running: #{cmd.join(' ')}"
39
49
  system(cmd.join(' ') + "; true")
40
50
 
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: codebase4
3
3
  version: !ruby/object:Gem::Version
4
- hash: 15
4
+ hash: 13
5
5
  prerelease:
6
6
  segments:
7
7
  - 1
8
8
  - 0
9
- - 12
10
- version: 1.0.12
9
+ - 13
10
+ version: 1.0.13
11
11
  platform: ruby
12
12
  authors:
13
13
  - Adam Cooke
@@ -15,7 +15,7 @@ autorequire:
15
15
  bindir: bin
16
16
  cert_chain: []
17
17
 
18
- date: 2011-10-24 00:00:00 Z
18
+ date: 2011-10-27 00:00:00 Z
19
19
  dependencies:
20
20
  - !ruby/object:Gem::Dependency
21
21
  name: json