Skip to content
Open
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions examples/rails/Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ gem 'rails', '~> 6.1.7', '>= 6.1.7.4'
# Use sqlite3 as the database for Active Record
gem 'sqlite3', '~> 1.4'
# Use Puma as the app server
gem 'puma', '~> 5.0'
gem 'puma', '~> 6.4'
# Build JSON APIs with ease. Read more: https://github.com/rails/jbuilder
# gem 'jbuilder', '~> 2.7'
# Use Redis adapter to run Action Cable in production
Expand Down Expand Up @@ -41,4 +41,4 @@ end
# Windows does not include zoneinfo files, so bundle the tzinfo-data gem
gem 'tzinfo-data', platforms: [:mingw, :mswin, :x64_mingw, :jruby]

gem "firetail", "~> 1.0.1"
gem "firetail", '~> 1.0.1'
20 changes: 11 additions & 9 deletions examples/rails/Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -60,8 +60,8 @@ GEM
minitest (>= 5.1)
tzinfo (~> 2.0)
zeitwerk (~> 2.3)
addressable (2.8.6)
public_suffix (>= 2.0.2, < 6.0)
addressable (2.8.7)
public_suffix (>= 2.0.2, < 7.0)
async (1.30.3)
console (~> 1.10)
nio4r (~> 2.3)
Expand All @@ -76,17 +76,19 @@ GEM
openapi_parser (~> 2.1.0)
rack (>= 1.5)
concurrent-ruby (1.2.2)
console (1.24.0)
console (1.25.2)
fiber-annotation
fiber-local
fiber-local (~> 1.1)
json
crass (1.0.6)
date (3.3.3)
diff-lcs (1.5.0)
erubi (1.12.0)
ffi (1.15.5)
fiber-annotation (0.2.0)
fiber-local (1.0.0)
fiber-local (1.1.0)
fiber-storage
fiber-storage (0.1.2)
firetail (1.0.1)
async (~> 1.30.3)
committee_firetail (~> 5.0.1)
Expand All @@ -100,7 +102,7 @@ GEM
json-schema (3.0.0)
addressable (>= 2.8)
json_schema (0.21.0)
jwt (2.8.1)
jwt (2.8.2)
base64
listen (3.8.0)
rb-fsevent (~> 0.10, >= 0.10.3)
Expand Down Expand Up @@ -133,8 +135,8 @@ GEM
mini_portile2 (~> 2.8.2)
racc (~> 1.4)
openapi_parser (2.1.0)
public_suffix (5.0.5)
puma (5.6.6)
public_suffix (6.0.0)
puma (6.4.2)
nio4r (~> 2.0)
racc (1.7.3)
rack (2.2.7)
Expand Down Expand Up @@ -221,7 +223,7 @@ DEPENDENCIES
byebug
firetail (~> 1.0.1)
listen (~> 3.3)
puma (~> 5.0)
puma (~> 6.4)
rails (~> 6.1.7, >= 6.1.7.4)
rspec (= 3.12)
rspec-rails
Expand Down
9 changes: 7 additions & 2 deletions lib/firetail.rb
Original file line number Diff line number Diff line change
Expand Up @@ -154,6 +154,7 @@ def log(env,
else
body = body.body
end

@reqres.push({
version: "1.0.0-alpha",
dateCreated: Time.now.utc.to_i,
Expand All @@ -171,10 +172,14 @@ def log(env,
statusCode: status,
body: body,
headers: response_headers,
}
})
},
oauth: subject ? {
subject: sha1_hash(subject),
} : nil,
}.compact) # .compact removes keys with nil values, so we avoid sending empty values
@request.body.rewind
#Firetail.logger.debug "Request: #{body}"
#Firetail.logger.debug "Request: #{@reqres}"

# the time we calculate if request that is
# buffered max is 120 seconds
Expand Down