lean_pool 0.1.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 +7 -0
- data/.rspec +3 -0
- data/.rspec_status +195 -0
- data/.rubocop.yml +14 -0
- data/CHANGELOG.md +19 -0
- data/Gemfile +10 -0
- data/LICENSE.txt +21 -0
- data/PUBLISH.md +66 -0
- data/QUICKSTART.md +88 -0
- data/README.md +324 -0
- data/Rakefile +11 -0
- data/examples/basic_usage.rb +73 -0
- data/lean_pool.gemspec +38 -0
- data/lib/lean_pool/errors.rb +69 -0
- data/lib/lean_pool/http_pool.rb +206 -0
- data/lib/lean_pool/pool.rb +441 -0
- data/lib/lean_pool/version.rb +14 -0
- data/lib/lean_pool.rb +62 -0
- metadata +78 -0
checksums.yaml
ADDED
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
---
|
|
2
|
+
SHA256:
|
|
3
|
+
metadata.gz: 53547d3a01d0e2e9d97cc9f0f7a76346a86dd46e3c0e4a3bbc84ad983323f5ef
|
|
4
|
+
data.tar.gz: 26edf68327fa22547a3781e8e506bfc5de74d7ee042404360cb352d3b07f4494
|
|
5
|
+
SHA512:
|
|
6
|
+
metadata.gz: 482d67d17f597df062ef48eb4d0888fbf55f13c526294b6c61e8849c99bab9dba86b5cb4e06990ffc68ec1e62c3f811b9720b042242f869b0138005f1a919cbb
|
|
7
|
+
data.tar.gz: bc2f6c0087c8e571e4d9a2edfdebece8d5de869f37e28f2af5f0a5dada940da904e262e0f1a1f81e5a295e3a146d5dc793046193dfabe04a55fec2607adbe639
|
data/.rspec
ADDED
data/.rspec_status
ADDED
|
@@ -0,0 +1,195 @@
|
|
|
1
|
+
example_id | status | run_time |
|
|
2
|
+
------------------------------------------- | ------ | --------------------- |
|
|
3
|
+
./spec/lean_pool/errors_spec.rb[1:1:1] | passed | 0.00034 seconds |
|
|
4
|
+
./spec/lean_pool/errors_spec.rb[1:1:2] | passed | 0.00004 seconds |
|
|
5
|
+
./spec/lean_pool/errors_spec.rb[1:1:3] | passed | 0.00004 seconds |
|
|
6
|
+
./spec/lean_pool/errors_spec.rb[1:1:4] | passed | 0.00004 seconds |
|
|
7
|
+
./spec/lean_pool/errors_spec.rb[1:2:1] | passed | 1.01 seconds |
|
|
8
|
+
./spec/lean_pool/errors_spec.rb[1:2:2] | passed | 0.0006 seconds |
|
|
9
|
+
./spec/lean_pool/errors_spec.rb[1:2:3] | passed | 0.00032 seconds |
|
|
10
|
+
./spec/lean_pool/errors_spec.rb[1:2:4] | passed | 0.00153 seconds |
|
|
11
|
+
./spec/lean_pool/errors_spec.rb[1:2:5] | passed | 0.00152 seconds |
|
|
12
|
+
./spec/lean_pool/errors_spec.rb[1:3:1] | passed | 1.01 seconds |
|
|
13
|
+
./spec/lean_pool/errors_spec.rb[1:3:2] | passed | 0.00084 seconds |
|
|
14
|
+
./spec/lean_pool/errors_spec.rb[1:3:3] | passed | 1 second |
|
|
15
|
+
./spec/lean_pool/errors_spec.rb[1:3:4] | passed | 0.00222 seconds |
|
|
16
|
+
./spec/lean_pool/errors_spec.rb[1:3:5] | passed | 1.01 seconds |
|
|
17
|
+
./spec/lean_pool/errors_spec.rb[1:3:6] | passed | 0.00072 seconds |
|
|
18
|
+
./spec/lean_pool/errors_spec.rb[1:3:7] | passed | 0.00121 seconds |
|
|
19
|
+
./spec/lean_pool/errors_spec.rb[1:3:8] | passed | 1 second |
|
|
20
|
+
./spec/lean_pool/errors_spec.rb[1:4:1] | passed | 0.00144 seconds |
|
|
21
|
+
./spec/lean_pool/errors_spec.rb[1:4:2] | passed | 0.00023 seconds |
|
|
22
|
+
./spec/lean_pool/errors_spec.rb[1:4:3] | passed | 1.01 seconds |
|
|
23
|
+
./spec/lean_pool/http_pool_spec.rb[1:1:1] | passed | 0.00039 seconds |
|
|
24
|
+
./spec/lean_pool/http_pool_spec.rb[1:1:2] | passed | 0.00011 seconds |
|
|
25
|
+
./spec/lean_pool/http_pool_spec.rb[1:2:1] | passed | 0.82162 seconds |
|
|
26
|
+
./spec/lean_pool/http_pool_spec.rb[1:2:2] | passed | 0.6066 seconds |
|
|
27
|
+
./spec/lean_pool/http_pool_spec.rb[1:2:3] | passed | 0.569 seconds |
|
|
28
|
+
./spec/lean_pool/http_pool_spec.rb[1:2:4] | passed | 0.00262 seconds |
|
|
29
|
+
./spec/lean_pool/http_pool_spec.rb[1:3:1] | passed | 1.1 seconds |
|
|
30
|
+
./spec/lean_pool/http_pool_spec.rb[1:4:1] | passed | 0.00034 seconds |
|
|
31
|
+
./spec/lean_pool/http_pool_spec.rb[1:5:1] | passed | 0.00016 seconds |
|
|
32
|
+
./spec/lean_pool/http_pool_spec.rb[1:5:2] | passed | 0.09382 seconds |
|
|
33
|
+
./spec/lean_pool/http_pool_spec.rb[1:6:1] | passed | 0.00212 seconds |
|
|
34
|
+
./spec/lean_pool/http_pool_spec.rb[1:6:2] | passed | 0.00145 seconds |
|
|
35
|
+
./spec/lean_pool/http_pool_spec.rb[1:6:3] | passed | 1 minute 0.01 seconds |
|
|
36
|
+
./spec/lean_pool/http_pool_spec.rb[1:6:4] | passed | 1.34 seconds |
|
|
37
|
+
./spec/lean_pool/http_pool_spec.rb[1:6:5] | passed | 0.48591 seconds |
|
|
38
|
+
./spec/lean_pool/http_pool_spec.rb[1:6:6] | passed | 0.54131 seconds |
|
|
39
|
+
./spec/lean_pool/http_pool_spec.rb[1:6:7] | passed | 0.58358 seconds |
|
|
40
|
+
./spec/lean_pool/http_pool_spec.rb[1:6:8] | passed | 0.48274 seconds |
|
|
41
|
+
./spec/lean_pool/http_pool_spec.rb[1:6:9] | passed | 0.48734 seconds |
|
|
42
|
+
./spec/lean_pool/http_pool_spec.rb[1:6:10] | passed | 0.53447 seconds |
|
|
43
|
+
./spec/lean_pool/http_pool_spec.rb[1:6:11] | passed | 2.76 seconds |
|
|
44
|
+
./spec/lean_pool/http_pool_spec.rb[1:6:12] | passed | 0.58104 seconds |
|
|
45
|
+
./spec/lean_pool/http_pool_spec.rb[1:6:13] | passed | 1.2 seconds |
|
|
46
|
+
./spec/lean_pool/http_pool_spec.rb[1:6:14] | passed | 0.49333 seconds |
|
|
47
|
+
./spec/lean_pool/http_pool_spec.rb[1:6:15] | passed | 0.83684 seconds |
|
|
48
|
+
./spec/lean_pool/http_pool_spec.rb[1:6:16] | passed | 0.60123 seconds |
|
|
49
|
+
./spec/lean_pool/http_pool_spec.rb[1:6:17] | passed | 0.68758 seconds |
|
|
50
|
+
./spec/lean_pool/http_pool_spec.rb[1:6:18] | passed | 0.50677 seconds |
|
|
51
|
+
./spec/lean_pool/http_pool_spec.rb[1:6:19] | passed | 0.56878 seconds |
|
|
52
|
+
./spec/lean_pool/http_pool_spec.rb[1:6:20] | passed | 2.48 seconds |
|
|
53
|
+
./spec/lean_pool/http_pool_spec.rb[1:6:21] | passed | 0.00048 seconds |
|
|
54
|
+
./spec/lean_pool/http_pool_spec.rb[1:6:22] | passed | 0.00033 seconds |
|
|
55
|
+
./spec/lean_pool/http_pool_spec.rb[1:6:23] | passed | 0.00022 seconds |
|
|
56
|
+
./spec/lean_pool/http_pool_spec.rb[1:6:24] | passed | 0.0002 seconds |
|
|
57
|
+
./spec/lean_pool/http_pool_spec.rb[1:6:25] | passed | 0.00023 seconds |
|
|
58
|
+
./spec/lean_pool/http_pool_spec.rb[1:7:1] | passed | 2.82 seconds |
|
|
59
|
+
./spec/lean_pool/http_pool_spec.rb[1:7:2] | failed | 0.00064 seconds |
|
|
60
|
+
./spec/lean_pool/http_pool_spec.rb[1:7:3] | passed | 1.11 seconds |
|
|
61
|
+
./spec/lean_pool/integration_spec.rb[1:1:1] | passed | 0.00119 seconds |
|
|
62
|
+
./spec/lean_pool/integration_spec.rb[1:1:2] | passed | 0.00105 seconds |
|
|
63
|
+
./spec/lean_pool/integration_spec.rb[1:1:3] | passed | 0.11958 seconds |
|
|
64
|
+
./spec/lean_pool/integration_spec.rb[1:1:4] | passed | 0.00136 seconds |
|
|
65
|
+
./spec/lean_pool/integration_spec.rb[1:1:5] | passed | 0.00116 seconds |
|
|
66
|
+
./spec/lean_pool/integration_spec.rb[1:1:6] | passed | 1 second |
|
|
67
|
+
./spec/lean_pool/integration_spec.rb[1:2:1] | passed | 0.03494 seconds |
|
|
68
|
+
./spec/lean_pool/integration_spec.rb[1:2:2] | passed | 0.00011 seconds |
|
|
69
|
+
./spec/lean_pool/integration_spec.rb[1:2:3] | passed | 0.0001 seconds |
|
|
70
|
+
./spec/lean_pool/integration_spec.rb[1:3:1] | passed | 0.12266 seconds |
|
|
71
|
+
./spec/lean_pool/integration_spec.rb[1:3:2] | passed | 0.00146 seconds |
|
|
72
|
+
./spec/lean_pool/integration_spec.rb[1:3:3] | passed | 0.05228 seconds |
|
|
73
|
+
./spec/lean_pool/integration_spec.rb[1:3:4] | passed | 0.01409 seconds |
|
|
74
|
+
./spec/lean_pool/integration_spec.rb[1:3:5] | passed | 0.00379 seconds |
|
|
75
|
+
./spec/lean_pool/integration_spec.rb[1:3:6] | passed | 0.25101 seconds |
|
|
76
|
+
./spec/lean_pool/integration_spec.rb[1:3:7] | passed | 0.00067 seconds |
|
|
77
|
+
./spec/lean_pool/integration_spec.rb[1:4:1] | passed | 0.00098 seconds |
|
|
78
|
+
./spec/lean_pool/integration_spec.rb[1:4:2] | passed | 0.00114 seconds |
|
|
79
|
+
./spec/lean_pool/integration_spec.rb[1:4:3] | passed | 0.0005 seconds |
|
|
80
|
+
./spec/lean_pool/integration_spec.rb[1:4:4] | failed | 0.00076 seconds |
|
|
81
|
+
./spec/lean_pool/integration_spec.rb[1:4:5] | passed | 0.00083 seconds |
|
|
82
|
+
./spec/lean_pool/integration_spec.rb[1:5:1] | passed | 0.16345 seconds |
|
|
83
|
+
./spec/lean_pool/integration_spec.rb[1:5:2] | passed | 0.00499 seconds |
|
|
84
|
+
./spec/lean_pool/integration_spec.rb[1:5:3] | passed | 0.50016 seconds |
|
|
85
|
+
./spec/lean_pool/integration_spec.rb[1:5:4] | passed | 0.09268 seconds |
|
|
86
|
+
./spec/lean_pool/integration_spec.rb[1:6:1] | passed | 0.5324 seconds |
|
|
87
|
+
./spec/lean_pool/integration_spec.rb[1:6:2] | passed | 0.01655 seconds |
|
|
88
|
+
./spec/lean_pool/integration_spec.rb[1:6:3] | failed | 5.11 seconds |
|
|
89
|
+
./spec/lean_pool/integration_spec.rb[1:6:4] | passed | 5.09 seconds |
|
|
90
|
+
./spec/lean_pool/pool_spec.rb[1:1:1] | passed | 0.00039 seconds |
|
|
91
|
+
./spec/lean_pool/pool_spec.rb[1:1:2] | passed | 0.00037 seconds |
|
|
92
|
+
./spec/lean_pool/pool_spec.rb[1:1:3] | passed | 0.00021 seconds |
|
|
93
|
+
./spec/lean_pool/pool_spec.rb[1:1:4] | passed | 0.00034 seconds |
|
|
94
|
+
./spec/lean_pool/pool_spec.rb[1:1:5] | passed | 0.00016 seconds |
|
|
95
|
+
./spec/lean_pool/pool_spec.rb[1:1:6] | passed | 0.00016 seconds |
|
|
96
|
+
./spec/lean_pool/pool_spec.rb[1:1:7] | passed | 0.00031 seconds |
|
|
97
|
+
./spec/lean_pool/pool_spec.rb[1:2:1] | passed | 0.0004 seconds |
|
|
98
|
+
./spec/lean_pool/pool_spec.rb[1:2:2] | passed | 0.00026 seconds |
|
|
99
|
+
./spec/lean_pool/pool_spec.rb[1:2:3] | failed | 0.00849 seconds |
|
|
100
|
+
./spec/lean_pool/pool_spec.rb[1:2:4] | passed | 0.00031 seconds |
|
|
101
|
+
./spec/lean_pool/pool_spec.rb[1:2:5] | passed | 0.0002 seconds |
|
|
102
|
+
./spec/lean_pool/pool_spec.rb[1:2:6] | passed | 0.0002 seconds |
|
|
103
|
+
./spec/lean_pool/pool_spec.rb[1:3:1] | passed | 0.06102 seconds |
|
|
104
|
+
./spec/lean_pool/pool_spec.rb[1:3:2] | passed | 0.06746 seconds |
|
|
105
|
+
./spec/lean_pool/pool_spec.rb[1:3:3] | passed | 0.21578 seconds |
|
|
106
|
+
./spec/lean_pool/pool_spec.rb[1:3:4] | passed | 0.00223 seconds |
|
|
107
|
+
./spec/lean_pool/pool_spec.rb[1:4:1] | passed | 1 second |
|
|
108
|
+
./spec/lean_pool/pool_spec.rb[1:4:2] | passed | 1 second |
|
|
109
|
+
./spec/lean_pool/pool_spec.rb[1:4:3] | passed | 0.20984 seconds |
|
|
110
|
+
./spec/lean_pool/pool_spec.rb[1:5:1] | passed | 0.00024 seconds |
|
|
111
|
+
./spec/lean_pool/pool_spec.rb[1:5:2] | passed | 0.00013 seconds |
|
|
112
|
+
./spec/lean_pool/pool_spec.rb[1:5:3] | passed | 0.00028 seconds |
|
|
113
|
+
./spec/lean_pool/pool_spec.rb[1:5:4] | passed | 0.00037 seconds |
|
|
114
|
+
./spec/lean_pool/pool_spec.rb[1:6:1] | passed | 0.00018 seconds |
|
|
115
|
+
./spec/lean_pool/pool_spec.rb[1:6:2] | passed | 0.00013 seconds |
|
|
116
|
+
./spec/lean_pool/pool_spec.rb[1:6:3] | passed | 0.20562 seconds |
|
|
117
|
+
./spec/lean_pool/pool_spec.rb[1:6:4] | passed | 0.00037 seconds |
|
|
118
|
+
./spec/lean_pool/pool_spec.rb[1:7:1] | passed | 0.00029 seconds |
|
|
119
|
+
./spec/lean_pool/pool_spec.rb[1:7:2] | passed | 5.09 seconds |
|
|
120
|
+
./spec/lean_pool/pool_spec.rb[1:7:3] | passed | 0.00041 seconds |
|
|
121
|
+
./spec/lean_pool/pool_spec.rb[1:7:4] | passed | 0.00024 seconds |
|
|
122
|
+
./spec/lean_pool/pool_spec.rb[1:8:1] | passed | 0.00059 seconds |
|
|
123
|
+
./spec/lean_pool/pool_spec.rb[1:8:2] | passed | 0.00034 seconds |
|
|
124
|
+
./spec/lean_pool/pool_spec.rb[1:9:1] | passed | 0.00047 seconds |
|
|
125
|
+
./spec/lean_pool/pool_spec.rb[1:9:2] | passed | 0.00046 seconds |
|
|
126
|
+
./spec/lean_pool/pool_spec.rb[1:10:1] | passed | 0.00139 seconds |
|
|
127
|
+
./spec/lean_pool/pool_spec.rb[1:10:2] | passed | 0.00054 seconds |
|
|
128
|
+
./spec/lean_pool/pool_spec.rb[1:10:3] | passed | 0.07132 seconds |
|
|
129
|
+
./spec/lean_pool/pool_spec.rb[1:11:1] | passed | 0.01976 seconds |
|
|
130
|
+
./spec/lean_pool/pool_spec.rb[1:11:2] | passed | 0.00161 seconds |
|
|
131
|
+
./spec/lean_pool/pool_spec.rb[1:12:1] | passed | 0.00019 seconds |
|
|
132
|
+
./spec/lean_pool/pool_spec.rb[1:12:2] | failed | 0.00033 seconds |
|
|
133
|
+
./spec/lean_pool/pool_spec.rb[1:12:3] | passed | 0.10557 seconds |
|
|
134
|
+
./spec/lean_pool/pool_spec.rb[1:12:4] | passed | 0.05285 seconds |
|
|
135
|
+
./spec/lean_pool/pool_spec.rb[1:12:5] | passed | 0.00056 seconds |
|
|
136
|
+
./spec/lean_pool/pool_spec.rb[1:12:6] | passed | 0.0002 seconds |
|
|
137
|
+
./spec/lean_pool/pool_spec.rb[1:12:7] | failed | 5.01 seconds |
|
|
138
|
+
./spec/lean_pool/pool_spec.rb[1:12:8] | passed | 0.00082 seconds |
|
|
139
|
+
./spec/lean_pool/pool_spec.rb[1:12:9] | passed | 0.00038 seconds |
|
|
140
|
+
./spec/lean_pool/pool_spec.rb[1:12:10] | passed | 0.00031 seconds |
|
|
141
|
+
./spec/lean_pool/pool_spec.rb[1:12:11] | failed | 0.00053 seconds |
|
|
142
|
+
./spec/lean_pool/pool_spec.rb[1:12:12] | passed | 0.00064 seconds |
|
|
143
|
+
./spec/lean_pool/pool_spec.rb[1:12:13] | passed | 5.11 seconds |
|
|
144
|
+
./spec/lean_pool/pool_spec.rb[1:12:14] | passed | 0.00071 seconds |
|
|
145
|
+
./spec/lean_pool/pool_spec.rb[1:12:15] | passed | 0.00034 seconds |
|
|
146
|
+
./spec/lean_pool/pool_spec.rb[1:12:16] | passed | 1.01 seconds |
|
|
147
|
+
./spec/lean_pool/pool_spec.rb[1:13:1] | passed | 0.0018 seconds |
|
|
148
|
+
./spec/lean_pool/pool_spec.rb[1:13:2] | failed | 0.00031 seconds |
|
|
149
|
+
./spec/lean_pool/pool_spec.rb[1:13:3] | passed | 0.00055 seconds |
|
|
150
|
+
./spec/lean_pool/pool_spec.rb[1:13:4] | passed | 0.10572 seconds |
|
|
151
|
+
./spec/lean_pool/pool_spec.rb[1:14:1] | passed | 0.26712 seconds |
|
|
152
|
+
./spec/lean_pool/pool_spec.rb[1:14:2] | passed | 0.32881 seconds |
|
|
153
|
+
./spec/lean_pool/pool_spec.rb[1:14:3] | passed | 0.02756 seconds |
|
|
154
|
+
./spec/lean_pool/pool_spec.rb[1:14:4] | failed | 5.12 seconds |
|
|
155
|
+
./spec/lean_pool/pool_spec.rb[1:14:5] | passed | 0.09881 seconds |
|
|
156
|
+
./spec/lean_pool/pool_spec.rb[1:15:1] | passed | 0.00644 seconds |
|
|
157
|
+
./spec/lean_pool/pool_spec.rb[1:15:2] | passed | 0.01415 seconds |
|
|
158
|
+
./spec/lean_pool/pool_spec.rb[1:15:3] | passed | 0.00026 seconds |
|
|
159
|
+
./spec/lean_pool/pool_spec.rb[1:15:4] | passed | 0.00218 seconds |
|
|
160
|
+
./spec/lean_pool/pool_spec.rb[1:15:5] | passed | 0.00022 seconds |
|
|
161
|
+
./spec/lean_pool/pool_spec.rb[1:15:6] | passed | 0.00056 seconds |
|
|
162
|
+
./spec/lean_pool/pool_spec.rb[1:16:1] | passed | 0.1077 seconds |
|
|
163
|
+
./spec/lean_pool/pool_spec.rb[1:16:2] | passed | 0.0177 seconds |
|
|
164
|
+
./spec/lean_pool/pool_spec.rb[1:16:3] | passed | 0.00025 seconds |
|
|
165
|
+
./spec/lean_pool/pool_spec.rb[1:17:1] | failed | 0.0007 seconds |
|
|
166
|
+
./spec/lean_pool/pool_spec.rb[1:17:2] | passed | 0.00024 seconds |
|
|
167
|
+
./spec/lean_pool/pool_spec.rb[1:17:3] | passed | 0.00037 seconds |
|
|
168
|
+
./spec/lean_pool/pool_spec.rb[1:18:1] | passed | 0.00044 seconds |
|
|
169
|
+
./spec/lean_pool/pool_spec.rb[1:18:2] | passed | 0.0011 seconds |
|
|
170
|
+
./spec/lean_pool/pool_spec.rb[1:18:3] | passed | 0.00051 seconds |
|
|
171
|
+
./spec/lean_pool/pool_spec.rb[1:19:1] | passed | 0.20385 seconds |
|
|
172
|
+
./spec/lean_pool/pool_spec.rb[1:19:2] | passed | 0.10197 seconds |
|
|
173
|
+
./spec/lean_pool/version_spec.rb[1:1] | passed | 0.00029 seconds |
|
|
174
|
+
./spec/lean_pool/version_spec.rb[1:2] | passed | 0.00017 seconds |
|
|
175
|
+
./spec/lean_pool/version_spec.rb[1:3] | passed | 0.00172 seconds |
|
|
176
|
+
./spec/lean_pool/version_spec.rb[1:4] | passed | 0.00019 seconds |
|
|
177
|
+
./spec/lean_pool/version_spec.rb[1:5] | passed | 0.00012 seconds |
|
|
178
|
+
./spec/lean_pool/version_spec.rb[1:6] | passed | 0.00012 seconds |
|
|
179
|
+
./spec/lean_pool/version_spec.rb[1:7] | passed | 0.00018 seconds |
|
|
180
|
+
./spec/lean_pool/version_spec.rb[1:8] | passed | 0.00015 seconds |
|
|
181
|
+
./spec/lean_pool/version_spec.rb[1:9] | passed | 0.00022 seconds |
|
|
182
|
+
./spec/lean_pool_spec.rb[1:1] | passed | 0.00017 seconds |
|
|
183
|
+
./spec/lean_pool_spec.rb[1:2] | passed | 0.0002 seconds |
|
|
184
|
+
./spec/lean_pool_spec.rb[1:3:1] | passed | 0.0003 seconds |
|
|
185
|
+
./spec/lean_pool_spec.rb[1:3:2] | passed | 0.00024 seconds |
|
|
186
|
+
./spec/lean_pool_spec.rb[1:3:3] | passed | 0.00019 seconds |
|
|
187
|
+
./spec/lean_pool_spec.rb[1:3:4] | passed | 0.00216 seconds |
|
|
188
|
+
./spec/lean_pool_spec.rb[1:3:5] | passed | 0.0003 seconds |
|
|
189
|
+
./spec/lean_pool_spec.rb[1:4:1] | passed | 0.0002 seconds |
|
|
190
|
+
./spec/lean_pool_spec.rb[1:4:2] | passed | 0.00015 seconds |
|
|
191
|
+
./spec/lean_pool_spec.rb[1:4:3] | passed | 0.00019 seconds |
|
|
192
|
+
./spec/lean_pool_spec.rb[1:4:4] | passed | 0.0001 seconds |
|
|
193
|
+
./spec/lean_pool_spec.rb[1:4:5] | passed | 0.0001 seconds |
|
|
194
|
+
./spec/lean_pool_spec.rb[1:5:1] | passed | 0.00013 seconds |
|
|
195
|
+
./spec/lean_pool_spec.rb[1:5:2] | passed | 0.00043 seconds |
|
data/.rubocop.yml
ADDED
data/CHANGELOG.md
ADDED
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
# Changelog
|
|
2
|
+
|
|
3
|
+
All notable changes to this project will be documented in this file.
|
|
4
|
+
|
|
5
|
+
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
|
|
6
|
+
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
|
7
|
+
|
|
8
|
+
## [0.1.0] - 2026-01-25
|
|
9
|
+
|
|
10
|
+
### Added
|
|
11
|
+
- Initial release of LeanPool
|
|
12
|
+
- Core pooling functionality with `LeanPool::Pool`
|
|
13
|
+
- Thread-safe resource management using `concurrent-ruby`
|
|
14
|
+
- Lazy and eager resource initialization
|
|
15
|
+
- Pool statistics and monitoring
|
|
16
|
+
- Shutdown and reload functionality
|
|
17
|
+
- HTTP connection pool example (`LeanPool::HTTPPool`)
|
|
18
|
+
- Comprehensive error handling
|
|
19
|
+
- Full test suite
|
data/Gemfile
ADDED
data/LICENSE.txt
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
data/PUBLISH.md
ADDED
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
# Publishing LeanPool Gem
|
|
2
|
+
|
|
3
|
+
## Prerequisites
|
|
4
|
+
|
|
5
|
+
1. RubyGems account - Sign up at https://rubygems.org/sign_up
|
|
6
|
+
2. API key from RubyGems (for publishing)
|
|
7
|
+
|
|
8
|
+
## Steps to Publish
|
|
9
|
+
|
|
10
|
+
### 1. Build the Gem
|
|
11
|
+
|
|
12
|
+
```bash
|
|
13
|
+
gem build lean_pool.gemspec
|
|
14
|
+
```
|
|
15
|
+
|
|
16
|
+
This will create `lean_pool-0.1.0.gem`
|
|
17
|
+
|
|
18
|
+
### 2. Check the Gem
|
|
19
|
+
|
|
20
|
+
```bash
|
|
21
|
+
gem install ./lean_pool-0.1.0.gem
|
|
22
|
+
```
|
|
23
|
+
|
|
24
|
+
### 3. Publish to RubyGems
|
|
25
|
+
|
|
26
|
+
```bash
|
|
27
|
+
# First time - add your credentials
|
|
28
|
+
gem signin
|
|
29
|
+
|
|
30
|
+
# Or use API key
|
|
31
|
+
gem push lean_pool-0.1.0.gem --key YOUR_API_KEY
|
|
32
|
+
```
|
|
33
|
+
|
|
34
|
+
### 4. Verify Publication
|
|
35
|
+
|
|
36
|
+
Visit: https://rubygems.org/gems/lean_pool
|
|
37
|
+
|
|
38
|
+
### 5. Install from RubyGems
|
|
39
|
+
|
|
40
|
+
After publishing, anyone can install with:
|
|
41
|
+
|
|
42
|
+
```bash
|
|
43
|
+
gem install lean_pool
|
|
44
|
+
```
|
|
45
|
+
|
|
46
|
+
Or add to Gemfile:
|
|
47
|
+
|
|
48
|
+
```ruby
|
|
49
|
+
gem 'lean_pool'
|
|
50
|
+
```
|
|
51
|
+
|
|
52
|
+
## Updating the Gem
|
|
53
|
+
|
|
54
|
+
For future versions:
|
|
55
|
+
|
|
56
|
+
1. Update version in `lib/lean_pool/version.rb`
|
|
57
|
+
2. Update CHANGELOG.md
|
|
58
|
+
3. Build: `gem build lean_pool.gemspec`
|
|
59
|
+
4. Push: `gem push lean_pool-X.Y.Z.gem`
|
|
60
|
+
|
|
61
|
+
## Notes
|
|
62
|
+
|
|
63
|
+
- The gem will be publicly available after publishing
|
|
64
|
+
- Badges in README will start working after the gem is published
|
|
65
|
+
- Make sure all tests pass before publishing
|
|
66
|
+
- Consider adding a release tag in git after publishing
|
data/QUICKSTART.md
ADDED
|
@@ -0,0 +1,88 @@
|
|
|
1
|
+
# LeanPool Quick Start Guide
|
|
2
|
+
|
|
3
|
+
## Installation
|
|
4
|
+
|
|
5
|
+
```bash
|
|
6
|
+
gem install lean_pool
|
|
7
|
+
# or add to Gemfile: gem 'lean_pool'
|
|
8
|
+
```
|
|
9
|
+
|
|
10
|
+
## Basic Usage
|
|
11
|
+
|
|
12
|
+
```ruby
|
|
13
|
+
require 'lean_pool'
|
|
14
|
+
|
|
15
|
+
# Create a pool
|
|
16
|
+
pool = LeanPool::Pool.new(size: 5) do
|
|
17
|
+
# Initialize your resource here
|
|
18
|
+
MyResource.new
|
|
19
|
+
end
|
|
20
|
+
|
|
21
|
+
# Use the pool
|
|
22
|
+
pool.checkout do |resource|
|
|
23
|
+
resource.do_something
|
|
24
|
+
end
|
|
25
|
+
```
|
|
26
|
+
|
|
27
|
+
## Real-World Examples
|
|
28
|
+
|
|
29
|
+
### Redis Connection Pool
|
|
30
|
+
|
|
31
|
+
```ruby
|
|
32
|
+
require 'redis'
|
|
33
|
+
require 'lean_pool'
|
|
34
|
+
|
|
35
|
+
redis_pool = LeanPool::Pool.new(size: 10) do
|
|
36
|
+
Redis.new(host: "localhost", port: 6379)
|
|
37
|
+
end
|
|
38
|
+
|
|
39
|
+
redis_pool.checkout do |redis|
|
|
40
|
+
redis.get("key")
|
|
41
|
+
redis.set("key", "value")
|
|
42
|
+
end
|
|
43
|
+
```
|
|
44
|
+
|
|
45
|
+
### HTTP Connection Pool
|
|
46
|
+
|
|
47
|
+
```ruby
|
|
48
|
+
require 'lean_pool'
|
|
49
|
+
|
|
50
|
+
http_pool = LeanPool::HTTPPool.new("api.example.com", 443, size: 10)
|
|
51
|
+
|
|
52
|
+
response = http_pool.get("/users")
|
|
53
|
+
puts response[:body]
|
|
54
|
+
|
|
55
|
+
# Check pool stats
|
|
56
|
+
puts http_pool.stats
|
|
57
|
+
```
|
|
58
|
+
|
|
59
|
+
### Database Connection Pool
|
|
60
|
+
|
|
61
|
+
```ruby
|
|
62
|
+
require 'lean_pool'
|
|
63
|
+
|
|
64
|
+
db_pool = LeanPool::Pool.new(
|
|
65
|
+
size: 20,
|
|
66
|
+
pool_state: { database: "production" }
|
|
67
|
+
) do |state|
|
|
68
|
+
DatabaseConnection.new(database: state[:database])
|
|
69
|
+
end
|
|
70
|
+
|
|
71
|
+
db_pool.checkout do |db|
|
|
72
|
+
db.query("SELECT * FROM users")
|
|
73
|
+
end
|
|
74
|
+
```
|
|
75
|
+
|
|
76
|
+
## Key Features
|
|
77
|
+
|
|
78
|
+
- ✅ Thread-safe resource pooling
|
|
79
|
+
- ✅ Zero overhead (no data copying)
|
|
80
|
+
- ✅ Lazy initialization
|
|
81
|
+
- ✅ Automatic resource cleanup
|
|
82
|
+
- ✅ Pool statistics and monitoring
|
|
83
|
+
|
|
84
|
+
## Next Steps
|
|
85
|
+
|
|
86
|
+
- Read the full [README.md](README.md) for detailed documentation
|
|
87
|
+
- Check out [examples/basic_usage.rb](examples/basic_usage.rb)
|
|
88
|
+
- Run tests: `bundle exec rspec`
|