http_store 0.5.6 → 0.6.0

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: fdb887967fe4247fd630e97de02c2d9989d2c49b1df9f48dffed6765c13e82b3
4
- data.tar.gz: 8fd1eba2478b23eb784e70502170111eb87c01430fa8717b88c7feb2a56693af
3
+ metadata.gz: 3fc35f82b4c13ee6d7fa07fc1e4e6e94c64888ead6e5287baac7481d4b873cc3
4
+ data.tar.gz: b6eb03d409312936461f71e0785194583d738baad2d7c175f69c589480e88ba0
5
5
  SHA512:
6
- metadata.gz: f1503fd29ebf15ce3e9c5fb8fa0a5dd11d811cc7cd301023598a1ae1d53b2cce6c84a2b0560b2d6d5e079985fb67bc2179a5aaa5dacacda0d1967800cd3275d6
7
- data.tar.gz: 28f98446e75902f3dfe29e975d5e7ff439a65236d233701bc1fef153dfcda157b735d96a3e7374fd7c1cb1f8cac9c25f1176a17ccbaa122248a2e9558dfeb03f
6
+ metadata.gz: f1e33fd7b35fcd01a17f864137a43ff1f757083f5da10a9cbb7d841f98da584eba59ffb247e731040d084554f1bc562202544d38fd34d23fffeba534f2a6ccd5
7
+ data.tar.gz: 54f1031493c66d8bdbb5c987c3100556698cdc9e3ea751d3b6826b5bfbc78443a51194e1d457262c0f709dea806450ea5fb5acfd2461c5b83a7e435a3d3c31e7
data/.gitignore CHANGED
@@ -6,7 +6,7 @@
6
6
  /pkg/
7
7
  /spec/reports/
8
8
  /tmp/
9
-
9
+ *.gem
10
10
  # rspec failure tracking
11
11
  .rspec_status
12
12
  .byebug_history
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- http_store (0.5.6)
4
+ http_store (0.6.0)
5
5
  activerecord
6
6
  hashie
7
7
  rails
@@ -10,89 +10,106 @@ PATH
10
10
  GEM
11
11
  remote: https://rubygems.org/
12
12
  specs:
13
- actioncable (7.0.6)
14
- actionpack (= 7.0.6)
15
- activesupport (= 7.0.6)
13
+ actioncable (7.1.2)
14
+ actionpack (= 7.1.2)
15
+ activesupport (= 7.1.2)
16
16
  nio4r (~> 2.0)
17
17
  websocket-driver (>= 0.6.1)
18
- actionmailbox (7.0.6)
19
- actionpack (= 7.0.6)
20
- activejob (= 7.0.6)
21
- activerecord (= 7.0.6)
22
- activestorage (= 7.0.6)
23
- activesupport (= 7.0.6)
18
+ zeitwerk (~> 2.6)
19
+ actionmailbox (7.1.2)
20
+ actionpack (= 7.1.2)
21
+ activejob (= 7.1.2)
22
+ activerecord (= 7.1.2)
23
+ activestorage (= 7.1.2)
24
+ activesupport (= 7.1.2)
24
25
  mail (>= 2.7.1)
25
26
  net-imap
26
27
  net-pop
27
28
  net-smtp
28
- actionmailer (7.0.6)
29
- actionpack (= 7.0.6)
30
- actionview (= 7.0.6)
31
- activejob (= 7.0.6)
32
- activesupport (= 7.0.6)
29
+ actionmailer (7.1.2)
30
+ actionpack (= 7.1.2)
31
+ actionview (= 7.1.2)
32
+ activejob (= 7.1.2)
33
+ activesupport (= 7.1.2)
33
34
  mail (~> 2.5, >= 2.5.4)
34
35
  net-imap
35
36
  net-pop
36
37
  net-smtp
37
- rails-dom-testing (~> 2.0)
38
- actionpack (7.0.6)
39
- actionview (= 7.0.6)
40
- activesupport (= 7.0.6)
41
- rack (~> 2.0, >= 2.2.4)
38
+ rails-dom-testing (~> 2.2)
39
+ actionpack (7.1.2)
40
+ actionview (= 7.1.2)
41
+ activesupport (= 7.1.2)
42
+ nokogiri (>= 1.8.5)
43
+ racc
44
+ rack (>= 2.2.4)
45
+ rack-session (>= 1.0.1)
42
46
  rack-test (>= 0.6.3)
