vx-service_connector 0.4.12 → 0.4.13
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/vx/service_connector/model.rb +6 -0
- data/lib/vx/service_connector/version.rb +1 -1
- data/spec/lib/model_spec.rb +3 -0
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 55998353485bbb34c647c6282a7eca40de1e4ef9
|
4
|
+
data.tar.gz: 0f1d502875a94ada6aa4ec119df9cdec082e7cbf
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 4423bf0f743b012bdfa52e72be9d89f4ef874549c4abcb850d33d5c6a554a65414b29fb32a230640d30487343a7258cfed05d705dad06a5ac7d732181aee2c39
|
7
|
+
data.tar.gz: 8017337b8d418b0c6166fa44f5a1277f764138eb63a43aadc0b299f133206ddf6ae579a3981b293590ad1bffa74c46c8e9a2b80fb1e17435afabfe4d6750ebd1
|
@@ -49,6 +49,12 @@ module Vx
|
|
49
49
|
pr_branch_re = restriction[:pull_requests_filter]
|
50
50
|
pr = restriction[:pull_request]
|
51
51
|
|
52
|
+
if pr && branch_re.nil? && pr_branch_re.nil?
|
53
|
+
# skip internal pr or tag
|
54
|
+
# allow all pushes and foreign pr
|
55
|
+
return !(internal_pull_request? or tag?)
|
56
|
+
end
|
57
|
+
|
52
58
|
if !branch_re && internal_pull_request?
|
53
59
|
return false
|
54
60
|
end
|
data/spec/lib/model_spec.rb
CHANGED
@@ -123,6 +123,9 @@ describe "(models)" do
|
|
123
123
|
branch: 'develop'
|
124
124
|
)
|
125
125
|
).to_not be_perform(pull_requests_filter: "test", pull_request: false)
|
126
|
+
|
127
|
+
#allow, pr, filters is nil
|
128
|
+
instance(params).to be_perform(branch: nil, pull_request: true, pull_requests_filter: nil)
|
126
129
|
end
|
127
130
|
|
128
131
|
it "unknown restriction" do
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: vx-service_connector
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.4.
|
4
|
+
version: 0.4.13
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Dmitry Galinsky
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-
|
11
|
+
date: 2015-12-23 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: octokit
|