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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 105bfdc91ba47ae3170367f67b7ad1d54929eb614d629b81539f8c7bb7ec2236
4
- data.tar.gz: d8fa3703fda620db1156f2c7de4d4690ac0e2c27ae877cbec094820ad61af44a
3
+ metadata.gz: f16ded1e988830364267df7d10ab98c2ecd19f22f52b72e0ddfd2a755be43ef7
4
+ data.tar.gz: 6f9207560467e19928cc219757878c2c017931d28e4e9f892e40e572c2ff7664
5
5
  SHA512:
6
- metadata.gz: 00e9bc0f6f4af675337fa81d1838f154289b5ca5ceee4cff502f4bbe558849be86be7d651689afba45e836f8dd95680d99845e8dbe3395157d1366b849338bbb
7
- data.tar.gz: a38c732d74afea64c2ed27190746e39e5311f3635e16d5f3642c813f4a598f71f00ab2fb39f4359ac77c5dc096b703f7d6a737624d72e30caa87a808ffc1bec3
6
+ metadata.gz: 311277b318ee91cbc013a7fd62bd954a50b5b5e0e87946196e61cd63e397f197af9cfba65f1f29bd2c4be29e5f5b646972f0c7ace3d690cac0efd03a62f5479c
7
+ data.tar.gz: 6afa91a2abcd786f3e5f3f9a759ddeb8fd5fdf1e96e420ea6599a69b34cc1aa02a911a82a13ef455c77d2c1969e418838b0ead83e14e53550cf1de0d6ae15935
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- icodebreaker_gem (0.3.7)
4
+ icodebreaker_gem (0.3.8)
5
5
  rake (~> 13.0)
6
6
 
7
7
  GEM
data/lib/game_core.rb CHANGED
@@ -22,7 +22,7 @@ module IcodebreakerGem
22
22
 
23
23
  '+' * [pluses1, pluses2].min + '-' * [minuses1, minuses2].min
24
24
  end
25
-
25
+
26
26
  def hint
27
27
  @shuffle.pop
28
28
  end
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module IcodebreakerGem
4
- VERSION = '0.3.7'
4
+ VERSION = '0.3.8'
5
5
  end
@@ -6,15 +6,21 @@ module IcodebreakerGem
6
6
  CODE = /^[1-6]{4}$/.freeze
7
7
 
8
8
  def validate_name(name)
9
- raise ArgumentError, 'Incorrect username' unless name.to_s.match?(USERNAME)
9
+ return unless name.to_s.match?(USERNAME)
10
+
11
+ true
10
12
  end
11
13
 
12
14
  def validate_code(code)
13
- raise ArgumentError, 'Incorrect code' unless code.to_s.match?(CODE)
15
+ return unless code.to_s.match?(CODE)
16
+
17
+ true
14
18
  end
15
19
 
16
20
  def validate_difficulty(difficulty)
17
- raise ArgumentError, 'No such difficulty' unless %i[easy medium hell].include? difficulty.to_s.to_sym
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.7
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-14 00:00:00.000000000 Z
11
+ date: 2021-10-15 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rake