octopolo 0.1.1 → 0.1.2

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,15 +1,15 @@
1
1
  ---
2
2
  !binary "U0hBMQ==":
3
3
  metadata.gz: !binary |-
4
- N2RmMDI0OTU2NDAyZGU3MTIzYWUzNGQxNTU3OTg3NDkyZjdmOWJmYQ==
4
+ YTgyM2U3NzNkMzA5ZmFmYjM2ZjkwNTAzNTU2MDU3MWQzNWVlMzc5Nw==
5
5
  data.tar.gz: !binary |-
6
- ZWRhMTJiMGE5YjRlZmRlYjk4MzEzMmIxMjE1MzNjMWU2OGZjODlkOQ==
6
+ NThjZWMxNGIwMjkyMTgxYjVlN2FhZmQ1YjZiMThjZWUyMDY5YzQ4Ng==
7
7
  SHA512:
8
8
  metadata.gz: !binary |-
9
- NjQ0ZTRiMjEwYTZhNjQzNjhmOTcyMjZkODE1NjBlNWI0YTJkNmI5NzkzOWE4
10
- YTllOWE0NGYwMjY5YjczYTZlZjRiOTg3ZmU1ZDM4MTY1ZjdjNmRkZDY0MGIy
11
- OWY1YWU5M2ExMjRiZDE3NGU2MDhhMDE0ZDVhMDg3MWI1Zjk3NzM=
9
+ OTQwNTI2ZThiYzFhNGI1YmJiM2Q0YjUxOTNhM2ViYTBhMmEyNmM1N2M0Y2Jh
10
+ YTdiY2Y4ODRhMTJmOGU2MzgyYjQ3MzBiY2NiY2I4NjEwYzIyMjM5NTBkNTk5
11
+ MTU0MzEyNDlkNTk0MGFmMmU0ZWVkMjcwOWU5NDAyYzkyMDc3ZTU=
12
12
  data.tar.gz: !binary |-
13
- NTVlMTZhNGY0OTdmMjU3NDJmMTRmNDFjODA1NGNhZDhjYzhjNjZlYTJlZTEz
14
- MjA1NjI2NDJkYmUxNzgzNjViMzg1OGNhZTVhOGRmOGEzMjE5MjMxOGI3NWVm
15
- MGE1MTcyNTk0Yjc3NTE1OTc1OTg1NTgyNGEwZWMxM2Q0MWRhNmE=
13
+ ZDk2ZTdlMGExMzg1NTNhNzUzY2RkMzEyZjJiYTI5MzJhNjg3ZWJlOWY4YTY1
14
+ ZTg3N2RiOWQ1ZmI5MWM0MWYwNGZlNmZhZDliOTRjNjA3Zjc2NDJmNWRlNWFk
15
+ ODUyZDg3MmUzYTcwZDczMDdkNjBlOTBhY2E5YzdlOTM3NDdjZmE=
@@ -1,3 +1,9 @@
1
+ #### v0.1.2
2
+
3
+ * Fixed first_or_create
4
+
5
+ > Elliot Hursh: Nick LaMuro: https://github.com/sportngin/octopolo/pull/29
6
+
1
7
  #### v0.1.1
2
8
 
3
9
  * Fix dependancy issues
@@ -37,7 +37,7 @@ module Octopolo
37
37
  #
38
38
  # label - a label object
39
39
  def self.first_or_create(label)
40
- unless all.include?(label)
40
+ unless all_from_repo.include?(label)
41
41
  GitHub.add_label(config.github_repo, label.name, label.color)
42
42
  end
43
43
  end
@@ -1,3 +1,3 @@
1
1
  module Octopolo
2
- VERSION = "0.1.1"
2
+ VERSION = "0.1.2"
3
3
  end
@@ -34,13 +34,13 @@ module Octopolo
34
34
 
35
35
  context "#first_or_create" do
36
36
  it "finds the existing label and doesn't do anything" do
37
- allow(Label).to receive(:all).and_return([label1,label2])
37
+ allow(Label).to receive(:all_from_repo).and_return([label1,label2])
38
38
  expect(GitHub).not_to receive(:add_label)
39
39
  Label.first_or_create(label1)
40
40
  end
41
41
 
42
42
  it "doesn't find a label and creates one" do
43
- allow(Label).to receive(:all).and_return([label1,label2])
43
+ allow(Label).to receive(:all_from_repo).and_return([label1,label2])
44
44
  expect(GitHub).to receive(:add_label).with(config.github_repo, "medium-risk", "454545")
45
45
  Label.first_or_create(Label.new(name: "medium-risk", color: "454545"))
46
46
  end
@@ -124,6 +124,13 @@ module Octopolo
124
124
  expect(cli).to receive(:ask).with("Label:",choices)
125
125
  subject.send(:ask_label)
126
126
  end
127
+
128
+ it "asks for a label" do
129
+ allow(Octopolo::GitHub::Label).to receive(:all) {[label1,label2]}
130
+ allow(Octopolo::GitHub::Label).to receive(:get_names) {choices}
131
+ allow(cli).to receive(:ask) {"low-risk"}
132
+ expect(subject.send(:ask_label)).to eq(label1)
133
+ end
127
134
  end
128
135
 
129
136
  context "#ask_pivotal_ids" do
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.1
4
+ version: 0.1.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Patrick Byrne