right_support 2.8.35 → 2.8.36

Sign up to get free protection for your applications and to get access to all the features.
data/VERSION CHANGED
@@ -1 +1 @@
1
- 2.8.35
1
+ 2.8.36
@@ -50,17 +50,20 @@ module RightSupport::Deployment
50
50
  # commit does not indicate the last commit that would be seen in the Git repo anywhere else,
51
51
  # so we should ignore this commit whe logging the current repositories state.
52
52
  commit_diff = `git --git-dir #{Shellwords.escape(@dir.to_s)}/.git log origin/HEAD..HEAD \
53
- --pretty=format:'%ae'`.split(/\n+/)
53
+ --pretty=format:'%ae' 2> /dev/null`.split(/\n+/)
54
54
 
55
55
  ops_commit_exists = (commit_diff.count == 1 && commit_diff.first =~ /ops@/)
56
- ops_commit_exists ? head_commit = 1 : head_commit = 0
56
+ ($?.success? && ops_commit_exists) ? head_commit = 1 : head_commit = 0
57
57
 
58
- @recent_commits = `git --git-dir #{Shellwords.escape(@dir.to_s)}/.git log \
58
+ recent_commits = `git --git-dir #{Shellwords.escape(@dir.to_s)}/.git log \
59
59
  -n #{Shellwords.escape(@num_commits.to_s)} \
60
- --pretty=format:'%h %an %ad'`.split(/\n+/)[head_commit..-1]
60
+ --pretty=format:'%h %an %ad' 2> /dev/null`.split(/\n+/)[head_commit..-1]
61
+ @recent_commits = $?.success? ? recent_commits : []
61
62
 
62
- @head_commit = `git --git-dir #{Shellwords.escape(@dir.to_s)}/.git log -n 1 \
63
- --pretty=format:'%H' #{"HEAD~" if ops_commit_exists}`
63
+ head_commit = `git --git-dir #{Shellwords.escape(@dir.to_s)}/.git log -n 1 \
64
+ --pretty=format:'%H' #{"HEAD~" if ops_commit_exists} 2> /dev/null`
65
+
66
+ @head_commit = $?.success? ? head_commit : 'unknown'
64
67
  end
65
68
  end
66
69
  end
@@ -159,8 +159,10 @@ module RightSupport::Rack
159
159
  else
160
160
  if body.is_a?(Array)
161
161
  body.reduce(0) {|accum, e| accum += e.bytesize}
162
- else
162
+ elsif body.is_a?(String)
163
163
  body.bytesize
164
+ else
165
+ '-'
164
166
  end
165
167
  end
166
168
 
@@ -5,11 +5,11 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = "right_support"
8
- s.version = "2.8.35"
8
+ s.version = "2.8.36"
9
9
 
10
10
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
11
  s.authors = ["Tony Spataro", "Sergey Sergyenko", "Ryan Williamson", "Lee Kirchhoff", "Alexey Karpik", "Scott Messier"]
12
- s.date = "2014-11-12"
12
+ s.date = "2014-11-18"
13
13
  s.description = "A toolkit of useful, reusable foundation code created by RightScale."
14
14
  s.email = "support@rightscale.com"
15
15
  s.extra_rdoc_files = [
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: right_support
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.8.35
4
+ version: 2.8.36
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -14,7 +14,7 @@ authors:
14
14
  autorequire:
15
15
  bindir: bin
16
16
  cert_chain: []
17
- date: 2014-11-12 00:00:00.000000000 Z
17
+ date: 2014-11-18 00:00:00.000000000 Z
18
18
  dependencies:
19
19
  - !ruby/object:Gem::Dependency
20
20
  name: rake
@@ -245,7 +245,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
245
245
  version: '0'
246
246
  segments:
247
247
  - 0
248
- hash: -578187549211322829
248
+ hash: -3247930919812590420
249
249
  required_rubygems_version: !ruby/object:Gem::Requirement
250
250
  none: false
251
251
  requirements: