octopolo 0.1.2 → 0.1.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +8 -8
- data/CHANGELOG.markdown +6 -0
- data/lib/octopolo/scripts/pull_request.rb +11 -3
- data/lib/octopolo/version.rb +1 -1
- data/spec/octopolo/scripts/pull_request_spec.rb +14 -3
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,15 +1,15 @@
|
|
1
1
|
---
|
2
2
|
!binary "U0hBMQ==":
|
3
3
|
metadata.gz: !binary |-
|
4
|
-
|
4
|
+
Yzk5NjJkNWE2MzhhYTkxOWVhMzFiZGUxMDRhMTgwNTAyY2UzMjQ1ZA==
|
5
5
|
data.tar.gz: !binary |-
|
6
|
-
|
6
|
+
MTVhNTUyNmZhY2NmZGYzZTRkOGJhM2M2MzRmOTE1ZWViNWI3NDJmZA==
|
7
7
|
SHA512:
|
8
8
|
metadata.gz: !binary |-
|
9
|
-
|
10
|
-
|
11
|
-
|
9
|
+
ZTM0M2VjODQyNGY2YmE1YjQ1YTI1ZTRmNjFiZWZiNDg0NmYyMjNjMmY2MDJk
|
10
|
+
ODlkYjYxYzEzZDExNjI0Mzk3M2JlNmYzYjEzNTI1MzQzN2Y3MTM4MGQ2ZjE5
|
11
|
+
NDRkZThhMjVkYzcxMTVkMDExZjcwM2Q2MmQ1YzI0NmZhZGUxYWQ=
|
12
12
|
data.tar.gz: !binary |-
|
13
|
-
|
14
|
-
|
15
|
-
|
13
|
+
YjIwODg3ODA4NGI2MWQ2YTY4YzllZTNlZDY2YzNkMWFmMDgzZmM4NTRiNDUy
|
14
|
+
ZDk4NTc5OTNhOWZmMGEwNzM2OGU5NjJhMThjNmVlYTQ4NTY5MzYzMTI0MDA1
|
15
|
+
ZmVkNWUyYmExMTEwNDlkMjIzZDAwNzE2NDIwZGZiM2M0NTU2MTQ=
|
data/CHANGELOG.markdown
CHANGED
@@ -72,9 +72,9 @@ module Octopolo
|
|
72
72
|
|
73
73
|
# Private: Ask for a label for the pull request
|
74
74
|
def ask_label
|
75
|
-
|
76
|
-
response = cli.ask(
|
77
|
-
self.label = Hash[
|
75
|
+
choices = Octopolo::GitHub::Label.get_names(label_choices).concat(["None"])
|
76
|
+
response = cli.ask(label_prompt, choices)
|
77
|
+
self.label = Hash[label_choices.map{|l| [l.name,l]}][response]
|
78
78
|
end
|
79
79
|
private :ask_label
|
80
80
|
|
@@ -119,6 +119,14 @@ module Octopolo
|
|
119
119
|
end
|
120
120
|
private :open_pull_request
|
121
121
|
|
122
|
+
def label_prompt
|
123
|
+
'Label:'
|
124
|
+
end
|
125
|
+
|
126
|
+
def label_choices
|
127
|
+
Octopolo::GitHub::Label.all
|
128
|
+
end
|
129
|
+
|
122
130
|
def update_pivotal
|
123
131
|
pivotal_ids.each do |story_id|
|
124
132
|
Pivotal::StoryCommenter.new(story_id, pull_request.url).perform
|
data/lib/octopolo/version.rb
CHANGED
@@ -117,11 +117,11 @@ module Octopolo
|
|
117
117
|
context "#ask_label" do
|
118
118
|
let(:label1) {Octopolo::GitHub::Label.new(name: "low-risk", color: '151515')}
|
119
119
|
let(:label2) {Octopolo::GitHub::Label.new(name: "high-risk", color: '151515')}
|
120
|
-
let(:choices) {["
|
120
|
+
let(:choices) {["low-risk","high-risk","None"]}
|
121
|
+
|
121
122
|
it "asks for and capture a label" do
|
122
123
|
allow(Octopolo::GitHub::Label).to receive(:all) {[label1,label2]}
|
123
|
-
|
124
|
-
expect(cli).to receive(:ask).with("Label:",choices)
|
124
|
+
expect(cli).to receive(:ask).with("Label:", choices)
|
125
125
|
subject.send(:ask_label)
|
126
126
|
end
|
127
127
|
|
@@ -192,6 +192,17 @@ module Octopolo
|
|
192
192
|
end
|
193
193
|
end
|
194
194
|
|
195
|
+
context "#label_choices" do
|
196
|
+
let(:label1) { Octopolo::GitHub::Label.new(name: "low-risk", color: '151515') }
|
197
|
+
let(:label2) { Octopolo::GitHub::Label.new(name: "high-risk", color: '151515') }
|
198
|
+
let(:github_labels) { [label1, label2] }
|
199
|
+
|
200
|
+
it "returns the labels plus 'None'" do
|
201
|
+
allow(Octopolo::GitHub::Label).to receive(:all) { github_labels }
|
202
|
+
expect(subject.send(:label_choices)).to eq github_labels
|
203
|
+
end
|
204
|
+
end
|
205
|
+
|
195
206
|
context "#update_pivotal" do
|
196
207
|
before do
|
197
208
|
subject.pivotal_ids = %w(123 234)
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: octopolo
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Patrick Byrne
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2014-07-
|
12
|
+
date: 2014-07-30 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: rake
|