http_store 0.5.1 → 0.5.2

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: e21b78e87d29ba5cc7dda5c373c0c795c5ad497a7e50657079055b6d711cbf7c
4
- data.tar.gz: 51a2b9c79ed2ec24db30a08aa27692cce94209176e86f35fef42964467f99766
3
+ metadata.gz: c3d99fb3eccde52a754bdc4a0a83ff650591c297f28dcc9d8eccc0e24ef0c4b0
4
+ data.tar.gz: f597d1f6ef335f2da23cf95d62c7d8f07b23001d5ef07e46c89d8a8fb8a0564c
5
5
  SHA512:
6
- metadata.gz: 1e2511f353ba3cec16b15452daef6d817f0698c44662ed56463f4f7466d8649c0235e907c70c92310ac4f385e174bf570bdc19ee4ad1683ccaa3bf0878809dc7
7
- data.tar.gz: 845a31ef1c6579a82d129f9d615a79565aee3d5460429d178c516c7d3ba5ee18d1a5a0285b07d92ac4cf8bedddcd4b720fa224bfad52f6ee87c8b8395971995b
6
+ metadata.gz: 0f05f4b6a7087861b78e83e76f67eca620f544a0a3677afe177b7b6bb1144701f2570681dbbde9452bcd0331472c5e7cdec2d356662da737bc456a336a77bab6
7
+ data.tar.gz: 22b94e98bfea7fb0a64e79befe7888e2e9721a79c1b32ac14c82b4a8550facba6727672cc0aeba99c00d187903017c470b14540a1d3f8fdf3a2e619e49ac82da
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- http_store (0.5.1)
4
+ http_store (0.5.2)
5
5
  activerecord (>= 5.0, < 6.1)
6
6
  hashie (~> 3.0)
7
7
  rails (>= 5, < 7)
@@ -10,56 +10,56 @@ PATH
10
10
  GEM
11
11
  remote: https://rubygems.org/
12
12
  specs:
13
- actioncable (6.0.3.1)
14
- actionpack (= 6.0.3.1)
13
+ actioncable (6.0.3.3)
14
+ actionpack (= 6.0.3.3)
15
15
  nio4r (~> 2.0)
16
16
  websocket-driver (>= 0.6.1)
17
- actionmailbox (6.0.3.1)
18
- actionpack (= 6.0.3.1)
19
- activejob (= 6.0.3.1)
20
- activerecord (= 6.0.3.1)
21
- activestorage (= 6.0.3.1)
22
- activesupport (= 6.0.3.1)
17
+ actionmailbox (6.0.3.3)
18
+ actionpack (= 6.0.3.3)
19
+ activejob (= 6.0.3.3)
20
+ activerecord (= 6.0.3.3)
21
+ activestorage (= 6.0.3.3)
22
+ activesupport (= 6.0.3.3)
23
23
  mail (>= 2.7.1)
24
- actionmailer (6.0.3.1)
25
- actionpack (= 6.0.3.1)
26
- actionview (= 6.0.3.1)
27
- activejob (= 6.0.3.1)
24
+ actionmailer (6.0.3.3)
25
+ actionpack (= 6.0.3.3)
26
+ actionview (= 6.0.3.3)
27
+ activejob (= 6.0.3.3)
28
28
  mail (~> 2.5, >= 2.5.4)
29
29
  rails-dom-testing (~> 2.0)
30
- actionpack (6.0.3.1)
31
- actionview (= 6.0.3.1)
32
- activesupport (= 6.0.3.1)
30
+ actionpack (6.0.3.3)
31
+ actionview (= 6.0.3.3)
32
+ activesupport (= 6.0.3.3)
33
33
  rack (~> 2.0, >= 2.0.8)
34
34
  rack-test (>= 0.6.3)
35
35
  rails-dom-testing (~> 2.0)
36
36
  rails-html-sanitizer (~> 1.0, >= 1.2.0)
37
- actiontext (6.0.3.1)
38
- actionpack (= 6.0.3.1)
39
- activerecord (= 6.0.3.1)
40
- activestorage (= 6.0.3.1)
41
- activesupport (= 6.0.3.1)
37
+ actiontext (6.0.3.3)
38
+ actionpack (= 6.0.3.3)
39
+ activerecord (= 6.0.3.3)
40
+ activestorage (= 6.0.3.3)
41
+ activesupport (= 6.0.3.3)
42
42
  nokogiri (>= 1.8.5)
