nyan-cat 0.0.1 → 0.0.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.gitignore +1 -0
- data/.travis.yml +4 -0
- data/Gemfile +9 -0
- data/Gemfile.lock +45 -0
- data/Guardfile +14 -0
- data/LICENSE +20 -0
- data/README.md +4 -0
- data/Rakefile +12 -0
- data/bin/nyan-cat +6 -2
- data/lib/nyan-cat/version.rb +3 -0
- data/lib/{nyan_cat.rb → nyan-cat.rb} +0 -0
- data/nyan-cat.gemspec +20 -0
- data/spec/cat_integration_spec.rb +42 -0
- metadata +16 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 3454be47a1c20632a06a1aa0bf629475cc5e92f0
|
4
|
+
data.tar.gz: ce93ec93e9399ed34f9caf3c9538780b860c4501
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: c7560d926414ed22073a285b49179789b23cea56ec8353359a79e024865dee92f77cc9abde7a3d1a89d49c370eddef029ada7cdf233c3357b064b59df13c56ab
|
7
|
+
data.tar.gz: 1d248ebcda3ebe848bed8013966b88736568e89a68557b1b493f85bce2fc7211dfef3f6b7aa3ff69390d0d657252979c2aecd49719f3abffe6f775534928dd14
|
data/.gitignore
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
*.gem
|
data/.travis.yml
ADDED
data/Gemfile
ADDED
data/Gemfile.lock
ADDED
@@ -0,0 +1,45 @@
|
|
1
|
+
GEM
|
2
|
+
remote: https://rubygems.org/
|
3
|
+
specs:
|
4
|
+
celluloid (0.15.2)
|
5
|
+
timers (~> 1.1.0)
|
6
|
+
coderay (1.1.0)
|
7
|
+
ffi (1.9.3)
|
8
|
+
formatador (0.2.4)
|
9
|
+
guard (2.2.5)
|
10
|
+
formatador (>= 0.2.4)
|
11
|
+
listen (~> 2.1)
|
12
|
+
lumberjack (~> 1.0)
|
13
|
+
pry (>= 0.9.12)
|
14
|
+
thor (>= 0.18.1)
|
15
|
+
guard-minitest (2.1.3)
|
16
|
+
guard (~> 2.0)
|
17
|
+
minitest (>= 3.0)
|
18
|
+
listen (2.4.0)
|
19
|
+
celluloid (>= 0.15.2)
|
20
|
+
rb-fsevent (>= 0.9.3)
|
21
|
+
rb-inotify (>= 0.9)
|
22
|
+
lumberjack (1.0.4)
|
23
|
+
method_source (0.8.2)
|
24
|
+
minitest (5.2.0)
|
25
|
+
paint (0.8.6)
|
26
|
+
pry (0.9.12.4)
|
27
|
+
coderay (~> 1.0)
|
28
|
+
method_source (~> 0.8)
|
29
|
+
slop (~> 3.4)
|
30
|
+
rake (10.0.3)
|
31
|
+
rb-fsevent (0.9.3)
|
32
|
+
rb-inotify (0.9.3)
|
33
|
+
ffi (>= 0.5.0)
|
34
|
+
slop (3.4.7)
|
35
|
+
thor (0.18.1)
|
36
|
+
timers (1.1.0)
|
37
|
+
|
38
|
+
PLATFORMS
|
39
|
+
ruby
|
40
|
+
|
41
|
+
DEPENDENCIES
|
42
|
+
guard
|
43
|
+
guard-minitest
|
44
|
+
paint
|
45
|
+
rake
|
data/Guardfile
ADDED
@@ -0,0 +1,14 @@
|
|
1
|
+
# A sample Guardfile
|
2
|
+
# More info at https://github.com/guard/guard#readme
|
3
|
+
|
4
|
+
guard :minitest do
|
5
|
+
# with Minitest::Unit
|
6
|
+
watch(%r{^test/(.*)\/?test_(.*)\.rb})
|
7
|
+
watch(%r{^lib/(.*/)?([^/]+)\.rb}) { |m| "test/#{m[1]}test_#{m[2]}.rb" }
|
8
|
+
watch(%r{^test/test_helper\.rb}) { 'test' }
|
9
|
+
|
10
|
+
# with Minitest::Spec
|
11
|
+
watch(%r{^spec/(.*)_spec\.rb})
|
12
|
+
watch(%r{^lib/(.+)\.rb}) { |m| "spec/#{m[1]}_spec.rb" }
|
13
|
+
watch(%r{^spec/spec_helper\.rb}) { 'spec' }
|
14
|
+
end
|
data/LICENSE
ADDED
@@ -0,0 +1,20 @@
|
|
1
|
+
The MIT License (MIT)
|
2
|
+
|
3
|
+
Copyright (c) 2013 Chris Keathley
|
4
|
+
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy of
|
6
|
+
this software and associated documentation files (the "Software"), to deal in
|
7
|
+
the Software without restriction, including without limitation the rights to
|
8
|
+
use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
|
9
|
+
the Software, and to permit persons to whom the Software is furnished to do so,
|
10
|
+
subject to the following conditions:
|
11
|
+
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
13
|
+
copies or substantial portions of the Software.
|
14
|
+
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
|
17
|
+
FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
|
18
|
+
COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
|
19
|
+
IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
|
20
|
+
CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
data/README.md
ADDED
data/Rakefile
ADDED
data/bin/nyan-cat
CHANGED
File without changes
|
data/nyan-cat.gemspec
ADDED
@@ -0,0 +1,20 @@
|
|
1
|
+
$:.push File.expand_path("../lib", __FILE__)
|
2
|
+
require "nyan-cat/version"
|
3
|
+
|
4
|
+
Gem::Specification.new do |s|
|
5
|
+
s.name = 'nyan-cat'
|
6
|
+
s.version = NyanCat::VERSION
|
7
|
+
s.executables << 'nyan-cat'
|
8
|
+
s.date = '2013-12-17'
|
9
|
+
s.summary = "Command line cat"
|
10
|
+
s.description = "Nyan Cat all of the things"
|
11
|
+
s.authors = ["Chris Keathley"]
|
12
|
+
s.email = 'spyc3r@gmail.com'
|
13
|
+
s.homepage = 'https://github.com/spyc3r/nyan-cat'
|
14
|
+
s.license = 'MIT'
|
15
|
+
|
16
|
+
s.files = `git ls-files`.split("\n")
|
17
|
+
s.test_files = `git ls-files -- {test,spec,features}/*`.split("\n")
|
18
|
+
s.executables = `git ls-files -- bin/*`.split("\n").map{ |f| File.basename(f) }
|
19
|
+
s.require_paths = ["lib"]
|
20
|
+
end
|
@@ -0,0 +1,42 @@
|
|
1
|
+
require 'minitest/autorun'
|
2
|
+
require 'minitest/spec'
|
3
|
+
|
4
|
+
$LOAD_PATH.unshift(File.dirname(__FILE__))
|
5
|
+
$LOAD_PATH.unshift(File.join(File.dirname(__FILE__), '..', 'lib'))
|
6
|
+
require 'nyan_cat'
|
7
|
+
|
8
|
+
describe NyanCat do
|
9
|
+
before do
|
10
|
+
@cat = NyanCat.new_cat
|
11
|
+
@cat_frame_1 = (<<'END').strip
|
12
|
+
-_-_-_-_-_,------,
|
13
|
+
_-_-_-_-_-| /\_/\
|
14
|
+
-_-_-_-_-~|__( ^ .^)
|
15
|
+
_-_-_-_-_-"" ""
|
16
|
+
END
|
17
|
+
@cat_frame_2 = (<<'END').strip
|
18
|
+
_-_-_-_-_-,------,
|
19
|
+
-_-_-_-_-_| /\_/\
|
20
|
+
_-_-_-_-_^|__( ^ .^)
|
21
|
+
-_-_-_-_-_ "" ""
|
22
|
+
END
|
23
|
+
end
|
24
|
+
|
25
|
+
describe "#tick" do
|
26
|
+
it "returns an ascii cat" do
|
27
|
+
result = @cat.tick.strip
|
28
|
+
result.must_equal @cat_frame_1
|
29
|
+
end
|
30
|
+
|
31
|
+
it "returns an animated cat with repeated calls" do
|
32
|
+
@cat.tick
|
33
|
+
result = @cat.tick.strip
|
34
|
+
result.must_equal @cat_frame_2
|
35
|
+
end
|
36
|
+
|
37
|
+
it "animates the cat based on frame number" do
|
38
|
+
result = @cat.tick(1).strip
|
39
|
+
result.must_equal @cat_frame_2
|
40
|
+
end
|
41
|
+
end
|
42
|
+
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: nyan-cat
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Chris Keathley
|
@@ -17,10 +17,21 @@ executables:
|
|
17
17
|
extensions: []
|
18
18
|
extra_rdoc_files: []
|
19
19
|
files:
|
20
|
-
-
|
20
|
+
- .gitignore
|
21
|
+
- .travis.yml
|
22
|
+
- Gemfile
|
23
|
+
- Gemfile.lock
|
24
|
+
- Guardfile
|
25
|
+
- LICENSE
|
26
|
+
- README.md
|
27
|
+
- Rakefile
|
28
|
+
- bin/nyan-cat
|
29
|
+
- lib/nyan-cat.rb
|
21
30
|
- lib/nyan-cat/cat.rb
|
22
31
|
- lib/nyan-cat/ui.rb
|
23
|
-
-
|
32
|
+
- lib/nyan-cat/version.rb
|
33
|
+
- nyan-cat.gemspec
|
34
|
+
- spec/cat_integration_spec.rb
|
24
35
|
homepage: https://github.com/spyc3r/nyan-cat
|
25
36
|
licenses:
|
26
37
|
- MIT
|
@@ -45,4 +56,5 @@ rubygems_version: 2.1.8
|
|
45
56
|
signing_key:
|
46
57
|
specification_version: 4
|
47
58
|
summary: Command line cat
|
48
|
-
test_files:
|
59
|
+
test_files:
|
60
|
+
- spec/cat_integration_spec.rb
|