43
- rails-dom-testing (~> 2.0)
44
- rails-html-sanitizer (~> 1.0, >= 1.2.0)
45
- actiontext (7.0.6)
46
- actionpack (= 7.0.6)
47
- activerecord (= 7.0.6)
48
- activestorage (= 7.0.6)
49
- activesupport (= 7.0.6)
47
+ rails-dom-testing (~> 2.2)
48
+ rails-html-sanitizer (~> 1.6)
49
+ actiontext (7.1.2)
50
+ actionpack (= 7.1.2)
51
+ activerecord (= 7.1.2)
52
+ activestorage (= 7.1.2)
53
+ activesupport (= 7.1.2)
50
54
  globalid (>= 0.6.0)
51
55
  nokogiri (>= 1.8.5)
52
- actionview (7.0.6)
53
- activesupport (= 7.0.6)
56
+ actionview (7.1.2)
57
+ activesupport (= 7.1.2)
54
58
  builder (~> 3.1)
55
- erubi (~> 1.4)
56
- rails-dom-testing (~> 2.0)
57
- rails-html-sanitizer (~> 1.1, >= 1.2.0)
58
- activejob (7.0.6)
59
- activesupport (= 7.0.6)
59
+ erubi (~> 1.11)
60
+ rails-dom-testing (~> 2.2)
61
+ rails-html-sanitizer (~> 1.6)
62
+ activejob (7.1.2)
63
+ activesupport (= 7.1.2)
60
64
  globalid (>= 0.3.6)
61
- activemodel (7.0.6)
62
- activesupport (= 7.0.6)
63
- activerecord (7.0.6)
64
- activemodel (= 7.0.6)
65
- activesupport (= 7.0.6)
66
- activestorage (7.0.6)
67
- actionpack (= 7.0.6)
68
- activejob (= 7.0.6)
69
- activerecord (= 7.0.6)
70
- activesupport (= 7.0.6)
65
+ activemodel (7.1.2)
66
+ activesupport (= 7.1.2)
67
+ activerecord (7.1.2)
68
+ activemodel (= 7.1.2)
69
+ activesupport (= 7.1.2)
70
+ timeout (>= 0.4.0)
71
+ activestorage (7.1.2)
72
+ actionpack (= 7.1.2)
73
+ activejob (= 7.1.2)
74
+ activerecord (= 7.1.2)
75
+ activesupport (= 7.1.2)
71
76
  marcel (~> 1.0)
72
- mini_mime (>= 1.1.0)
73
- activesupport (7.0.6)
77
+ activesupport (7.1.2)
78
+ base64
79
+ bigdecimal
74
80
  concurrent-ruby (~> 1.0, >= 1.0.2)
81
+ connection_pool (>= 2.2.5)
82
+ drb
75
83
  i18n (>= 1.6, < 2)
76
84
  minitest (>= 5.1)
85
+ mutex_m
77
86
  tzinfo (~> 2.0)
87
+ base64 (0.2.0)
88
+ bigdecimal (3.1.5)
78
89
  builder (3.2.4)
79
90
  byebug (11.1.3)
80
91
  concurrent-ruby (1.2.2)
92
+ connection_pool (2.4.1)
81
93
  crass (1.0.6)
82
- date (3.3.3)
94
+ date (3.3.4)
83
95
  diff-lcs (1.5.0)
84
- domain_name (0.5.20190701)
85
- unf (>= 0.0.5, < 1.0.0)
96
+ domain_name (0.6.20231109)
97
+ drb (2.2.0)
98
+ ruby2_keywords
86
99
  erubi (1.12.0)
87
- globalid (1.1.0)
88
- activesupport (>= 5.0)
100
+ globalid (1.2.1)
101
+ activesupport (>= 6.1)
89
102
  hashie (5.0.0)
90
103
  http-accept (1.7.0)
91
104
  http-cookie (1.0.5)
