judoscale-rails 1.4.1 → 1.5.1

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: 6ae56d5ab48de149743b80af218c2a49c214a163eae2efcc2270b4d24b5e5a2d
4
- data.tar.gz: b253f2f38bd54ad214f6c490f350484745ed4c9fb486762b770cefa9827670a3
3
+ metadata.gz: da1d7f0e6554f227a270bd479a75bb2521058f88f11cb4c065be456dc9c8ccd9
4
+ data.tar.gz: 852777b7910e0c1f8c95782e044727446520bf9693a4142cd5739ec5e0f68559
5
5
  SHA512:
6
- metadata.gz: 7d99f801fa53f92ed55f25cacdce4437216ce767988c88b7f49745502065b217a819534dec64a6ab4c8db0904d8ef04ec9a6a469bd087958d0907a27a9b66f3c
7
- data.tar.gz: 9698e69fe298ed713b208c2a55553f6434a3533e1b39731a66fb55708a13749dd02a990bde7cc0983933d5637e2088be570769126265670994f9d07a5fd76907
6
+ metadata.gz: de25402d724f99c4b5c32d753737d90f3e4c80ccb91abfe54faa3ce09e7b37461a7b92dea4addaec4186136157e02f8d8175b9dcb30993ea3accf79c9260892d
7
+ data.tar.gz: cbd3ad069953a701efdb9ac22fd0e2e91de0818bad72e418ccac258b27990a01b11816b2c14fecb3b05f3fd4e7e4a1677c20e293af9590a19dbb66c2049135f5
data/Gemfile CHANGED
@@ -4,5 +4,6 @@ gemspec name: "judoscale-rails"
4
4
 
5
5
  gem "judoscale-ruby", path: "../judoscale-ruby"
6
6
  gem "minitest"
7
+ gem "minitest-stub-const"
7
8
  gem "rake"
8
9
  gem "debug"
data/Gemfile-rails-6-1 CHANGED
@@ -5,4 +5,5 @@ gemspec name: "judoscale-rails"
5
5
  gem "judoscale-ruby", path: "../judoscale-ruby"
6
6
  gem "railties", "~> 6.1"
7
7
  gem "minitest"
8
+ gem "minitest-stub-const"
8
9
  gem "rake"
data/Gemfile.lock CHANGED
@@ -1,32 +1,32 @@
1
1
  PATH
2
2
  remote: ../judoscale-ruby
3
3
  specs:
4
- judoscale-ruby (1.4.1)
4
+ judoscale-ruby (1.5.1)
5
5
 
6
6
  PATH
7
7
  remote: .
8
8
  specs:
9
- judoscale-rails (1.4.1)
10
- judoscale-ruby (= 1.4.1)
9
+ judoscale-rails (1.5.1)
10
+ judoscale-ruby (= 1.5.1)
11
11
  railties
12
12
 
13
13
  GEM
14
14
  remote: https://rubygems.org/
15
15
  specs:
16
- actionpack (7.0.4.3)
17
- actionview (= 7.0.4.3)
18
- activesupport (= 7.0.4.3)
19
- rack (~> 2.0, >= 2.2.0)
16
+ actionpack (7.0.6)
17
+ actionview (= 7.0.6)
18
+ activesupport (= 7.0.6)
19
+ rack (~> 2.0, >= 2.2.4)
20
20
  rack-test (>= 0.6.3)
21
21
  rails-dom-testing (~> 2.0)
22
22
  rails-html-sanitizer (~> 1.0, >= 1.2.0)
23
- actionview (7.0.4.3)
24
- activesupport (= 7.0.4.3)
23
+ actionview (7.0.6)
24
+ activesupport (= 7.0.6)
25
25
  builder (~> 3.1)
26
26
  erubi (~> 1.4)
27
27
  rails-dom-testing (~> 2.0)
28
28
  rails-html-sanitizer (~> 1.1, >= 1.2.0)
29
- activesupport (7.0.4.3)
29
+ activesupport (7.0.6)
30
30
  concurrent-ruby (~> 1.0, >= 1.0.2)
31
31
  i18n (>= 1.6, < 2)
32
32
  minitest (>= 5.1)
@@ -38,34 +38,37 @@ GEM
38
38
  irb (>= 1.5.0)
39
39
  reline (>= 0.3.1)
40
40
  erubi (1.12.0)
41
- i18n (1.13.0)
41
+ i18n (1.14.1)
42
42
  concurrent-ruby (~> 1.0)
43
43
  io-console (0.6.0)
44
44
  irb (1.6.2)
45
45
  reline (>= 0.3.0)
46
- loofah (2.20.0)
46
+ loofah (2.21.3)
47
47
  crass (~> 1.0.2)
48
- nokogiri (>= 1.5.9)
48
+ nokogiri (>= 1.12.0)
49
49
  method_source (1.0.0)
50
50
  minitest (5.17.0)
51
- nokogiri (1.14.3-arm64-darwin)
51
+ minitest-stub-const (0.6)
52
+ nokogiri (1.15.3-arm64-darwin)
52
53
  racc (~> 1.4)
53
- nokogiri (1.14.3-x86_64-darwin)
54
+ nokogiri (1.15.3-x86_64-darwin)
54
55
  racc (~> 1.4)
