rails-cloud-tasks 0.0.9 → 0.0.10

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: cf8686a1d37e225e18480144e17a4d31b2f266d59797bf8cf58b167234ec0ee8
4
- data.tar.gz: 7f1c4d33eb8262432fab9890fc673d1edaa8909f958eca547fb5f7da1119b30f
3
+ metadata.gz: 952737c3d117251bc7512f2867fff43b13329baea58cefda03a1cbb202782b72
4
+ data.tar.gz: a341d110cce7e062c2b0102054f2afeaf5c407e262ed05f678119fac6917233b
5
5
  SHA512:
6
- metadata.gz: fa8eb367eee9f5c6f93ed3820c7595e39af878f22d5a0eedfbc43f0a54eb63ff639f60e04146a4e12abbc1db08b8e4c9804fcdbf829240f4ed7bb0114df932bc
7
- data.tar.gz: 3e4d0fbf5cbbaa78766060b46163c765802468f7e1d27c2d543bb33ac240ab3994fd7ef3f7029cabd97f8a227bef2118c91d0e713a514c628ac86c11b7fbcab3
6
+ metadata.gz: 7907df6e3c2ccf1dc053113b50e5a06f3b1051f2ec3ca6be6c1a788ae69d60b73b5034d3a8dba89136b5a606a870243f18667064a815fa926a1d9c3fce4cac6f
7
+ data.tar.gz: e06333fe3e9770248045a35dbc7f3749b1b853e13ade2470a3ad86a9ea6ba7e7e7a7d8a05a524c5c02c33f7240928e952cd84e4b570213e042735dfd2ad9b18a
data/.rubocop.yml CHANGED
@@ -1,5 +1,5 @@
1
1
  AllCops:
2
- TargetRubyVersion: 2.4
2
+ TargetRubyVersion: 2.7
3
3
  DisplayCopNames: true
4
4
  NewCops: enable
5
5
 
data/.ruby-version CHANGED
@@ -1 +1 @@
1
- 2.7.2
1
+ 2.7.4
@@ -2,6 +2,8 @@ module RailsCloudTasks
2
2
  module Instrumentation
3
3
  class Default
4
4
  def transaction_name!(*opts); end
5
+
6
+ def add_custom_attributes(custom_attributes); end
5
7
  end
6
8
  end
7
9
  end
@@ -5,6 +5,10 @@ module RailsCloudTasks
5
5
  agent.set_transaction_name(*opts)
6
6
  end
7
7
 
8
+ def add_custom_attributes(custom_attributes)
9
+ agent.add_custom_attributes(custom_attributes)
10
+ end
11
+
8
12
  def agent
9
13
  @agent ||= ::NewRelic::Agent
10
14
  end
@@ -15,5 +15,9 @@ module RailsCloudTasks
15
15
  def transaction_name!(*opts)
16
16
  agent.transaction_name!(opts)
17
17
  end
18
+
19
+ def add_custom_attributes(custom_attributes)
20
+ agent.add_custom_attributes(custom_attributes)
21
+ end
18
22
  end
19
23
  end
@@ -15,6 +15,10 @@ module RailsCloudTasks
15
15
  request = ::Rack::Request.new(env)
16
16
  job_args = extract_args(request)
17
17
 
18
+ RailsCloudTasks::Instrumentation.add_custom_attributes(
19
+ { request_body: job_args }
20
+ )
21
+
18
22
  job_class.perform_now(*job_args)
19
23
 
20
24
  response(200, {})
@@ -13,6 +13,10 @@ module RailsCloudTasks
13
13
  "RailsCloudTasks/#{job['job_class']}/perform_now"
14
14
  )
15
15
 
16
+ RailsCloudTasks::Instrumentation.add_custom_attributes(
17
+ { request_body: job['arguments'] }
18
+ )
19
+
16
20
  ActiveJob::Base.execute(job)
17
21
  response(200, {})
18
22
  rescue Rack::InvalidPayloadError => e
@@ -1,3 +1,3 @@
1
1
  module RailsCloudTasks
2
- VERSION = '0.0.9'.freeze
2
+ VERSION = '0.0.10'.freeze
3
3
  end
@@ -17,7 +17,7 @@ Gem::Specification.new do |spec|
17
17
  spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
18
18
  spec.require_paths = ['lib']
19
19
 
20
- spec.required_ruby_version = '>= 2.4'
20
+ spec.required_ruby_version = '>= 2.7'
21
21
  spec.files = `git ls-files -z`.split("\x0").reject do |f|
22
22
  f.match(%r{^(test|spec|features)/})
23
23
  end
@@ -40,4 +40,7 @@ Gem::Specification.new do |spec|
40
40
  spec.add_development_dependency 'shoulda-matchers'
41
41
  spec.add_development_dependency 'simplecov'
42
42
  spec.add_development_dependency 'webmock'
43
+ spec.metadata = {
44
+ 'rubygems_mfa_required' => 'true'
45
+ }
43
46
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rails-cloud-tasks
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.9
4
+ version: 0.0.10
5
5
  platform: ruby
6
6
  authors:
7
7
  - Guilherme Araújo
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2021-04-07 00:00:00.000000000 Z
11
+ date: 2021-12-14 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activesupport
@@ -286,7 +286,8 @@ files:
286
286
  homepage: http://github.com/flamingo-run/rails-cloud-tasks
287
287
  licenses:
288
288
  - Apache License 2.0
289
- metadata: {}
289
+ metadata:
290
+ rubygems_mfa_required: 'true'
290
291
  post_install_message:
291
292
  rdoc_options: []
292
293
  require_paths:
@@ -295,14 +296,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
295
296
  requirements:
296
297
  - - ">="
297
298
  - !ruby/object:Gem::Version
298
- version: '2.4'
299
+ version: '2.7'
299
300
  required_rubygems_version: !ruby/object:Gem::Requirement
300
301
  requirements:
301
302
  - - ">="
302
303
  - !ruby/object:Gem::Version
303
304
  version: '0'
304
305
  requirements: []
305
- rubygems_version: 3.1.4
306
+ rubygems_version: 3.1.6
306
307
  signing_key:
307
308
  specification_version: 4
308
309
  summary: Rails Cloud Tasks