vx-service_connector 0.2.10 → 0.2.11

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: 4fe7297908d5f6f62244ac09397f3ee2572ad017
4
- data.tar.gz: 517726f7dfdd075141cb82e4b8c7883e4ddef0a6
3
+ metadata.gz: 7b2d9612c81c343c02bd7cb85e65f6abbcfd1492
4
+ data.tar.gz: 5b6f5db46a5248fd02c38da7e857e10adcf19825
5
5
  SHA512:
6
- metadata.gz: 5aac67c77fe3aac17f022ccaa6a34633bf5b59f8e7d018dafa40a312e2c16e89f06f13e68364221cfe4e4dbc76ce9fa70ad7ceccd7fb1b813751b2fa4323311b
7
- data.tar.gz: 360693cf3463286d3989c36d6db6a511c663abb60cea3df138d91ed08808f08d64f61d1b1254b6a77e1230122827e1352d84e441bb9639bc1eceb8abca7ca3d7
6
+ metadata.gz: dc2201581b286c08291bea94cfbcf3747d237f0e9e19ab3b9c4ef0dddc5b40c71bea497e89ccb20c934005bba4812f785df00718cee097424e3c4be29dc4ab9b
7
+ data.tar.gz: 17e582c3484afce936b8b766b8ff16061c7de065cde3bea068a5789e2418b62efab539ebf156543e24a4bb62929253d776221e450d2c5f807cd3051deab67f3c
@@ -112,15 +112,20 @@ module Vx
112
112
  pull_request? && (pull_request_head_repo_id != pull_request_base_repo_id)
113
113
  end
114
114
 
115
+ def ping_request?
116
+ self["zen"] == "Approachable is better than simple."
117
+ end
118
+
115
119
  def ignore?
116
120
  if pull_request?
117
121
  closed_pull_request? || !foreign_pull_request?
122
+ elsif ping_request?
123
+ true
118
124
  else
119
125
  sha == '0000000000000000000000000000000000000000' || tag?
120
126
  end
121
127
  end
122
128
 
123
-
124
129
  def commit_for_pull_request
125
130
  @commit_for_pull_request ||=
126
131
  begin
@@ -1,5 +1,5 @@
1
1
  module Vx
2
2
  module ServiceConnector
3
- VERSION = "0.2.10"
3
+ VERSION = "0.2.11"
4
4
  end
5
5
  end
