rails_api_logger 0.4.0 → 0.4.1

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: 6a4cfc6305629f5d93ede15587bb8abc1f9218fa0f07fab94f3e8a9547c11609
4
- data.tar.gz: f1c3dd646b07d8774833769d9d8417b32dae2a3ab6a1aa1297b041b6fbdf552f
3
+ metadata.gz: '00489e11faa84622f3557560cf9d989b1fb36f6c6d18fdd41f1f1784e59893dd'
4
+ data.tar.gz: 54f3202bd8446cce3a32c97a2da3b2f881d317207c511bf1d9ada9250ac751d8
5
5
  SHA512:
6
- metadata.gz: cba867c8dce17d890b8c6cb3b81e92c80c0c98f85804a1ab61fba669681a31bbd0acd1b7cba4f677600e55666317a75fe30e2d0210c6f1a9e0f81e74cb691316
7
- data.tar.gz: e45d3c7dd24c05003dd76a03c2b0f34de8563f2c65611f332a3af9ad7230af5502687b1d110f7b8ce9b1c7271cc9987440a6d127f09713d9e6e382d276f1ce3e
6
+ metadata.gz: 254e3a0054438fa416561f5e34155529f4860d255cb01e80c5ea5a5a65bac694b35bc6b88199775b1fa11bc6532981f6e514b517f703140020c6b9618284ce1e
7
+ data.tar.gz: bf5537dfcb5eec1c675b9eb68bee42a8700fa756d1728666c67075a77a9f99baf0f573b5090e36dd6e345c0d5471b923fbcaddd8f689c257e89c496e858722cd
data/CHANGELOG.md CHANGED
@@ -1,3 +1,6 @@
1
+ # 0.4.1
2
+ * Fixed the `.failed` scope.
3
+
1
4
  # 0.4.0
2
5
  * Added `started_at`, `ended_at` and `duration` methods.
3
6
 
data/README.md CHANGED
@@ -1,5 +1,7 @@
1
1
  # Rails API Logger
2
2
 
3
+ The simplest way to log API requests of your Rails application in your database.
4
+
3
5
  The Rails API logger gem introduces a set of tools to log and debug API requests.
4
6
  It works on two sides:
5
7
 
@@ -16,6 +18,8 @@ This gem creates two database tables to log the following information:
16
18
  * **request_body** what was included in the request body
17
19
  * **response_body** what was included in the response body
18
20
  * **response_code** the HTTP response code of the request
21
+ * **started_at** when the request started
22
+ * **ended_at** when the request finished
19
23
 
20
24
  ## Installation
21
25
 
@@ -6,7 +6,7 @@ class RequestLog < ActiveRecord::Base
6
6
 
7
7
  belongs_to :loggable, optional: true, polymorphic: true
8
8
 
9
- scope :failed, -> { where("response_code not like '2%'") }
9
+ scope :failed, -> { where.not(response_code: 200..299) }
10
10
 
11
11
  validates :method, presence: true
12
12
  validates :path, presence: true
@@ -1,3 +1,3 @@
1
1
  module RailsApiLogger
2
- VERSION = "0.4.0"
2
+ VERSION = "0.4.1"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rails_api_logger
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.4.0
4
+ version: 0.4.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Alessandro Rodi
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2021-06-10 00:00:00.000000000 Z
11
+ date: 2021-11-09 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: railties