secret_knock 0.2.0 → 0.2.1

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
  SHA1:
3
- metadata.gz: 81911ddcaec334a9e82098526bc56782fb79b267
4
- data.tar.gz: 6741ca05a53298891ba58164bcdd4ac389991cbb
3
+ metadata.gz: 65090eccf99cdc0971ace6bdf7a458639b972266
4
+ data.tar.gz: 9a19b89e369d5b01f6a5afb03928f6d5b1d9bdf4
5
5
  SHA512:
6
- metadata.gz: d94dc502275011b03199af610464cacc79698963ad3bce696fee40153e55d6944ea1f446235951f55ca7f84284bd572d1055754bb82395ed9d1c5be402df9c45
7
- data.tar.gz: af9d6643f0956f0ef866c10629bbd65e4cbb28110b2930071bae008b8e8774deab903798a5ee49d2e6b75d3b9beed461e2df5eeff3aca745c27f41e607cbac05
6
+ metadata.gz: a6e44c15c13622c66a1bdd55c6f476b3583b9c1e091d5c7cdcd02304042157c35a488eb71f468458f892aeef0423e97b92e77573ef75743d6091c77b773ef318
7
+ data.tar.gz: 7b38d20b6ab6320480114b7f5769699dd47ae3f5fb4241d1d220a90176a64773060affd254328cd4d9630d8529c036a146630618a5f8849d40c7065e313ff415
Binary file
data.tar.gz.sig CHANGED
Binary file
@@ -30,6 +30,7 @@ class SecretKnock
30
30
  # hash lookup and inverted hash lookup
31
31
 
32
32
  @h = (a.take(27).sort_by(&:first) + a[27..-1]).to_h
33
+ @h.merge!({"7" => 7, "8" => 8, "9" => 9})
33
34
 
34
35
  #> h contains the following
35
36
  # {
@@ -37,9 +38,10 @@ class SecretKnock
37
38
  # "h"=>13, "i"=>6, "j"=>36, "k"=>35, "l"=>16, "m"=>23, "n"=>11, "o"=>5,
38
39
  # "p"=>32, "q"=>42, "r"=>14, "s"=>12, "t"=>3, "u"=>22, "v"=>34, "w"=>24,
39
40
  # "x"=>41, "y"=>31, "z"=>43, "1"=>44, "2"=>45, "3"=>46, "4"=>51, "5"=>52,
40
- # "6"=>53, "7"=>54, "8"=>55, "9"=>56, "0"=>61, "<backspace>"=>62
41
+ # "6"=>53, "7"=>7, "8"=>8, "9"=>9, "0"=>61, "<backspace>"=>62
41
42
  # }
42
-
43
+
44
+
43
45
 
44
46
  @hb = h.invert
45
47
 
@@ -85,8 +87,8 @@ class SecretKnock
85
87
 
86
88
  print @i.to_s + ' ' if @verbose
87
89
 
88
- @a[-1] = @i
89
-
90
+ @a[-1] = @i if @a.any?
91
+
90
92
  @t = Time.now
91
93
 
92
94
  @external.knock if @external
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: secret_knock
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.0
4
+ version: 0.2.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - James Robertson
@@ -31,7 +31,7 @@ cert_chain:
31
31
  99xt/V2xyDfAqj78KwcwRRl/reRM/gEwgnYu81SLIJj/VBHE111bleyFUb95Y6rQ
32
32
  Zs+o5zexvKrktw==
33
33
  -----END CERTIFICATE-----
34
- date: 2016-01-19 00:00:00.000000000 Z
34
+ date: 2016-01-20 00:00:00.000000000 Z
35
35
  dependencies: []
36
36
  description:
37
37
  email: james@r0bertson.co.uk
metadata.gz.sig CHANGED
Binary file