akitaonrails-locarails 1.1.12 → 1.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -5,8 +5,10 @@ unless Gem.source_index.find_name('capistrano').select { |g| g.version.to_s =~ /
5
5
  require 'capistrano/recipes/deploy/dependencies'
6
6
  require 'capistrano/recipes/deploy/strategy/base'
7
7
  require 'capistrano/recipes/deploy/strategy/copy'
8
+ require 'capistrano/recipes/deploy/scm/git'
8
9
  require 'capistrano/recipes/deploy/scm/none'
9
10
  require 'locarails/base'
10
11
  require 'locarails/copy'
12
+ require 'locarails/git'
11
13
  require 'locarails/none'
12
14
  end
@@ -0,0 +1,39 @@
1
+ class Capistrano::Deploy::SCM::Git
2
+ alias :checkout_old :checkout
3
+ def checkout(revision, destination)
4
+ sub_wrapper(:checkout_old, revision, destination)
5
+ end
6
+
7
+ alias :sync_old :sync
8
+ def sync(revision, destination)
9
+ sub_wrapper(:sync_old, revision, destination)
10
+ end
11
+
12
+ def sub_wrapper(method, revision, destination)
13
+ execute = send(method, revision, destination) # execute original method
14
+ # filter the git URL to force it to a local file:// URL
15
+ execute.collect do |line|
16
+ if line.include?(configuration[:repository])
17
+ line.sub(configuration[:repository], remote_repository)
18
+ else
19
+ line
20
+ end
21
+ end
22
+ end
23
+
24
+ # force the remote git commands to fetch from the local filesystem instead
25
+ # making a round-trip to itself through ssh
26
+ def remote_repository
27
+ url = "#{configuration[:user]}@#{configuration[:domain]}:"
28
+ @remote_repository ||= if configuration[:repository].include?(url)
29
+ tmp = configuration[:repository].sub(url, "file://")
30
+ if tmp.include?("~")
31
+ tmp.sub!("~", "/home/#{configuration[:user]}")
32
+ end
33
+ tmp
34
+ else
35
+ configuration[:repository]
36
+ end
37
+ @remote_repository
38
+ end
39
+ end
@@ -1,8 +1,8 @@
1
1
  module Locarails
2
2
  module VERSION #:nodoc:
3
3
  MAJOR = 1
4
- MINOR = 1
5
- TINY = 12
4
+ MINOR = 2
5
+ TINY = 0
6
6
 
7
7
  STRING = [MAJOR, MINOR, TINY].join('.')
8
8
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: akitaonrails-locarails
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.1.12
4
+ version: 1.2.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Fabio Akita
@@ -9,7 +9,7 @@ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
11
 
12
- date: 2008-12-24 00:00:00 -08:00
12
+ date: 2009-09-22 00:00:00 -07:00
13
13
  default_executable: locarails
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
@@ -20,7 +20,7 @@ dependencies:
20
20
  requirements:
21
21
  - - ">="
22
22
  - !ruby/object:Gem::Version
23
- version: 2.5.0
23
+ version: 2.0.0
24
24
  version:
25
25
  - !ruby/object:Gem::Dependency
26
26
  name: highline
@@ -57,6 +57,7 @@ files:
57
57
  - lib/locarails/base.rb
58
58
  - lib/locarails/copy.rb
59
59
  - lib/locarails/fix.rb
60
+ - lib/locarails/git.rb
60
61
  - lib/locarails/none.rb
61
62
  - lib/locarails/version.rb
62
63
  - lib/locarails.rb
@@ -67,8 +68,9 @@ files:
67
68
  - templates/ssh_helper.rb
68
69
  - tasks/gems.rake
69
70
  - templates/.gitignore
70
- has_rdoc: true
71
+ has_rdoc: false
71
72
  homepage: http://www.locaweb.com.br/rails
73
+ licenses:
72
74
  post_install_message:
73
75
  rdoc_options: []
74
76
 
@@ -89,9 +91,9 @@ required_rubygems_version: !ruby/object:Gem::Requirement
89
91
  requirements: []
90
92
 
91
93
  rubyforge_project:
92
- rubygems_version: 1.2.0
94
+ rubygems_version: 1.3.5
93
95
  signing_key:
94
- specification_version: 2
96
+ specification_version: 3
95
97
  summary: Configuracao de Capistrano automatica para hospedagens Linux Locaweb.
96
98
  test_files: []
97
99