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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 1afb870c7c8f8f0051ee1e8a7462b8a5da8d4a4aac3b410a83447ad520330ac0
4
- data.tar.gz: 2a9cef08d1c0e81f6afe139ec8065fa790f94efcd06863c414e2d7abb318f00e
3
+ metadata.gz: f36ad4203b1471b0dfa6a95fd4407978f5bfab703c09d14d2ee481d519296b46
4
+ data.tar.gz: 539e6eb3ef50f12d6159c271a63130e696c3f48f914e1b74e7671a90cf90f726
5
5
  SHA512:
6
- metadata.gz: 5e881bbf03b5d45c30c9af256b10cd962c430bfd294708547d4bc4e7a9f0ff42dd4209ae849eaf3ec108eff2fcf5e5a040e05be79cd382cc26b55a0c77dc62c0
7
- data.tar.gz: 1166c7dc2daac295c04b8a3134d449853a9a68086f8bb268ce93bffc7175ac6ea0a7c8428c6adfb459c7fabf0046b0b7540195f9d07a838a326d31e553f11a55
6
+ metadata.gz: dddf727776b219c29970aea30f177903bd52f82497a552dd55ff4821be51b5722aade3e081b3eb0d878ab033385ef375aee222afbf500b07a109b2bc8438f85f
7
+ data.tar.gz: 9dd5df66341eaac3877777af106cd2262720991a3ec742b7859934790255440334b961bce01a3b28306e45b7c4db33d56f56cc5bdf052143f4109a4854f3ba8e
checksums.yaml.gz.sig CHANGED
Binary file
data/lib/sus/be_truthy.rb CHANGED
@@ -1,7 +1,7 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  # Released under the MIT License.
4
- # Copyright, 2021-2022, by Samuel Williams.
4
+ # Copyright, 2022, by Samuel Williams.
5
5
 
6
6
  module Sus
7
7
  module BeTruthy
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-2022, by Samuel Williams.
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 = ->(klass, path){klass.class_eval(::File.read(path), path)}
10
+ Sus::TOPLEVEL_CLASS_EVAL = ->(__klass__, __path__){__klass__.class_eval(::File.read(__path__), __path__)}
10
11
 
11
12
  module Sus
12
13
  module File
@@ -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
@@ -2,6 +2,7 @@
2
2
 
3
3
  # Released under the MIT License.
4
4
  # Copyright, 2021-2022, by Samuel Williams.
5
+ # Copyright, 2022, by Brad Schrag.
5
6
 
6
7
  require_relative 'base'
7
8
 
data/lib/sus/version.rb CHANGED
@@ -4,5 +4,5 @@
4
4
  # Copyright, 2021-2022, by Samuel Williams.
5
5
 
6
6
  module Sus
7
- VERSION = "0.15.2"
7
+ VERSION = "0.16.0"
8
8
  end
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-2022, by Samuel Williams.
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
- Z52q��Wg>� ]�����F )+��g�mtx�Ƕ&��L�p��FB�^�Q&
2
- ሹ$h����mE�lAD?���OH��J��+���hR9�E,��lp݇+�r[oR��(�wÎ�q�K>X���B�*�2��y^ Rc<g#�>+����5�^4�Q�ʷ�����&�#������m",3��VB��euz��o�%U\!�x�!�������&�����QX���Ϸ�Ob���D ���:Fc��'��,�'���HӤ�U����ah].7�l��������_7X�&!��3k�`�?>�~���+/n�>�}isR��(@! 1,Zj��0АrТ���=��U|�4��Ę��\�i7Ȏ������Ζ+p��
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������Cca��EE#r��Ah� ��s�\ucq����=e���a ���8��]|��b'n3kC@PI�2D����ғ5 zNq�.�)��}
2
+ �����{7GUA��ՠ��5����m���"�y���b��,�bǁ��T�~T8�̬J�� ��m���xEo�*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.15.2
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: 2022-12-04 00:00:00.000000000 Z
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.3.7
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