txgh-server 4.0.0.beta4 → 4.0.4.beta1

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: 5dfb4f56ff049516c9998ed87f01a0344a951cee6650e76a5dd2c83d26060209
4
- data.tar.gz: 500743daa5be0764284ad5ccd94d5adba2eda1e0bd30c47c1337dd2fb9173b5f
3
+ metadata.gz: 01533075fc1a6e7d23d7c6f4f411d559dabdabbab75ae135d4e124306a3208d9
4
+ data.tar.gz: 799a547697eb1712ef7212e2f53e752382dcfa821aae188f448c0f6b9d5bbb6e
5
5
  SHA512:
6
- metadata.gz: bb9b28df309534b6a55a15969222371e497c683cf9f7239cf7c6f7e75493433eb0b8f0161d135a37e097ec22a7ddfbe736ba9e5e0081d96c1c08322cfc8f90f3
7
- data.tar.gz: 364f062112801b74c68b1b658ea193aa1a68c078c1c2d237fe7042527ced078c32baed32080d79e330a5f7d09c2350706dc54d8ad068d3e77e2b1ec907e21dcb
6
+ metadata.gz: ed81100333ec6dcd84e713556a6fd3a1039f872a5e30375220d8bdf47070475c5f265484693e706c86e0cdbb7ce01f56a8b4a0c5d1b4eb9ca902e45b783d4d3c
7
+ data.tar.gz: 6ce3add4c8a41768c11805cad2c13fe54aa427b2ec80856fb0f9dc8efcbda3a17b33a6aec0b308d6e0ce62db5ef2509a098683066eecef165de62b802c384860
@@ -1,3 +1,6 @@
1
+ require 'octokit'
2
+ require 'gitlab'
3
+
1
4
  module TxghServer
2
5
  module Triggers
3
6
  class Handler
@@ -1,3 +1,3 @@
1
1
  module TxghServer
2
- VERSION = '4.0.0.beta4'
2
+ VERSION = '4.0.4.beta1'
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)
@@ -16,7 +16,7 @@ Gem::Specification.new do |s|
16
16
  s.add_dependency 'sinatra', '~> 1.4'
17
17
  s.add_dependency 'sinatra-contrib', '~> 1.4'
18
18
  s.add_dependency 'rubyzip', '>= 1.0', '<= 1.1.2'
19
- s.add_dependency 'txgh', '7.0.0.beta5'
19
+ s.add_dependency 'txgh', '>= 7.0.3.beta1'
20
20
 
21
21
  s.require_path = 'lib'
22
22
  s.files = Dir['{lib,spec}/**/*', 'README.md', 'txgh-server.gemspec', 'LICENSE']
metadata CHANGED
@@ -1,15 +1,15 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: txgh-server
3
3
  version: !ruby/object:Gem::Version
4
- version: 4.0.0.beta4
4
+ version: 4.0.4.beta1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Matthew Jackowski
8
8
  - Cameron Dutro
9
- autorequire:
9
+ autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2020-03-27 00:00:00.000000000 Z
12
+ date: 2020-12-08 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: mime-types
@@ -77,16 +77,16 @@ dependencies:
77
77
  name: txgh
78
78
  requirement: !ruby/object:Gem::Requirement
79
79
  requirements:
80
- - - '='
80
+ - - ">="
81
81
  - !ruby/object:Gem::Version
82
- version: 7.0.0.beta5
82
+ version: 7.0.3.beta1
83
83
  type: :runtime
84
84
  prerelease: false
85
85
  version_requirements: !ruby/object:Gem::Requirement
86
86
  requirements:
87
- - - '='
87
+ - - ">="
88
88
  - !ruby/object:Gem::Version
89
- version: 7.0.0.beta5
89
+ version: 7.0.3.beta1
90
90
  description: An HTTP server for interacting with txgh.
91
91
  email:
92
92
  - mattjjacko@gmail.com
@@ -184,7 +184,7 @@ files:
184
184
  homepage: https://github.com/lumoslabs/txgh
185
185
  licenses: []
186
186
  metadata: {}
187
- post_install_message:
187
+ post_install_message:
188
188
  rdoc_options: []
189
189
  require_paths:
190
190
  - lib
@@ -199,8 +199,9 @@ required_rubygems_version: !ruby/object:Gem::Requirement
199
199
  - !ruby/object:Gem::Version
200
200
  version: 1.3.1
201
201
  requirements: []
202
- rubygems_version: 3.0.6
203
- signing_key:
202
+ rubyforge_project:
203
+ rubygems_version: 2.7.6
204
+ signing_key:
204
205
  specification_version: 4
205
206
  summary: An HTTP server for interacting with txgh.
206
207
  test_files: []