43
- actionview (6.0.3.1)
44
- activesupport (= 6.0.3.1)
43
+ actionview (6.0.3.3)
44
+ activesupport (= 6.0.3.3)
45
45
  builder (~> 3.1)
46
46
  erubi (~> 1.4)
47
47
  rails-dom-testing (~> 2.0)
48
48
  rails-html-sanitizer (~> 1.1, >= 1.2.0)
49
- activejob (6.0.3.1)
50
- activesupport (= 6.0.3.1)
49
+ activejob (6.0.3.3)
50
+ activesupport (= 6.0.3.3)
51
51
  globalid (>= 0.3.6)
52
- activemodel (6.0.3.1)
53
- activesupport (= 6.0.3.1)
54
- activerecord (6.0.3.1)
55
- activemodel (= 6.0.3.1)
56
- activesupport (= 6.0.3.1)
57
- activestorage (6.0.3.1)
58
- actionpack (= 6.0.3.1)
59
- activejob (= 6.0.3.1)
60
- activerecord (= 6.0.3.1)
52
+ activemodel (6.0.3.3)
53
+ activesupport (= 6.0.3.3)
54
+ activerecord (6.0.3.3)
55
+ activemodel (= 6.0.3.3)
56
+ activesupport (= 6.0.3.3)
57
+ activestorage (6.0.3.3)
58
+ actionpack (= 6.0.3.3)
59
+ activejob (= 6.0.3.3)
60
+ activerecord (= 6.0.3.3)
61
61
  marcel (~> 0.3.1)
62
- activesupport (6.0.3.1)
62
+ activesupport (6.0.3.3)
63
63
  concurrent-ruby (~> 1.0, >= 1.0.2)
64
64
  i18n (>= 0.7, < 2)
65
65
  minitest (~> 5.1)
@@ -67,7 +67,7 @@ GEM
67
67
  zeitwerk (~> 2.2, >= 2.2.2)
68
68
  builder (3.2.4)
69
69
  byebug (11.0.1)
70
- concurrent-ruby (1.1.6)
70
+ concurrent-ruby (1.1.7)
71
71
  crass (1.0.6)
72
72
  diff-lcs (1.3)
73
73
  domain_name (0.5.20190701)
@@ -79,9 +79,9 @@ GEM
79
79
  http-accept (1.7.0)
80
80
  http-cookie (1.0.3)
81
81
  domain_name (~> 0.5)
82
- i18n (1.8.2)
82
+ i18n (1.8.5)
83
83
  concurrent-ruby (~> 1.0)
84
- loofah (2.5.0)
84
+ loofah (2.7.0)
85
85
  crass (~> 1.0.2)
86
86
  nokogiri (>= 1.5.9)
87
87
  mail (2.7.1)
@@ -91,41 +91,41 @@ GEM
91
91
  method_source (1.0.0)
92
92
  mime-types (3.3.1)
93
93
  mime-types-data (~> 3.2015)
94
- mime-types-data (3.2020.0425)
94
+ mime-types-data (3.2020.0512)
95
95
  mimemagic (0.3.5)
96
96
  mini_mime (1.0.2)
97
97
  mini_portile2 (2.4.0)
98
- minitest (5.14.1)
98
+ minitest (5.14.2)
99
99
  netrc (0.11.0)
100
- nio4r (2.5.2)
101
- nokogiri (1.10.9)
100
+ nio4r (2.5.4)
101
+ nokogiri (1.10.10)
102
102
  mini_portile2 (~> 2.4.0)
103
- rack (2.2.2)
103
+ rack (2.2.3)
104
104
  rack-test (1.1.0)
105
105
  rack (>= 1.0, < 3)
