txgh-queue 2.0.0 → 2.1.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +5 -5
- data/lib/txgh-queue/config.rb +7 -2
- data/lib/txgh-queue/version.rb +1 -1
- data/spec/application_spec.rb +1 -0
- data/spec/webhooks/transifex/request_handler_spec.rb +2 -1
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
|
-
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
2
|
+
SHA256:
|
3
|
+
metadata.gz: 182f92ae726c4dd56d50d53ae0f5cae3bcfae7f44ee675783a5153b2b084f4cf
|
4
|
+
data.tar.gz: 14bda789ede5a1f337c6c4bd708681b8f5958f279d5b01d71214f52fa737bfea
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 11476fc78f162f70a3c4331aac64d4eec1d80101462cd30a29f1efd4e65af4cbd66be23aaafb80fc018347635789ab4dbc6ab95ba22b656c12769bc4265dcc1d
|
7
|
+
data.tar.gz: 6ac7cb8a9d890cb72407882fe2265b8abe9e2f61c958d7345c6d94ec1ea8b371545caa0afebec96c2ab19ccdf7c4db2db31d91673ec44b12c9a3fbf3089d8af9
|
data/lib/txgh-queue/config.rb
CHANGED
@@ -1,3 +1,4 @@
|
|
1
|
+
require 'erb'
|
1
2
|
require 'yaml'
|
2
3
|
|
3
4
|
module TxghQueue
|
@@ -37,11 +38,15 @@ module TxghQueue
|
|
37
38
|
end
|
38
39
|
|
39
40
|
def load_file(payload)
|
40
|
-
Txgh::Utils.deep_symbolize_keys(
|
41
|
+
Txgh::Utils.deep_symbolize_keys(parse(File.read(payload)))
|
41
42
|
end
|
42
43
|
|
43
44
|
def load_raw(payload)
|
44
|
-
Txgh::Utils.deep_symbolize_keys(
|
45
|
+
Txgh::Utils.deep_symbolize_keys(parse(payload))
|
46
|
+
end
|
47
|
+
|
48
|
+
def parse(str)
|
49
|
+
YAML.load(ERB.new(str).result(binding))
|
45
50
|
end
|
46
51
|
end
|
47
52
|
end
|
data/lib/txgh-queue/version.rb
CHANGED
data/spec/application_spec.rb
CHANGED
@@ -11,7 +11,8 @@ describe Transifex::RequestHandler, auto_configure: true do
|
|
11
11
|
|
12
12
|
let(:logger) { NilLogger.new }
|
13
13
|
let(:body) { payload.to_json }
|
14
|
-
let(:
|
14
|
+
let(:headers) { { 'CONTENT_TYPE' => 'application/json' } }
|
15
|
+
let(:request) { TestRequest.new(body: body, headers: headers) }
|
15
16
|
let(:handler) { described_class.new(request, logger) }
|
16
17
|
let(:payload) do
|
17
18
|
{ 'project' => project_name, 'resource' => resource_slug, 'language' => 'pt' }
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: txgh-queue
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.
|
4
|
+
version: 2.1.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Cameron Dutro
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2019-02-22 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: aws-sdk
|
@@ -167,7 +167,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
167
167
|
version: '0'
|
168
168
|
requirements: []
|
169
169
|
rubyforge_project:
|
170
|
-
rubygems_version: 2.6
|
170
|
+
rubygems_version: 2.7.6
|
171
171
|
signing_key:
|
172
172
|
specification_version: 4
|
173
173
|
summary: Queue worker for processing Txgh webhooks.
|