spectus 2.4.0 → 2.5.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
2
  SHA1:
3
- metadata.gz: dbcd04aaa8066c8ff3195c36b283169b10530296
4
- data.tar.gz: b68284b11d486d8a0cec19bcdecd65adcf7bb674
3
+ metadata.gz: dd7a1b7b057daf5d0165b3e8d5b7b2d7bae2fc1d
4
+ data.tar.gz: 33f52d7e2a81e5369124481e4d251094eccf5a72
5
5
  SHA512:
6
- metadata.gz: 74cf34427dc5b39763a3bfb2f32469ff0e78013e54afb5218b3ac3555ff8357cd95fc0d097862ff4108beeaeab4a63746291865399e854732b84750a0bb912d1
7
- data.tar.gz: 4ca5afde6ac2c85272caa1256ef4847d305f4aa045ed6369d9acc85bdd1aab192c9ec3bbc8538f9b68e2fa571b0ab2ccdd3831ac83013c1fba79fa8263207c4c
6
+ metadata.gz: 8e74c1c63a8493d7128bf1bdca786e9c7dbfe247f610f829d9222be3aa343a39944d540c02c0e86c283b0baded388ae8b64bfe07df937d828f7c57f672f4bb10
7
+ data.tar.gz: 90d4b2fcbfe2265bf7ffdc5c11aa58d74eaaaf943c0fe21817a3dc903edbfd3fb791f30aaf06971e8d2e38f1f69cffdb56ac81a4af239dcc3b73624a0f64a52e
checksums.yaml.gz.sig CHANGED
Binary file
data.tar.gz.sig CHANGED
@@ -1,3 +1 @@
1
- ���3Q�#"����Š�)��v��V ��XI���4es;Ll:�Vk�.� Ga}Ϸ�N �aH#�PNO?��U��
2
- ƂG����N�P���Ȫ�/-��7S��c�tt����Zo����ʫ���Q�g� ��ۡZ"�N���f� �>�g�Qo�+�Y���rn�ĮC�\�{�M��(���dV!�c�y{�|�f �zt�Z���X�g�Ȉ3Vo����ۢ8��W)?q$:Ӟ+Ә��5
3
- �����̠�.g
1
+ ���������)`N��%��'�VW-����ٟ�O��>5�B���� ��$AH��|��+W4K�:��ᘹv�t7�~J�a�<�>Q�l�� =�'�&���βnX�(�=� "�~:��<rW�>��K�b4���� 3*v���v~�����U؀6���CTMZ�> f�ҡ�LC��<��T��rZ8���I+ŏ�������\�t�R���:I*�ʮӚ����-.�x��`6��bJb��:0+�:�3KIa��
data/VERSION.semver CHANGED
@@ -1 +1 @@
1
- 2.4.0
1
+ 2.5.0
@@ -0,0 +1 @@
1
+ 3ce44d084f1cd8a6cf79947912c3ae12bf397d0af3442bdd77d4e0cc1e740752b4e68ec57f9b448ecf54cd3a3f84327e86a93885e17563a420d3977fefc5dc40
@@ -1,7 +1,7 @@
1
1
  require_relative File.join 'level', 'high'
2
2
  require_relative File.join 'level', 'medium'
3
3
  require_relative File.join 'level', 'low'
4
- require_relative 'challenge'
4
+ require 'defi'
5
5
 
6
6
  module Spectus
7
7
  # Wraps the target of an expectation.
@@ -14,7 +14,7 @@ module Spectus
14
14
  # @param subject [Proc] The value which is compared with the expected value.
15
15
  def initialize(&subject)
16
16
  @subject = subject
17
- @challenges = [Challenge.new(:call)]
17
+ @challenges = [::Defi.send(:call)]
18
18
  end
19
19
 
20
20
  # @!attribute [r] subject
@@ -11,7 +11,7 @@ module Spectus
11
11
  #
12
12
  # @param message [String] It is describing the actual/error value.
