mini_sql 0.2.3 → 1.0.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 12406a36df764fd0c71ddb38a845d59099665dd081e0c6f6e125d396d7ec20de
4
- data.tar.gz: 738d7ce83ff247695d8f4270f5c31f347d3c2e9af807449004b41cde03a33ec4
3
+ metadata.gz: 78a25d1d6af83ae3c2f74f85c4a920a2a1019324ce8904bf3feda15b4ee486df
4
+ data.tar.gz: 5d686631612a51a4134cf964c40bb41a883e19fa9847498668eca9f03e2f9816
5
5
  SHA512:
6
- metadata.gz: 1e510becc31ccd32edd41dc54d0ce4f85d38a47d4e3503e017edc5068bcd346e2912eaba290120c43686c4d6f06c2860fe7bf9e7a2d9c9a695d6c560e395f66c
7
- data.tar.gz: 1bf82c5f43bda47ba1cdb8bfb9e72360e7c1ce70d65c38de6f851cfaad901d46b3e7dae2fce2e584d46601d5c1f72fed078e689452ad87574948ee6b1e556ae5
6
+ metadata.gz: 2c862314017d5be1cfe429b1632ae350d3f123ef7312506437eec04f9023e309dbdb7c366eb6afe88d65d4137accd43627856ae823bc11707a51c358219a19ed
7
+ data.tar.gz: 6e3ac51e042bdbaff790a272c8e9207512d436493b005a4fe268128204125e44c3a955eef9ae38a3db2e07f207f86ee4dedbaa59145f0257055347581434b79f
@@ -0,0 +1,66 @@
1
+ name: Mini SQL Tests
2
+
3
+ on:
4
+ pull_request:
5
+ push:
6
+ branches:
7
+ - master
8
+
9
+ env:
10
+ PGHOST: localhost
11
+ PGPORT: 5432
12
+ PGPASSWORD: postgres
13
+ PGUSER: postgres
14
+ MINI_SQL_MYSQL_HOST: 127.0.0.1
15
+ MINI_SQL_MYSQL_PORT: 3306
16
+ MINI_SQL_MYSQL_PASSWORD: mysql
17
+ jobs:
18
+ build:
19
+ runs-on: ubuntu-latest
20
+ name: Ruby ${{ matrix.ruby }}
21
+ services:
22
+ postgres:
23
+ image: postgres:9.6
24
+ env:
25
+ POSTGRES_PASSWORD: postgres
26
+ ports:
27
+ - 5432:5432
28
+ options: --health-cmd pg_isready --health-interval 10s --health-timeout 5s --health-retries 5
29
+ mysql:
30
+ image: mysql:5.7
31
+ env:
32
+ MYSQL_ROOT_PASSWORD: mysql
33
+ ports:
34
+ - 3306:3306
35
+ options: --health-cmd="mysqladmin ping" --health-interval=10s --health-timeout=5s --health-retries=3
36
+ strategy:
37
+ matrix:
38
+ ruby: ["2.7", "2.6", "2.5"]
39
+ experimental: [false]
40
+ include:
41
+ - ruby: ruby-head
42
+ experimental: true
43
+ steps:
44
+ - uses: actions/checkout@v2
45
+ - uses: ruby/setup-ruby@v1
46
+ with:
47
+ ruby-version: ${{ matrix.ruby }}
48
+ - name: Bundler cache
49
+ uses: actions/cache@v2
50
+ with:
51
+ path: vendor/bundle
52
+ key: ${{ runner.os }}-${{ matrix.ruby }}-gems-${{ hashFiles('**/Gemfile.lock') }}
53
+ restore-keys: |
54
+ ${{ runner.os }}-${{ matrix.ruby }}-gems-
55
+ - name: Create Databases
56
+ run: |
57
+ createdb test_mini_sql
58
+ mysql --host=127.0.0.1 --port=3306 --user=root --password=mysql -e 'CREATE DATABASE test_mini_sql'
59
+ - name: Setup gems
60
+ run: |
61
+ bundle config path vendor/bundle
62
+ bundle install --jobs 4
63
+ - name: Tests
64
+ run: bundle exec rake test
65
+ - name: Rubocop
66
+ run: bundle exec rubocop
@@ -0,0 +1,355 @@
1
+ require:
2
+ - rubocop-discourse
3
+ - rubocop-rspec
4
+
5
+ AllCops:
6
+ TargetRubyVersion: 2.6
7
+ DisabledByDefault: true
8
+ Exclude:
9
+ - "db/schema.rb"
10
+ - "bundle/**/*"
11
+ - "vendor/**/*"
12
+ - "node_modules/**/*"
13
+ - "public/**/*"
14
+ - "plugins/**/gems/**/*"
15
+
16
+ Discourse:
17
+ Enabled: true
18
+
19
+ Discourse/NoChdir:
20
+ Exclude:
21
+ - 'spec/**/*' # Specs are run sequentially, so chdir can be used
22
+ - 'plugins/*/spec/**/*'
23
+
24
+ # Prefer &&/|| over and/or.
25
+ Style/AndOr:
26
+ Enabled: true
27
+
28
+ Style/FrozenStringLiteralComment:
29
+ Enabled: true
30
+
31
+ # Align `when` with `case`.
32
+ Layout/CaseIndentation:
33
+ Enabled: true
34
+
35
+ # Align comments with method definitions.
36
+ Layout/CommentIndentation:
37
+ Enabled: true
38
+
39
+ # No extra empty lines.
40
+ Layout/EmptyLines:
41
+ Enabled: true
42
+
43
+ # Use Ruby >= 1.9 syntax for hashes. Prefer { a: :b } over { :a => :b }.
44
+ Style/HashSyntax:
45
+ Enabled: true
46
+
47
+ # Two spaces, no tabs (for indentation).
48
+ Layout/IndentationWidth:
49
+ Enabled: true
50
+
51
+ Layout/SpaceAfterColon:
52
+ Enabled: true
53
+
54
+ Layout/SpaceAfterComma:
55
+ Enabled: true
56
+
57
+ Layout/SpaceAroundEqualsInParameterDefault:
58
+ Enabled: true
59
+
60
+ Layout/SpaceAroundKeyword:
61
+ Enabled: true
62
+
63
+ Layout/SpaceAroundOperators:
64
+ Enabled: true
65
+
66
+ Layout/SpaceBeforeFirstArg:
67
+ Enabled: true
68
+
69
+ # Defining a method with parameters needs parentheses.
70
+ Style/MethodDefParentheses:
71
+ Enabled: true
72
+
73
+ # Use `foo {}` not `foo{}`.
74
+ Layout/SpaceBeforeBlockBraces:
75
+ Enabled: true
76
+
77
+ # Use `foo { bar }` not `foo {bar}`.
78
+ Layout/SpaceInsideBlockBraces:
79
+ Enabled: true
80
+
81
+ # Use `{ a: 1 }` not `{a:1}`.
82
+ Layout/SpaceInsideHashLiteralBraces:
83
+ Enabled: true
84
+
85
+ Layout/SpaceInsideParens:
86
+ Enabled: true
87
+
88
+ # Detect hard tabs, no hard tabs.
89
+ Layout/Tab:
90
+ Enabled: true
91
+
92
+ # Blank lines should not have any spaces.
93
+ Layout/TrailingEmptyLines:
94
+ Enabled: true
95
+
96
+ # No trailing whitespace.
97
+ Layout/TrailingWhitespace:
98
+ Enabled: true
99
+
100
+ Lint/Debugger:
101
+ Enabled: true
102
+
103
+ Layout/BlockAlignment:
104
+ Enabled: true
105
+
106
+ # Align `end` with the matching keyword or starting expression except for
107
+ # assignments, where it should be aligned with the LHS.
108
+ Layout/EndAlignment:
109
+ Enabled: true
110
+ EnforcedStyleAlignWith: variable
111
+
112
+ # Use my_method(my_arg) not my_method( my_arg ) or my_method my_arg.
113
+ Lint/RequireParentheses:
114
+ Enabled: true
115
+
116
+ Lint/ShadowingOuterLocalVariable:
117
+ Enabled: true
118
+
119
+ Layout/MultilineMethodCallIndentation:
120
+ Enabled: true
121
+ EnforcedStyle: indented
122
+
123
+ Layout/HashAlignment:
124
+ Enabled: true
125
+
126
+ Bundler/OrderedGems:
127
+ Enabled: false
128
+
129
+ Style/SingleLineMethods:
130
+ Enabled: true
131
+
132
+ Style/Semicolon:
133
+ Enabled: true
134
+ AllowAsExpressionSeparator: true
135
+
136
+ Style/RedundantReturn:
137
+ Enabled: true
138
+
139
+ Style/GlobalVars:
140
+ Enabled: true
141
+ Severity: warning
142
+ Exclude:
143
+ - 'lib/tasks/**/*'
144
+ - 'script/**/*'
145
+ - 'spec/**/*.rb'
146
+ - 'plugins/*/spec/**/*'
147
+
148
+ # Specs
149
+
150
+ RSpec/AnyInstance:
151
+ Enabled: false # To be decided
152
+
153
+ RSpec/AroundBlock:
154
+ Enabled: true
155
+
156
+ RSpec/BeforeAfterAll:
157
+ Enabled: false # To be decided
158
+
159
+ RSpec/ContextMethod:
160
+ Enabled: false # TODO
161
+
162
+ RSpec/ContextWording:
163
+ Enabled: false # To be decided
164
+
165
+ RSpec/DescribeClass:
166
+ Enabled: false # To be decided
167
+
168
+ RSpec/DescribeMethod:
169
+ Enabled: true
170
+
171
+ RSpec/DescribeSymbol:
172
+ Enabled: false # To be decided
173
+
174
+ RSpec/DescribedClass:
175
+ Enabled: false # To be decided
176
+
177
+ RSpec/DescribedClassModuleWrapping:
178
+ Enabled: false # To be decided
179
+
180
+ RSpec/EmptyExampleGroup:
181
+ Enabled: true
182
+
183
+ RSpec/EmptyLineAfterExample:
184
+ Enabled: false # TODO
185
+
186
+ RSpec/EmptyLineAfterExampleGroup:
187
+ Enabled: false # TODO
188
+
189
+ RSpec/EmptyLineAfterFinalLet:
190
+ Enabled: false # TODO
191
+
192
+ RSpec/EmptyLineAfterHook:
193
+ Enabled: false # TODO
194
+
195
+ RSpec/EmptyLineAfterSubject:
196
+ Enabled: false # TODO
197
+
198
+ RSpec/ExampleLength:
199
+ Enabled: false # To be decided
200
+
201
+ RSpec/ExampleWithoutDescription:
202
+ Enabled: true
203
+
204
+ RSpec/ExampleWording:
205
+ Enabled: false # TODO
206
+
207
+ RSpec/ExpectActual:
208
+ Enabled: true
209
+
210
+ RSpec/ExpectChange:
211
+ Enabled: false # To be decided
212
+
213
+ RSpec/ExpectInHook:
214
+ Enabled: false # To be decided
215
+
216
+ RSpec/ExpectOutput:
217
+ Enabled: true
218
+
219
+ RSpec/FilePath:
220
+ Enabled: false # To be decided
221
+
222
+ RSpec/Focus:
223
+ Enabled: true
224
+
225
+ RSpec/HookArgument:
226
+ Enabled: false # TODO
227
+
228
+ RSpec/HooksBeforeExamples:
229
+ Enabled: false # TODO
230
+
231
+ RSpec/ImplicitBlockExpectation:
232
+ Enabled: true
233
+
234
+ RSpec/ImplicitExpect:
235
+ Enabled: false # To be decided
236
+
237
+ RSpec/ImplicitSubject:
238
+ Enabled: false # To be decided
239
+
240
+ RSpec/InstanceSpy:
241
+ Enabled: true
242
+
243
+ RSpec/InstanceVariable:
244
+ Enabled: false # TODO
245
+
246
+ RSpec/InvalidPredicateMatcher:
247
+ Enabled: true
248
+
249
+ RSpec/ItBehavesLike:
250
+ Enabled: true
251
+
252
+ RSpec/IteratedExpectation:
253
+ Enabled: false # To be decided
254
+
255
+ RSpec/LeadingSubject:
256
+ Enabled: false # TODO
257
+
258
+ RSpec/LeakyConstantDeclaration:
259
+ Enabled: false # To be decided
260
+
261
+ RSpec/LetBeforeExamples:
262
+ Enabled: false # TODO
263
+
264
+ RSpec/LetSetup:
265
+ Enabled: false # TODO
266
+
267
+ RSpec/MessageChain:
268
+ Enabled: true
269
+
270
+ RSpec/MessageSpies:
271
+ Enabled: true
272
+
273
+ RSpec/MissingExampleGroupArgument:
274
+ Enabled: true
275
+
276
+ RSpec/MultipleDescribes:
277
+ Enabled: false # TODO
278
+
279
+ RSpec/MultipleSubjects:
280
+ Enabled: true
281
+
282
+ RSpec/NamedSubject:
283
+ Enabled: false # To be decided
284
+
285
+ RSpec/NestedGroups:
286
+ Enabled: false # To be decided
287
+
288
+ RSpec/OverwritingSetup:
289
+ Enabled: true
290
+
291
+ RSpec/ReceiveCounts:
292
+ Enabled: true
293
+
294
+ RSpec/ReceiveNever:
295
+ Enabled: true
296
+
297
+ RSpec/RepeatedDescription:
298
+ Enabled: false # TODO
299
+
300
+ RSpec/RepeatedExample:
301
+ Enabled: false # TODO
302
+
303
+ RSpec/RepeatedExampleGroupBody:
304
+ Enabled: false # TODO
305
+
306
+ RSpec/RepeatedExampleGroupDescription:
307
+ Enabled: false # TODO
308
+
309
+ RSpec/ReturnFromStub:
310
+ Enabled: true
311
+
312
+ RSpec/ScatteredSetup:
313
+ Enabled: false # TODO
314
+
315
+ RSpec/SharedContext:
316
+ Enabled: true
317
+
318
+ RSpec/SharedExamples:
319
+ Enabled: true
320
+
321
+ RSpec/SingleArgumentMessageChain:
322
+ Enabled: true
323
+
324
+ RSpec/SubjectStub:
325
+ Enabled: true
326
+
327
+ RSpec/UnspecifiedException:
328
+ Enabled: true
329
+
330
+ RSpec/VerifiedDoubles:
331
+ Enabled: true
332
+
333
+ RSpec/VoidExpect:
334
+ Enabled: true
335
+
336
+ RSpec/Yield:
337
+ Enabled: true
338
+
339
+ Capybara/CurrentPathExpectation:
340
+ Enabled: true
341
+
342
+ Capybara/FeatureMethods:
343
+ Enabled: true
344
+
345
+ FactoryBot/AttributeDefinedStatically:
346
+ Enabled: true
347
+
348
+ FactoryBot/CreateList:
349
+ Enabled: true
350
+
351
+ FactoryBot/FactoryClassName:
352
+ Enabled: true
353
+
354
+ Rails/HttpStatus:
355
+ Enabled: true
@@ -0,0 +1,8 @@
1
+ inherit_gem:
2
+ rubocop-discourse: default.yml
3
+ inherit_mode:
4
+ merge:
5
+ - Exclude
6
+ AllCops:
7
+ Exclude:
8
+ - 'bench/**/*'
data/CHANGELOG CHANGED
@@ -1,3 +1,25 @@
1
+ 2020-12-31 - 1.0.1
2
+
3
+ - FIX: revert perf fix broke param_encoder interface, we were expecting never to be called if no encoding was to happen
4
+
5
+ 2020-12-30 - 1.0
6
+
7
+ - Added serialization support using MiniSql::Serializer.to_json / .from_json
8
+ - Fixed minor issue with cache poisoning when using query_decorator
9
+ - Version 1.0 to reflect the stability of the interfaces and project, used in productions for almost 2 years now
10
+
11
+ 2020-06-25 - 0.3
12
+
13
+ - Added support for query_each and query_each_hash, which lazily queries rows and enables selecting large result sets by streaming
14
+
15
+ 2020-04-07 - 0.2.5
16
+
17
+ - Added support for custom type maps with Postgres connections
18
+
19
+ 2019-01-16 - 0.2.4
20
+
21
+ - Fixed symbol param encoder
22
+
1
23
  2019-12-20 - 0.2.3
2
24
 
3
25
  - Added support for MySQL