lib/jive/pull_request.rb in jive-0.4.4 vs lib/jive/pull_request.rb in jive-0.5.0

- old
+ new

@@ -2,23 +2,22 @@ module Jive class PullRequest attr_reader :dir, :uri - def initialize(url) - @uri = URI.parse(url) - @dir = Pathname(Dir.home).join(".jive").join(uri.host).join(uri.path[1..-1]) + def initialize(repo: Repo.current) + @dir = Jive.home.join(repo.uri.host).join(repo.branch) Jive.shell.execute([:mkdir, "-p", @dir]) unless @dir.exist? end def edit(editor) Jive.shell.execute([editor, readme.to_s]) end private def template - Jive.root.join("lib/jive/templates/pull_request_template.md") + Jive.root.join("lib/jive/templates/pull_request.md") end def readme @readme ||= begin