http_store 0.6.8 → 0.6.10

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: f53b0332ad89c7fcf2635bf0e1c1f75214ab9117dfdec3cb7f06e81bdf23e2d1
4
- data.tar.gz: 90b12f0dd61add74fbc3647cccc2df3031e593e70c204b5afbfe32a1474cf250
3
+ metadata.gz: ab4f8418f860b33a975ce7c2a0b4f9bb004854e57923bb991151d0dabf35a2dd
4
+ data.tar.gz: 85fe0063e357445ea13b71d5b2736f3958a0986f3b6f7490554c45def69150bd
5
5
  SHA512:
6
- metadata.gz: c8784e4a46a97eb50a7c3400fc53e0b21783e347fde49f1262aa32b02f10b187a1ed7af5fabde7315fe460b8c44aae2a03f6d2aec27cbb0f767431350b2f1529
7
- data.tar.gz: 73df573b54dc5ae131186ad6077c8b84c6183b0c4bad91faacd9a0139c78041a118c81a4a5423792f2e07878e1ff0f8ebaaaf4cf70eadfc93be3884891b8154c
6
+ metadata.gz: facc954f20fed4d119feb9b9abebf5f2d22077a91e029ec4835d229b117eebc75bd24c2f85af4cbee90d5108859e4b0e8c84ee354b3b299d960a8537d5b7132f
7
+ data.tar.gz: fed0ceb645ceef55d40c0b471ced9cff0e9fc495271f3da94d7cb565489a10d0ad3874064be1f27a029442753652767be191ef65bd53894cc48390a217eb1192
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- http_store (0.6.8)
4
+ http_store (0.6.10)
5
5
  activerecord
6
6
  hashie
7
7
  rails
@@ -10,35 +10,35 @@ PATH
10
10
  GEM
11
11
  remote: https://rubygems.org/
12
12
  specs:
13
- actioncable (7.1.3)
14
- actionpack (= 7.1.3)
15
- activesupport (= 7.1.3)
13
+ actioncable (7.1.3.2)
14
+ actionpack (= 7.1.3.2)
15
+ activesupport (= 7.1.3.2)
16
16
  nio4r (~> 2.0)
17
17
  websocket-driver (>= 0.6.1)
18
18
  zeitwerk (~> 2.6)
19
- actionmailbox (7.1.3)
20
- actionpack (= 7.1.3)
21
- activejob (= 7.1.3)
22
- activerecord (= 7.1.3)
23
- activestorage (= 7.1.3)
24
- activesupport (= 7.1.3)
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
25
  mail (>= 2.7.1)
26
26
  net-imap
27
27
  net-pop
28
28
  net-smtp
29
- actionmailer (7.1.3)
30
- actionpack (= 7.1.3)
31
- actionview (= 7.1.3)
32
- activejob (= 7.1.3)
33
- activesupport (= 7.1.3)
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
34
  mail (~> 2.5, >= 2.5.4)
35
35
  net-imap
36
36
  net-pop
37
37
  net-smtp
38
38
  rails-dom-testing (~> 2.2)
39
- actionpack (7.1.3)
40
- actionview (= 7.1.3)
41
- activesupport (= 7.1.3)
39
+ actionpack (7.1.3.2)
40
+ actionview (= 7.1.3.2)
41
+ activesupport (= 7.1.3.2)
42
42
  nokogiri (>= 1.8.5)
43
43
  racc
44
44
  rack (>= 2.2.4)
@@ -46,35 +46,35 @@ GEM
46
46
  rack-test (>= 0.6.3)
47
47
  rails-dom-testing (~> 2.2)
48
48
  rails-html-sanitizer (~> 1.6)
49
- actiontext (7.1.3)
50
- actionpack (= 7.1.3)
51
- activerecord (= 7.1.3)
52
- activestorage (= 7.1.3)
53
- activesupport (= 7.1.3)
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)
54
54
  globalid (>= 0.6.0)
55
55
  nokogiri (>= 1.8.5)
56
- actionview (7.1.3)
57
- activesupport (= 7.1.3)
56
+ actionview (7.1.3.2)
57
+ activesupport (= 7.1.3.2)
58
58
  builder (~> 3.1)
59
59
  erubi (~> 1.11)
60
60
  rails-dom-testing (~> 2.2)
61
61
  rails-html-sanitizer (~> 1.6)
62
- activejob (7.1.3)
63
- activesupport (= 7.1.3)
62
+ activejob (7.1.3.2)
63
+ activesupport (= 7.1.3.2)
64
64
  globalid (>= 0.3.6)
