http_store 0.6.10 → 0.6.12

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: ab4f8418f860b33a975ce7c2a0b4f9bb004854e57923bb991151d0dabf35a2dd
4
- data.tar.gz: 85fe0063e357445ea13b71d5b2736f3958a0986f3b6f7490554c45def69150bd
3
+ metadata.gz: caf1eaffc74fbbb3f04ac5b0137eb9ea62e98b889e511bb339f7f398d85a5093
4
+ data.tar.gz: ac5c247efda80c1f4612ea06a23f4eab3c5cfcf23fe29df16451902572c0c23c
5
5
  SHA512:
6
- metadata.gz: facc954f20fed4d119feb9b9abebf5f2d22077a91e029ec4835d229b117eebc75bd24c2f85af4cbee90d5108859e4b0e8c84ee354b3b299d960a8537d5b7132f
7
- data.tar.gz: fed0ceb645ceef55d40c0b471ced9cff0e9fc495271f3da94d7cb565489a10d0ad3874064be1f27a029442753652767be191ef65bd53894cc48390a217eb1192
6
+ metadata.gz: 6add30418905c1c9d7bedf31c6e2efc508732bf4268e8755ea64e40e0910d97a1341e3b81f699f16f2a43590b7dd8113b4efb7054be09332f0bd251e157c0b52
7
+ data.tar.gz: 6069cf983395fa035ee5c282e5d1b3b42d8ebf018ce357babe14310e0de0e704093bb0fac94eee6cab9cbab7a3e7f0854c4e02ac6647bff227aec04c870770de
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- http_store (0.6.10)
4
+ http_store (0.6.12)
5
5
  activerecord
6
6
  hashie
7
7
  rails
@@ -10,104 +10,101 @@ PATH
10
10
  GEM
11
11
  remote: https://rubygems.org/
12
12
  specs:
13
- actioncable (7.1.3.2)
14
- actionpack (= 7.1.3.2)
15
- activesupport (= 7.1.3.2)
13
+ actioncable (7.2.0)
14
+ actionpack (= 7.2.0)
15
+ activesupport (= 7.2.0)
16
16
  nio4r (~> 2.0)
17
17
  websocket-driver (>= 0.6.1)
18
18
  zeitwerk (~> 2.6)
19
- actionmailbox (7.1.3.2)
20
- actionpack (= 7.1.3.2)
21
- activejob (= 7.1.3.2)
22
- activerecord (= 7.1.3.2)
23
- activestorage (= 7.1.3.2)
24
- activesupport (= 7.1.3.2)
25
- mail (>= 2.7.1)
26
- net-imap
27
- net-pop
28
- net-smtp
29
- actionmailer (7.1.3.2)
30
- actionpack (= 7.1.3.2)
31
- actionview (= 7.1.3.2)
32
- activejob (= 7.1.3.2)
33
- activesupport (= 7.1.3.2)
34
- mail (~> 2.5, >= 2.5.4)
35
- net-imap
36
- net-pop
37
- net-smtp
19
+ actionmailbox (7.2.0)
20
+ actionpack (= 7.2.0)
21
+ activejob (= 7.2.0)
22
+ activerecord (= 7.2.0)
23
+ activestorage (= 7.2.0)
24
+ activesupport (= 7.2.0)
25
+ mail (>= 2.8.0)
26
+ actionmailer (7.2.0)
27
+ actionpack (= 7.2.0)
28
+ actionview (= 7.2.0)
29
+ activejob (= 7.2.0)
30
+ activesupport (= 7.2.0)
31
+ mail (>= 2.8.0)
38
32
  rails-dom-testing (~> 2.2)
39
- actionpack (7.1.3.2)
40
- actionview (= 7.1.3.2)
41
- activesupport (= 7.1.3.2)
33
+ actionpack (7.2.0)
34
+ actionview (= 7.2.0)
35
+ activesupport (= 7.2.0)
42
36
  nokogiri (>= 1.8.5)
43
37
  racc
44
- rack (>= 2.2.4)
38
+ rack (>= 2.2.4, < 3.2)
45
39
  rack-session (>= 1.0.1)
