konamio 0.0.1 → 0.0.2
Sign up to get free protection for your applications and to get access to all the features.
- data/README.md +39 -1
- data/lib/konamio.rb +0 -1
- data/lib/konamio/sequence/requisition.rb +1 -1
- data/lib/konamio/version.rb +1 -1
- metadata +67 -44
- checksums.yaml +0 -7
- data/Gemfile.lock +0 -26
- data/lib/konamio/key_map.rb +0 -1
- data/lib/konamio/sequence.rb +0 -7
data/README.md
CHANGED
@@ -1 +1,39 @@
|
|
1
|
-
Konamio
|
1
|
+
## Konamio
|
2
|
+
|
3
|
+
![Konami Code](http://images.nintendolife.com/news/2012/01/the_origins_of_the_konami_code_revealed/attachment/0/small.jpg)
|
4
|
+
|
5
|
+
gem install konamio
|
6
|
+
|
7
|
+
and
|
8
|
+
|
9
|
+
require "konamio"
|
10
|
+
|
11
|
+
|
12
|
+
Default Usage:
|
13
|
+
```ruby
|
14
|
+
> Konamio::Sequence::Requisition.new
|
15
|
+
Enter konami code (or hit escape)
|
16
|
+
Good job, you.
|
17
|
+
|
18
|
+
=> #<Konamio::Sequence::Requisition:0x8821de4
|
19
|
+
@confirmation="Good job, you.",
|
20
|
+
@prompt="Enter konami code (or hit escape)",
|
21
|
+
@sequence="\e[A\e[A\e[B\e[B\e[D\e[C\e[D\e[CBA">
|
22
|
+
```
|
23
|
+
|
24
|
+
You can configure it to listen for any sequence you want:
|
25
|
+
```ruby
|
26
|
+
> Konamio::Sequence::Requisition.new({
|
27
|
+
sequence: "a".upto("z").to_a.reverse,
|
28
|
+
prompt: "Say the alphabet backwards",
|
29
|
+
confirmation: "Okay, you can go"
|
30
|
+
})
|
31
|
+
Say the alphabet backwards
|
32
|
+
Okay, you can go
|
33
|
+
=> #<Konamio::Sequence::Requisition:0x8699bac
|
34
|
+
@confirmation="Okay, you can go",
|
35
|
+
@prompt="Say the alphabet backwards",
|
36
|
+
@sequence=["z","y","x",...,"a"]>
|
37
|
+
```
|
38
|
+
|
39
|
+
Just something fun...
|
data/lib/konamio.rb
CHANGED
data/lib/konamio/version.rb
CHANGED
metadata
CHANGED
@@ -1,71 +1,88 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: konamio
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
|
4
|
+
prerelease:
|
5
|
+
version: 0.0.2
|
5
6
|
platform: ruby
|
6
7
|
authors:
|
7
8
|
- Tad Hosford
|
8
|
-
autorequire:
|
9
|
+
autorequire:
|
9
10
|
bindir: bin
|
10
11
|
cert_chain: []
|
11
12
|
date: 2013-05-03 00:00:00.000000000 Z
|
12
13
|
dependencies:
|
13
14
|
- !ruby/object:Gem::Dependency
|
14
15
|
name: pay_dirt
|
16
|
+
version_requirements: !ruby/object:Gem::Requirement
|
17
|
+
requirements:
|
18
|
+
- - ! '>='
|
19
|
+
- !ruby/object:Gem::Version
|
20
|
+
version: !binary |-
|
21
|
+
MA==
|
22
|
+
none: false
|
15
23
|
requirement: !ruby/object:Gem::Requirement
|
16
24
|
requirements:
|
17
|
-
- - '>='
|
25
|
+
- - ! '>='
|
18
26
|
- !ruby/object:Gem::Version
|
19
|
-
version:
|
20
|
-
|
27
|
+
version: !binary |-
|
28
|
+
MA==
|
29
|
+
none: false
|
21
30
|
prerelease: false
|
31
|
+
type: :runtime
|
32
|
+
- !ruby/object:Gem::Dependency
|
33
|
+
name: minitest
|
22
34
|
version_requirements: !ruby/object:Gem::Requirement
|
23
35
|
requirements:
|
24
|
-
- - '>='
|
36
|
+
- - ! '>='
|
25
37
|
- !ruby/object:Gem::Version
|
26
|
-
version:
|
27
|
-
|
28
|
-
|
38
|
+
version: !binary |-
|
39
|
+
MA==
|
40
|
+
none: false
|
29
41
|
requirement: !ruby/object:Gem::Requirement
|
30
42
|
requirements:
|
31
|
-
- - '>='
|
43
|
+
- - ! '>='
|
32
44
|
- !ruby/object:Gem::Version
|
33
|
-
version:
|
34
|
-
|
45
|
+
version: !binary |-
|
46
|
+
MA==
|
47
|
+
none: false
|
35
48
|
prerelease: false
|
49
|
+
type: :development
|
50
|
+
- !ruby/object:Gem::Dependency
|
51
|
+
name: pry
|
36
52
|
version_requirements: !ruby/object:Gem::Requirement
|
37
53
|
requirements:
|
38
|
-
- - '>='
|
54
|
+
- - ! '>='
|
39
55
|
- !ruby/object:Gem::Version
|
40
|
-
version:
|
41
|
-
|
42
|
-
|
56
|
+
version: !binary |-
|
57
|
+
MA==
|
58
|
+
none: false
|
43
59
|
requirement: !ruby/object:Gem::Requirement
|
44
60
|
requirements:
|
45
|
-
- - '>='
|
61
|
+
- - ! '>='
|
46
62
|
- !ruby/object:Gem::Version
|
47
|
-
version:
|
48
|
-
|
63
|
+
version: !binary |-
|
64
|
+
MA==
|
65
|
+
none: false
|
49
66
|
prerelease: false
|
67
|
+
type: :development
|
68
|
+
- !ruby/object:Gem::Dependency
|
69
|
+
name: rake
|
50
70
|
version_requirements: !ruby/object:Gem::Requirement
|
51
71
|
requirements:
|
52
|
-
- - '>='
|
72
|
+
- - ! '>='
|
53
73
|
- !ruby/object:Gem::Version
|
54
|
-
version:
|
55
|
-
|
56
|
-
|
74
|
+
version: !binary |-
|
75
|
+
MA==
|
76
|
+
none: false
|
57
77
|
requirement: !ruby/object:Gem::Requirement
|
58
78
|
requirements:
|
59
|
-
- - '>='
|
79
|
+
- - ! '>='
|
60
80
|
- !ruby/object:Gem::Version
|
61
|
-
version:
|
62
|
-
|
81
|
+
version: !binary |-
|
82
|
+
MA==
|
83
|
+
none: false
|
63
84
|
prerelease: false
|
64
|
-
|
65
|
-
requirements:
|
66
|
-
- - '>='
|
67
|
-
- !ruby/object:Gem::Version
|
68
|
-
version: '0'
|
85
|
+
type: :development
|
69
86
|
description: Recognize sequences in Ruby... just for fun.
|
70
87
|
email:
|
71
88
|
- tad.hosford@gmail.com
|
@@ -75,40 +92,46 @@ extra_rdoc_files: []
|
|
75
92
|
files:
|
76
93
|
- .gitignore
|
77
94
|
- Gemfile
|
78
|
-
- Gemfile.lock
|
79
95
|
- MIT-LICENSE
|
80
96
|
- README.md
|
81
97
|
- Rakefile
|
82
98
|
- konamio.gemspec
|
83
99
|
- lib/konamio.rb
|
84
|
-
- lib/konamio/key_map.rb
|
85
100
|
- lib/konamio/prompt.rb
|
86
|
-
- lib/konamio/sequence.rb
|
87
101
|
- lib/konamio/sequence/listener.rb
|
88
102
|
- lib/konamio/sequence/requisition.rb
|
89
103
|
- lib/konamio/version.rb
|
90
104
|
- test/minitest_helper.rb
|
91
105
|
homepage: https://github.com/rthbound/konamio
|
92
106
|
licenses: []
|
93
|
-
|
94
|
-
post_install_message:
|
107
|
+
post_install_message:
|
95
108
|
rdoc_options: []
|
96
109
|
require_paths:
|
97
110
|
- lib
|
98
111
|
required_ruby_version: !ruby/object:Gem::Requirement
|
99
112
|
requirements:
|
100
|
-
- - '>='
|
113
|
+
- - ! '>='
|
101
114
|
- !ruby/object:Gem::Version
|
102
|
-
|
115
|
+
segments:
|
116
|
+
- 0
|
117
|
+
hash: 2
|
118
|
+
version: !binary |-
|
119
|
+
MA==
|
120
|
+
none: false
|
103
121
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
104
122
|
requirements:
|
105
|
-
- - '>='
|
123
|
+
- - ! '>='
|
106
124
|
- !ruby/object:Gem::Version
|
107
|
-
|
125
|
+
segments:
|
126
|
+
- 0
|
127
|
+
hash: 2
|
128
|
+
version: !binary |-
|
129
|
+
MA==
|
130
|
+
none: false
|
108
131
|
requirements: []
|
109
|
-
rubyforge_project:
|
110
|
-
rubygems_version:
|
111
|
-
signing_key:
|
112
|
-
specification_version:
|
132
|
+
rubyforge_project:
|
133
|
+
rubygems_version: 1.8.24
|
134
|
+
signing_key:
|
135
|
+
specification_version: 3
|
113
136
|
summary: I'm gonna recognize the konami sequence
|
114
137
|
test_files: []
|
checksums.yaml
DELETED
@@ -1,7 +0,0 @@
|
|
1
|
-
---
|
2
|
-
SHA1:
|
3
|
-
metadata.gz: 07768607588f91ae5e6c3ec94cb699ba11d41013
|
4
|
-
data.tar.gz: 9734e2819d9e9f47766b2540e54e3cb10ccf7002
|
5
|
-
SHA512:
|
6
|
-
metadata.gz: dadb81c80c6d589fa9c74d186a23fad5ac15d8879df638205574b5b0beb1a17bc787adf76f02c0731870104cbb232a4eb3ddfd4d3e05f31735e5a52307b484d0
|
7
|
-
data.tar.gz: 6ac723e1f3ff320ac883782e9aac5599b06b707cf7be45a4ffdde96a62ce16b881879df0c23ee8e7ff2878857173e258a96cf844dab20398bb64142c93d4256d
|
data/Gemfile.lock
DELETED
@@ -1,26 +0,0 @@
|
|
1
|
-
PATH
|
2
|
-
remote: .
|
3
|
-
specs:
|
4
|
-
konamio (0.0.1)
|
5
|
-
pay_dirt
|
6
|
-
|
7
|
-
GEM
|
8
|
-
remote: http://rubygems.org/
|
9
|
-
specs:
|
10
|
-
coderay (1.0.9)
|
11
|
-
method_source (0.8.1)
|
12
|
-
minitest (4.7.0)
|
13
|
-
pay_dirt (0.0.5)
|
14
|
-
pry (0.9.12)
|
15
|
-
coderay (~> 1.0.5)
|
16
|
-
method_source (~> 0.8)
|
17
|
-
slop (~> 3.4)
|
18
|
-
slop (3.4.4)
|
19
|
-
|
20
|
-
PLATFORMS
|
21
|
-
ruby
|
22
|
-
|
23
|
-
DEPENDENCIES
|
24
|
-
konamio!
|
25
|
-
minitest
|
26
|
-
pry
|
data/lib/konamio/key_map.rb
DELETED
@@ -1 +0,0 @@
|
|
1
|
-
module Konamio
|