Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

make build_path public

  • Loading branch information...
commit 2cce540b353bcd67ef97140dd875babc84880bfe 1 parent 091cba8
@chriskite authored
Showing with 6 additions and 8 deletions.
  1. +6 −8 app/models/pull_request.rb
View
14 app/models/pull_request.rb
@@ -4,8 +4,6 @@ class PullRequest < ActiveRecord::Base
has_one :provisioned_nginx, dependent: :destroy
has_one :provisioned_redis, dependent: :destroy
- attr_reader :build_path
-
before_destroy :destroy_build
attr_accessible :author,
@@ -130,6 +128,12 @@ def destroy_build
end
end
+ def build_path
+ return nil unless !!repo
+ builds_dir = Rails.root.join('builds')
+ builds_dir.join("#{repo.owner}-#{repo.name}-#{number}")
+ end
+
private
def ensure_builds_dir_exists
@@ -137,10 +141,4 @@ def ensure_builds_dir_exists
FileUtils.mkdir_p(builds_dir)
end
- def build_path
- return nil unless !!repo
- builds_dir = Rails.root.join('builds')
- builds_dir.join("#{repo.owner}-#{repo.name}-#{number}")
- end
-
end
Please sign in to comment.
Something went wrong with that request. Please try again.