46
40
  rack-test (>= 0.6.3)
47
41
  rails-dom-testing (~> 2.2)
48
42
  rails-html-sanitizer (~> 1.6)
49
- actiontext (7.1.3.2)
50
- actionpack (= 7.1.3.2)
51
- activerecord (= 7.1.3.2)
52
- activestorage (= 7.1.3.2)
53
- activesupport (= 7.1.3.2)
43
+ useragent (~> 0.16)
44
+ actiontext (7.2.0)
45
+ actionpack (= 7.2.0)
46
+ activerecord (= 7.2.0)
47
+ activestorage (= 7.2.0)
48
+ activesupport (= 7.2.0)
54
49
  globalid (>= 0.6.0)
55
50
  nokogiri (>= 1.8.5)
56
- actionview (7.1.3.2)
57
- activesupport (= 7.1.3.2)
51
+ actionview (7.2.0)
52
+ activesupport (= 7.2.0)
58
53
  builder (~> 3.1)
59
54
  erubi (~> 1.11)
60
55
  rails-dom-testing (~> 2.2)
61
56
  rails-html-sanitizer (~> 1.6)
62
- activejob (7.1.3.2)
63
- activesupport (= 7.1.3.2)
57
+ activejob (7.2.0)
58
+ activesupport (= 7.2.0)
64
59
  globalid (>= 0.3.6)
65
- activemodel (7.1.3.2)
66
- activesupport (= 7.1.3.2)
67
- activerecord (7.1.3.2)
68
- activemodel (= 7.1.3.2)
69
- activesupport (= 7.1.3.2)
60
+ activemodel (7.2.0)
61
+ activesupport (= 7.2.0)
62
+ activerecord (7.2.0)
63
+ activemodel (= 7.2.0)
64
+ activesupport (= 7.2.0)
70
65
  timeout (>= 0.4.0)
71
- activestorage (7.1.3.2)
72
- actionpack (= 7.1.3.2)
73
- activejob (= 7.1.3.2)
74
- activerecord (= 7.1.3.2)
75
- activesupport (= 7.1.3.2)
66
+ activestorage (7.2.0)
67
+ actionpack (= 7.2.0)
68
+ activejob (= 7.2.0)
69
+ activerecord (= 7.2.0)
70
+ activesupport (= 7.2.0)
76
71
  marcel (~> 1.0)
77
- activesupport (7.1.3.2)
72
+ activesupport (7.2.0)
78
73
  base64
79
74
  bigdecimal
80
- concurrent-ruby (~> 1.0, >= 1.0.2)
75
+ concurrent-ruby (~> 1.0, >= 1.3.1)
81
76
  connection_pool (>= 2.2.5)
82
77
  drb
83
78
  i18n (>= 1.6, < 2)
79
+ logger (>= 1.4.2)
84
80
  minitest (>= 5.1)
85
- mutex_m
86
- tzinfo (~> 2.0)
81
+ securerandom (>= 0.3)
82
+ tzinfo (~> 2.0, >= 2.0.5)
87
83
  base64 (0.2.0)
88
- bigdecimal (3.1.7)
89
- builder (3.2.4)
84
+ bigdecimal (3.1.8)
85
+ builder (3.3.0)
90
86
  byebug (11.1.3)
91
- concurrent-ruby (1.2.3)
87
+ concurrent-ruby (1.3.4)
92
88
  connection_pool (2.4.1)
93
89
  crass (1.0.6)
94
90
  date (3.3.4)
95
91
  diff-lcs (1.5.0)
96
92
  domain_name (0.6.20240107)
97
93
  drb (2.2.1)
98
- erubi (1.12.0)
94
+ erubi (1.13.0)
99
95
  globalid (1.2.1)
100
96
  activesupport (>= 6.1)
101
97
  hashie (5.0.0)
102
98
  http-accept (1.7.0)
103
- http-cookie (1.0.5)
99
+ http-cookie (1.0.6)
104
100
  domain_name (~> 0.5)
