nyan-cat 0.0.0
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 +15 -0
- data/bin/nyan-cat +5 -0
- data/lib/nyan-cat.rb +44 -0
- metadata +46 -0
checksums.yaml
ADDED
@@ -0,0 +1,15 @@
|
|
1
|
+
---
|
2
|
+
!binary "U0hBMQ==":
|
3
|
+
metadata.gz: !binary |-
|
4
|
+
ODRlMWFiM2RiZjNiNWQxZjBmNWYyNTRjMDYyZjNkMDMyNGFjYmZhZQ==
|
5
|
+
data.tar.gz: !binary |-
|
6
|
+
ODU5Y2JkMjk5NWYxOWVhMDY4MTA4ZTVjNTJmODcyZmZlODAzNGM2Zg==
|
7
|
+
SHA512:
|
8
|
+
metadata.gz: !binary |-
|
9
|
+
ZGE1ZjU4NmMyZGJiYTgwNzczMWI2NjA1YjZhMWEwY2Q4MDFhMGIwMDRiMjlk
|
10
|
+
ZTMwMmYxZDQ0ZDJjMzNiNTI2MGU5MzM1OTJiYmUwZTgzYzQ3Zjk0YzQzMTE4
|
11
|
+
ZTljNjIyYTU4ZDA4OTI3MGM5ZTY1ZWI2Y2ZmNWUwZTUwZTM3ZGM=
|
12
|
+
data.tar.gz: !binary |-
|
13
|
+
NjhkYWM2MmUzNzIwMTkzZWY3MDAzYWFmNTRiNTI2ZDYzMDI3ZTBjOTg4MTEz
|
14
|
+
MGMzY2ZiMTIwNTg4MTdkOWI0NDljN2I3ZDA5MzA0NmY3M2MwZDZkZGNiMGQy
|
15
|
+
NWJlNTk1ZTVmNzc2OWMzMjUyYTUxZjZlMTc4OGFjYzM1OTdlYzQ=
|
data/bin/nyan-cat
ADDED
data/lib/nyan-cat.rb
ADDED
@@ -0,0 +1,44 @@
|
|
1
|
+
class NyanCat
|
2
|
+
|
3
|
+
FRAME1 = <<'END'
|
4
|
+
-_-_-_-_-_-_-_,------,
|
5
|
+
_-_-_-_-_-_-_-| /\_/\
|
6
|
+
-_-_-_-_-_-_-~|__( ^ .^)
|
7
|
+
_-_-_-_-_-_-_-"" ""
|
8
|
+
END
|
9
|
+
|
10
|
+
FRAME2 = <<'END'
|
11
|
+
_-_-_-_-_-_-_-,------,
|
12
|
+
-_-_-_-_-_-_-_| /\_/\
|
13
|
+
_-_-_-_-_-_-_^|__( ^ .^)
|
14
|
+
-_-_-_-_-_-_-_ "" ""
|
15
|
+
END
|
16
|
+
|
17
|
+
def render
|
18
|
+
loop do
|
19
|
+
frames.each do |frame|
|
20
|
+
render_frame(frame)
|
21
|
+
end
|
22
|
+
end
|
23
|
+
end
|
24
|
+
|
25
|
+
private
|
26
|
+
|
27
|
+
def frames
|
28
|
+
[FRAME1, FRAME2]
|
29
|
+
end
|
30
|
+
|
31
|
+
def render_frame(frame)
|
32
|
+
clear_screen
|
33
|
+
puts frame
|
34
|
+
delay_next_render
|
35
|
+
end
|
36
|
+
|
37
|
+
def delay_next_render
|
38
|
+
sleep (1.0/8.0)
|
39
|
+
end
|
40
|
+
|
41
|
+
def clear_screen
|
42
|
+
puts "\e[H\e[2J"
|
43
|
+
end
|
44
|
+
end
|
metadata
ADDED
@@ -0,0 +1,46 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: nyan-cat
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 0.0.0
|
5
|
+
platform: ruby
|
6
|
+
authors:
|
7
|
+
- Chris Keathley
|
8
|
+
autorequire:
|
9
|
+
bindir: bin
|
10
|
+
cert_chain: []
|
11
|
+
date: 2013-12-17 00:00:00.000000000 Z
|
12
|
+
dependencies: []
|
13
|
+
description: Nyan Cat all of the things
|
14
|
+
email: spyc3r@gmail.com
|
15
|
+
executables:
|
16
|
+
- nyan-cat
|
17
|
+
extensions: []
|
18
|
+
extra_rdoc_files: []
|
19
|
+
files:
|
20
|
+
- lib/nyan-cat.rb
|
21
|
+
- bin/nyan-cat
|
22
|
+
homepage: http://rubygems.org/gems/hola
|
23
|
+
licenses:
|
24
|
+
- MIT
|
25
|
+
metadata: {}
|
26
|
+
post_install_message:
|
27
|
+
rdoc_options: []
|
28
|
+
require_paths:
|
29
|
+
- lib
|
30
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
31
|
+
requirements:
|
32
|
+
- - ! '>='
|
33
|
+
- !ruby/object:Gem::Version
|
34
|
+
version: '0'
|
35
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
36
|
+
requirements:
|
37
|
+
- - ! '>='
|
38
|
+
- !ruby/object:Gem::Version
|
39
|
+
version: '0'
|
40
|
+
requirements: []
|
41
|
+
rubyforge_project:
|
42
|
+
rubygems_version: 2.1.5
|
43
|
+
signing_key:
|
44
|
+
specification_version: 4
|
45
|
+
summary: Command line cat
|
46
|
+
test_files: []
|