icodebreaker_gem 0.3.7 → 0.3.8
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/lib/game_core.rb +1 -1
- data/lib/icodebreaker_gem/version.rb +1 -1
- data/lib/modules/validation.rb +9 -3
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: f16ded1e988830364267df7d10ab98c2ecd19f22f52b72e0ddfd2a755be43ef7
|
4
|
+
data.tar.gz: 6f9207560467e19928cc219757878c2c017931d28e4e9f892e40e572c2ff7664
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 311277b318ee91cbc013a7fd62bd954a50b5b5e0e87946196e61cd63e397f197af9cfba65f1f29bd2c4be29e5f5b646972f0c7ace3d690cac0efd03a62f5479c
|
7
|
+
data.tar.gz: 6afa91a2abcd786f3e5f3f9a759ddeb8fd5fdf1e96e420ea6599a69b34cc1aa02a911a82a13ef455c77d2c1969e418838b0ead83e14e53550cf1de0d6ae15935
|
data/Gemfile.lock
CHANGED
data/lib/game_core.rb
CHANGED
data/lib/modules/validation.rb
CHANGED
@@ -6,15 +6,21 @@ module IcodebreakerGem
|
|
6
6
|
CODE = /^[1-6]{4}$/.freeze
|
7
7
|
|
8
8
|
def validate_name(name)
|
9
|
-
|
9
|
+
return unless name.to_s.match?(USERNAME)
|
10
|
+
|
11
|
+
true
|
10
12
|
end
|
11
13
|
|
12
14
|
def validate_code(code)
|
13
|
-
|
15
|
+
return unless code.to_s.match?(CODE)
|
16
|
+
|
17
|
+
true
|
14
18
|
end
|
15
19
|
|
16
20
|
def validate_difficulty(difficulty)
|
17
|
-
|
21
|
+
return unless %i[easy medium hell].include? difficulty.to_s.to_sym
|
22
|
+
|
23
|
+
true
|
18
24
|
end
|
19
25
|
end
|
20
26
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: icodebreaker_gem
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.3.
|
4
|
+
version: 0.3.8
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- JohnnyGsy
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2021-10-
|
11
|
+
date: 2021-10-15 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rake
|