92
105
  domain_name (~> 0.5)
93
106
  i18n (1.14.1)
94
107
  concurrent-ruby (~> 1.0)
95
- loofah (2.21.3)
108
+ io-console (0.7.1)
109
+ irb (1.10.1)
110
+ rdoc
111
+ reline (>= 0.3.8)
112
+ loofah (2.22.0)
96
113
  crass (~> 1.0.2)
97
114
  nokogiri (>= 1.12.0)
98
115
  mail (2.8.1)
@@ -101,58 +118,70 @@ GEM
101
118
  net-pop
102
119
  net-smtp
103
120
  marcel (1.0.2)
104
- method_source (1.0.0)
105
- mime-types (3.4.1)
121
+ mime-types (3.5.1)
106
122
  mime-types-data (~> 3.2015)
107
- mime-types-data (3.2023.0218.1)
123
+ mime-types-data (3.2023.1205)
108
124
  mini_mime (1.1.5)
109
- minitest (5.19.0)
110
- net-imap (0.3.7)
125
+ minitest (5.20.0)
126
+ mutex_m (0.2.0)
127
+ net-imap (0.4.8)
111
128
  date
112
129
  net-protocol
113
130
  net-pop (0.1.2)
114
131
  net-protocol
115
- net-protocol (0.2.1)
132
+ net-protocol (0.2.2)
116
133
  timeout
117
- net-smtp (0.3.3)
134
+ net-smtp (0.4.0)
118
135
  net-protocol
119
136
  netrc (0.11.0)
120
- nio4r (2.5.9)
121
- nokogiri (1.15.3-x86_64-darwin)
137
+ nio4r (2.7.0)
138
+ nokogiri (1.15.5-x86_64-darwin)
122
139
  racc (~> 1.4)
123
- racc (1.7.1)
124
- rack (2.2.8)
140
+ psych (5.1.2)
141
+ stringio
142
+ racc (1.7.3)
143
+ rack (3.0.8)
144
+ rack-session (2.0.0)
145
+ rack (>= 3.0.0)
125
146
  rack-test (2.1.0)
126
147
  rack (>= 1.3)
127
- rails (7.0.6)
128
- actioncable (= 7.0.6)
129
- actionmailbox (= 7.0.6)
130
- actionmailer (= 7.0.6)
131
- actionpack (= 7.0.6)
132
- actiontext (= 7.0.6)
133
- actionview (= 7.0.6)
134
- activejob (= 7.0.6)
135
- activemodel (= 7.0.6)
136
- activerecord (= 7.0.6)
137
- activestorage (= 7.0.6)
138
- activesupport (= 7.0.6)
148
+ rackup (2.1.0)
149
+ rack (>= 3)
150
+ webrick (~> 1.8)
151
+ rails (7.1.2)
152
+ actioncable (= 7.1.2)
153
+ actionmailbox (= 7.1.2)
154
+ actionmailer (= 7.1.2)
155
+ actionpack (= 7.1.2)
156
+ actiontext (= 7.1.2)
157
+ actionview (= 7.1.2)
158
+ activejob (= 7.1.2)
159
+ activemodel (= 7.1.2)
160
+ activerecord (= 7.1.2)
161
+ activestorage (= 7.1.2)
162
+ activesupport (= 7.1.2)
139
163
  bundler (>= 1.15.0)
140
- railties (= 7.0.6)
141
- rails-dom-testing (2.1.1)
164
+ railties (= 7.1.2)
165
+ rails-dom-testing (2.2.0)
142
166
  activesupport (>= 5.0.0)
143
167
  minitest
144
168
  nokogiri (>= 1.6)
145
169
  rails-html-sanitizer (1.6.0)
146
170
  loofah (~> 2.21)
147
171
  nokogiri (~> 1.14)
148
- railties (7.0.6)
149
- actionpack (= 7.0.6)
150
- activesupport (= 7.0.6)
151
- method_source
172
+ railties (7.1.2)
173
+ actionpack (= 7.1.2)
174
+ activesupport (= 7.1.2)
175
+ irb
176
+ rackup (>= 1.0.0)
152
177
  rake (>= 12.2)