55
- nokogiri (1.14.3-x86_64-linux)
56
+ nokogiri (1.15.3-x86_64-linux)
56
57
  racc (~> 1.4)
57
- racc (1.6.2)
58
- rack (2.2.7)
58
+ racc (1.7.1)
59
+ rack (2.2.8)
59
60
  rack-test (2.1.0)
60
61
  rack (>= 1.3)
61
- rails-dom-testing (2.0.3)
62
- activesupport (>= 4.2.0)
62
+ rails-dom-testing (2.2.0)
63
+ activesupport (>= 5.0.0)
64
+ minitest
63
65
  nokogiri (>= 1.6)
64
- rails-html-sanitizer (1.5.0)
65
- loofah (~> 2.19, >= 2.19.1)
66
- railties (7.0.4.3)
67
- actionpack (= 7.0.4.3)
68
- activesupport (= 7.0.4.3)
66
+ rails-html-sanitizer (1.6.0)
67
+ loofah (~> 2.21)
68
+ nokogiri (~> 1.14)
69
+ railties (7.0.6)
70
+ actionpack (= 7.0.6)
71
+ activesupport (= 7.0.6)
69
72
  method_source
70
73
  rake (>= 12.2)
71
74
  thor (~> 1.0)
@@ -73,14 +76,15 @@ GEM
73
76
  rake (13.0.6)
74
77
  reline (0.3.2)
75
78
  io-console (~> 0.5)
76
- thor (1.2.1)
79
+ thor (1.2.2)
77
80
  tzinfo (2.0.6)
78
81
  concurrent-ruby (~> 1.0)
79
- zeitwerk (2.6.8)
82
+ zeitwerk (2.6.11)
80
83
 
81
84
  PLATFORMS
82
85
  arm64-darwin-20
83
86
  arm64-darwin-21
87
+ arm64-darwin-22
84
88
  x86_64-darwin-21
85
89
  x86_64-linux
86
90
 
@@ -89,6 +93,7 @@ DEPENDENCIES
89
93
  judoscale-rails!
90
94
  judoscale-ruby!
91
95
  minitest
96
+ minitest-stub-const
92
97
  rake
93
98
 
94
99
  BUNDLED WITH
@@ -12,21 +12,28 @@ module Judoscale
12
12
  class Railtie < ::Rails::Railtie
13
13
  include Judoscale::Logger
14
14
 
15
+ def in_rails_console?
16
+ defined?(::Rails::Console)
17
+ end
18
+
19
+ def in_rake_task?
20
+ defined?(::Rake) && Rake.respond_to?(:application) && Rake.application.top_level_tasks.any?
21
+ end
22
+
15
23
  initializer "Judoscale.logger" do |app|
16
24
  Config.instance.logger = ::Rails.logger
17
25
  end
18
26
 
19
27
  initializer "Judoscale.request_middleware" do |app|
20
- logger.debug "Preparing request middleware"
21
- app.middleware.insert_before Rack::Runtime, RequestMiddleware
28
+ if !in_rails_console? && !in_rake_task?
29
+ logger.debug "Preparing request middleware"
30
+ app.middleware.insert_before Rack::Runtime, RequestMiddleware
31
+ end
22
32
  end
23
33
 
24
34
  config.after_initialize do
25
- # Don't start the reporter in a Rails console.
26
- # NOTE: This is untested because we initialize the Rails test app in test_helper.rb,
27
- # so the reporter has already started before any of the tests run. You can manually
28
- # test this by running `DYNO=web.1 rails c` in sample-apps/rails-sample.
29
- Reporter.start unless defined?(::Rails::Console)
35
+ # Don't suppress this in Rake tasks since some job adapters use Rake tasks to run jobs.
36
+ Reporter.start unless in_rails_console?
30
37
  end
31
38
  end
32
39
  end
@@ -2,6 +2,6 @@
2
2
 
3
3
  module Judoscale
4
4
  module Rails
5
- VERSION = "1.4.1"
5
+ VERSION = "1.5.1"
6
6
  end
7
7
  end
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.4.1
4
+ version: 1.5.1
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: 2023-05-04 00:00:00.000000000 Z
13
+ date: 2023-08-09 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.4.1
21
+ version: 1.5.1
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.4.1
28
+ version: 1.5.1
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: []
@@ -67,7 +67,7 @@ metadata:
67
67
  documentation_uri: https://judoscale.com/docs
68
68
  changelog_uri: https://github.com/judoscale/judoscale-ruby/blob/main/CHANGELOG.md
69
69
  source_code_uri: https://github.com/judoscale/judoscale-ruby
70
- post_install_message:
70
+ post_install_message:
71
71
  rdoc_options: []
72
72
  require_paths:
73
73
  - lib
@@ -82,8 +82,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
82
82
  - !ruby/object:Gem::Version
83
83
  version: '0'
84
84
  requirements: []
85
- rubygems_version: 3.2.32
86
- signing_key:
85
+ rubygems_version: 3.4.10
86
+ signing_key:
87
87
  specification_version: 4
88
88
  summary: This gem provides Ruby on Rails integration with the Judoscale autoscaling
89
89
  add-on for Heroku.