judoscale-rails 1.8.1 → 1.8.3

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: '08ec2299c78c7d9a2cb79c0460d5fc4d6afe6587e346fd61f280ef2e3a87ccb3'
4
- data.tar.gz: 0b8fa857bbf4e4bc64698bbb774e43203855d1de6f9db258280ccfccc4fa3765
3
+ metadata.gz: 8853361449f6166a9427478b81ffe995e47373e5c78721a26929b1c552c4b017
4
+ data.tar.gz: c5ae0c9c9cd8353555ab791a0a4b2a88cbe2ba0fdfccd01542895a6cd06f20a4
5
5
  SHA512:
6
- metadata.gz: 68a24398f5a7abdfb8ed69ae2a7fa01d561c9529c7233724c187043237aeb2c571b5afa686c0912f70476d35789f9b63f62fd68d2c9ea81ae8dd6637b7350770
7
- data.tar.gz: '09eb5087f00eea618536d9f3956e7e217d4517d21f6f3c25a0023f280fd1210ac5f85537b501b971ce929d9e9948719387fec3b68c9653c05e22569652267ce8'
6
+ metadata.gz: 47d5cfcd2a48e41657059c5c6ca2716660af822292ff24a3f12e4ae413ca31baf471cdbd0071565ea7ab2e802372e24fcb5bd17a9e376b5468553ce82b612fdb
7
+ data.tar.gz: 144398203f49e4db825bd8aa5fc266f752a63b181557b25468c7f37b4e39b8edec766558f2fefeecd7858c3bd7c78fa40904e2b00924434f58a2f45f7cd562fc
@@ -3,11 +3,12 @@ require "judoscale/config"
3
3
  module Judoscale
4
4
  module Rails
5
5
  module Config
6
- attr_accessor :start_reporter_after_initialize
6
+ attr_accessor :start_reporter_after_initialize, :rake_task_ignore_regex
7
7
 
8
8
  def reset
9
9
  super
10
10
  @start_reporter_after_initialize = true
11
+ @rake_task_ignore_regex = /assets:|db:/
11
12
  end
12
13
  end
13
14
 
@@ -12,9 +12,9 @@ module Judoscale
12
12
  class Railtie < ::Rails::Railtie
13
13
  include Judoscale::Logger
14
14
 
15
- def in_rails_console?
16
- # This is gross, but we can't find a more reliable way to detect if we're in a Rails console.
17
- caller.any? { |call| call.include?("console_command.rb") }
15
+ def in_rails_console_or_runner?
16
+ # This is gross, but we can't find a more reliable way to detect if we're in a Rails console/runner.
17
+ caller.any? { |call| call.include?("console_command.rb") || call.include?("runner_command.rb") }
18
18
  end
19
19
 
20
20
  def in_rake_task?(task_regex)
@@ -36,9 +36,9 @@ module Judoscale
36
36
  end
37
37
 
38
38
  config.after_initialize do
39
- if in_rails_console?
40
- logger.debug "No reporting since we're in a Rails console"
41
- elsif in_rake_task?(/assets:|db:/)
39
+ if in_rails_console_or_runner?
40
+ logger.debug "No reporting since we're in a Rails console or runner process"
41
+ elsif in_rake_task?(judoscale_config.rake_task_ignore_regex)
42
42
  logger.debug "No reporting since we're in a build process"
43
43
  elsif judoscale_config.start_reporter_after_initialize
44
44
  Reporter.start
metadata CHANGED
@@ -1,16 +1,16 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: judoscale-rails
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.8.1
4
+ version: 1.8.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Adam McCrea
8
8
  - Carlos Antonio da Silva
9
9
  - Jon Sullivan
10
- autorequire:
10
+ autorequire:
11
11
  bindir: bin
12
12
  cert_chain: []
13
- date: 2024-09-10 00:00:00.000000000 Z
13
+ date: 2024-12-30 00:00:00.000000000 Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: judoscale-ruby
@@ -18,14 +18,14 @@ dependencies:
18
18
  requirements:
19
19
  - - '='
20
20
  - !ruby/object:Gem::Version
21
- version: 1.8.1
21
+ version: 1.8.3
22
22
  type: :runtime
23
23
  prerelease: false
24
24
  version_requirements: !ruby/object:Gem::Requirement
25
25
  requirements:
26
26
  - - '='
27
27
  - !ruby/object:Gem::Version
28
- version: 1.8.1
28
+ version: 1.8.3
29
29
  - !ruby/object:Gem::Dependency
30
30
  name: railties
31
31
  requirement: !ruby/object:Gem::Requirement
@@ -40,7 +40,7 @@ dependencies:
40
40
  - - ">="
41
41
  - !ruby/object:Gem::Version
42
42
  version: '0'
43
- description:
43
+ description:
44
44
  email:
45
45
  - hello@judoscale.com
46
46
  executables: []
@@ -60,7 +60,7 @@ metadata:
60
60
  documentation_uri: https://judoscale.com/docs
61
61
  changelog_uri: https://github.com/judoscale/judoscale-ruby/blob/main/CHANGELOG.md
62
62
  source_code_uri: https://github.com/judoscale/judoscale-ruby
63
- post_install_message:
63
+ post_install_message:
64
64
  rdoc_options: []
65
65
  require_paths:
66
66
  - lib
@@ -75,8 +75,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
75
75
  - !ruby/object:Gem::Version
76
76
  version: '0'
77
77
  requirements: []
78
- rubygems_version: 3.5.16
79
- signing_key:
78
+ rubygems_version: 3.5.22
79
+ signing_key:
80
80
  specification_version: 4
81
81
  summary: Autoscaling for Ruby on Rails applications.
82
82
  test_files: []