105
- i18n (1.14.4)
101
+ i18n (1.14.5)
106
102
  concurrent-ruby (~> 1.0)
107
103
  io-console (0.7.2)
108
- irb (1.12.0)
109
- rdoc
104
+ irb (1.14.0)
105
+ rdoc (>= 4.0.0)
110
106
  reline (>= 0.4.2)
107
+ logger (1.6.0)
111
108
  loofah (2.22.0)
112
109
  crass (~> 1.0.2)
113
110
  nokogiri (>= 1.12.0)
@@ -119,11 +116,10 @@ GEM
119
116
  marcel (1.0.4)
120
117
  mime-types (3.5.2)
121
118
  mime-types-data (~> 3.2015)
122
- mime-types-data (3.2024.0305)
119
+ mime-types-data (3.2024.0806)
123
120
  mini_mime (1.1.5)
124
- minitest (5.22.3)
125
- mutex_m (0.2.0)
126
- net-imap (0.4.10)
121
+ minitest (5.24.1)
122
+ net-imap (0.4.14)
127
123
  date
128
124
  net-protocol
129
125
  net-pop (0.1.2)
@@ -133,13 +129,15 @@ GEM
133
129
  net-smtp (0.5.0)
134
130
  net-protocol
135
131
  netrc (0.11.0)
136
- nio4r (2.7.1)
137
- nokogiri (1.16.4-arm64-darwin)
132
+ nio4r (2.7.3)
133
+ nokogiri (1.16.7-arm64-darwin)
134
+ racc (~> 1.4)
135
+ nokogiri (1.16.7-x86_64-darwin)
138
136
  racc (~> 1.4)
139
137
  psych (5.1.2)
140
138
  stringio
141
- racc (1.7.3)
142
- rack (3.0.10)
139
+ racc (1.8.1)
140
+ rack (3.1.7)
143
141
  rack-session (2.0.0)
144
142
  rack (>= 3.0.0)
145
143
  rack-test (2.1.0)
@@ -147,20 +145,20 @@ GEM
147
145
  rackup (2.1.0)
148
146
  rack (>= 3)
149
147
  webrick (~> 1.8)
150
- rails (7.1.3.2)
151
- actioncable (= 7.1.3.2)
152
- actionmailbox (= 7.1.3.2)
153
- actionmailer (= 7.1.3.2)
154
- actionpack (= 7.1.3.2)
155
- actiontext (= 7.1.3.2)
156
- actionview (= 7.1.3.2)
157
- activejob (= 7.1.3.2)
158
- activemodel (= 7.1.3.2)
159
- activerecord (= 7.1.3.2)
160
- activestorage (= 7.1.3.2)
161
- activesupport (= 7.1.3.2)
148
+ rails (7.2.0)
149
+ actioncable (= 7.2.0)
150
+ actionmailbox (= 7.2.0)
151
+ actionmailer (= 7.2.0)
152
+ actionpack (= 7.2.0)
153
+ actiontext (= 7.2.0)
154
+ actionview (= 7.2.0)
155
+ activejob (= 7.2.0)
156
+ activemodel (= 7.2.0)
157
+ activerecord (= 7.2.0)
158
+ activestorage (= 7.2.0)
159
+ activesupport (= 7.2.0)
162
160
  bundler (>= 1.15.0)
163
- railties (= 7.1.3.2)
161
+ railties (= 7.2.0)
164
162
  rails-dom-testing (2.2.0)
165
163
  activesupport (>= 5.0.0)
166
164
  minitest
@@ -168,18 +166,18 @@ GEM
168
166
  rails-html-sanitizer (1.6.0)
169
167
  loofah (~> 2.21)
170
168
  nokogiri (~> 1.14)
171
- railties (7.1.3.2)
172
- actionpack (= 7.1.3.2)
173
- activesupport (= 7.1.3.2)
174
- irb
169
+ railties (7.2.0)
170
+ actionpack (= 7.2.0)
171
+ activesupport (= 7.2.0)
172
+ irb (~> 1.13)
175
173
  rackup (>= 1.0.0)
