rbCaptcha 0.3.2 → 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: 7da5d7a97f4e10887ab8782d27689791477ebd45fe341c1fbf00bc51be6346a3
4
- data.tar.gz: 1b2bb409872d041aca6ecd2a5a3510cb461568eac8d02599ed4ba1f9c6438044
3
+ metadata.gz: e3fa778826608d92cba6bb315d1acc51cb62e58c0954d09f931b9009a5f083d3
4
+ data.tar.gz: f11c77d1d10c735811e7416f0c5126b55f3b4461f377a86d1e663d9c9c163768
5
5
  SHA512:
6
- metadata.gz: 926e364cd78c12a88bb095c4db254de85f31638b60bd64c05aec2e0b84dbc45432146082fd787e25349e087bb13cf8a5e00c39c82e393b57cc94539213f92c53
7
- data.tar.gz: '0391d1204f450f2f55111b15699393f29485d07dccfcf7940ceef447e4a7c8e5f7b4c73851215f15ef518dc33dc16403d4a35098028440fcfc7d459553ca9162'
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.2"
4
+ VERSION = "0.3.4"
5
5
  end
data/lib/rbCaptcha.rb CHANGED
@@ -2,34 +2,39 @@
2
2
 
3
3
  require_relative "rbCaptcha/version"
4
4
 
5
- def crun()
5
+ class << self
6
+ attr_accessor :words, :cwords, :truew, :mw0, :mw, :data
7
+
8
+ def crun(data)
6
9
 
7
- 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
10
+ words = [
11
+ '29183!с92-3822a29!``~39t', # => cat
12
+ '38134@3#2d392o1911!!(@)O!!!#g', # => dog
13
+ '3928937h392!@(o)303m39---e' # => home
14
+ ]
14
15
 
15
- if cword == words[0]
16
- truew = 'cat'
17
- elsif cword == words[1]
18
- truew = 'dog'
19
- elsif cword == words[2]
20
- truew = 'home'
21
- end
22
-
23
- puts "Please, to continue, write a word that is written in lowercase letters.\n #{cword}"
16
+ cword = words.sample
17
+
18
+ if cword == words[0]
19
+ truew = 'cat'
20
+ elsif cword == words[1]
21
+ truew = 'dog'
22
+ elsif cword == words[2]
23
+ truew = 'home'
24
+ end
24
25
 
25
- mw0 = gets.chomp
26
- mw = mw0.downcase
27
- if mw == truew
28
- puts "You have passed the captcha sir."
29
- return true
30
- else
31
- puts "You didn't pass the captcha, try again."
32
- return false
26
+ puts "Please, to continue, write a word that is written in lowercase letters.\n #{cword}"
27
+
28
+ mw0 = gets.chomp
29
+ mw = mw0.downcase
30
+ if mw == truew
31
+ puts "You have passed the captcha sir."
32
+ return true
33
+ else
34
+ puts "You didn't pass the captcha, try again."
35
+ return false
36
+ end
37
+
38
+ sleep(data)
33
39
  end
34
- sleep(5)
35
- end
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.2
4
+ version: 0.3.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - DmitriySergeevich