abak-flow 0.3.0 → 0.3.1

Sign up to get free protection for your applications and to get access to all the features.
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.2.3
1
+ 0.3.1
@@ -10,7 +10,7 @@ require 'hub'
10
10
  require 'highline'
11
11
  require 'octokit'
12
12
 
13
- require 'abak-flow/hub_extensions'
13
+ require 'abak-flow/extensions'
14
14
  require 'abak-flow/config'
15
15
  require 'abak-flow/github_client'
16
16
  require 'abak-flow/pull_request'
@@ -1,4 +1,18 @@
1
+ # -*- encoding: utf-8 -*-
1
2
  module Abak::Flow
3
+ module ::Faraday
4
+ class Response::RaiseOctokitError < Response::Middleware
5
+ def error_message_with_trace(response)
6
+ message = (response[:body].errors || []).map {|error| "=> #{error.code}: #{error.message}" }.join("\n")
7
+
8
+ [error_message_without_trace(response), message].reject { |m| m.empty? }.join("\n\nДополнительные сообщения:\n")
9
+ end
10
+ alias_method :error_message_without_trace, :error_message
11
+ alias_method :error_message, :error_message_with_trace
12
+ end
13
+ end
14
+
15
+
2
16
  class ::Hub::Runner
3
17
  def execute
4
18
  if args.noop?
@@ -47,7 +47,7 @@ module Abak::Flow
47
47
 
48
48
  branch = Abak::Flow::PullRequest.branch_by_prefix(branch_prefix)
49
49
 
50
- request_params.body || "#{repository.remote_by_name('upstream').project.owner}:#{branch}"
50
+ request_params.base || "#{repository.remote_by_name('upstream').project.owner}:#{branch}"
51
51
  end
52
52
 
53
53
  def head
@@ -1,5 +1,5 @@
1
1
  module Abak
2
2
  module Flow
3
- VERSION = '0.3.0'
3
+ VERSION = '0.3.1'
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: abak-flow
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.0
4
+ version: 0.3.1
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2012-09-03 00:00:00.000000000 Z
12
+ date: 2012-09-05 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: hub
@@ -77,8 +77,8 @@ files:
77
77
  - bin/request
78
78
  - lib/abak-flow.rb
79
79
  - lib/abak-flow/config.rb
80
+ - lib/abak-flow/extensions.rb
80
81
  - lib/abak-flow/github_client.rb
81
- - lib/abak-flow/hub_extensions.rb
82
82
  - lib/abak-flow/pull_request.rb
83
83
  - lib/abak-flow/request.rb
84
84
  - lib/abak-flow/version.rb