http_store 0.6.3 → 0.6.5
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile.lock +2 -2
- data/db/migrate/1_create_http_logs.rb +5 -1
- data/lib/http_store/middleware/request_log.rb +1 -0
- data/lib/http_store/version.rb +1 -1
- metadata +2 -5
- data/db/migrate/2_add_cache_response_field_to_http_log.rb +0 -6
- data/db/migrate/3_add_retry_times_field_to_http_log.rb +0 -5
- data/db/migrate/4_add_index_to_http_log.rb +0 -5
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: f2e4186bd3b3e01595c14925d778912591b3c99a5642f3a6ad6e964767dfd3cd
|
4
|
+
data.tar.gz: bc501f774c428c046799401c7e599ae7a174491787e668e83682eee88c483e78
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 141855265f8240eddd298a057efc71d0ae144959d24fdc21384fa12ab98d1cfb05682ed789d777d11767b4ececb9c4a0343af5c97e9b7a1a6f6a3d72e3e9a14a
|
7
|
+
data.tar.gz: f611ca17409ba059e6fa1aef48ad787f8a0cfe07e3163eb3ed00b28cbafd78fa36142ec7d4fcb0c96cdcbd00c063c45df332c5d718d5013e2c1a1e1d0c5a2f05
|
data/Gemfile.lock
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
http_store (0.6.
|
4
|
+
http_store (0.6.5)
|
5
5
|
activerecord
|
6
6
|
hashie
|
7
7
|
rails
|
@@ -124,7 +124,7 @@ GEM
|
|
124
124
|
mini_mime (1.1.5)
|
125
125
|
minitest (5.20.0)
|
126
126
|
mutex_m (0.2.0)
|
127
|
-
net-imap (0.4.
|
127
|
+
net-imap (0.4.9)
|
128
128
|
date
|
129
129
|
net-protocol
|
130
130
|
net-pop (0.1.2)
|
@@ -19,16 +19,20 @@ class CreateHttpLogs < ActiveRecord::Migration[5.2]
|
|
19
19
|
t.integer :status_code, comment: 'response http code'
|
20
20
|
t.text :response, comment: 'response body'
|
21
21
|
t.text :response_headers, comment: 'response header'
|
22
|
+
t.integer :cache_response, comment: '是否缓存请求'
|
23
|
+
t.integer :response_code, comment: 'response code'
|
24
|
+
t.integer :retry_times, comment: '重试次数'
|
22
25
|
|
23
26
|
# response checker
|
24
27
|
t.boolean :response_valid, comment: '请求结果 true/false, 这个要根据业务逻辑来设定. 不能靠 status_code 来确定'
|
25
28
|
t.text :response_data, comment: '格式化后的 response'
|
26
29
|
|
27
30
|
# relation
|
28
|
-
t.string :client_type, limit: 80, comment: '请求类型'
|
31
|
+
t.string :client_type, index: true, limit: 80, comment: '请求类型'
|
29
32
|
t.string :requestable_id, comment: '外键 ID'
|
30
33
|
t.string :requestable_type, comment: '外键 类型'
|
31
34
|
t.integer :parent_id
|
35
|
+
t.boolean :is_system, default: false, comment: '是否系统请求'
|
32
36
|
|
33
37
|
t.index [:created_at, :client_type]
|
34
38
|
t.index [:created_at, :response_valid]
|
@@ -31,6 +31,7 @@ module HttpStore
|
|
31
31
|
http_method: request.request_method,
|
32
32
|
data: request.params,
|
33
33
|
client_type: request.params[:client_type],
|
34
|
+
is_system: true,
|
34
35
|
headers: request.headers.select { |k, _v| k.start_with? 'HTTP_' }.to_h,
|
35
36
|
query_params: request.query_parameters,
|
36
37
|
force: true,
|
data/lib/http_store/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: http_store
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.6.
|
4
|
+
version: 0.6.5
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- black
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2023-12-
|
11
|
+
date: 2023-12-28 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rest-client
|
@@ -140,9 +140,6 @@ files:
|
|
140
140
|
- bin/console
|
141
141
|
- bin/setup
|
142
142
|
- db/migrate/1_create_http_logs.rb
|
143
|
-
- db/migrate/2_add_cache_response_field_to_http_log.rb
|
144
|
-
- db/migrate/3_add_retry_times_field_to_http_log.rb
|
145
|
-
- db/migrate/4_add_index_to_http_log.rb
|
146
143
|
- http_store.gemspec
|
147
144
|
- lib/generators/http_store/initializer_generator.rb
|
148
145
|
- lib/http_store.rb
|