octopolo 1.7.0 → 1.7.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 9334b55413013fff938d17faa0915b5d74e3c60a
4
- data.tar.gz: ad1c3dd6590b82460fea3ffe4228b45cfbccbcb2
3
+ metadata.gz: 9cda31d965fb45d75ae197ea4343da56736f69f9
4
+ data.tar.gz: 6e3dbbe248ff7c975bdbad6ee696fe30843da062
5
5
  SHA512:
6
- metadata.gz: 6bd7da2422de942541157b0328bf49b168b04dfee1c829a08299d6d4a75755e57ea3514add65f3696262ffddc0cd3cddffef25724d2e38eb5c7eb912b8edf62b
7
- data.tar.gz: 8e8337675ee8304524a911f0bb37d00917c93e088f1391452ede7f74f496fd9c19d2d0cdae20ac99bc41f6c3816991b249da19fe340c63b86a4e822a27ffef8e
6
+ metadata.gz: 3edb4de1696405e53dde4d3abe2fc387856cd42ddac0c847d6ad4ec1e23f65f7fa3ea13d2ab2b33acdd412269c0099bbd9a61760830172dc41f20afa941fe6dd
7
+ data.tar.gz: 206579ef9b311236170a6813707351b2288dc5efe82df1a7cc6377b9f1ab585b1447968baf7a0dff353f31e4b28f30258e8c24fdc3964d24ca39596db58f871d
data/.ruby-version CHANGED
@@ -1 +1 @@
1
- 2.2.4
1
+ ruby-2.3.0
data/CHANGELOG.markdown CHANGED
@@ -1,3 +1,8 @@
1
+ #### v1.7.2
2
+ * Fix pagination issue
3
+
4
+ > Emma Sax: production-status-check[bot]: https://github.com/sportngin/octopolo/pull/130
5
+
1
6
  #### v1.6.0
2
7
  * Octopolo asks label-related questions as an array of objects
3
8
 
@@ -1,6 +1,5 @@
1
1
  require "yaml"
2
2
  require "octokit"
3
- require "pry"
4
3
 
5
4
  module Octopolo
6
5
  module GitHub
@@ -38,7 +37,6 @@ module Octopolo
38
37
  #
39
38
  # label - a label object
40
39
  def self.first_or_create(label)
41
- # binding.pry
42
40
  unless all_from_repo.include?(label)
43
41
  GitHub.add_label(config.github_repo, label.name, label.color)
44
42
  end
@@ -58,10 +56,9 @@ module Octopolo
58
56
  #
59
57
  # returns - an array of labels
60
58
  def self.all_from_repo
61
- GitHub.labels(config.github_repo).map{ |label_hash| new(label_hash) }
59
+ GitHub.labels(config.github_repo, per_page: 100).map{ |label_hash| new(label_hash) }
62
60
  end
63
61
  private_class_method :all_from_repo
64
-
65
62
  end
66
63
  end
67
64
  end
@@ -5,7 +5,6 @@ require_relative "../github/issue_creator"
5
5
  require_relative "../pivotal/story_commenter"
6
6
  require_relative "../jira/story_commenter"
7
7
  require_relative "../question"
8
- require "pry"
9
8
 
10
9
  module Octopolo
11
10
  module Scripts
@@ -73,8 +72,6 @@ module Octopolo
73
72
  end
74
73
  end
75
74
 
76
- # binding.pry
77
-
78
75
  self.labels
79
76
  end
80
77
  protected :ask_labels
@@ -1,3 +1,3 @@
1
1
  module Octopolo
2
- VERSION = "1.7.0"
2
+ VERSION = "1.7.1"
3
3
  end
@@ -15,7 +15,8 @@ module Octopolo
15
15
  subject { Label }
16
16
 
17
17
  before do
18
- subject.config = config
18
+ subject.config = config
19
+ allow(GitHub).to receive(:labels).and_return(labels_hash)
19
20
  end
20
21
 
21
22
  context "#initialize" do
@@ -27,20 +28,17 @@ module Octopolo
27
28
 
28
29
  context "#all_labels" do
29
30
  it "gets and returns all labels belonging to a repository" do
30
- allow(GitHub).to receive(:labels).and_return(labels_hash)
31
31
  expect(Label.all).to eq([label1,label2])
32
32
  end
33
33
  end
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_from_repo).and_return([label1,label2])
38
37
  expect(GitHub).not_to receive(:add_label)
39
38
  Label.first_or_create(label1)
40
39
  end
41
40
 
42
41
  it "doesn't find a label and creates one" do
43
- allow(Label).to receive(:all_from_repo).and_return([label1,label2])
44
42
  expect(GitHub).to receive(:add_label).with(config.github_repo, "medium-risk", "454545")
45
43
  Label.first_or_create(Label.new(name: "medium-risk", color: "454545"))
46
44
  end
@@ -56,7 +54,6 @@ module Octopolo
56
54
  end
57
55
  end
58
56
 
59
-
60
57
  context "#build_label_array" do
61
58
  it "returns an array of label when given a label" do
62
59
  allow(Label).to receive(:first_or_create)
@@ -84,6 +81,12 @@ module Octopolo
84
81
  expect(Label.get_names([label1,label2])).to eq(["low-risk","high-risk"])
85
82
  end
86
83
  end
84
+
85
+ describe "#all_from_repo" do
86
+ it "should list all repos" do
87
+ expect(Label.send(:all_from_repo)).to eq([label1, label2])
88
+ end
89
+ end
87
90
  end
88
91
  end
89
92
  end
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: 1.7.0
4
+ version: 1.7.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Patrick Byrne
@@ -10,7 +10,7 @@ authors:
10
10
  autorequire:
11
11
  bindir: bin
12
12
  cert_chain: []
13
- date: 2018-08-30 00:00:00.000000000 Z
13
+ date: 2018-09-05 00:00:00.000000000 Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: gli