rbCaptcha 0.3.3 → 0.3.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 61e816d8dbfb2b952f318648b04ffacb40ebbce8078f5f71a76784f89cae18e8
4
- data.tar.gz: a31a9c205a1de26baad0adf80f0e609acdf0b9dfcfe820fcb54ab5ee6ad8be69
3
+ metadata.gz: e3fa778826608d92cba6bb315d1acc51cb62e58c0954d09f931b9009a5f083d3
4
+ data.tar.gz: f11c77d1d10c735811e7416f0c5126b55f3b4461f377a86d1e663d9c9c163768
5
5
  SHA512:
6
- metadata.gz: 0cb6558cc05464f5d808144cab1b2bcf1600ceedfe73e711c0261e39d6a719eacae74e7a7c08485076bda19817695abefa05827396788fc1f4a96804ffb50406
7
- data.tar.gz: 11bd44607fd55adb2dcd4ae6e4d53498c7f4f96d7fa678e81281d973382d44d0e8b11ee8f83085d2dbce721e708bded510a5bda0bcb93a773fe8e7f397f56be2
6
+ metadata.gz: 33277b4f10e63ce21e362ce8efc13d6e624fff2c63488159f1ed05388779f02c83891098f2687e8824d9ea5f79672490b1eddd3a07b1f90681aa91175e4b7557
7
+ data.tar.gz: 4b06eee307b23703154b0234e1eeceb1e88b0a672c0da66a7e28a7e5a730c7f4b2d5de0b370d77690e69738bf11ddd5f5190ae1009ed9ddd2256ad8948c6142a
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module RbCaptcha
4
- VERSION = "0.3.3"
4
+ VERSION = "0.3.4"
5
5
  end
data/lib/rbCaptcha.rb CHANGED
@@ -1,37 +1,40 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  require_relative "rbCaptcha/version"
4
- module RbCaptcha
5
- def crun()
4
+
5
+ class << self
6
+ attr_accessor :words, :cwords, :truew, :mw0, :mw, :data
7
+
8
+ def crun(data)
6
9
 
7
10
  words = [
8
- '29183!с92-3822a29!``~39t', # => cat
9
- '38134@3#2d392o1911!!(@)O!!!#g', # => dog
10
- '3928937h392!@(o)303m39---e' # => home
11
- ]
12
-
13
- cword = words.sample
11
+ '29183!с92-3822a29!``~39t', # => cat
12
+ '38134@3#2d392o1911!!(@)O!!!#g', # => dog
13
+ '3928937h392!@(o)303m39---e' # => home
14
+ ]
14
15
 
16
+ cword = words.sample
17
+
15
18
  if cword == words[0]
16
- truew = 'cat'
19
+ truew = 'cat'
17
20
  elsif cword == words[1]
18
- truew = 'dog'
21
+ truew = 'dog'
19
22
  elsif cword == words[2]
20
- truew = 'home'
23
+ truew = 'home'
21
24
  end
22
-
23
- puts "Please, to continue, write a word that is written in lowercase letters.\n #{cword}"
24
25
 
26
+ puts "Please, to continue, write a word that is written in lowercase letters.\n #{cword}"
27
+
25
28
  mw0 = gets.chomp
26
29
  mw = mw0.downcase
27
30
  if mw == truew
28
- puts "You have passed the captcha sir."
29
- return true
31
+ puts "You have passed the captcha sir."
32
+ return true
30
33
  else
31
- puts "You didn't pass the captcha, try again."
32
- return false
34
+ puts "You didn't pass the captcha, try again."
35
+ return false
33
36
  end
34
-
35
- sleep(5)
37
+
38
+ sleep(data)
36
39
  end
37
40
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rbCaptcha
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.3
4
+ version: 0.3.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - DmitriySergeevich