minitest-sequel 0.3.2 → 0.4.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +5 -5
- data/.github/dependabot.yml +24 -0
- data/.github/workflows/ruby.yml +45 -0
- data/.gitignore +1 -0
- data/.rubocop.yml +48 -0
- data/.rubocop_todo.yml +7 -0
- data/CODE_OF_CONDUCT.md +17 -10
- data/Gemfile +81 -2
- data/Guardfile +26 -0
- data/README.md +368 -243
- data/Rakefile +16 -24
- data/lib/minitest/sequel/associations.rb +353 -163
- data/lib/minitest/sequel/columns.rb +204 -140
- data/lib/minitest/sequel/helpers.rb +190 -21
- data/lib/minitest/sequel/plugins.rb +409 -129
- data/lib/minitest/sequel/validations.rb +1122 -504
- data/lib/minitest/sequel/version.rb +4 -3
- data/lib/minitest/sequel.rb +27 -23
- data/minitest-sequel.gemspec +28 -27
- metadata +49 -143
data/lib/minitest/sequel.rb
CHANGED
@@ -1,29 +1,33 @@
|
|
1
|
-
|
2
|
-
require "minitest/sequel/version"
|
3
|
-
require "sequel"
|
4
|
-
require "sequel/extensions/inflector" unless "".respond_to?(:classify)
|
1
|
+
# frozen_string_literal: false
|
5
2
|
|
6
|
-
|
7
|
-
|
3
|
+
require 'minitest'
|
4
|
+
require 'minitest/sequel/version'
|
5
|
+
require 'sequel'
|
6
|
+
require 'sequel/extensions/inflector' unless ''.respond_to?(:classify)
|
8
7
|
|
9
|
-
|
8
|
+
# reopening to add validations functionality
|
9
|
+
module Minitest
|
10
|
+
# add support for Assert syntax
|
11
|
+
module Assertions
|
12
|
+
private
|
10
13
|
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
14
|
+
# handles converting `:nil`, `:false` values
|
15
|
+
# rubocop:disable Lint/BooleanSymbol
|
16
|
+
def _convert_value(val)
|
17
|
+
case val
|
18
|
+
when :nil then nil
|
19
|
+
when :false then false
|
20
|
+
when :true then true
|
21
|
+
else
|
22
|
+
val
|
23
|
+
end
|
24
|
+
end
|
25
|
+
# rubocop:enable Lint/BooleanSymbol
|
21
26
|
end
|
22
|
-
|
23
27
|
end
|
24
28
|
|
25
|
-
require
|
26
|
-
require
|
27
|
-
require
|
28
|
-
require
|
29
|
-
require
|
29
|
+
require 'minitest/sequel/columns'
|
30
|
+
require 'minitest/sequel/associations'
|
31
|
+
require 'minitest/sequel/validations'
|
32
|
+
require 'minitest/sequel/plugins'
|
33
|
+
require 'minitest/sequel/helpers'
|
data/minitest-sequel.gemspec
CHANGED
@@ -1,18 +1,22 @@
|
|
1
|
-
#
|
2
|
-
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
lib = File.expand_path('lib', __dir__)
|
4
|
+
|
3
5
|
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
4
|
-
|
6
|
+
|
7
|
+
require 'minitest/sequel/version'
|
5
8
|
|
6
9
|
Gem::Specification.new do |spec|
|
7
|
-
spec.name =
|
10
|
+
spec.name = 'minitest-sequel'
|
8
11
|
spec.version = Minitest::Sequel::VERSION
|
9
|
-
spec.authors = [
|
10
|
-
spec.email = [
|
12
|
+
spec.authors = ['Kematzy']
|
13
|
+
spec.email = ['kematzy@gmail.com']
|
11
14
|
|
12
|
-
spec.summary =
|
13
|
-
spec.description = "A collection of convenient assertions
|
14
|
-
spec.homepage =
|
15
|
-
spec.license =
|
15
|
+
spec.summary = 'Minitest assertions to speed-up development and testing of Sequel database setups.'
|
16
|
+
spec.description = "A collection of convenient assertions for faster & DRY'er testing of Sequel database apps/gems."
|
17
|
+
spec.homepage = 'https://github.com/kematzy/minitest-sequel'
|
18
|
+
spec.license = 'MIT'
|
19
|
+
spec.required_ruby_version = '>= 3.0.0'
|
16
20
|
|
17
21
|
# # Prevent pushing this gem to RubyGems.org by setting 'allowed_push_host', or
|
18
22
|
# # delete this section to allow pushing this gem to any host.
|
@@ -23,22 +27,19 @@ Gem::Specification.new do |spec|
|
|
23
27
|
# end
|
24
28
|
|
25
29
|
spec.files = `git ls-files -z`.split("\x0").reject { |f| f.match(%r{^(test|spec|features)/}) }
|
26
|
-
spec.bindir =
|
30
|
+
spec.bindir = 'exe'
|
27
31
|
spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
|
28
|
-
spec.require_paths = [
|
29
|
-
|
30
|
-
spec.
|
31
|
-
spec.
|
32
|
-
spec.
|
33
|
-
|
34
|
-
|
35
|
-
spec.
|
36
|
-
spec.
|
37
|
-
spec.
|
38
|
-
spec.
|
39
|
-
|
40
|
-
spec.
|
41
|
-
spec.add_development_dependency "minitest-documentation"
|
42
|
-
spec.add_development_dependency "simplecov"
|
43
|
-
spec.add_development_dependency "rubocop"
|
32
|
+
spec.require_paths = ['lib']
|
33
|
+
|
34
|
+
spec.platform = Gem::Platform::RUBY
|
35
|
+
spec.extra_rdoc_files = ['README.md', 'LICENSE.txt']
|
36
|
+
spec.rdoc_options += ['--quiet', '--line-numbers', '--inline-source', '--title',
|
37
|
+
'Minitest::Sequel: assertions for testing Sequel databases', '--main', 'README.md']
|
38
|
+
|
39
|
+
spec.add_dependency('minitest', '~> 5.25.0', '>= 5.20.0')
|
40
|
+
spec.add_dependency('sequel', '~> 5.84.0', '>= 5.80.0')
|
41
|
+
spec.add_dependency('sequel-paranoid', '~> 0.7.0', '>= 0.7.0')
|
42
|
+
# spec.add_dependency("sequel-factory", "~> 1.0.0")
|
43
|
+
|
44
|
+
spec.metadata['rubygems_mfa_required'] = 'true'
|
44
45
|
end
|
metadata
CHANGED
@@ -1,194 +1,93 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: minitest-sequel
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.4.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Kematzy
|
8
|
-
autorequire:
|
8
|
+
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2024-10-08 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: minitest
|
15
15
|
requirement: !ruby/object:Gem::Requirement
|
16
16
|
requirements:
|
17
|
-
- - "
|
18
|
-
- !ruby/object:Gem::Version
|
19
|
-
version: 5.7.0
|
20
|
-
type: :runtime
|
21
|
-
prerelease: false
|
22
|
-
version_requirements: !ruby/object:Gem::Requirement
|
23
|
-
requirements:
|
24
|
-
- - ">="
|
25
|
-
- !ruby/object:Gem::Version
|
26
|
-
version: 5.7.0
|
27
|
-
- !ruby/object:Gem::Dependency
|
28
|
-
name: sequel
|
29
|
-
requirement: !ruby/object:Gem::Requirement
|
30
|
-
requirements:
|
31
|
-
- - ">="
|
32
|
-
- !ruby/object:Gem::Version
|
33
|
-
version: 4.35.0
|
34
|
-
type: :runtime
|
35
|
-
prerelease: false
|
36
|
-
version_requirements: !ruby/object:Gem::Requirement
|
37
|
-
requirements:
|
38
|
-
- - ">="
|
17
|
+
- - "~>"
|
39
18
|
- !ruby/object:Gem::Version
|
40
|
-
version:
|
41
|
-
- !ruby/object:Gem::Dependency
|
42
|
-
name: sequel-paranoid
|
43
|
-
requirement: !ruby/object:Gem::Requirement
|
44
|
-
requirements:
|
19
|
+
version: 5.25.0
|
45
20
|
- - ">="
|
46
21
|
- !ruby/object:Gem::Version
|
47
|
-
version:
|
22
|
+
version: 5.20.0
|
48
23
|
type: :runtime
|
49
24
|
prerelease: false
|
50
25
|
version_requirements: !ruby/object:Gem::Requirement
|
51
26
|
requirements:
|
52
|
-
- - "
|
53
|
-
- !ruby/object:Gem::Version
|
54
|
-
version: 0.6.2
|
55
|
-
- !ruby/object:Gem::Dependency
|
56
|
-
name: bundler
|
57
|
-
requirement: !ruby/object:Gem::Requirement
|
58
|
-
requirements:
|
59
|
-
- - ">="
|
60
|
-
- !ruby/object:Gem::Version
|
61
|
-
version: '1.10'
|
62
|
-
type: :development
|
63
|
-
prerelease: false
|
64
|
-
version_requirements: !ruby/object:Gem::Requirement
|
65
|
-
requirements:
|
66
|
-
- - ">="
|
67
|
-
- !ruby/object:Gem::Version
|
68
|
-
version: '1.10'
|
69
|
-
- !ruby/object:Gem::Dependency
|
70
|
-
name: rake
|
71
|
-
requirement: !ruby/object:Gem::Requirement
|
72
|
-
requirements:
|
73
|
-
- - ">="
|
74
|
-
- !ruby/object:Gem::Version
|
75
|
-
version: '10.0'
|
76
|
-
type: :development
|
77
|
-
prerelease: false
|
78
|
-
version_requirements: !ruby/object:Gem::Requirement
|
79
|
-
requirements:
|
80
|
-
- - ">="
|
81
|
-
- !ruby/object:Gem::Version
|
82
|
-
version: '10.0'
|
83
|
-
- !ruby/object:Gem::Dependency
|
84
|
-
name: sqlite3
|
85
|
-
requirement: !ruby/object:Gem::Requirement
|
86
|
-
requirements:
|
87
|
-
- - ">="
|
27
|
+
- - "~>"
|
88
28
|
- !ruby/object:Gem::Version
|
89
|
-
version:
|
90
|
-
type: :development
|
91
|
-
prerelease: false
|
92
|
-
version_requirements: !ruby/object:Gem::Requirement
|
93
|
-
requirements:
|
29
|
+
version: 5.25.0
|
94
30
|
- - ">="
|
95
31
|
- !ruby/object:Gem::Version
|
96
|
-
version:
|
32
|
+
version: 5.20.0
|
97
33
|
- !ruby/object:Gem::Dependency
|
98
|
-
name:
|
34
|
+
name: sequel
|
99
35
|
requirement: !ruby/object:Gem::Requirement
|
100
36
|
requirements:
|
101
|
-
- - "
|
102
|
-
- !ruby/object:Gem::Version
|
103
|
-
version: '0'
|
104
|
-
type: :development
|
105
|
-
prerelease: false
|
106
|
-
version_requirements: !ruby/object:Gem::Requirement
|
107
|
-
requirements:
|
108
|
-
- - ">="
|
37
|
+
- - "~>"
|
109
38
|
- !ruby/object:Gem::Version
|
110
|
-
version:
|
111
|
-
- !ruby/object:Gem::Dependency
|
112
|
-
name: minitest-hooks
|
113
|
-
requirement: !ruby/object:Gem::Requirement
|
114
|
-
requirements:
|
39
|
+
version: 5.84.0
|
115
40
|
- - ">="
|
116
41
|
- !ruby/object:Gem::Version
|
117
|
-
version:
|
118
|
-
type: :
|
42
|
+
version: 5.80.0
|
43
|
+
type: :runtime
|
119
44
|
prerelease: false
|
120
45
|
version_requirements: !ruby/object:Gem::Requirement
|
121
46
|
requirements:
|
122
|
-
- - "
|
123
|
-
- !ruby/object:Gem::Version
|
124
|
-
version: '0'
|
125
|
-
- !ruby/object:Gem::Dependency
|
126
|
-
name: minitest-color
|
127
|
-
requirement: !ruby/object:Gem::Requirement
|
128
|
-
requirements:
|
129
|
-
- - ">="
|
47
|
+
- - "~>"
|
130
48
|
- !ruby/object:Gem::Version
|
131
|
-
version:
|
132
|
-
type: :development
|
133
|
-
prerelease: false
|
134
|
-
version_requirements: !ruby/object:Gem::Requirement
|
135
|
-
requirements:
|
49
|
+
version: 5.84.0
|
136
50
|
- - ">="
|
137
51
|
- !ruby/object:Gem::Version
|
138
|
-
version:
|
52
|
+
version: 5.80.0
|
139
53
|
- !ruby/object:Gem::Dependency
|
140
|
-
name:
|
54
|
+
name: sequel-paranoid
|
141
55
|
requirement: !ruby/object:Gem::Requirement
|
142
56
|
requirements:
|
143
|
-
- - "
|
144
|
-
- !ruby/object:Gem::Version
|
145
|
-
version: '0'
|
146
|
-
type: :development
|
147
|
-
prerelease: false
|
148
|
-
version_requirements: !ruby/object:Gem::Requirement
|
149
|
-
requirements:
|
150
|
-
- - ">="
|
57
|
+
- - "~>"
|
151
58
|
- !ruby/object:Gem::Version
|
152
|
-
version:
|
153
|
-
- !ruby/object:Gem::Dependency
|
154
|
-
name: simplecov
|
155
|
-
requirement: !ruby/object:Gem::Requirement
|
156
|
-
requirements:
|
59
|
+
version: 0.7.0
|
157
60
|
- - ">="
|
158
61
|
- !ruby/object:Gem::Version
|
159
|
-
version:
|
160
|
-
type: :
|
62
|
+
version: 0.7.0
|
63
|
+
type: :runtime
|
161
64
|
prerelease: false
|
162
65
|
version_requirements: !ruby/object:Gem::Requirement
|
163
66
|
requirements:
|
164
|
-
- - "
|
165
|
-
- !ruby/object:Gem::Version
|
166
|
-
version: '0'
|
167
|
-
- !ruby/object:Gem::Dependency
|
168
|
-
name: rubocop
|
169
|
-
requirement: !ruby/object:Gem::Requirement
|
170
|
-
requirements:
|
171
|
-
- - ">="
|
67
|
+
- - "~>"
|
172
68
|
- !ruby/object:Gem::Version
|
173
|
-
version:
|
174
|
-
type: :development
|
175
|
-
prerelease: false
|
176
|
-
version_requirements: !ruby/object:Gem::Requirement
|
177
|
-
requirements:
|
69
|
+
version: 0.7.0
|
178
70
|
- - ">="
|
179
71
|
- !ruby/object:Gem::Version
|
180
|
-
version:
|
181
|
-
description: A collection of convenient assertions
|
182
|
-
|
72
|
+
version: 0.7.0
|
73
|
+
description: A collection of convenient assertions for faster & DRY'er testing of
|
74
|
+
Sequel database apps/gems.
|
183
75
|
email:
|
184
76
|
- kematzy@gmail.com
|
185
77
|
executables: []
|
186
78
|
extensions: []
|
187
|
-
extra_rdoc_files:
|
79
|
+
extra_rdoc_files:
|
80
|
+
- README.md
|
81
|
+
- LICENSE.txt
|
188
82
|
files:
|
83
|
+
- ".github/dependabot.yml"
|
84
|
+
- ".github/workflows/ruby.yml"
|
189
85
|
- ".gitignore"
|
86
|
+
- ".rubocop.yml"
|
87
|
+
- ".rubocop_todo.yml"
|
190
88
|
- CODE_OF_CONDUCT.md
|
191
89
|
- Gemfile
|
90
|
+
- Guardfile
|
192
91
|
- LICENSE.txt
|
193
92
|
- README.md
|
194
93
|
- Rakefile
|
@@ -203,25 +102,32 @@ files:
|
|
203
102
|
homepage: https://github.com/kematzy/minitest-sequel
|
204
103
|
licenses:
|
205
104
|
- MIT
|
206
|
-
metadata:
|
207
|
-
|
208
|
-
|
105
|
+
metadata:
|
106
|
+
rubygems_mfa_required: 'true'
|
107
|
+
post_install_message:
|
108
|
+
rdoc_options:
|
109
|
+
- "--quiet"
|
110
|
+
- "--line-numbers"
|
111
|
+
- "--inline-source"
|
112
|
+
- "--title"
|
113
|
+
- 'Minitest::Sequel: assertions for testing Sequel databases'
|
114
|
+
- "--main"
|
115
|
+
- README.md
|
209
116
|
require_paths:
|
210
117
|
- lib
|
211
118
|
required_ruby_version: !ruby/object:Gem::Requirement
|
212
119
|
requirements:
|
213
120
|
- - ">="
|
214
121
|
- !ruby/object:Gem::Version
|
215
|
-
version:
|
122
|
+
version: 3.0.0
|
216
123
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
217
124
|
requirements:
|
218
125
|
- - ">="
|
219
126
|
- !ruby/object:Gem::Version
|
220
127
|
version: '0'
|
221
128
|
requirements: []
|
222
|
-
|
223
|
-
|
224
|
-
signing_key:
|
129
|
+
rubygems_version: 3.5.16
|
130
|
+
signing_key:
|
225
131
|
specification_version: 4
|
226
132
|
summary: Minitest assertions to speed-up development and testing of Sequel database
|
227
133
|
setups.
|