106
- rails (6.0.3.1)
107
- actioncable (= 6.0.3.1)
108
- actionmailbox (= 6.0.3.1)
109
- actionmailer (= 6.0.3.1)
110
- actionpack (= 6.0.3.1)
111
- actiontext (= 6.0.3.1)
112
- actionview (= 6.0.3.1)
113
- activejob (= 6.0.3.1)
114
- activemodel (= 6.0.3.1)
115
- activerecord (= 6.0.3.1)
116
- activestorage (= 6.0.3.1)
117
- activesupport (= 6.0.3.1)
106
+ rails (6.0.3.3)
107
+ actioncable (= 6.0.3.3)
108
+ actionmailbox (= 6.0.3.3)
109
+ actionmailer (= 6.0.3.3)
110
+ actionpack (= 6.0.3.3)
111
+ actiontext (= 6.0.3.3)
112
+ actionview (= 6.0.3.3)
113
+ activejob (= 6.0.3.3)
114
+ activemodel (= 6.0.3.3)
115
+ activerecord (= 6.0.3.3)
116
+ activestorage (= 6.0.3.3)
117
+ activesupport (= 6.0.3.3)
118
118
  bundler (>= 1.3.0)
119
- railties (= 6.0.3.1)
119
+ railties (= 6.0.3.3)
120
120
  sprockets-rails (>= 2.0.0)
121
121
  rails-dom-testing (2.0.3)
122
122
  activesupport (>= 4.2.0)
123
123
  nokogiri (>= 1.6)
124
124
  rails-html-sanitizer (1.3.0)
125
125
  loofah (~> 2.3)
126
- railties (6.0.3.1)
127
- actionpack (= 6.0.3.1)
128
- activesupport (= 6.0.3.1)
126
+ railties (6.0.3.3)
127
+ actionpack (= 6.0.3.3)
128
+ activesupport (= 6.0.3.3)
129
129
  method_source
130
130
  rake (>= 0.8.7)
131
131
  thor (>= 0.20.3, < 2.0)
@@ -148,10 +148,10 @@ GEM
148
148
  diff-lcs (>= 1.2.0, < 2.0)
149
149
  rspec-support (~> 3.8.0)
150
150
  rspec-support (3.8.2)
151
- sprockets (4.0.0)
151
+ sprockets (4.0.2)
152
152
  concurrent-ruby (~> 1.0)
153
153
  rack (> 1, < 3)
154
- sprockets-rails (3.2.1)
154
+ sprockets-rails (3.2.2)
155
155
  actionpack (>= 4.0)
156
156
  activesupport (>= 4.0)
157
157
  sprockets (>= 3.0.0)
@@ -162,10 +162,10 @@ GEM
162
162
  unf (0.1.4)
163
163
  unf_ext
164
164
  unf_ext (0.0.7.7)
165
- websocket-driver (0.7.1)
165
+ websocket-driver (0.7.3)
166
166
  websocket-extensions (>= 0.1.0)
167
- websocket-extensions (0.1.4)
168
- zeitwerk (2.3.0)
167
+ websocket-extensions (0.1.5)
168
+ zeitwerk (2.4.0)
169
169
 
170
170
  PLATFORMS
171
171
  ruby
@@ -9,5 +9,9 @@ module HttpStore
9
9
  def store_class
10
10
  @store_class || HttpStore::HttpLog
11
11
  end
12
+
13
+ def store_time
14
+ @store_time || 31_536_000
15
+ end
12
16
  end
13
17
  end
@@ -7,7 +7,8 @@ module HttpStore
7
7
  def storeable_record
8
8
  return unless HttpStore.config.store_enable
9
9
 
10
- @storeable_record ||= HttpStore.config.store_class.where(request_digest: @meta.request_digest, cache_response: true).order(id: :desc).first
10
+ expired_time = Time.current - HttpStore.config.store_time
11
+ @storeable_record ||= HttpStore.config.store_class.where('created_at > ?', expired_time).where(request_digest: @meta.request_digest, cache_response: true).order(id: :desc).first
11
12
  end
12
13
 
13
14
  def load_storeable_record
@@ -1,3 +1,3 @@
1
1
  module HttpStore
2
- VERSION = "0.5.1"
2
+ VERSION = "0.5.2"
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.1
4
+ version: 0.5.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - black
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2020-08-20 00:00:00.000000000 Z
11
+ date: 2020-11-30 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rest-client