queue_classic_plus 4.0.0.alpha10 → 4.0.0.alpha12
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.circleci/config.yml +24 -2
- data/.circleci/update-jira.sh +10 -0
- data/Gemfile +1 -0
- data/lib/queue_classic_plus/datadog.rb +16 -2
- data/lib/queue_classic_plus/version.rb +1 -1
- data/spec/datadog_spec.rb +16 -2
- metadata +4 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 53bcc9820afd73035eac622633277005186232b40cee67736b6e7365dc00ccee
|
4
|
+
data.tar.gz: cfcb45c257cc50fdbeca8dd594aba7b0387ad6e210f7a1a314022488aae885cf
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 9bbd716d0c1a11645745f4929543bac35220db15e9bd76baf9677643cb5f66138ed7cc1a9c040d0bcfa91b57bb9afb84042339759e1a687c2bcdff805e14861e
|
7
|
+
data.tar.gz: ec310250c95292616e98e894ece699f6dc10adb7824684d0cfd209f56146c4b49f3d7ee32a37763a52947af7af8c05a7c0568a20327db22936ffe7f3328771ca
|
data/.circleci/config.yml
CHANGED
@@ -3,7 +3,7 @@ version: 2.1
|
|
3
3
|
jobs:
|
4
4
|
test:
|
5
5
|
docker:
|
6
|
-
- image: cimg/ruby:3.0
|
6
|
+
- image: cimg/ruby:3.2.0
|
7
7
|
auth:
|
8
8
|
username: $DOCKERHUB_USERNAME
|
9
9
|
password: $DOCKERHUB_TOKEN
|
@@ -27,7 +27,7 @@ jobs:
|
|
27
27
|
|
28
28
|
push_to_rubygems:
|
29
29
|
docker:
|
30
|
-
- image: cimg/ruby:3.0
|
30
|
+
- image: cimg/ruby:3.2.0
|
31
31
|
auth:
|
32
32
|
username: $DOCKERHUB_USERNAME
|
33
33
|
password: $DOCKERHUB_TOKEN
|
@@ -47,6 +47,21 @@ jobs:
|
|
47
47
|
gem build queue_classic_plus
|
48
48
|
gem push queue_classic_plus-*.gem
|
49
49
|
|
50
|
+
update_jira:
|
51
|
+
docker:
|
52
|
+
- image: alpine:3.8
|
53
|
+
auth:
|
54
|
+
username: $DOCKERHUB_USERNAME
|
55
|
+
password: $DOCKERHUB_TOKEN
|
56
|
+
steps:
|
57
|
+
- run:
|
58
|
+
name: Install dependencies
|
59
|
+
command: apk add --no-cache bash curl git openssh
|
60
|
+
- checkout
|
61
|
+
- run:
|
62
|
+
name: Update JIRA
|
63
|
+
command: .circleci/update-jira.sh
|
64
|
+
|
50
65
|
workflows:
|
51
66
|
version: 2
|
52
67
|
gem_release:
|
@@ -65,3 +80,10 @@ workflows:
|
|
65
80
|
- /^v.*/
|
66
81
|
context:
|
67
82
|
- DockerHub
|
83
|
+
- RubyGems
|
84
|
+
- update_jira:
|
85
|
+
context:
|
86
|
+
- DockerHub
|
87
|
+
- update-jira-webhook
|
88
|
+
requires:
|
89
|
+
- push_to_rubygems
|
@@ -0,0 +1,10 @@
|
|
1
|
+
#!/usr/bin/env bash
|
2
|
+
|
3
|
+
set -euo pipefail
|
4
|
+
|
5
|
+
# Use JIRA automation webhooks to move issues to SHIPPED:
|
6
|
+
# https://support.atlassian.com/jira-software-cloud/docs/automation-triggers/#Automationtriggers-Incomingwebhook
|
7
|
+
|
8
|
+
git log --max-count=50 --pretty=format:'%s' | grep -Eo '^\w+-[0-9]+' | sort -u | while read i; do
|
9
|
+
curl -X POST "$UPDATE_JIRA_WEBHOOK_URL?issue=$i"
|
10
|
+
done
|
data/Gemfile
CHANGED
@@ -1,9 +1,23 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
|
+
require 'dry-configurable'
|
4
|
+
|
3
5
|
module QueueClassicDatadog
|
6
|
+
extend Dry::Configurable
|
7
|
+
|
8
|
+
setting :dd_service
|
9
|
+
|
4
10
|
def _perform(*args)
|
5
|
-
|
6
|
-
|
11
|
+
service_name = QueueClassicDatadog.config.dd_service || 'qc.job'
|
12
|
+
|
13
|
+
if Gem.loaded_specs['ddtrace'].version >= Gem::Version.new('1')
|
14
|
+
Datadog::Tracing.trace('qc.job', service: service_name, resource: "#{name}#perform") do |_|
|
15
|
+
super
|
16
|
+
end
|
17
|
+
else
|
18
|
+
Datadog.tracer.trace('qc.job', service_name: 'qc.job', resource: "#{name}#perform") do |_|
|
19
|
+
super
|
20
|
+
end
|
7
21
|
end
|
8
22
|
end
|
9
23
|
|
data/spec/datadog_spec.rb
CHANGED
@@ -10,9 +10,23 @@ describe 'requiring queue_classic_plus/new_relic' do
|
|
10
10
|
|
11
11
|
it 'adds Datadog profiling support' do
|
12
12
|
require 'queue_classic_plus/datadog'
|
13
|
-
expect(Datadog
|
14
|
-
'qc.job',
|
13
|
+
expect(Datadog::Tracing).to receive(:trace).with(
|
14
|
+
'qc.job', service: 'qc.job', resource: 'FunkyName#perform'
|
15
15
|
)
|
16
16
|
subject
|
17
17
|
end
|
18
|
+
|
19
|
+
context "when service name is configured" do
|
20
|
+
let(:configured_service_name) { "configured_service_name" }
|
21
|
+
|
22
|
+
it "traces using the service name" do
|
23
|
+
require 'queue_classic_plus/datadog'
|
24
|
+
QueueClassicDatadog.config.dd_service = configured_service_name
|
25
|
+
|
26
|
+
expect(Datadog::Tracing).to receive(:trace).with(
|
27
|
+
'qc.job', service: configured_service_name, resource: 'FunkyName#perform'
|
28
|
+
)
|
29
|
+
subject
|
30
|
+
end
|
31
|
+
end
|
18
32
|
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: queue_classic_plus
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 4.0.0.
|
4
|
+
version: 4.0.0.alpha12
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Simon Mathieu
|
@@ -10,7 +10,7 @@ authors:
|
|
10
10
|
autorequire:
|
11
11
|
bindir: bin
|
12
12
|
cert_chain: []
|
13
|
-
date:
|
13
|
+
date: 2023-08-01 00:00:00.000000000 Z
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|
16
16
|
name: queue_classic
|
@@ -92,6 +92,7 @@ extensions: []
|
|
92
92
|
extra_rdoc_files: []
|
93
93
|
files:
|
94
94
|
- ".circleci/config.yml"
|
95
|
+
- ".circleci/update-jira.sh"
|
95
96
|
- ".github/dependabot.yml"
|
96
97
|
- ".gitignore"
|
97
98
|
- ".rspec"
|
@@ -146,7 +147,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
146
147
|
- !ruby/object:Gem::Version
|
147
148
|
version: 1.3.1
|
148
149
|
requirements: []
|
149
|
-
rubygems_version: 3.
|
150
|
+
rubygems_version: 3.4.1
|
150
151
|
signing_key:
|
151
152
|
specification_version: 4
|
152
153
|
summary: Useful extras for Queue Classic
|