sus 0.15.2 → 0.16.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 +4 -4
- checksums.yaml.gz.sig +0 -0
- data/lib/sus/be_truthy.rb +1 -1
- data/lib/sus/file.rb +3 -2
- data/lib/sus/it_behaves_like.rb +5 -5
- data/lib/sus/registry.rb +1 -0
- data/lib/sus/version.rb +1 -1
- data/lib/sus/with.rb +2 -0
- data/license.md +2 -1
- data/readme.md +0 -24
- data.tar.gz.sig +2 -2
- metadata +4 -3
- metadata.gz.sig +0 -0
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: f36ad4203b1471b0dfa6a95fd4407978f5bfab703c09d14d2ee481d519296b46
|
4
|
+
data.tar.gz: 539e6eb3ef50f12d6159c271a63130e696c3f48f914e1b74e7671a90cf90f726
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: dddf727776b219c29970aea30f177903bd52f82497a552dd55ff4821be51b5722aade3e081b3eb0d878ab033385ef375aee222afbf500b07a109b2bc8438f85f
|
7
|
+
data.tar.gz: 9dd5df66341eaac3877777af106cd2262720991a3ec742b7859934790255440334b961bce01a3b28306e45b7c4db33d56f56cc5bdf052143f4109a4854f3ba8e
|
checksums.yaml.gz.sig
CHANGED
Binary file
|
data/lib/sus/be_truthy.rb
CHANGED
data/lib/sus/file.rb
CHANGED
@@ -1,12 +1,13 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
3
|
# Released under the MIT License.
|
4
|
-
# Copyright, 2021-
|
4
|
+
# Copyright, 2021-2023, by Samuel Williams.
|
5
|
+
# Copyright, 2022, by Brad Schrag.
|
5
6
|
|
6
7
|
require_relative 'context'
|
7
8
|
|
8
9
|
# This has to be done at the top level. It allows us to define constants within the given class while still retaining top-level constant resolution.
|
9
|
-
Sus::TOPLEVEL_CLASS_EVAL = ->(
|
10
|
+
Sus::TOPLEVEL_CLASS_EVAL = ->(__klass__, __path__){__klass__.class_eval(::File.read(__path__), __path__)}
|
10
11
|
|
11
12
|
module Sus
|
12
13
|
module File
|
data/lib/sus/it_behaves_like.rb
CHANGED
@@ -11,7 +11,7 @@ module Sus
|
|
11
11
|
|
12
12
|
attr_accessor :shared
|
13
13
|
|
14
|
-
def self.build(parent, shared, unique: false, &block)
|
14
|
+
def self.build(parent, shared, arguments = nil, unique: false, &block)
|
15
15
|
base = Class.new(parent)
|
16
16
|
base.singleton_class.prepend(ItBehavesLike)
|
17
17
|
base.children = Hash.new
|
@@ -20,10 +20,10 @@ module Sus
|
|
20
20
|
|
21
21
|
# User provided block is evaluated first, so that it can provide default behaviour for the shared context:
|
22
22
|
if block_given?
|
23
|
-
base.class_exec(&block)
|
23
|
+
base.class_exec(*arguments, &block)
|
24
24
|
end
|
25
25
|
|
26
|
-
base.class_exec(&shared.block)
|
26
|
+
base.class_exec(*arguments, &shared.block)
|
27
27
|
return base
|
28
28
|
end
|
29
29
|
|
@@ -34,8 +34,8 @@ module Sus
|
|
34
34
|
end
|
35
35
|
|
36
36
|
module Context
|
37
|
-
def it_behaves_like(shared, **options, &block)
|
38
|
-
add ItBehavesLike.build(self, shared, **options, &block)
|
37
|
+
def it_behaves_like(shared, *arguments, **options, &block)
|
38
|
+
add ItBehavesLike.build(self, shared, arguments, **options, &block)
|
39
39
|
end
|
40
40
|
end
|
41
41
|
end
|
data/lib/sus/registry.rb
CHANGED
data/lib/sus/version.rb
CHANGED
data/lib/sus/with.rb
CHANGED
@@ -21,6 +21,8 @@ module Sus
|
|
21
21
|
base.identity = Identity.nested(parent.identity, base.description, unique: unique)
|
22
22
|
base.variables = variables
|
23
23
|
|
24
|
+
base.define_method(:description, ->{subject})
|
25
|
+
|
24
26
|
variables.each do |key, value|
|
25
27
|
base.define_method(key, ->{value})
|
26
28
|
end
|
data/license.md
CHANGED
@@ -1,6 +1,7 @@
|
|
1
1
|
# MIT License
|
2
2
|
|
3
|
-
Copyright, 2021-
|
3
|
+
Copyright, 2021-2023, by Samuel Williams.
|
4
|
+
Copyright, 2022, by Brad Schrag.
|
4
5
|
|
5
6
|
Permission is hereby granted, free of charge, to any person obtaining a copy
|
6
7
|
of this software and associated documentation files (the "Software"), to deal
|
data/readme.md
CHANGED
@@ -43,27 +43,3 @@ Check `test` directory for examples.
|
|
43
43
|
3. Commit your changes (`git commit -am 'Add some feature'`).
|
44
44
|
4. Push to the branch (`git push origin my-new-feature`).
|
45
45
|
5. Create new Pull Request.
|
46
|
-
|
47
|
-
## License
|
48
|
-
|
49
|
-
Released under the MIT license.
|
50
|
-
|
51
|
-
Copyright, 2021, by [Samuel G. D. Williams](https://www.codeotaku.com).
|
52
|
-
|
53
|
-
Permission is hereby granted, free of charge, to any person obtaining a copy
|
54
|
-
of this software and associated documentation files (the "Software"), to deal
|
55
|
-
in the Software without restriction, including without limitation the rights
|
56
|
-
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
57
|
-
copies of the Software, and to permit persons to whom the Software is
|
58
|
-
furnished to do so, subject to the following conditions:
|
59
|
-
|
60
|
-
The above copyright notice and this permission notice shall be included in
|
61
|
-
all copies or substantial portions of the Software.
|
62
|
-
|
63
|
-
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
64
|
-
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
65
|
-
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
66
|
-
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
67
|
-
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
68
|
-
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
69
|
-
THE SOFTWARE.
|
data.tar.gz.sig
CHANGED
@@ -1,2 +1,2 @@
|
|
1
|
-
|
2
|
-
|
1
|
+
_2�~��[�ͤ�R�k=l����#϶���Ɯ��E�K������v?K�p�˰�U��b��(S��\���8�D�������]��x�4�(�J�Ͱ��~u�ToG� �N7�L�䝔:��J2ʼn��ZJ�ǑJ�k�}�$<u�)�+��!Cl�A/b��9�����c����W���g�3O������Cc�a��EE#r�� �Ah� ��s�\uc�q����=e���a���8��]|��b'n3kC@PI�2D����ғ5zNq�.�)��}
|
2
|
+
�����{7G�UA��ՠ��5����m���"�y���b��,�bǁ��T�~T�8�̬J�� ��m���xE�o�*f��:iP0�S��`
|
metadata
CHANGED
@@ -1,10 +1,11 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: sus
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.16.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Samuel Williams
|
8
|
+
- Brad Schrag
|
8
9
|
autorequire:
|
9
10
|
bindir: bin
|
10
11
|
cert_chain:
|
@@ -37,7 +38,7 @@ cert_chain:
|
|
37
38
|
Q2K9NVun/S785AP05vKkXZEFYxqG6EW012U4oLcFl5MySFajYXRYbuUpH6AY+HP8
|
38
39
|
voD0MPg1DssDLKwXyt1eKD/+Fq0bFWhwVM/1XiAXL7lyYUyOq24KHgQ2Csg=
|
39
40
|
-----END CERTIFICATE-----
|
40
|
-
date:
|
41
|
+
date: 2023-01-03 00:00:00.000000000 Z
|
41
42
|
dependencies:
|
42
43
|
- !ruby/object:Gem::Dependency
|
43
44
|
name: bake-test
|
@@ -154,7 +155,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
154
155
|
- !ruby/object:Gem::Version
|
155
156
|
version: '0'
|
156
157
|
requirements: []
|
157
|
-
rubygems_version: 3.
|
158
|
+
rubygems_version: 3.4.1
|
158
159
|
signing_key:
|
159
160
|
specification_version: 4
|
160
161
|
summary: A fast and scalable test runner.
|
metadata.gz.sig
CHANGED
Binary file
|