Class: BitbucketPullRequest::Opener
- Inherits:
-
Object
- Object
- BitbucketPullRequest::Opener
- Defined in:
- lib/bitbucket-pull-request/opener.rb
Class Method Summary collapse
- .branch ⇒ Object
- .dest_param ⇒ Object
- .full_url ⇒ Object
- .open ⇒ Object
- .path ⇒ Object
- .pull_request_path ⇒ Object
- .root_url ⇒ Object
- .source_param ⇒ Object
Class Method Details
.branch ⇒ Object
21 22 23 |
# File 'lib/bitbucket-pull-request/opener.rb', line 21 def self.branch Branch.get end |
.dest_param ⇒ Object
29 30 31 |
# File 'lib/bitbucket-pull-request/opener.rb', line 29 def self.dest_param CGI.escape "#{self.path}::master" end |
.full_url ⇒ Object
9 10 11 |
# File 'lib/bitbucket-pull-request/opener.rb', line 9 def self.full_url "#{self.root_url}#{self.path}/#{self.pull_request_path}" end |
.open ⇒ Object
5 6 7 |
# File 'lib/bitbucket-pull-request/opener.rb', line 5 def self.open `open "#{self.full_url}"` end |
.path ⇒ Object
17 18 19 |
# File 'lib/bitbucket-pull-request/opener.rb', line 17 def self.path Remotes.remote_path end |
.pull_request_path ⇒ Object
33 34 35 |
# File 'lib/bitbucket-pull-request/opener.rb', line 33 def self.pull_request_path "pull-request/new?source=#{self.source_param}&dest=#{self.dest_param}" end |
.root_url ⇒ Object
13 14 15 |
# File 'lib/bitbucket-pull-request/opener.rb', line 13 def self.root_url "https://bitbucket.org/" end |
.source_param ⇒ Object
25 26 27 |
# File 'lib/bitbucket-pull-request/opener.rb', line 25 def self.source_param CGI.escape "#{self.path}::#{self.branch}" end |