github-pivotal-flow 1.0.1 → 1.0.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/github_pivotal_flow.rb +1 -0
- data/lib/github_pivotal_flow/git.rb +2 -2
- data/lib/github_pivotal_flow/github_api.rb +2 -2
- data/lib/github_pivotal_flow/project.rb +2 -1
- data/lib/github_pivotal_flow/version.rb +1 -1
- data/spec/github_pivotal_flow/git_spec.rb +2 -2
- metadata +16 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: cece2a251f6cd78582155921715f4591ef7a825b
|
4
|
+
data.tar.gz: e5c6ec83aef54e82c8c628382289d11545ad8664
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: f53421dd4465a18089d0356ea510c440684d7d952575de790d1f8f873421f0a5f0f4da9c1b3a5e11c0a639fa03476995384b49d68838d0da2a77052672227793
|
7
|
+
data.tar.gz: 70a2342c1e95eab672bc824a9fa0ae27256003e943ea18a3b8a4def9891cfb38d933fcd1cf3dee0d9c38175b436c01d358e49dd92dba5d82e223c6a64e5a9b4f
|
data/lib/github_pivotal_flow.rb
CHANGED
@@ -107,9 +107,9 @@ module GithubPivotalFlow
|
|
107
107
|
|
108
108
|
def self.get_config(key, scope = :inherited)
|
109
109
|
if :branch == scope
|
110
|
-
exec("git config branch.#{self.current_branch}.#{key}", false).strip
|
110
|
+
exec("git config --get branch.#{self.current_branch}.#{key}", false).strip
|
111
111
|
elsif :inherited == scope
|
112
|
-
exec("git config #{key}", false).strip
|
112
|
+
exec("git config --get #{key}", false).strip
|
113
113
|
else
|
114
114
|
raise "Unable to get Git configuration for scope '#{scope}'"
|
115
115
|
end
|
@@ -78,7 +78,7 @@ module GithubPivotalFlow
|
|
78
78
|
module ResponseMethods
|
79
79
|
def status() code.to_i end
|
80
80
|
def data?() content_type =~ /\bjson\b/ end
|
81
|
-
def data() @data ||=
|
81
|
+
def data() @data ||= MultiJson.load(body) end
|
82
82
|
def error_message?() data? and data['errors'] || data['message'] end
|
83
83
|
def error_message() error_sentences || data['message'] end
|
84
84
|
def success?() Net::HTTPSuccess === self end
|
@@ -104,7 +104,7 @@ module GithubPivotalFlow
|
|
104
104
|
def post url, params = nil
|
105
105
|
perform_request url, :Post do |req|
|
106
106
|
if params
|
107
|
-
req.body =
|
107
|
+
req.body = MultiJson.dump params
|
108
108
|
req['Content-Type'] = 'application/json;charset=utf-8'
|
109
109
|
end
|
110
110
|
yield req if block_given?
|
@@ -23,7 +23,8 @@ module GithubPivotalFlow
|
|
23
23
|
self.name ||= path_components[2]
|
24
24
|
self.host ||= url.host
|
25
25
|
end
|
26
|
-
self.name = self.name.tr(' ', '-').sub(/\.git$/, '')
|
26
|
+
self.name = self.name.tr(' ', '-').sub(/\.git$/, '') if self.name
|
27
|
+
self.name ||= File.basename(Dir.getwd)
|
27
28
|
self.host ||= 'github.com'
|
28
29
|
self.host = host.sub(/^ssh\./i, '') if 'ssh.github.com' == host.downcase
|
29
30
|
end
|
@@ -63,7 +63,7 @@ module GithubPivotalFlow
|
|
63
63
|
describe '.get_config' do
|
64
64
|
it 'gets configuration scoped by branch when :branch scope is specified' do
|
65
65
|
expect(Git).to receive(:current_branch).and_return('test_branch_name')
|
66
|
-
expect(Shell).to receive(:exec).with('git config branch.test_branch_name.test_key', false).and_return('test_value')
|
66
|
+
expect(Shell).to receive(:exec).with('git config --get branch.test_branch_name.test_key', false).and_return('test_value')
|
67
67
|
|
68
68
|
value = Git.get_config 'test_key', :branch
|
69
69
|
|
@@ -71,7 +71,7 @@ module GithubPivotalFlow
|
|
71
71
|
end
|
72
72
|
|
73
73
|
it 'gets configuration when :inherited scope is specified' do
|
74
|
-
expect(Shell).to receive(:exec).with('git config test_key', false).and_return('test_value')
|
74
|
+
expect(Shell).to receive(:exec).with('git config --get test_key', false).and_return('test_value')
|
75
75
|
|
76
76
|
value = Git.get_config 'test_key', :inherited
|
77
77
|
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: github-pivotal-flow
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0.
|
4
|
+
version: 1.0.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Donald Piret
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2014-
|
11
|
+
date: 2014-06-02 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: highline
|
@@ -38,6 +38,20 @@ dependencies:
|
|
38
38
|
- - "~>"
|
39
39
|
- !ruby/object:Gem::Version
|
40
40
|
version: '0.5'
|
41
|
+
- !ruby/object:Gem::Dependency
|
42
|
+
name: multi_json
|
43
|
+
requirement: !ruby/object:Gem::Requirement
|
44
|
+
requirements:
|
45
|
+
- - "~>"
|
46
|
+
- !ruby/object:Gem::Version
|
47
|
+
version: '1.8'
|
48
|
+
type: :runtime
|
49
|
+
prerelease: false
|
50
|
+
version_requirements: !ruby/object:Gem::Requirement
|
51
|
+
requirements:
|
52
|
+
- - "~>"
|
53
|
+
- !ruby/object:Gem::Version
|
54
|
+
version: '1.8'
|
41
55
|
- !ruby/object:Gem::Dependency
|
42
56
|
name: bundler
|
43
57
|
requirement: !ruby/object:Gem::Requirement
|