http_store 0.3.3 → 0.3.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 7260e19010b3f1f15beb41344f4f724e93259b4f265331676392987f6f5f6117
4
- data.tar.gz: 508395e3ccc1a935eec7d8b7b4cb7d17b37cae941ad74fd020cde4856fe411d9
3
+ metadata.gz: bbad1b169cfaefecb2f2c7a96b916d382e109c8ff89c7104340974a9061013f0
4
+ data.tar.gz: 8957ccdac995dcaacb30b40b0e4cbe3c53b06fcacf92344b741515dd3c8cbbfc
5
5
  SHA512:
6
- metadata.gz: 84c075dd32cfb36b0073cbde39fd604095d47a36bd45d46355b33d035f55b8f71ca949d413a9f0db04f853e7c332c89c6b9d5b16725d0c65d67af227c6e0054a
7
- data.tar.gz: 696d1df0b628def8e953965ed4541ece093f96f2dae053b03388b8a247ea6206e96788da8983632213ccfe5879bd34eca445e2aaa61b3914ed7c7b5d6ba27e2c
6
+ metadata.gz: 7a52092f8d72dcac74d88662e7cc5ecf361be80526d6ebb8908fd448f28e7f1a6c7107ccdb972bc640f672b3e572d310585c31dfc4219ad36ccc769a28d5c494
7
+ data.tar.gz: 9a14abb12047c30f3afd11c1218ee068ee4a3de9da46291024f872087aca09303351538d0bdd1b1ca26e45c855cae840adb413cb564326e4a9ad36b8adb213be
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- http_store (0.3.3)
4
+ http_store (0.3.4)
5
5
  activerecord (>= 5.0, < 6.1)
6
6
  hashie (~> 3.0)
7
7
  rails (>= 5, < 7)
@@ -33,10 +33,10 @@ module HttpStore
33
33
  when Array
34
34
  value.map { |v| storable(v) }
35
35
  when String
36
- json = JSON.parse(v) rescue nil
37
- json ? storable(json) : storable_string(v)
36
+ json = JSON.parse(value) rescue nil
37
+ json ? storable(json) : storable_string(value)
38
38
  else
39
- v.try(:to_h) || v.try(:to_a) || v
39
+ value.try(:to_h) || value.try(:to_a) || value
40
40
  end
41
41
  end
42
42
 
@@ -20,12 +20,15 @@ module HttpStore
20
20
  def build_meta(env, status, headers, body)
21
21
  request = ActionDispatch::Request.new(env)
22
22
 
23
- @meta = format_req(request)
23
+ @meta = Hashie::Mash.new(format_req(request))
24
24
  @meta.merge!(format_rsp(status, headers, body))
25
25
  end
26
26
 
27
27
  def format_req(request)
28
28
  {
29
+ url: request.url,
30
+ path: request.path,
31
+ http_method: request.request_method,
29
32
  data: request.params,
30
33
  headers: request.headers.select { |k, _v| k.start_with? 'HTTP_' }.to_h,
31
34
  query_params: request.query_parameters
@@ -1,3 +1,3 @@
1
1
  module HttpStore
2
- VERSION = "0.3.3"
2
+ VERSION = "0.3.4"
3
3
  end
data/lib/http_store.rb CHANGED
@@ -27,6 +27,12 @@ module HttpStore
27
27
  autoload :Storable
28
28
  end
29
29
 
30
+ module Middleware
31
+ extend ActiveSupport::Autoload
32
+
33
+ autoload :RequestLog
34
+ end
35
+
30
36
  autoload :Engine
31
37
  autoload :VERSION
32
38
  autoload :HttpLog
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: http_store
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.3
4
+ version: 0.3.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - black