txgh-server 4.0.1 → 4.0.2

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
  SHA256:
3
- metadata.gz: fa9aa22639b985e2fcb273d4dde5b702e09e246612b0368cd60908c7965214a4
4
- data.tar.gz: 476bb3837d65c91f575a882284179930a785030b62925d5764c7d8c99deadc9d
3
+ metadata.gz: 796b4223421550d35216f2e72604ee82e7ec0538f0bb3d6390fc51321c0ed47b
4
+ data.tar.gz: 8ad4617de3dcdfa0e198ecf6c4abc1c9da6897206ee106f45f7583fb3e818f56
5
5
  SHA512:
6
- metadata.gz: d9bc81c7b5a87ea59fdaa8405853927c2094d097276b26990a6d866ed5846ac87f45126635af500e62d1d2872a139e03f13b360a2f412b15b598a7b2e3981ddb
7
- data.tar.gz: 2e247d683ed52ad34249cea2fe9f8a68861def4ab18126001fb3ff1b42f9c386e542e3fa36eacc2dd39d297c4b5d07d2456a00176e620a0c20605ee3af67db75
6
+ metadata.gz: 666b9623c9790a8dbcb2a1630aa5918ab210a096704b3decbd8217e6c9bb654e6bb9da3b314a2d885b4a74da2a36b987eef1e97383589232cdf40c67ed95131c
7
+ data.tar.gz: 6bb4c0b865b1d8a9f6682d53ae2f07d5cf01ae32dd54601cf50f18cf800675f01aeaf6ee97a8f1f7b0d22ccba6a00cc67e1788664e2564082518eb681249e604
@@ -1,3 +1,3 @@
1
1
  module TxghServer
2
- VERSION = '4.0.1'
2
+ VERSION = '4.0.2'
3
3
  end
@@ -19,17 +19,9 @@ module TxghServer
19
19
  'delete'
20
20
  end
21
21
 
22
- def repo_name(payload)
23
- raise NotImplementedError
24
- end
25
-
26
22
  def ref(payload)
27
23
  payload.fetch('ref')
28
24
  end
29
-
30
- def ref_type(payload)
31
- raise NotImplementedError
32
- end
33
25
  end
34
26
 
35
27
  attr_reader *ATTRIBUTES
@@ -20,10 +20,6 @@ module TxghServer
20
20
  'push'
21
21
  end
22
22
 
23
- def repo_name(payload)
24
- raise NotImplementedError
25
- end
26
-
27
23
  def ref(payload)
28
24
  payload.fetch('ref')
29
25
  end
@@ -36,21 +32,9 @@ module TxghServer
36
32
  payload.fetch('after')
37
33
  end
38
34
 
39
- def added_files(payload)
40
- raise NotImplementedError
41
- end
42
-
43
35
  def modified_files(payload)
44
36
  extract_files(payload, 'modified')
45
37
  end
46
-
47
- def author(payload)
48
- raise NotImplementedError
49
- end
50
-
51
- def extract_files(payload, state)
52
- raise NotImplementedError
53
- end
54
38
  end
55
39
 
56
40
  def files
@@ -44,10 +44,6 @@ module TxghServer
44
44
  @pusher ||= Txgh::Pusher.new(project, repo, branch)
45
45
  end
46
46
 
47
- def status_updater
48
- raise NotImplementedError
49
- end
50
-
51
47
  # finds the resources that were updated in each commit
52
48
  def added_and_modified_resources
53
49
  @amr ||= attributes.files.each_with_object(Set.new) do |file, ret|
@@ -19,16 +19,8 @@ module TxghServer
19
19
  @logger = logger
20
20
  end
21
21
 
22
- def handle_request
23
- raise NotImplementedError
24
- end
25
-
26
22
  private
27
23
 
28
- def attributes
29
- raise NotImplementedError
30
- end
31
-
32
24
  def handle_safely
33
25
  if authentic_request?
34
26
  yield
@@ -51,10 +43,6 @@ module TxghServer
51
43
  end
52
44
  end
53
45
 
54
- def git_repo_name
55
- raise NotImplementedError
56
- end
57
-
58
46
  def config
59
47
  @config ||= Txgh::Config::KeyManager.config_from_repo(git_repo_name)
60
48
  end
@@ -66,10 +54,6 @@ module TxghServer
66
54
  def project
67
55
  config.transifex_project
68
56
  end
69
-
70
- def authentic_request?
71
- raise NotImplementedError
72
- end
73
57
  end
74
58
  end
75
59
  end
@@ -4,7 +4,7 @@ module TxghServer
4
4
  class DeleteAttributes < TxghServer::Webhooks::Git::DeleteAttributes
5
5
  class << self
6
6
  def repo_name(payload)
7
- payload.fetch('repository').fetch('name')
7
+ payload.fetch('project', {})['path_with_namespace']
8
8
  end
9
9
 
10
10
  def ref_type(_payload)
@@ -4,7 +4,7 @@ module TxghServer
4
4
  class PushAttributes < TxghServer::Webhooks::Git::PushAttributes
5
5
  class << self
6
6
  def repo_name(payload)
7
- payload.fetch('repository').fetch('name')
7
+ payload.fetch('project', {})['path_with_namespace']
8
8
  end
9
9
 
10
10
  def added_files(payload)
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: txgh-server
3
3
  version: !ruby/object:Gem::Version
4
- version: 4.0.1
4
+ version: 4.0.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Matthew Jackowski
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2020-03-31 00:00:00.000000000 Z
12
+ date: 2020-04-01 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: mime-types