153
- thor (~> 1.0)
154
- zeitwerk (~> 2.5)
178
+ thor (~> 1.0, >= 1.2.2)
179
+ zeitwerk (~> 2.6)
155
180
  rake (13.0.6)
181
+ rdoc (6.6.2)
182
+ psych (>= 4.0.0)
183
+ reline (0.4.1)
184
+ io-console (~> 0.5)
156
185
  rest-client (2.1.0)
157
186
  http-accept (>= 1.7.0, < 2.0)
158
187
  http-cookie (>= 1.0.2, < 2.0)
@@ -171,17 +200,17 @@ GEM
171
200
  diff-lcs (>= 1.2.0, < 2.0)
172
201
  rspec-support (~> 3.12.0)
173
202
  rspec-support (3.12.1)
174
- thor (1.2.2)
175
- timeout (0.4.0)
203
+ ruby2_keywords (0.0.5)
204
+ stringio (3.1.0)
205
+ thor (1.3.0)
206
+ timeout (0.4.1)
176
207
  tzinfo (2.0.6)
177
208
  concurrent-ruby (~> 1.0)
178
- unf (0.1.4)
179
- unf_ext
180
- unf_ext (0.0.8.2)
209
+ webrick (1.8.1)
181
210
  websocket-driver (0.7.6)
182
211
  websocket-extensions (>= 0.1.0)
183
212
  websocket-extensions (0.1.5)
184
- zeitwerk (2.6.11)
213
+ zeitwerk (2.6.12)
185
214
 
186
215
  PLATFORMS
187
216
  x86_64-darwin-21
data/README.md CHANGED
@@ -24,7 +24,7 @@ first, you need create migration whit this command.
24
24
 
25
25
  ```bash
26
26
  rake http_store_engine:install:migrations # create table(default)
27
- rails generator http_store:initializer # create global settings
27
+ rails g http_store:initializer # create global settings
28
28
  ```
29
29
 
30
30
 
@@ -71,6 +71,15 @@ class BaseClient < HttpStore::Client
71
71
  end
72
72
  ```
73
73
 
74
+ ### store all rails request
75
+
76
+ ```ruby
77
+ # config/application.rb
78
+
79
+ config.middleware.use HttpStore::Middleware::RequestLog
80
+
81
+ ```
82
+
74
83
  ### HttpStore::HttpLog
75
84
 
76
85
  Default use activerecord, you can to rewrite it by setting
@@ -92,4 +101,4 @@ To install this gem onto your local machine, run `bundle exec rake install`. To
92
101
 
93
102
  ## Contributing
94
103
 
95
- Bug reports and pull requests are welcome on GitHub at https://github.com/[USERNAME]/http_store.
104
+ Bug reports and pull requests are welcome on GitHub at https://github.com/blackerhand/http-store.
@@ -0,0 +1,5 @@
1
+ class AddRetryTimesFieldToHttpLog < ActiveRecord::Migration[5.2]
2
+ def change
3
+ add_index :http_logs, :client_type
4
+ end
5
+ end
@@ -30,6 +30,7 @@ module HttpStore
30
30
  path: request.path,
31
31
  http_method: request.request_method,
32
32
  data: request.params,
33
+ client_type: request.params.client_type,
33
34
  headers: request.headers.select { |k, _v| k.start_with? 'HTTP_' }.to_h,
34
35
  query_params: request.query_parameters,
35
36
  force: true,
@@ -1,3 +1,3 @@
1
1
  module HttpStore
2
- VERSION = "0.5.6"
2
+ VERSION = "0.6.0"
3
3
  end
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.5.6
4
+ version: 0.6.0
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-15 00:00:00.000000000 Z
11
+ date: 2023-12-20 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rest-client
@@ -141,6 +141,7 @@ files:
141
141
  - bin/setup
142
142
  - db/migrate/1_create_http_logs.rb
143
143
  - db/migrate/2_add_cache_response_field_to_http_log.rb
144
+ - db/migrate/3_add_index_to_http_log.rb
144
145
  - db/migrate/3_add_retry_times_field_to_http_log.rb
145
146
  - http_store.gemspec
146
147
  - lib/generators/http_store/initializer_generator.rb