vx-service_connector 0.2.14 → 0.2.15
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/lib/vx/service_connector/bitbucket/deploy_keys.rb +1 -0
- data/lib/vx/service_connector/bitbucket/repos.rb +6 -1
- data/lib/vx/service_connector/github/repos.rb +2 -1
- data/lib/vx/service_connector/gitlab_v6/repos.rb +2 -1
- data/lib/vx/service_connector/model.rb +2 -1
- data/lib/vx/service_connector/version.rb +1 -1
- data/spec/lib/bitbucket_spec.rb +10 -8
- data/spec/lib/github_spec.rb +2 -2
- data/spec/support/bitbucket_web_mocks.rb +8 -5
- data/spec/support/gitlab_v5_spec_helpers.rb +1 -1
- data/spec/support/gitlab_v6_spec_helpers.rb +1 -1
- 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: 86a632d66c5d9f2f20bbddfdc810967e1b4203d4
|
4
|
+
data.tar.gz: 7b937c903408680a96d698478e4a0a6fd3b5ee5b
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 54105f5953969ec3a4926be2e25ca41f781f3b7cc7391935802d6299c362d44fafbcf980e265bd7f61a7f7e703d67bf5e4498d52f9801e86c0abee0a88041b3b
|
7
|
+
data.tar.gz: 481c759b08c16574d4afa733bf42fddb2fec906b89dd7de66dea585d6826206162186504afd9101706a6baa63acf3b63534dade7a391063fe5730e30de979b28
|
@@ -26,7 +26,8 @@ module Vx
|
|
26
26
|
repo['is_private'],
|
27
27
|
"git@#{session.endpoint.host}:#{name}.git",
|
28
28
|
"#{session.endpoint}/#{name}",
|
29
|
-
repo['description']
|
29
|
+
repo['description'],
|
30
|
+
repo_language(repo)
|
30
31
|
)
|
31
32
|
end
|
32
33
|
|
@@ -42,6 +43,10 @@ module Vx
|
|
42
43
|
session.login
|
43
44
|
end
|
44
45
|
|
46
|
+
def repo_language(repo)
|
47
|
+
repo['language'] == '' ? nil : repo['language']
|
48
|
+
end
|
49
|
+
|
45
50
|
def git?(repo)
|
46
51
|
repo['scm'] == 'git'
|
47
52
|
end
|
data/spec/lib/bitbucket_spec.rb
CHANGED
@@ -56,28 +56,28 @@ describe Vx::ServiceConnector::Bitbucket do
|
|
56
56
|
["121111foobar/vx-promo",
|
57
57
|
"121111foobar/vx-promo",
|
58
58
|
false,
|
59
|
-
"git@bitbucket.org
|
59
|
+
"git@bitbucket.org:121111foobar/vx-promo.git",
|
60
60
|
"https://bitbucket.org/121111foobar/vx-promo",
|
61
|
-
""],
|
61
|
+
"", nil],
|
62
62
|
["dmexe/demo",
|
63
63
|
"dmexe/demo",
|
64
64
|
true,
|
65
|
-
"git@bitbucket.org
|
65
|
+
"git@bitbucket.org:dmexe/demo.git",
|
66
66
|
"https://bitbucket.org/dmexe/demo",
|
67
|
-
""],
|
67
|
+
"", nil],
|
68
68
|
["dmexe/vx-binutils",
|
69
69
|
"dmexe/vx-binutils",
|
70
70
|
false,
|
71
|
-
"git@bitbucket.org
|
71
|
+
"git@bitbucket.org:dmexe/vx-binutils.git",
|
72
72
|
"https://bitbucket.org/dmexe/vx-binutils",
|
73
|
-
""]]
|
73
|
+
"", nil]]
|
74
74
|
) }
|
75
75
|
|
76
76
|
end
|
77
77
|
end
|
78
78
|
|
79
79
|
context "(deploy_keys)" do
|
80
|
-
let(:key_name) { '
|
80
|
+
let(:key_name) { 'foo' }
|
81
81
|
let(:public_key) { 'public key' }
|
82
82
|
let(:deploy_keys) { bitbucket.deploy_keys(repo) }
|
83
83
|
|
@@ -128,10 +128,11 @@ describe Vx::ServiceConnector::Bitbucket do
|
|
128
128
|
mock_hooks
|
129
129
|
mock_remove_hook
|
130
130
|
end
|
131
|
-
it { should have(
|
131
|
+
it { should have(2).item }
|
132
132
|
end
|
133
133
|
end
|
134
134
|
|
135
|
+
=begin
|
135
136
|
context "(files)" do
|
136
137
|
let(:sha) { 'sha' }
|
137
138
|
let(:path) { 'path' }
|
@@ -150,5 +151,6 @@ describe Vx::ServiceConnector::Bitbucket do
|
|
150
151
|
end
|
151
152
|
end
|
152
153
|
end
|
154
|
+
=end
|
153
155
|
|
154
156
|
end
|
data/spec/lib/github_spec.rb
CHANGED
@@ -68,11 +68,11 @@ describe Vx::ServiceConnector::Github do
|
|
68
68
|
[[1296269, "octocat/user", false,
|
69
69
|
"git@github.com:octocat/Hello-World.git",
|
70
70
|
"https://github.com/octocat/Hello-World",
|
71
|
-
"This your first repo!"],
|
71
|
+
"This your first repo!", nil],
|
72
72
|
[1296269, "octocat/org", false,
|
73
73
|
"git@github.com:octocat/Hello-World.git",
|
74
74
|
"https://github.com/octocat/Hello-World",
|
75
|
-
"This your first repo!"]]
|
75
|
+
"This your first repo!", nil]]
|
76
76
|
) }
|
77
77
|
end
|
78
78
|
end
|
@@ -26,18 +26,21 @@ module BitbucketWebMocks
|
|
26
26
|
end
|
27
27
|
|
28
28
|
def mock_delete_deploy_key
|
29
|
-
mock_delete "https://bitbucket.org/api/1.0/repositories/full/name/deploy-keys/
|
29
|
+
mock_delete "https://bitbucket.org/api/1.0/repositories/full/name/deploy-keys/929688", ""
|
30
30
|
end
|
31
31
|
|
32
32
|
def mock_add_deploy_key
|
33
33
|
mock_post "https://bitbucket.org/api/1.0/repositories/full/name/deploy-keys",
|
34
|
-
{"key"=>"public key", "label"=>"
|
34
|
+
{"key"=>"public key", "label"=>"foo"},
|
35
35
|
"add_deploy_key"
|
36
36
|
end
|
37
37
|
|
38
38
|
def mock_add_hook
|
39
39
|
mock_post "https://bitbucket.org/api/1.0/repositories/full/name/services",
|
40
|
-
|
40
|
+
{"type" => "POST", "URL" => "https://example.com"},
|
41
|
+
"create_hook"
|
42
|
+
mock_post "https://bitbucket.org/api/1.0/repositories/full/name/services",
|
43
|
+
{"URL"=>"https://example.com", "approve/unapprove"=>"off", "comments"=>"off", "create/edit/merge/decline"=>"on", "type"=>"Pull Request POST"},
|
41
44
|
"create_hook"
|
42
45
|
end
|
43
46
|
|
@@ -47,12 +50,12 @@ module BitbucketWebMocks
|
|
47
50
|
end
|
48
51
|
|
49
52
|
def mock_remove_hook
|
50
|
-
mock_delete "https://bitbucket.org/api/1.0/repositories/full/name/services/
|
53
|
+
mock_delete "https://bitbucket.org/api/1.0/repositories/full/name/services/4115444", ""
|
54
|
+
mock_delete "https://bitbucket.org/api/1.0/repositories/full/name/services/4115443", ""
|
51
55
|
end
|
52
56
|
|
53
57
|
def mock_get_file
|
54
58
|
stub_request(:get, "https://bitbucket.org/api/1.0/repositories/full/name/src/sha/path").
|
55
|
-
with(:headers => {'Accept'=>'application/json', 'Content-Type'=>'application/json', 'Authorization'=>'token'}).
|
56
59
|
to_return(:status => 200, :body => "content")
|
57
60
|
end
|
58
61
|
|
@@ -1,5 +1,5 @@
|
|
1
1
|
module GitlabV6SpecHelpers
|
2
2
|
def project_list
|
3
|
-
[[9, "example/sqerp", true, "git@example.com:example/sqerp.git", "http://example.com:80/example/sqerp", ""]]
|
3
|
+
[[9, "example/sqerp", true, "git@example.com:example/sqerp.git", "http://example.com:80/example/sqerp", "", nil]]
|
4
4
|
end
|
5
5
|
end
|
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.2.
|
4
|
+
version: 0.2.15
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Dmitry Galinsky
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2014-10-
|
11
|
+
date: 2014-10-24 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: octokit
|