rebuy_deployment 0.2.2 → 0.2.3

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/rebuy_deployment/deploy.rb +15 -10
  2. metadata +10 -10
@@ -34,16 +34,21 @@ def get_git_log
34
34
  ["deployed", "master", current, latest] : \
35
35
  ["previous", "deployed", previous, current]
36
36
 
37
- # Show difference between master and deployed revisions.
38
- if (diff = `git log #{base_rev}..#{new_rev} --oneline`) != ""
39
- diff = " " << diff.gsub("\n", "\n ") << "\n"
40
- # Indent commit messages nicely, max 80 chars per line, line has to end with space.
41
- diff = diff.split("\n").map{|l|l.scan(/.{1,120}/).join("\n"<<" "*14).gsub(/([^ ]*)\n {14}/m,"\n"<<" "*14<<"\\1")}.join("\n")
42
- body << "Difference between #{base_label} revision and #{new_label} revision:\n\n"
43
- body << diff
44
- return body
45
- else
46
- body << "An old version was redeployed. No changes."
37
+ # Temporary path with repository
38
+ tmp_repo = File.expand_path("#{application}", Dir.tmpdir)
39
+
40
+ Dir.chdir tmp_repo do
41
+ # Show difference between master and deployed revisions.
42
+ if (diff = `git log #{base_rev}..#{new_rev} --oneline`) != ""
43
+ diff = " " << diff.gsub("\n", "\n ") << "\n"
44
+ # Indent commit messages nicely, max 80 chars per line, line has to end with space.
45
+ diff = diff.split("\n").map{|l|l.scan(/.{1,120}/).join("\n"<<" "*14).gsub(/([^ ]*)\n {14}/m,"\n"<<" "*14<<"\\1")}.join("\n")
46
+ body << "Difference between #{base_label} revision and #{new_label} revision:\n\n"
47
+ body << diff
48
+ return body
49
+ else
50
+ body << "An old version was redeployed. No changes."
51
+ end
47
52
  end
48
53
  end
49
54
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rebuy_deployment
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.2
4
+ version: 0.2.3
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,11 +9,11 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2012-08-31 00:00:00.000000000 Z
12
+ date: 2012-09-10 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: capistrano
16
- requirement: &6061240 !ruby/object:Gem::Requirement
16
+ requirement: &19498760 !ruby/object:Gem::Requirement
17
17
  none: false
18
18
  requirements:
19
19
  - - ! '>='
@@ -24,10 +24,10 @@ dependencies:
24
24
  version: 2.12.0
25
25
  type: :runtime
26
26
  prerelease: false
27
- version_requirements: *6061240
27
+ version_requirements: *19498760
28
28
  - !ruby/object:Gem::Dependency
29
29
  name: railsless-deploy
30
- requirement: &6060480 !ruby/object:Gem::Requirement
30
+ requirement: &19497980 !ruby/object:Gem::Requirement
31
31
  none: false
32
32
  requirements:
33
33
  - - ! '>='
@@ -35,10 +35,10 @@ dependencies:
35
35
  version: 1.0.2
36
36
  type: :runtime
37
37
  prerelease: false
38
- version_requirements: *6060480
38
+ version_requirements: *19497980
39
39
  - !ruby/object:Gem::Dependency
40
40
  name: rake
41
- requirement: &6059980 !ruby/object:Gem::Requirement
41
+ requirement: &19497300 !ruby/object:Gem::Requirement
42
42
  none: false
43
43
  requirements:
44
44
  - - ! '>='
@@ -46,10 +46,10 @@ dependencies:
46
46
  version: '0'
47
47
  type: :runtime
48
48
  prerelease: false
49
- version_requirements: *6059980
49
+ version_requirements: *19497300
50
50
  - !ruby/object:Gem::Dependency
51
51
  name: mail
52
- requirement: &6059400 !ruby/object:Gem::Requirement
52
+ requirement: &19496680 !ruby/object:Gem::Requirement
53
53
  none: false
54
54
  requirements:
55
55
  - - ! '>='
@@ -57,7 +57,7 @@ dependencies:
57
57
  version: 2.4.4
58
58
  type: :runtime
59
59
  prerelease: false
60
- version_requirements: *6059400
60
+ version_requirements: *19496680
61
61
  description: This gem offers deployment for all rebuy.de projects
62
62
  email:
63
63
  - m.roetgers@rebuy.de