unidom-common-rspec 0.10.1 → 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 +5 -5
- data/CHANGELOG.md +21 -1
- data/Gemfile.lock +1 -1
- data/README.md +22 -18
- data/ROADMAP.md +20 -0
- data/lib/unidom/common/rspec/version.rb +1 -1
- data/unidom-common-rspec.gemspec +3 -3
- metadata +9 -10
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
|
-
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
2
|
+
SHA256:
|
3
|
+
metadata.gz: 6bed498047da558ddb227718bd226c1287590ec452bbd05246cfb3d1b66d10bd
|
4
|
+
data.tar.gz: 80a5dfef72584045011946a6f4eaa03e78952bd89087f0d667577d7a92189fad
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: '096b7911f542e6ed7059752e0f5b15a4a92b6fa608e4bbd3ea0f973a5c1d2d1fe24ecf01b268a4d86cf768308ae082a860d80ebbd94a862f8ff7ae704d05adb1'
|
7
|
+
data.tar.gz: 4514328850cb8103921686fda72b6b4c1e3bf872505bb80708a9ff15a76185e4f0f754ed9318e3dc4485c39b311e29f6383598cae6cd96fa06d2b1861a43ae2f
|
data/CHANGELOG.md
CHANGED
@@ -1,56 +1,76 @@
|
|
1
1
|
# Unidom Common RSpec Change Log Unidom Common RSpec 库变更日志
|
2
2
|
|
3
3
|
## v0.1
|
4
|
+
|
4
5
|
1. Scope shared examples
|
5
6
|
|
6
7
|
## v0.2
|
8
|
+
|
7
9
|
1. Validates shared examples
|
8
10
|
|
9
11
|
## v0.3
|
12
|
+
|
10
13
|
1. Model Extension shared examples
|
11
14
|
|
12
15
|
## v0.4
|
16
|
+
|
13
17
|
1. Has Many shared examples
|
14
18
|
|
15
19
|
## v0.5
|
20
|
+
|
16
21
|
1. Belongs To shared examples
|
17
22
|
2. Improved the Model Extension shared examples for the validates behaviors of the #``grade`` attribute & the #``priority`` attribute
|
18
23
|
3. Improved the Model Extension shared examples for the scope behaviours of the #``priority`` attribute
|
19
24
|
|
20
25
|
## v0.6
|
26
|
+
|
21
27
|
1. Has One shared examples
|
22
28
|
|
23
29
|
## v0.6.1
|
30
|
+
|
24
31
|
1. Improved the Belongs To shared examples for the #``build_association`` method, the #``create_association`` method, & the #``create_association!`` method
|
25
32
|
2. Improved the Has One shared examples for the #``build_association`` method, the #``create_association`` method, & the #``create_association!`` method
|
26
33
|
|
27
34
|
## v0.6.2
|
35
|
+
|
28
36
|
1. Improved the Has Many shared examples for the #``collection.build`` method, the #``collection.create`` method, & the #``collection.create!`` method
|
29
37
|
|
30
38
|
## v0.7
|
39
|
+
|
31
40
|
1. Each Validator shared examples
|
32
41
|
|
33
42
|
## v0.7.1
|
43
|
+
|
34
44
|
1. Improved the Model Extension shared examples for the ``ordinal_is`` scope, the ``grade_is`` scope, the ``grade_higher_than`` scope, the ``grade_lower_than`` scope, the ``priority_is`` scope, the ``priority_higher_than`` scope, & the ``priority_lower_than`` scope
|
35
45
|
2. Improved the Model Extension shared examples for the validations on the #``ordinal`` attribute
|
36
46
|
|
37
47
|
## v0.7.2
|
48
|
+
|
38
49
|
1. Improved the Validates shared examples for the failure message
|
39
50
|
|
40
51
|
## v0.8
|
52
|
+
|
41
53
|
1. Monomorphic Scope shared examples
|
42
54
|
2. Polymorphic Scope shared examples
|
43
55
|
|
44
56
|
## v0.9
|
57
|
+
|
45
58
|
1. Validates Text shared examples
|
46
59
|
2. Validates Numericality shared examples
|
47
60
|
|
48
61
|
## v0.9.1
|
49
|
-
|
62
|
+
|
63
|
+
1. Improved the Validates Text shared examples for the length
|
50
64
|
|
51
65
|
## v0.10
|
66
|
+
|
52
67
|
1. Assert Present shared examples
|
53
68
|
|
54
69
|
## v0.10.1
|
70
|
+
|
55
71
|
1. Improve the Scope shared examples to separate the Monomorphic Scope shared examples, & the Polymorphic Scope shared examples
|
56
72
|
2. Improve the Validates shared examples to separate the Validates Text shared examples, & the Validates Numericality shared examples
|
73
|
+
|
74
|
+
## v1.0
|
75
|
+
|
76
|
+
1. Improve the compatibility for Rails 6.x & RSpec Rails 4.x
|
data/Gemfile.lock
CHANGED
data/README.md
CHANGED
@@ -183,7 +183,7 @@ require 'rails_helper'
|
|
183
183
|
|
184
184
|
describe Person, type: :model do
|
185
185
|
|
186
|
-
context
|
186
|
+
context do
|
187
187
|
|
188
188
|
tim_attributes = { name: 'Tim' }
|
189
189
|
|
@@ -229,7 +229,7 @@ require 'rails_helper'
|
|
229
229
|
|
230
230
|
describe Person, type: :model do
|
231
231
|
|
232
|
-
context
|
232
|
+
context do
|
233
233
|
|
234
234
|
tim_attributes = { name: 'Tim', age: 28 }
|
235
235
|
|
@@ -345,22 +345,26 @@ The ``identification_number_validator_spec.rb`` looks like the following:
|
|
345
345
|
```ruby
|
346
346
|
RSpec.describe IdentificationNumberValidator, type: :validator do
|
347
347
|
|
348
|
-
|
349
|
-
|
350
|
-
|
351
|
-
|
352
|
-
|
353
|
-
|
354
|
-
|
355
|
-
|
356
|
-
|
357
|
-
|
358
|
-
|
359
|
-
|
360
|
-
|
361
|
-
|
362
|
-
|
363
|
-
|
348
|
+
context do
|
349
|
+
|
350
|
+
valid_values = %w{
|
351
|
+
231024198506186916
|
352
|
+
231024198506188110
|
353
|
+
231024198506185470
|
354
|
+
231024198506182851
|
355
|
+
231024198506187193
|
356
|
+
}
|
357
|
+
invalid_values = %w{
|
358
|
+
231024198506186917
|
359
|
+
231024198506188111
|
360
|
+
231024198506185471
|
361
|
+
231024198506182852
|
362
|
+
231024198506187194
|
363
|
+
}
|
364
|
+
|
365
|
+
it_behaves_like 'ActiveModel::EachValidator', valid_values, invalid_values
|
366
|
+
|
367
|
+
end
|
364
368
|
|
365
369
|
end
|
366
370
|
```
|
data/ROADMAP.md
CHANGED
@@ -1,56 +1,76 @@
|
|
1
1
|
# Unidom Common RSpec Roadmap Unidom Common RSpec 库线路图
|
2
2
|
|
3
3
|
## v0.1
|
4
|
+
|
4
5
|
1. Scope shared examples
|
5
6
|
|
6
7
|
## v0.2
|
8
|
+
|
7
9
|
1. Validates shared examples
|
8
10
|
|
9
11
|
## v0.3
|
12
|
+
|
10
13
|
1. Model Extension shared examples
|
11
14
|
|
12
15
|
## v0.4
|
16
|
+
|
13
17
|
1. Has Many shared examples
|
14
18
|
|
15
19
|
## v0.5
|
20
|
+
|
16
21
|
1. Belongs To shared examples
|
17
22
|
2. Improve the Model Extension shared examples for the validates behaviors of the #``grade`` attribute & the #``priority`` attribute
|
18
23
|
3. Improve the Model Extension shared examples for the scope behaviours of the #``priority`` attribute
|
19
24
|
|
20
25
|
## v0.6
|
26
|
+
|
21
27
|
1. Has One shared examples
|
22
28
|
|
23
29
|
## v0.6.1
|
30
|
+
|
24
31
|
1. Improve the Belongs To shared examples for the #``build_association`` method, the #``create_association`` method, & the #``create_association!`` method
|
25
32
|
2. Improve the Has One shared examples for the #``build_association`` method, the #``create_association`` method, & the #``create_association!`` method
|
26
33
|
|
27
34
|
## v0.6.2
|
35
|
+
|
28
36
|
1. Improve the Has Many shared examples for the #``collection.build`` method, the #``collection.create`` method, & the #``collection.create!`` method
|
29
37
|
|
30
38
|
## v0.7
|
39
|
+
|
31
40
|
1. Each Validator shared examples
|
32
41
|
|
33
42
|
## v0.7.1
|
43
|
+
|
34
44
|
1. Improve the Model Extension shared examples for the ``ordinal_is`` scope, the ``grade_is`` scope, the ``grade_higher_than`` scope, the ``grade_lower_than`` scope, the ``priority_is`` scope, the ``priority_higher_than`` scope, & the ``priority_lower_than`` scope
|
35
45
|
2. Improve the Model Extension shared examples for the validations on the #``ordinal`` attribute
|
36
46
|
|
37
47
|
## v0.7.2
|
48
|
+
|
38
49
|
1. Improve the Validates shared examples for the failure message
|
39
50
|
|
40
51
|
## v0.8
|
52
|
+
|
41
53
|
1. Monomorphic Scope shared examples
|
42
54
|
2. Polymorphic Scope shared examples
|
43
55
|
|
44
56
|
## v0.9
|
57
|
+
|
45
58
|
1. Validates Text shared examples
|
46
59
|
2. Validates Numericality shared examples
|
47
60
|
|
48
61
|
## v0.9.1
|
62
|
+
|
49
63
|
1. Improve the Validates Text shared examples for the length
|
50
64
|
|
51
65
|
## v0.10
|
66
|
+
|
52
67
|
1. Assert Present shared examples
|
53
68
|
|
54
69
|
## v0.10.1
|
70
|
+
|
55
71
|
1. Improve the Scope shared examples to separate the Monomorphic Scope shared examples, & the Polymorphic Scope shared examples
|
56
72
|
2. Improve the Validates shared examples to separate the Validates Text shared examples, & the Validates Numericality shared examples
|
73
|
+
|
74
|
+
## v1.0
|
75
|
+
|
76
|
+
1. Improve the compatibility for Rails 6.x & RSpec Rails 4.x
|
data/unidom-common-rspec.gemspec
CHANGED
@@ -27,10 +27,10 @@ Gem::Specification.new do |spec|
|
|
27
27
|
spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
|
28
28
|
spec.require_paths = [ 'lib' ]
|
29
29
|
|
30
|
-
spec.add_development_dependency 'rspec-rails', '~>
|
30
|
+
spec.add_development_dependency 'rspec-rails', '~> 4.0'
|
31
31
|
|
32
|
-
spec.add_development_dependency 'bundler', '~>
|
33
|
-
spec.add_development_dependency 'rake', '~>
|
32
|
+
spec.add_development_dependency 'bundler', '~> 2.0'
|
33
|
+
spec.add_development_dependency 'rake', '~> 11.0'
|
34
34
|
spec.add_development_dependency 'rspec', '~> 3.0'
|
35
35
|
|
36
36
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: unidom-common-rspec
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0
|
4
|
+
version: '1.0'
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Topbit Du
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2020-04-13 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rspec-rails
|
@@ -16,42 +16,42 @@ dependencies:
|
|
16
16
|
requirements:
|
17
17
|
- - "~>"
|
18
18
|
- !ruby/object:Gem::Version
|
19
|
-
version: '
|
19
|
+
version: '4.0'
|
20
20
|
type: :development
|
21
21
|
prerelease: false
|
22
22
|
version_requirements: !ruby/object:Gem::Requirement
|
23
23
|
requirements:
|
24
24
|
- - "~>"
|
25
25
|
- !ruby/object:Gem::Version
|
26
|
-
version: '
|
26
|
+
version: '4.0'
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
28
|
name: bundler
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
30
30
|
requirements:
|
31
31
|
- - "~>"
|
32
32
|
- !ruby/object:Gem::Version
|
33
|
-
version: '
|
33
|
+
version: '2.0'
|
34
34
|
type: :development
|
35
35
|
prerelease: false
|
36
36
|
version_requirements: !ruby/object:Gem::Requirement
|
37
37
|
requirements:
|
38
38
|
- - "~>"
|
39
39
|
- !ruby/object:Gem::Version
|
40
|
-
version: '
|
40
|
+
version: '2.0'
|
41
41
|
- !ruby/object:Gem::Dependency
|
42
42
|
name: rake
|
43
43
|
requirement: !ruby/object:Gem::Requirement
|
44
44
|
requirements:
|
45
45
|
- - "~>"
|
46
46
|
- !ruby/object:Gem::Version
|
47
|
-
version: '
|
47
|
+
version: '11.0'
|
48
48
|
type: :development
|
49
49
|
prerelease: false
|
50
50
|
version_requirements: !ruby/object:Gem::Requirement
|
51
51
|
requirements:
|
52
52
|
- - "~>"
|
53
53
|
- !ruby/object:Gem::Version
|
54
|
-
version: '
|
54
|
+
version: '11.0'
|
55
55
|
- !ruby/object:Gem::Dependency
|
56
56
|
name: rspec
|
57
57
|
requirement: !ruby/object:Gem::Requirement
|
@@ -121,8 +121,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
121
121
|
- !ruby/object:Gem::Version
|
122
122
|
version: '0'
|
123
123
|
requirements: []
|
124
|
-
|
125
|
-
rubygems_version: 2.6.4
|
124
|
+
rubygems_version: 3.1.2
|
126
125
|
signing_key:
|
127
126
|
specification_version: 4
|
128
127
|
summary: Unidom Common RSpec 是为 Unidom Common 设计的基于 RSpec 的共享测试用例。
|