key-vortex 0.1.3 → 0.1.4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile.lock +1 -1
- data/Guardfile +1 -1
- data/lib/key_vortex/constraint/base.rb +1 -1
- data/lib/key_vortex/constraint/length.rb +2 -2
- data/lib/key_vortex/constraint/maximum.rb +2 -2
- data/lib/key_vortex/constraint/minimum.rb +2 -2
- data/lib/key_vortex/limitation.rb +8 -2
- data/lib/key_vortex/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 2ef4caa4048de91fa4f99f928fd154c9ae3950a971fb6d8ad34149070f900914
|
4
|
+
data.tar.gz: 179229a1dd86d3e31fa2dca1d43089ab11000625a5260c5aaf8c31c7a691f3c8
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 7c847153af457304066f16e28436a018f289e73b1a929811e506c83d5bfb1da3d45be68a89b6c3781207dd11481753cfd9ec6b95335da58c6a88fc072d65546f
|
7
|
+
data.tar.gz: cfddc7282c2775b03595c679a3369c61584069b2cb961eeb68194ecb9d62fa1c204602611a1be473c410271648bcb3f7fe4b6b8230dacd874e3b2daea66a119a
|
data/Gemfile.lock
CHANGED
data/Guardfile
CHANGED
@@ -27,7 +27,7 @@
|
|
27
27
|
# * 'just' rspec: 'rspec'
|
28
28
|
|
29
29
|
group :red_green_refactor, halt_on_fail: true do
|
30
|
-
guard :rspec, cmd: "bundle exec rspec", all_on_pass: true do
|
30
|
+
guard :rspec, cmd: "bundle exec rspec", failed_mode: :focus, all_on_pass: true do
|
31
31
|
require "guard/rspec/dsl"
|
32
32
|
dsl = Guard::RSpec::Dsl.new(self)
|
33
33
|
|
@@ -30,10 +30,16 @@ class KeyVortex
|
|
30
30
|
!allows?(limitation)
|
31
31
|
end
|
32
32
|
|
33
|
+
def applicable_constraints(constraint)
|
34
|
+
@constraints.select do |con|
|
35
|
+
con.applies_to?(constraint)
|
36
|
+
end
|
37
|
+
end
|
38
|
+
|
33
39
|
def accomodates?(constraint)
|
34
|
-
|
40
|
+
!applicable_constraints(constraint).select do |con|
|
35
41
|
con.within?(constraint)
|
36
|
-
end
|
42
|
+
end.empty?
|
37
43
|
end
|
38
44
|
|
39
45
|
def to_s
|
data/lib/key_vortex/version.rb
CHANGED