rage-rb 1.1.0 → 1.2.0

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: fd10469efc73f6134f72f79fe21871238b8860e958c085499c47b312adf91764
4
- data.tar.gz: 34990a4885df4a4acd55fcbabf8d3a67e57e0609db406ee55d5f71cab0655ffb
3
+ metadata.gz: a4a2e988e548e3b47e16295ef34a14f01c0ac6b68fe42cadfd6ba765ee94ec08
4
+ data.tar.gz: ec42ab96db943f401530e0e69ccb28470787e0daf217451689a0f2d774c4d633
5
5
  SHA512:
6
- metadata.gz: bc28afd194f122bf436c215cb6d88dfe3d923874f4e07c3c1db5dd3f33a4676354731fad3f6ffc29326423086b59dbb0d1860ecb5cb71cf4c7f0412a252af16f
7
- data.tar.gz: 58cd0cea6daba63d67f9285d3b616980d2e69c778620c54b14c7c5cb1eccf093bfbc0644dec081c325d4cdc5f6c032b7f399ccb8ea5b052c1da401dcde08ed6e
6
+ metadata.gz: 8fc5d8cf381c0305452780c94fb5eef4b573215bc183511e6f561fcfa9234116da502992efb9cbcf8e2c8aa557a889b820812da7644a7c7e3b7d04c5513ea60c
7
+ data.tar.gz: '08164a5099060b01a037655b29285a14803b65403b30ab5b3a0e08166ef37c55d2c497ab3a1de8b712932678d5e5ad25530f9f52368d9dcd9ba46a08a26d012d'
data/CHANGELOG.md CHANGED
@@ -1,5 +1,13 @@
1
1
  ## [Unreleased]
2
2
 
3
+ ## [1.2.0] - 2024-04-03
4
+
5
+ ### Changed
6
+
7
+ - Disable Ruby buffer for logging IO (#73).
8
+ - Default to 1 worker in development (#74).
9
+ - Default to use ActionDispatch::Reloader in dev env in Rails mode (#75).
10
+
3
11
  ## [1.1.0] - 2024-03-25
4
12
 
5
13
  ### Changed
@@ -79,7 +79,7 @@
79
79
  #
80
80
  # • _config.server.workers_count_
81
81
  #
82
- # > Specifies the number of server processes to run.
82
+ # > Specifies the number of server processes to run. Defaults to 1 in development and to the number of available CPU cores in other environments.
83
83
  #
84
84
  # • _config.server.timeout_
85
85
  #
@@ -119,7 +119,7 @@ class Rage::Configuration
119
119
 
120
120
  def initialize
121
121
  @threads_count = 1
122
- @workers_count = -1
122
+ @workers_count = Rage.env.development? ? 1 : -1
123
123
  @port = 3000
124
124
  end
125
125
  end
@@ -77,6 +77,10 @@ class Rage::Logger
77
77
  Logger::LogDevice.new(log, shift_age:, shift_size:, shift_period_suffix:, binmode:)
78
78
  end
79
79
 
80
+ if Rage.env.development? && log.respond_to?(:sync=)
81
+ log.sync = true
82
+ end
83
+
80
84
  @formatter = formatter
81
85
  @level = level
82
86
  define_log_methods
data/lib/rage/rails.rb CHANGED
@@ -60,6 +60,11 @@ Rails.configuration.after_initialize do
60
60
  end
61
61
 
62
62
  ActionDispatch::Reloader.prepend(conditional_mutex)
63
+
64
+ # use `ActionDispatch::Reloader` in development
65
+ if Rage.env.development?
66
+ Rage.config.middleware.use ActionDispatch::Reloader
67
+ end
63
68
  end
64
69
 
65
70
  # clone Rails logger
data/lib/rage/version.rb CHANGED
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Rage
4
- VERSION = "1.1.0"
4
+ VERSION = "1.2.0"
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rage-rb
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.1.0
4
+ version: 1.2.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Roman Samoilov
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2024-03-25 00:00:00.000000000 Z
11
+ date: 2024-04-03 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: thor