activerecord-postgresql-cursors 2.0.0 → 3.0.0

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
- SHA1:
3
- metadata.gz: 4664b822d630c82374f56ca318d69c736c9ad819
4
- data.tar.gz: 7318a45c89b1b76dcb8d79fecb6a499bac1a7a48
2
+ SHA256:
3
+ metadata.gz: 1ee21e5716e2fddbafa8c4cafe62aac495f148fb70b8702e10b7ca0290afea65
4
+ data.tar.gz: df8f8aac03fc30eaa30ab0832087ed47291f17b53eaa33162007373dff46cc44
5
5
  SHA512:
6
- metadata.gz: '053952a5bcc975b0bc7652e652d0f8029fda8a1dd470adbfc0a081d1095f0a0ec601ee4c633250930b16c7e089e8f175d4753d2580d3bb4c796f6f0ff67671b0'
7
- data.tar.gz: a67bb236338e87143a8d0827edbbb847371b132f9fbc7dae09c9b39ce5a02129ece6fa8b809b2b8ca4a9cd989994203935c79a1d0b73a4a705d7cfc5b07afdd3
6
+ metadata.gz: b371b634d1438b8962c04490fe671eec38f3ded200e682d3dceffb72d37eda65dda298c91893550eef605ec4bbdb0841a0e7682287c3885cc9176874ac005d7f
7
+ data.tar.gz: 41754e33789a147e5c44b9ba4a5787bcae0fe5dd8cb881f2d74d1b4f055d66482a31d63a7fdd35bbe21e32748404daaa7cf5688a83ed6de623da15555d3fddc1
@@ -0,0 +1,71 @@
1
+ ---
2
+ name: ActiveRecord PostgreSQL Cursors
3
+ 'on':
4
+ push:
5
+ branches:
6
+ - master
7
+ - github-actions
8
+ pull_request:
9
+ jobs:
10
+ tests:
11
+ runs-on: ubuntu-24.04
12
+ services:
13
+ postgres:
14
+ image: postgres:16
15
+ env:
16
+ POSTGRES_PASSWORD: password
17
+ options: "--health-cmd pg_isready --health-interval 10s --health-timeout 5s --health-retries 5"
18
+ ports:
19
+ - 5432:5432
20
+ strategy:
21
+ matrix:
22
+ ruby: [ '3.0', '3.1', '3.2', '3.3' ]
23
+ name: Ruby ${{ matrix.ruby }} tests
24
+ steps:
25
+ - name: Check out app
26
+ uses: actions/checkout@v4
27
+ with:
28
+ fetch-depth: 0
29
+ - name: Set up Ruby
30
+ uses: ruby/setup-ruby@v1
31
+ with:
32
+ ruby-version: ${{ matrix.ruby }}
33
+ - name: Bundle install
34
+ run: |-
35
+ gem update --system
36
+ bundle install --path=.bundle --jobs 2 --retry 3
37
+ - name: Set up database
38
+ env:
39
+ PGHOST: localhost
40
+ PGPORT: 5432
41
+ PGUSER: postgres
42
+ PGPASSWORD: password
43
+ run: |-
44
+ psql template1 -c "create user appuser with encrypted password 'password' superuser;"
45
+ createdb -O appuser postgresql_cursors_unit_tests
46
+ cp -f test/ci/github/* test/
47
+ - name: Run Tests
48
+ env:
49
+ COVERAGE: 'true'
50
+ CI: 'true'
51
+ run: bundle exec rake test
52
+ - name: Fix coverage report
53
+ if: always()
54
+ run: sed -i "s/\/home\/runner\/work\/activerecord-postgresql-cursors\/activerecord-postgresql-cursors\//\/github\/workspace\//g" coverage/coverage.json || true
55
+ - uses: actions/upload-artifact@master
56
+ with:
57
+ name: "coverage-${{ matrix.ruby }}"
58
+ path: coverage/coverage.json
59
+ retention-days: 7
60
+ if: always()
61
+ - name: Run rubocop
62
+ if: always()
63
+ env:
64
+ RAILS_ENV: test
65
+ run: bundle exec rubocop --parallel --format=json > rubocop-report.json || true
66
+ - name: Run SonarCloud
67
+ if: always()
68
+ uses: sonarsource/sonarcloud-github-action@master
69
+ env:
70
+ GITHUB_TOKEN: "${{ secrets.GITHUB_TOKEN }}"
71
+ SONAR_TOKEN: "${{ secrets.SONAR_CLOUD_TOKEN }}"
@@ -0,0 +1,240 @@
1
+ Minitest:
2
+ Enabled: true
3
+ Include:
4
+ - '**/test/**/*'
5
+ - '**/*_test.rb'
6
+
7
+ Minitest/AssertEmpty:
8
+ Description: 'This cop enforces the test to use `assert_empty` instead of using `assert(object.empty?)`.'
9
+ StyleGuide: 'https://minitest.rubystyle.guide#assert-empty'
10
+ Enabled: true
11
+ VersionAdded: '0.2'
12
+
13
+ Minitest/AssertEmptyLiteral:
14
+ Description: 'This cop enforces the test to use `assert_empty` instead of using `assert_equal([], object)`.'
15
+ Enabled: true
16
+ VersionAdded: '0.5'
17
+ VersionChanged: '0.11'
18
+
19
+ Minitest/AssertEqual:
20
+ Description: 'This cop enforces the test to use `assert_equal` instead of using `assert(expected == actual)`.'
21
+ StyleGuide: 'https://minitest.rubystyle.guide#assert-equal-arguments-order'
22
+ Enabled: true
23
+ VersionAdded: '0.4'
24
+
25
+ Minitest/AssertInDelta:
26
+ Description: 'This cop enforces the test to use `assert_in_delta` instead of using `assert_equal` to compare floats.'
27
+ StyleGuide: 'https://minitest.rubystyle.guide/#assert-in-delta'
28
+ Enabled: true
29
+ VersionAdded: '0.10'
30
+
31
+ Minitest/AssertIncludes:
32
+ Description: 'This cop enforces the test to use `assert_includes` instead of using `assert(collection.include?(object))`.'
33
+ StyleGuide: 'https://minitest.rubystyle.guide#assert-includes'
34
+ Enabled: true
35
+ VersionAdded: '0.2'
36
+
37
+ Minitest/AssertInstanceOf:
38
+ Description: 'This cop enforces the test to use `assert_instance_of(Class, object)` over `assert(object.instance_of?(Class))`'
39
+ StyleGuide: 'https://minitest.rubystyle.guide#assert-instance-of'
40
+ Enabled: true
41
+ VersionAdded: '0.4'
42
+
43
+ Minitest/AssertKindOf:
44
+ Description: 'This cop enforces the test to use `assert_kind_of(Class, object)` over `assert(object.kind_of?(Class))`'
45
+ StyleGuide: 'https://github.com/rubocop/minitest-style-guide#assert-kind-of'
46
+ Enabled: true
47
+ VersionAdded: '0.10'
48
+
49
+ Minitest/AssertMatch:
50
+ Description: 'This cop enforces the test to use `assert_match` instead of using `assert(matcher.match(object))`.'
51
+ StyleGuide: 'https://minitest.rubystyle.guide#assert-match'
52
+ Enabled: true
53
+ VersionAdded: '0.6'
54
+
55
+ Minitest/AssertNil:
56
+ Description: 'This cop enforces the test to use `assert_nil` instead of using `assert_equal(nil, something)` or `assert(something.nil?)`.'
57
+ StyleGuide: 'https://minitest.rubystyle.guide#assert-nil'
58
+ Enabled: true
59
+ VersionAdded: '0.1'
60
+
61
+ Minitest/AssertOutput:
62
+ Description: 'This cop checks for opportunities to use `assert_output`.'
63
+ StyleGuide: 'https://minitest.rubystyle.guide/#assert-output'
64
+ Enabled: true
65
+ VersionAdded: '0.10'
66
+
67
+ Minitest/AssertPathExists:
68
+ Description: 'This cop enforces the test to use `assert_path_exists` instead of using `assert(File.exist?(path))`.'
69
+ StyleGuide: 'https://minitest.rubystyle.guide/#assert-path-exists'
70
+ Enabled: true
71
+ VersionAdded: '0.10'
72
+
73
+ Minitest/AssertPredicate:
74
+ Description: 'This cop enforces the test to use `assert_predicate` instead of using `assert(obj.a_predicate_method?)`.'
75
+ StyleGuide: 'https://minitest.rubystyle.guide/#assert-predicate'
76
+ Enabled: true
77
+ VersionAdded: '0.18'
78
+
79
+ Minitest/AssertRespondTo:
80
+ Description: 'This cop enforces the test to use `assert_respond_to(object, :do_something)` over `assert(object.respond_to?(:do_something))`.'
81
+ StyleGuide: 'https://minitest.rubystyle.guide#assert-responds-to-method'
82
+ Enabled: true
83
+ VersionAdded: '0.3'
84
+
85
+ Minitest/AssertSilent:
86
+ Description: "This cop enforces the test to use `assert_silent { ... }` instead of using `assert_output('', '') { ... }`."
87
+ StyleGuide: 'https://github.com/rubocop/minitest-style-guide#assert-silent'
88
+ Enabled: true
89
+ VersionAdded: '0.10'
90
+
91
+ Minitest/AssertTruthy:
92
+ Description: 'This cop enforces the test to use `assert(actual)` instead of using `assert_equal(true, actual)`.'
93
+ StyleGuide: 'https://minitest.rubystyle.guide#assert-truthy'
94
+ Enabled: true
95
+ VersionAdded: '0.2'
96
+
97
+ Minitest/AssertWithExpectedArgument:
98
+ Description: 'This cop tries to detect when a user accidentally used `assert` when they meant to use `assert_equal`.'
99
+ Enabled: true
100
+ Safe: false
101
+ VersionAdded: '0.11'
102
+
103
+ Minitest/AssertionInLifecycleHook:
104
+ Description: 'This cop checks for usage of assertions in lifecycle hooks.'
105
+ Enabled: true
106
+ VersionAdded: '0.10'
107
+
108
+ Minitest/DuplicateTestRun:
109
+ Description: 'This cop detects duplicate test runs caused by one test class inheriting from another.'
110
+ StyleGuide: 'https://minitest.rubystyle.guide/#subclassing-test-cases'
111
+ Enabled: true
112
+ VersionAdded: '0.19'
113
+
114
+ Minitest/GlobalExpectations:
115
+ Description: 'This cop checks for deprecated global expectations.'
116
+ StyleGuide: 'https://minitest.rubystyle.guide#global-expectations'
117
+ Enabled: true
118
+ EnforcedStyle: any
119
+ Include:
120
+ - '**/test/**/*'
121
+ - '**/*_test.rb'
122
+ - '**/spec/**/*'
123
+ - '**/*_spec.rb'
124
+ SupportedStyles:
125
+ - _
126
+ - any
127
+ - expect
128
+ - value
129
+ VersionAdded: '0.7'
130
+ VersionChanged: '0.16'
131
+
132
+ Minitest/LiteralAsActualArgument:
133
+ Description: 'This cop enforces correct order of `expected` and `actual` arguments for `assert_equal`.'
134
+ StyleGuide: 'https://minitest.rubystyle.guide/#assert-equal-arguments-order'
135
+ Enabled: true
136
+ VersionAdded: '0.10'
137
+
138
+ Minitest/MultipleAssertions:
139
+ Description: 'This cop checks if test cases contain too many assertion calls.'
140
+ Enabled: true
141
+ VersionAdded: '0.10'
142
+ Max: 3
143
+
144
+ Minitest/NoAssertions:
145
+ Description: 'This cop checks for at least one assertion (or flunk) in tests.'
146
+ Enabled: false
147
+ VersionAdded: '0.12'
148
+
149
+ Minitest/RefuteEmpty:
150
+ Description: 'This cop enforces to use `refute_empty` instead of using `refute(object.empty?)`.'
151
+ StyleGuide: 'https://minitest.rubystyle.guide#refute-empty'
152
+ Enabled: true
153
+ VersionAdded: '0.3'
154
+
155
+ Minitest/RefuteEqual:
156
+ Description: 'Check if your test uses `refute_equal` instead of `assert(expected != object)` or `assert(! expected == object))`.'
157
+ StyleGuide: 'https://minitest.rubystyle.guide#refute-equal'
158
+ Enabled: true
159
+ VersionAdded: '0.3'
160
+
161
+ Minitest/RefuteFalse:
162
+ Description: 'Check if your test uses `refute(actual)` instead of `assert_equal(false, actual)`.'
163
+ StyleGuide: 'https://minitest.rubystyle.guide#refute-false'
164
+ Enabled: true
165
+ VersionAdded: '0.3'
166
+
167
+ Minitest/RefuteInDelta:
168
+ Description: 'This cop enforces the test to use `refute_in_delta` instead of using `refute_equal` to compare floats.'
169
+ StyleGuide: 'https://minitest.rubystyle.guide/#refute-in-delta'
170
+ Enabled: true
171
+ VersionAdded: '0.10'
172
+
173
+ Minitest/RefuteIncludes:
174
+ Description: 'This cop enforces the test to use `refute_includes` instead of using `refute(collection.include?(object))`.'
175
+ StyleGuide: 'https://minitest.rubystyle.guide#refute-includes'
176
+ Enabled: true
177
+ VersionAdded: '0.3'
178
+
179
+ Minitest/RefuteInstanceOf:
180
+ Description: 'This cop enforces the test to use `refute_instance_of(Class, object)` over `refute(object.instance_of?(Class))`.'
181
+ StyleGuide: 'https://minitest.rubystyle.guide#refute-instance-of'
182
+ Enabled: true
183
+ VersionAdded: '0.4'
184
+
185
+ Minitest/RefuteKindOf:
186
+ Description: 'This cop enforces the test to use `refute_kind_of(Class, object)` over `refute(object.kind_of?(Class))`.'
187
+ StyleGuide: 'https://github.com/rubocop/minitest-style-guide#refute-kind-of'
188
+ Enabled: true
189
+ VersionAdded: '0.10'
190
+
191
+ Minitest/RefuteMatch:
192
+ Description: 'This cop enforces the test to use `refute_match` instead of using `refute(matcher.match(object))`.'
193
+ StyleGuide: 'https://minitest.rubystyle.guide#refute-match'
194
+ Enabled: true
195
+ VersionAdded: '0.6'
196
+
197
+ Minitest/RefuteNil:
198
+ Description: 'This cop enforces the test to use `refute_nil` instead of using `refute_equal(nil, something)` or `refute(something.nil?)`.'
199
+ StyleGuide: 'https://minitest.rubystyle.guide#refute-nil'
200
+ Enabled: true
201
+ VersionAdded: '0.2'
202
+
203
+ Minitest/RefutePathExists:
204
+ Description: 'This cop enforces the test to use `refute_path_exists` instead of using `refute(File.exist?(path))`.'
205
+ StyleGuide: 'https://minitest.rubystyle.guide/#refute-path-exists'
206
+ Enabled: true
207
+ VersionAdded: '0.10'
208
+
209
+ Minitest/RefutePredicate:
210
+ Description: 'This cop enforces the test to use `refute_predicate` instead of using `refute(obj.a_predicate_method?)`.'
211
+ StyleGuide: 'https://minitest.rubystyle.guide/#refute-predicate'
212
+ Enabled: true
213
+ VersionAdded: '0.18'
214
+
215
+ Minitest/RefuteRespondTo:
216
+ Description: 'This cop enforces the test to use `refute_respond_to(object, :do_something)` over `refute(object.respond_to?(:do_something))`.'
217
+ StyleGuide: 'https://minitest.rubystyle.guide#refute-respond-to'
218
+ Enabled: true
219
+ VersionAdded: '0.4'
220
+
221
+ Minitest/SkipEnsure:
222
+ Description: 'Checks that `ensure` call even if `skip`.'
223
+ Enabled: true
224
+ VersionAdded: '0.20'
225
+
226
+ Minitest/TestMethodName:
227
+ Description: 'This cop enforces that test method names start with `test_` prefix.'
228
+ Enabled: true
229
+ VersionAdded: '0.10'
230
+
231
+ Minitest/UnreachableAssertion:
232
+ Description: 'This cop checks for an `assert_raises` block containing any unreachable assertions.'
233
+ Enabled: true
234
+ VersionAdded: '0.14'
235
+
236
+ Minitest/UnspecifiedException:
237
+ Description: 'This cop checks for a specified error in `assert_raises`.'
238
+ StyleGuide: 'https://minitest.rubystyle.guide#unspecified-exception'
239
+ Enabled: true
240
+ VersionAdded: '0.10'