65
- activemodel (7.1.3)
66
- activesupport (= 7.1.3)
67
- activerecord (7.1.3)
68
- activemodel (= 7.1.3)
69
- activesupport (= 7.1.3)
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)
70
70
  timeout (>= 0.4.0)
71
- activestorage (7.1.3)
72
- actionpack (= 7.1.3)
73
- activejob (= 7.1.3)
74
- activerecord (= 7.1.3)
75
- activesupport (= 7.1.3)
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)
76
76
  marcel (~> 1.0)
77
- activesupport (7.1.3)
77
+ activesupport (7.1.3.2)
78
78
  base64
79
79
  bigdecimal
80
80
  concurrent-ruby (~> 1.0, >= 1.0.2)
@@ -85,7 +85,7 @@ GEM
85
85
  mutex_m
86
86
  tzinfo (~> 2.0)
87
87
  base64 (0.2.0)
88
- bigdecimal (3.1.6)
88
+ bigdecimal (3.1.7)
89
89
  builder (3.2.4)
90
90
  byebug (11.1.3)
91
91
  concurrent-ruby (1.2.3)
@@ -94,8 +94,7 @@ GEM
94
94
  date (3.3.4)
95
95
  diff-lcs (1.5.0)
96
96
  domain_name (0.6.20240107)
97
- drb (2.2.0)
98
- ruby2_keywords
97
+ drb (2.2.1)
99
98
  erubi (1.12.0)
100
99
  globalid (1.2.1)
101
100
  activesupport (>= 6.1)
@@ -103,10 +102,10 @@ GEM
103
102
  http-accept (1.7.0)
104
103
  http-cookie (1.0.5)
105
104
  domain_name (~> 0.5)
106
- i18n (1.14.1)
105
+ i18n (1.14.4)
107
106
  concurrent-ruby (~> 1.0)
108
107
  io-console (0.7.2)
109
- irb (1.11.1)
108
+ irb (1.12.0)
110
109
  rdoc
111
110
  reline (>= 0.4.2)
112
111
  loofah (2.22.0)
@@ -117,30 +116,30 @@ GEM
117
116
  net-imap
118
117
  net-pop
119
118
  net-smtp
120
- marcel (1.0.2)
119
+ marcel (1.0.4)
121
120
  mime-types (3.5.2)
122
121
  mime-types-data (~> 3.2015)
123
- mime-types-data (3.2023.1205)
122
+ mime-types-data (3.2024.0305)
124
123
  mini_mime (1.1.5)
125
- minitest (5.21.2)
124
+ minitest (5.22.3)
126
125
  mutex_m (0.2.0)
127
- net-imap (0.4.9.1)
126
+ net-imap (0.4.10)
128
127
  date
129
128
  net-protocol
130
129
  net-pop (0.1.2)
131
130
  net-protocol
132
131
  net-protocol (0.2.2)
133
132
  timeout
134
- net-smtp (0.4.0.1)
133
+ net-smtp (0.5.0)
135
134
  net-protocol
136
135
  netrc (0.11.0)
137
- nio4r (2.7.0)
138
- nokogiri (1.15.5-x86_64-darwin)
136
+ nio4r (2.7.1)
137
+ nokogiri (1.16.4-arm64-darwin)
139
138
  racc (~> 1.4)
140
139
  psych (5.1.2)
141
140
  stringio
142
141
  racc (1.7.3)
143
- rack (3.0.8)
142
+ rack (3.0.10)
144
143
  rack-session (2.0.0)
145
144
  rack (>= 3.0.0)
146
145
  rack-test (2.1.0)
@@ -148,20 +147,20 @@ GEM
148
147
  rackup (2.1.0)
149
148
  rack (>= 3)
150
149
  webrick (~> 1.8)
151
- rails (7.1.3)
152
- actioncable (= 7.1.3)
153
- actionmailbox (= 7.1.3)
154
- actionmailer (= 7.1.3)
155
- actionpack (= 7.1.3)
156
- actiontext (= 7.1.3)
157
- actionview (= 7.1.3)
158
- activejob (= 7.1.3)
159
- activemodel (= 7.1.3)
160
- activerecord (= 7.1.3)
161
- activestorage (= 7.1.3)
162
- activesupport (= 7.1.3)
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)
163
162
  bundler (>= 1.15.0)
164
- railties (= 7.1.3)
163
+ railties (= 7.1.3.2)
165
164
  rails-dom-testing (2.2.0)
166
165
  activesupport (>= 5.0.0)
167
166
  minitest
@@ -169,18 +168,18 @@ GEM
169
168
  rails-html-sanitizer (1.6.0)
170
169
  loofah (~> 2.21)
171
170
  nokogiri (~> 1.14)
