Skip to content

Commit

Permalink
Restrict minimum Rails version to 6.1
Browse files Browse the repository at this point in the history
Response object is available in `process_action.action_controller` event notification only since Ruby on Rails 6.1
  • Loading branch information
Envek committed May 31, 2022
1 parent 0c58b71 commit 661b3d8
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
3 changes: 1 addition & 2 deletions io_monitor.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,6 @@ Gem::Specification.new do |spec|

spec.required_ruby_version = ">= 2.6.0"

rails_version = ENV["RAILS_VERSION"] || ">= 6.0"
spec.add_dependency "rails", rails_version
spec.add_dependency "rails", ">= 6.1"
spec.add_development_dependency "redis", ">= 4.0"
end
2 changes: 1 addition & 1 deletion lib/io_monitor/controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ def append_info_to_payload(payload)
data[source] = IoMonitor.aggregator.get(source)
end

data[:response] = payload[:response]&.body&.bytesize || 0
data[:response] = payload[:response].body.bytesize
end
end
end

0 comments on commit 661b3d8

Please sign in to comment.