codebreaker_karolina 0.1.4 → 0.1.5

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: 1276ade3c40cf26100044dfbf9666471ea8572c0392bd77876c1d0c05f495097
4
- data.tar.gz: 4d5962dc8c4751e4d09998f06cb2ea6fbbeef06273c7941d065b37820d4c83b7
3
+ metadata.gz: 7453baca50feaa631814b88629ecd461c00a09ed14e3bd57da5ad842d8ddca36
4
+ data.tar.gz: 0e8567cb5e05658071c12af9c4f91c5828db7b4a39d446dd4a9d25f4f1ff788b
5
5
  SHA512:
6
- metadata.gz: 2863324da0f6b4603426e8070b7aaeb0b842a642285e206928ef6f3f4677c6d6a1fa484eadc6b34c97a275abe301bd062d5b57c66e77c7de6058506a1656174d
7
- data.tar.gz: 9d15b36e87d3f36f27965a6b81b3c821b41f75f373b2815cd9c2d5d4e82edc9d8930420128cbca4d984b5e9abaac4172d994bd5e9d6bb9865ee8b4b6fe6fa0fe
6
+ metadata.gz: 57f8fb6bd70d1bd16d6af68737c745a8b12d2b970f28e82c88479a26e7433f93fc9deb47126218ec2366c25da593e5ea608a01f566b6f5178fda56753d041ed9
7
+ data.tar.gz: 70d969087c130c05791bfeb42557b053f0d1b3da9635a0c3f3aa39254a1cefffb3d212880be144036303f453678716645982d9ee48ab326b7bfc8c0f9146d3c1
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- codebreaker_karolina (0.1.4)
4
+ codebreaker_karolina (0.1.5)
5
5
 
6
6
  GEM
7
7
  remote: https://rubygems.org/
Binary file
Binary file
@@ -1,3 +1,3 @@
1
1
  module CodebreakerKarolina
2
- VERSION = '0.1.4'.freeze
2
+ VERSION = '0.1.5'.freeze
3
3
  end
@@ -23,6 +23,8 @@ module CodebreakerKarolina
23
23
  private
24
24
 
25
25
  def load_file_stats
26
+ return unless File.file?(FILE_NAME)
27
+
26
28
  YAML.load_stream(File.open(FILE_NAME))
27
29
  end
28
30
  end
data/lib/modules/game.rb CHANGED
@@ -41,9 +41,7 @@ module CodebreakerKarolina
41
41
  private
42
42
 
43
43
  def valid_code?(code)
44
- return true if code =~ (/[1-6]{4}/)
45
-
46
- false
44
+ !!code[/\A[1-6]{4}\z/]
47
45
  end
48
46
 
49
47
  def generate_code
data/lib/modules/user.rb CHANGED
@@ -13,8 +13,6 @@ class User
13
13
  private
14
14
 
15
15
  def valid?(name)
16
- return true if name.match(/[A-Za-z0-9_]{3,20}/)
17
-
18
- false
16
+ !!name[/\A[A-Za-z0-9]{3,20}\z/]
19
17
  end
20
18
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: codebreaker_karolina
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.4
4
+ version: 0.1.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - drkarolina
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2022-09-08 00:00:00.000000000 Z
11
+ date: 2022-09-11 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: fasterer
@@ -127,6 +127,8 @@ files:
127
127
  - codebreaker_karolina-0.1.0.gem
128
128
  - codebreaker_karolina-0.1.1.gem
129
129
  - codebreaker_karolina-0.1.2.gem
130
+ - codebreaker_karolina-0.1.3.gem
131
+ - codebreaker_karolina-0.1.4.gem
130
132
  - lib/codebreaker_karolina.rb
131
133
  - lib/codebreaker_karolina/version.rb
132
134
  - lib/constants.rb