172
- railties (7.1.3)
173
- actionpack (= 7.1.3)
174
- activesupport (= 7.1.3)
171
+ railties (7.1.3.2)
172
+ actionpack (= 7.1.3.2)
173
+ activesupport (= 7.1.3.2)
175
174
  irb
176
175
  rackup (>= 1.0.0)
177
176
  rake (>= 12.2)
178
177
  thor (~> 1.0, >= 1.2.2)
179
178
  zeitwerk (~> 2.6)
180
179
  rake (13.0.6)
181
- rdoc (6.6.2)
180
+ rdoc (6.6.3.1)
182
181
  psych (>= 4.0.0)
183
- reline (0.4.2)
182
+ reline (0.5.2)
184
183
  io-console (~> 0.5)
185
184
  rest-client (2.1.0)
186
185
  http-accept (>= 1.7.0, < 2.0)
@@ -200,9 +199,8 @@ GEM
200
199
  diff-lcs (>= 1.2.0, < 2.0)
201
200
  rspec-support (~> 3.12.0)
202
201
  rspec-support (3.12.1)
203
- ruby2_keywords (0.0.5)
204
202
  stringio (3.1.0)
205
- thor (1.3.0)
203
+ thor (1.3.1)
206
204
  timeout (0.4.1)
207
205
  tzinfo (2.0.6)
208
206
  concurrent-ruby (~> 1.0)
@@ -210,9 +208,10 @@ GEM
210
208
  websocket-driver (0.7.6)
211
209
  websocket-extensions (>= 0.1.0)
212
210
  websocket-extensions (0.1.5)
213
- zeitwerk (2.6.12)
211
+ zeitwerk (2.6.13)
214
212
 
215
213
  PLATFORMS
214
+ arm64-darwin-23
216
215
  x86_64-darwin-21
217
216
 
218
217
  DEPENDENCIES
@@ -48,7 +48,15 @@ module HttpStore
48
48
  end
49
49
 
50
50
  def execute
51
- @meta.response_obj = get? ? http_get_execute : http_post_execute
51
+ @meta.response_obj =
52
+ begin
53
+ get? ? http_get_execute : http_post_execute
54
+ rescue RestClient::ExceptionWithResponse => e
55
+ e.response
56
+ # rescue Errno::ECONNREFUSED => e
57
+ # Hashie::Mash.new(code: 500, body: e.message)
58
+ end
59
+
52
60
  raise HttpStore::RequestError, 'response_obj is nil' if response_obj.nil?
53
61
 
54
62
  build_response
@@ -62,21 +70,12 @@ module HttpStore
62
70
 
63
71
  def http_get_execute
64
72
  RestClient::Request.execute(method: :get, url: uri, headers: headers.symbolize_keys, verify_ssl: verify_ssl)
65
- rescue RestClient::ExceptionWithResponse => e
66
- # :nocov:
67
- e.response
68
- # :nocov:
69
73
  end
70
74
 
71
75
  def http_post_execute
72
76
  real_data = json_request? ? data.to_json : data.to_hash
73
77
  # RestClient.post(uri, real_data, headers.symbolize_keys)
74
78
  RestClient::Request.execute(method: :post, url: uri, payload: real_data, headers: headers.symbolize_keys, verify_ssl: verify_ssl)
75
- rescue RestClient::ExceptionWithResponse => e
76
- # :nocov:
77
- e.response
78
- # :nocov:
79
79
  end
80
80
  end
81
81
  end
82
-
@@ -23,7 +23,7 @@ module HttpStore
23
23
  @meta.response_code = build_response_code
24
24
  @meta.response_data = build_response_data
25
25
  @meta.cache_response = cache_response?
26
- raise HttpStore::RequestError, '三方请求异常, 请与管理员联系' if response_data.blank?
26
+ raise HttpStore::RequestError, '三方请求异常, 请与管理员联系' if response_data.nil?
27
27
  end
28
28
 
29
29
  def build_response_data
@@ -1,3 +1,3 @@
1
1
  module HttpStore
2
- VERSION = "0.6.8"
2
+ VERSION = "0.6.10"
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.6.8
4
+ version: 0.6.10
5
5
  platform: ruby
6
6
  authors:
7
7
  - black
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2024-01-19 00:00:00.000000000 Z
11
+ date: 2024-04-26 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rest-client
@@ -173,7 +173,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
173
173
  - !ruby/object:Gem::Version
174
174
  version: '0'
175
175
  requirements: []
176
- rubygems_version: 3.1.6
176
+ rubygems_version: 3.4.10
177
177
  signing_key:
178
178
  specification_version: 4
179
179
  summary: store the http request, it based on rest-client