octopolo 1.5.2 → 1.5.3

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: 18c5e296ce0914de673bfd17051d93126fc58b7e
4
- data.tar.gz: 02624f57907de6b1426fa605c425c8618e398ee0
3
+ metadata.gz: 4330e2b0cb3d14e82b15bb69dcd74828dd7461c5
4
+ data.tar.gz: f4952a0a8428fda3a22e66ffad602233bfb4028c
5
5
  SHA512:
6
- metadata.gz: 23d921698f4295a74cb98e07b6ccc77b202e64ee1449e10a41c2442411b41bae2d4c245862f7258655f6b3b2382922e7a26fc3d83280b0873f30c53e22973a20
7
- data.tar.gz: 8ee7ecf80105318f96db7f86bd525dc48d865838962a7b3e2572643d574725994ffb8dbad8a1c2bc76dac58fa08173a1cd2d430f7d8570c44c27b0225a6276e8
6
+ metadata.gz: bb55714ef20937deb3fd455762d3b9aa6a2b9bc5f8d6145a326589b1d2929d6ee7c61b66b859652209fb1be0feaa0b5c4bcfe5e75044764be6af49b62f1229d5
7
+ data.tar.gz: a04932843c942b34aa80f361bbdbdc410380131d91684a3ecdaf2c8304b4a38ec58e271d0021df02d3065530fb0abbaed52d5c7a5e7ebaad8d717a4d1c5b3b6c
@@ -9,4 +9,4 @@ rvm:
9
9
  - 2.2
10
10
  script: bundle exec rspec
11
11
  before_install:
12
- - gem uninstall bundler && gem install bundler
12
+ - gem install bundler
@@ -1,3 +1,9 @@
1
+ #### v1.5.3
2
+ #### v1.5.2
3
+ * Fix merging into deployable
4
+
5
+ > Emma Sax: Unknown User: https://github.com/sportngin/octopolo/pull/120
6
+
1
7
  #### v1.5.1
2
8
  * Fix Ruby 2.0 compatiblity
3
9
 
@@ -35,28 +35,21 @@ module Octopolo
35
35
  CLI.say 'Pull request status checks have not passed. Cannot be marked deployable.'
36
36
  exit!
37
37
  end
38
- if config.deployable_label
39
- with_labelling do
40
- merge
41
- end
42
- else
43
- merge
44
- end
38
+
39
+ merge_result = merge
40
+ add_deployable_label if config.deployable_label && merge_result
45
41
  end
46
42
  end
47
43
 
48
44
  def merge
49
- PullRequestMerger.perform Git::DEPLOYABLE_PREFIX, Integer(@pull_request_id), :user_notifications => config.user_notifications
45
+ PullRequestMerger.new(Git::DEPLOYABLE_PREFIX, Integer(@pull_request_id), :user_notifications => config.user_notifications).perform
50
46
  end
51
47
  private :merge
52
48
 
53
- def with_labelling(&block)
49
+ def add_deployable_label
54
50
  pull_request.add_labels(Deployable.deployable_label)
55
- unless yield
56
- pull_request.remove_labels(Deployable.deployable_label)
57
- end
58
51
  end
59
- private :with_labelling
52
+ private :add_deployable_label
60
53
 
61
54
  def deployable?
62
55
  pull_request.mergeable? && pull_request.status_checks_passed?
@@ -1,3 +1,3 @@
1
1
  module Octopolo
2
- VERSION = "1.5.2"
2
+ VERSION = "1.5.3"
3
3
  end
@@ -26,6 +26,7 @@ Gem::Specification.new do |gem|
26
26
  gem.add_dependency 'semantic', '~> 1.3'
27
27
 
28
28
  gem.add_development_dependency 'rake', '~> 10.1'
29
+ gem.add_development_dependency 'bundler', '~> 1.16'
29
30
  gem.add_development_dependency 'rspec', '~> 2.99'
30
31
  gem.add_development_dependency 'guard', '~> 2.6'
31
32
  gem.add_development_dependency 'guard-rspec', '~> 4.3'
@@ -19,7 +19,7 @@ module Octopolo
19
19
  allow(subject).to receive(:cli) { cli }
20
20
  allow(subject).to receive(:config) { config }
21
21
  allow(Octopolo::GitHub::PullRequest).to receive(:new) { pull_request }
22
- allow(PullRequestMerger).to receive(:perform) { true }
22
+ allow_any_instance_of(PullRequestMerger).to receive(:perform) { true }
23
23
  allow(Octopolo::GitHub).to receive(:check_connection) { true }
24
24
  end
25
25
 
@@ -43,7 +43,7 @@ module Octopolo
43
43
  end
44
44
 
45
45
  it "takes the pull requests ID from the current branch" do
46
- PullRequestMerger.should_receive(:perform).with(Git::DEPLOYABLE_PREFIX, pull_request.number, :user_notifications => config.user_notifications)
46
+ expect_any_instance_of(PullRequestMerger).to receive(:perform)
47
47
  end
48
48
  end
49
49
 
@@ -67,17 +67,17 @@ module Octopolo
67
67
 
68
68
  context "when merge to deployable fails" do
69
69
  before do
70
- allow(PullRequestMerger).to receive(:perform) { false }
70
+ allow_any_instance_of(PullRequestMerger).to receive(:perform) { false }
71
71
  end
72
72
 
73
- it "removes the deployable label" do
74
- pull_request.should_receive(:remove_labels)
73
+ it "does not add any labels" do
74
+ pull_request.should_not_receive(:add_labels)
75
75
  end
76
76
  end
77
77
 
78
78
  context "when the merge to deployable succeeds" do
79
- it "doesn't remove the deployable label" do
80
- pull_request.should_not_receive(:remove_labels)
79
+ it "adds a label" do
80
+ pull_request.should_receive(:add_labels)
81
81
  end
82
82
  end
83
83
 
@@ -134,7 +134,6 @@ module Octopolo
134
134
  pull_request.should_receive(:add_labels)
135
135
  end
136
136
  end
137
-
138
137
  end
139
138
  end
140
139
  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.5.2
4
+ version: 1.5.3
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-02-21 00:00:00.000000000 Z
13
+ date: 2018-03-26 00:00:00.000000000 Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: gli
@@ -138,6 +138,20 @@ dependencies:
138
138
  - - "~>"
139
139
  - !ruby/object:Gem::Version
140
140
  version: '10.1'
141
+ - !ruby/object:Gem::Dependency
142
+ name: bundler
143
+ requirement: !ruby/object:Gem::Requirement
144
+ requirements:
145
+ - - "~>"
146
+ - !ruby/object:Gem::Version
147
+ version: '1.16'
148
+ type: :development
149
+ prerelease: false
150
+ version_requirements: !ruby/object:Gem::Requirement
151
+ requirements:
152
+ - - "~>"
153
+ - !ruby/object:Gem::Version
154
+ version: '1.16'
141
155
  - !ruby/object:Gem::Dependency
142
156
  name: rspec
143
157
  requirement: !ruby/object:Gem::Requirement
@@ -206,6 +220,7 @@ extensions: []
206
220
  extra_rdoc_files: []
207
221
  files:
208
222
  - ".gitignore"
223
+ - ".octopolo.yml"
209
224
  - ".ruby-gemset"
210
225
  - ".ruby-version"
211
226
  - ".soyuz.yml"