13
13
  # @param subject [#object_id] The untrusted object to be tested.
14
- # @param challenge [Challenge] The method to call on the subject.
14
+ # @param challenge [Defi::Challenge] The challenge for the subject.
15
15
  # @param actual [#object_id] The value that the subject return through
16
16
  # its challenge.
17
17
  # @param expected [Hash, Symbol] The definition of the expected value.
@@ -25,7 +25,7 @@ module Spectus
25
25
 
26
26
  # @!attribute [r] last_challenge
27
27
  #
28
- # @return [Challenge] The last evaluated challenge.
28
+ # @return [Defi::Challenge] The last evaluated challenge.
29
29
  attr_reader :last_challenge
30
30
 
31
31
  # @!attribute [r] actual
data/spectus.gemspec CHANGED
@@ -14,6 +14,7 @@ Gem::Specification.new do |spec|
14
14
  spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
15
15
  spec.require_paths = ['lib']
16
16
 
17
+ spec.add_dependency 'defi', '~> 1.1.0'
17
18
  spec.add_dependency 'matchi', '~> 0.0.9'
18
19
 
19
20
  spec.add_development_dependency 'bundler', '~> 1.10'
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: spectus
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.4.0
4
+ version: 2.5.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Cyril Wack
@@ -30,8 +30,22 @@ cert_chain:
30
30
  dzJvWzQ1+dJU6WQv75E9ddSkaQrK3nhdgQVu+/wgvGSrsMvOGNz+LXaSDxQqZuwX
31
31
  0KNQFuIukfrdk8URwRnHoAnvx4U93iUw
32
32
  -----END CERTIFICATE-----
33
- date: 2015-09-10 00:00:00.000000000 Z
33
+ date: 2015-09-11 00:00:00.000000000 Z
34
34
  dependencies:
35
+ - !ruby/object:Gem::Dependency
36
+ name: defi
37
+ requirement: !ruby/object:Gem::Requirement
38
+ requirements:
39
+ - - "~>"
40
+ - !ruby/object:Gem::Version
41
+ version: 1.1.0
42
+ type: :runtime
43
+ prerelease: false
44
+ version_requirements: !ruby/object:Gem::Requirement
45
+ requirements:
46
+ - - "~>"
47
+ - !ruby/object:Gem::Version
48
+ version: 1.1.0
35
49
  - !ruby/object:Gem::Dependency
36
50
  name: matchi
37
51
  requirement: !ruby/object:Gem::Requirement
@@ -148,8 +162,8 @@ files:
148
162
  - checksum/spectus-2.2.0.gem.sha512
149
163
  - checksum/spectus-2.3.0.gem.sha512
150
164
  - checksum/spectus-2.3.1.gem.sha512
165
+ - checksum/spectus-2.4.0.gem.sha512
151
166
  - lib/spectus.rb
152
- - lib/spectus/challenge.rb
153
167
  - lib/spectus/expectation_target.rb
154
168
  - lib/spectus/level/base.rb
155
169
  - lib/spectus/level/high.rb
metadata.gz.sig CHANGED
Binary file
@@ -1,33 +0,0 @@
1
- module Spectus
2
- # This class contains a challenge to apply against an object.
3
- #
4
- # @api public
5
- #
6
- class Challenge
7
- # Initialize the challenge class.
8
- #
9
- # @param method [#to_sym] The identifier of a method.
10
- # @param args [Array] The arguments of the method.
11
- def initialize(method, *args)
12
- @method = method.to_sym
13
- @args = args
14
- end
15
-
16
- # @param object [#public_send] The subject of the challenge.
17
- #
18
- # @return [BasicObject] The result of the challenge.
19
- def to(object)
20
- object.public_send(@method, *@args)
21
- end
22
-
23
- # Properties of the challenge.
24
- #
25
- # @return [Hash] The properties of the challenge.
26
- def to_h
27
- {
28
- method: @method,
29
- args: @args
30
- }
31
- end
32
- end
33
- end