176
174
  rake (>= 12.2)
177
175
  thor (~> 1.0, >= 1.2.2)
178
176
  zeitwerk (~> 2.6)
179
177
  rake (13.0.6)
180
- rdoc (6.6.3.1)
178
+ rdoc (6.7.0)
181
179
  psych (>= 4.0.0)
182
- reline (0.5.2)
180
+ reline (0.5.9)
183
181
  io-console (~> 0.5)
184
182
  rest-client (2.1.0)
185
183
  http-accept (>= 1.7.0, < 2.0)
@@ -199,16 +197,18 @@ GEM
199
197
  diff-lcs (>= 1.2.0, < 2.0)
200
198
  rspec-support (~> 3.12.0)
201
199
  rspec-support (3.12.1)
202
- stringio (3.1.0)
200
+ securerandom (0.3.1)
201
+ stringio (3.1.1)
203
202
  thor (1.3.1)
204
203
  timeout (0.4.1)
205
204
  tzinfo (2.0.6)
206
205
  concurrent-ruby (~> 1.0)
206
+ useragent (0.16.10)
207
207
  webrick (1.8.1)
208
208
  websocket-driver (0.7.6)
209
209
  websocket-extensions (>= 0.1.0)
210
210
  websocket-extensions (0.1.5)
211
- zeitwerk (2.6.13)
211
+ zeitwerk (2.6.17)
212
212
 
213
213
  PLATFORMS
214
214
  arm64-darwin-23
@@ -24,6 +24,9 @@ module HttpStore
24
24
  @meta.response_data = build_response_data
25
25
  @meta.cache_response = cache_response?
26
26
  raise HttpStore::RequestError, '三方请求异常, 请与管理员联系' if response_data.nil?
27
+
28
+ Rails.logger.info "#{uri}: response: #{response}"
29
+ Rails.logger.info "#{uri}: response_data: #{response_data}"
27
30
  end
28
31
 
29
32
  def build_response_data
@@ -27,7 +27,8 @@ module HttpStore
27
27
  def store_request
28
28
  return unless HttpStore.config.store_enable
29
29
 
30
- @meta.parent_id = storeable_record.id if use_cache?
30
+ @meta.parent_id = storeable_record.id if use_cache?
31
+ # HttpStore::Job::HttpLogStoreJob.perform_later(gen_storable_meta)
31
32
  @storeable_record = store_class.new(gen_storable_meta)
32
33
  @storeable_record.save!
33
34
  end
@@ -0,0 +1,12 @@
1
+ module HttpStore
2
+ module Job
3
+ class HttpLogStoreJob < ApplicationJob
4
+ queue_as :default
5
+
6
+ def perform(meta)
7
+ @storeable_record = HttpStore.config.store_class.new(meta)
8
+ @storeable_record.save!
9
+ end
10
+ end
11
+ end
12
+ end
@@ -1,3 +1,3 @@
1
1
  module HttpStore
2
- VERSION = "0.6.10"
2
+ VERSION = "0.6.12"
3
3
  end
data/lib/http_store.rb CHANGED
@@ -4,6 +4,7 @@ require 'active_support/core_ext/module'
4
4
  require 'hashie'
5
5
  require 'rest-client'
6
6
  require 'http_store/engine'
7
+ # require 'http_store/job/http_log_store_job'
7
8
 
8
9
  module HttpStore
9
10
  extend ActiveSupport::Autoload
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.10
4
+ version: 0.6.12
5
5
  platform: ruby
6
6
  authors:
7
7
  - black
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2024-04-26 00:00:00.000000000 Z
11
+ date: 2024-08-11 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rest-client
@@ -150,6 +150,7 @@ files:
150
150
  - lib/http_store/helpers/responseable.rb
151
151
  - lib/http_store/helpers/storable.rb
152
152
  - lib/http_store/http_log.rb
153
+ - lib/http_store/job/http_log_store_job.rb
153
154
  - lib/http_store/middleware/request_log.rb
154
155
  - lib/http_store/version.rb
155
156
  homepage: https://github.com/308820773/http-store