@@ -0,0 +1,133 @@
1
+ {
2
+ "zen": "Approachable is better than simple.",
3
+ "hook_id": 3194334,
4
+ "hook": {
5
+ "url": "https://api.github.com/repos/evrone/railsclub/hooks/3194334",
6
+ "test_url": "https://api.github.com/repos/evrone/railsclub/hooks/3194334/test",
7
+ "id": 3194334,
8
+ "name": "web",
9
+ "active": true,
10
+ "events": [
11
+ "push",
12
+ "pull_request"
13
+ ],
14
+ "config": {
15
+ "url": "https://ci.vexor.io/callbacks/github/79d4a3ab-bf43-4411-b562-908a4dac4071",
16
+ "secret": "********",
17
+ "content_type": "json"
18
+ },
19
+ "last_response": {
20
+ "code": null,
21
+ "status": "unused",
22
+ "message": null
23
+ },
24
+ "updated_at": "2014-10-11T17:45:33Z",
25
+ "created_at": "2014-10-11T17:45:33Z"
26
+ },
27
+ "repository": {
28
+ "id": 11655577,
29
+ "name": "railsclub",
30
+ "full_name": "evrone/railsclub",
31
+ "owner": {
32
+ "login": "evrone",
33
+ "id": 431569,
34
+ "avatar_url": "https://avatars.githubusercontent.com/u/431569?v=2",
35
+ "gravatar_id": "",
36
+ "url": "https://api.github.com/users/evrone",
37
+ "html_url": "https://github.com/evrone",
38
+ "followers_url": "https://api.github.com/users/evrone/followers",
39
+ "following_url": "https://api.github.com/users/evrone/following{/other_user}",
40
+ "gists_url": "https://api.github.com/users/evrone/gists{/gist_id}",
41
+ "starred_url": "https://api.github.com/users/evrone/starred{/owner}{/repo}",
42
+ "subscriptions_url": "https://api.github.com/users/evrone/subscriptions",
43
+ "organizations_url": "https://api.github.com/users/evrone/orgs",
44
+ "repos_url": "https://api.github.com/users/evrone/repos",
45
+ "events_url": "https://api.github.com/users/evrone/events{/privacy}",
46
+ "received_events_url": "https://api.github.com/users/evrone/received_events",
47
+ "type": "Organization",
48
+ "site_admin": false
49
+ },
50
+ "private": true,
51
+ "html_url": "https://github.com/evrone/railsclub",
52
+ "description": "",
53
+ "fork": false,
54
+ "url": "https://api.github.com/repos/evrone/railsclub",
55
+ "forks_url": "https://api.github.com/repos/evrone/railsclub/forks",
56
+ "keys_url": "https://api.github.com/repos/evrone/railsclub/keys{/key_id}",
57
+ "collaborators_url": "https://api.github.com/repos/evrone/railsclub/collaborators{/collaborator}",
58
+ "teams_url": "https://api.github.com/repos/evrone/railsclub/teams",
59
+ "hooks_url": "https://api.github.com/repos/evrone/railsclub/hooks",
60
+ "issue_events_url": "https://api.github.com/repos/evrone/railsclub/issues/events{/number}",
61
+ "events_url": "https://api.github.com/repos/evrone/railsclub/events",
62
+ "assignees_url": "https://api.github.com/repos/evrone/railsclub/assignees{/user}",
63
+ "branches_url": "https://api.github.com/repos/evrone/railsclub/branches{/branch}",
64
+ "tags_url": "https://api.github.com/repos/evrone/railsclub/tags",
65
+ "blobs_url": "https://api.github.com/repos/evrone/railsclub/git/blobs{/sha}",
66
+ "git_tags_url": "https://api.github.com/repos/evrone/railsclub/git/tags{/sha}",
67
+ "git_refs_url": "https://api.github.com/repos/evrone/railsclub/git/refs{/sha}",
68
+ "trees_url": "https://api.github.com/repos/evrone/railsclub/git/trees{/sha}",
69
+ "statuses_url": "https://api.github.com/repos/evrone/railsclub/statuses/{sha}",
70
+ "languages_url": "https://api.github.com/repos/evrone/railsclub/languages",
71
+ "stargazers_url": "https://api.github.com/repos/evrone/railsclub/stargazers",
72
+ "contributors_url": "https://api.github.com/repos/evrone/railsclub/contributors",
73
+ "subscribers_url": "https://api.github.com/repos/evrone/railsclub/subscribers",
74
+ "subscription_url": "https://api.github.com/repos/evrone/railsclub/subscription",
75
+ "commits_url": "https://api.github.com/repos/evrone/railsclub/commits{/sha}",
76
+ "git_commits_url": "https://api.github.com/repos/evrone/railsclub/git/commits{/sha}",
77
+ "comments_url": "https://api.github.com/repos/evrone/railsclub/comments{/number}",
78
+ "issue_comment_url": "https://api.github.com/repos/evrone/railsclub/issues/comments/{number}",
79
+ "contents_url": "https://api.github.com/repos/evrone/railsclub/contents/{+path}",
80
+ "compare_url": "https://api.github.com/repos/evrone/railsclub/compare/{base}...{head}",
81
+ "merges_url": "https://api.github.com/repos/evrone/railsclub/merges",
82
+ "archive_url": "https://api.github.com/repos/evrone/railsclub/{archive_format}{/ref}",
83
+ "downloads_url": "https://api.github.com/repos/evrone/railsclub/downloads",
84
+ "issues_url": "https://api.github.com/repos/evrone/railsclub/issues{/number}",
85
+ "pulls_url": "https://api.github.com/repos/evrone/railsclub/pulls{/number}",
86
+ "milestones_url": "https://api.github.com/repos/evrone/railsclub/milestones{/number}",
87
+ "notifications_url": "https://api.github.com/repos/evrone/railsclub/notifications{?since,all,participating}",
88
+ "labels_url": "https://api.github.com/repos/evrone/railsclub/labels{/name}",
89
+ "releases_url": "https://api.github.com/repos/evrone/railsclub/releases{/id}",
90
+ "created_at": "2013-07-25T08:22:52Z",
91
+ "updated_at": "2014-10-11T15:27:05Z",
92
+ "pushed_at": "2014-10-11T15:27:06Z",
93
+ "git_url": "git://github.com/evrone/railsclub.git",
94
+ "ssh_url": "git@github.com:evrone/railsclub.git",
95
+ "clone_url": "https://github.com/evrone/railsclub.git",
96
+ "svn_url": "https://github.com/evrone/railsclub",
97
+ "homepage": null,
98
+ "size": 153673,
99
+ "stargazers_count": 0,
100
+ "watchers_count": 0,
101
+ "language": "Ruby",
102
+ "has_issues": true,
103
+ "has_downloads": true,
104
+ "has_wiki": true,
105
+ "has_pages": false,
106
+ "forks_count": 0,
107
+ "mirror_url": null,
108
+ "open_issues_count": 2,
109
+ "forks": 0,
110
+ "open_issues": 2,
111
+ "watchers": 0,
112
+ "default_branch": "master"
113
+ },
114
+ "sender": {
115
+ "login": "dima-exe",
116
+ "id": 38505,
117
+ "avatar_url": "https://avatars.githubusercontent.com/u/38505?v=2",
118
+ "gravatar_id": "",
119
+ "url": "https://api.github.com/users/dima-exe",
120
+ "html_url": "https://github.com/dima-exe",
121
+ "followers_url": "https://api.github.com/users/dima-exe/followers",
122
+ "following_url": "https://api.github.com/users/dima-exe/following{/other_user}",
123
+ "gists_url": "https://api.github.com/users/dima-exe/gists{/gist_id}",
124
+ "starred_url": "https://api.github.com/users/dima-exe/starred{/owner}{/repo}",
125
+ "subscriptions_url": "https://api.github.com/users/dima-exe/subscriptions",
126
+ "organizations_url": "https://api.github.com/users/dima-exe/orgs",
127
+ "repos_url": "https://api.github.com/users/dima-exe/repos",
128
+ "events_url": "https://api.github.com/users/dima-exe/events{/privacy}",
129
+ "received_events_url": "https://api.github.com/users/dima-exe/received_events",
130
+ "type": "User",
131
+ "site_admin": false
132
+ }
133
+ }
@@ -10,6 +10,12 @@ describe Vx::ServiceConnector::Github::Payload do
10
10
  let(:payload) { github.payload repo, content }
11
11
  subject { payload }
12
12
 
13
+ context "ping" do
14
+ let(:content) { read_json_fixture 'github/payload/ping' }
15
+
16
+ its(:ignore?) { should be_true }
17
+ end
18
+
13
19
  context "push" do
14
20
  let(:url) { "https://github.com/evrone/ci-worker-test-repo/commit/687753389908e70801dd4ff5448be908642055c6" }
15
21
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: vx-service_connector
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.10
4
+ version: 0.2.11
5
5
  platform: ruby
6
6
  authors:
7
7
  - Dmitry Galinsky
@@ -155,6 +155,7 @@ files:
155
155
  - spec/fixtures/github/orgs.json
156
156
  - spec/fixtures/github/payload/closed_pull_request.json
157
157
  - spec/fixtures/github/payload/foreign_pull_request.json
158
+ - spec/fixtures/github/payload/ping.json
158
159
  - spec/fixtures/github/payload/pull_request.json
159
160
  - spec/fixtures/github/payload/push.json
160
161
  - spec/fixtures/github/payload/push_tag.json
@@ -224,6 +225,7 @@ test_files:
224
225
  - spec/fixtures/github/orgs.json
225
226
  - spec/fixtures/github/payload/closed_pull_request.json
226
227
  - spec/fixtures/github/payload/foreign_pull_request.json
228
+ - spec/fixtures/github/payload/ping.json
227
229
  - spec/fixtures/github/payload/pull_request.json
228
230
  - spec/fixtures/github/payload/push.json
229
231
  - spec/fixtures/github/payload/push_tag.json