nyan-cat 0.0.1 → 0.0.2

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: a185d33cda426522a2044e1d0dff777e48fd5d1f
4
- data.tar.gz: ab268e381aaf3e0f41124a60ecb69c39afc4f081
3
+ metadata.gz: 3454be47a1c20632a06a1aa0bf629475cc5e92f0
4
+ data.tar.gz: ce93ec93e9399ed34f9caf3c9538780b860c4501
5
5
  SHA512:
6
- metadata.gz: 7bccabc1da8380955a78414ca02fc00cb4dc70ff3b6dc82410051999afd0888e037b358e360a3be94f92f408ee727faea422ba1a3f30df5a8760711af41547c4
7
- data.tar.gz: 4ae9ae962dfbc72341845bbb7e90f88be2894386164929716a5dc9a0fd61683e6fae1bb28696026a90b6304fcb2fc98e7da437e129bf8e38655bfb35df4eb7a6
6
+ metadata.gz: c7560d926414ed22073a285b49179789b23cea56ec8353359a79e024865dee92f77cc9abde7a3d1a89d49c370eddef029ada7cdf233c3357b064b59df13c56ab
7
+ data.tar.gz: 1d248ebcda3ebe848bed8013966b88736568e89a68557b1b493f85bce2fc7211dfef3f6b7aa3ff69390d0d657252979c2aecd49719f3abffe6f775534928dd14
data/.gitignore ADDED
@@ -0,0 +1 @@
1
+ *.gem
data/.travis.yml ADDED
@@ -0,0 +1,4 @@
1
+ language: ruby
2
+ rvm:
3
+ - 1.9.3
4
+ - 2.0.0
data/Gemfile ADDED
@@ -0,0 +1,9 @@
1
+ source 'https://rubygems.org'
2
+
3
+ gem 'rake'
4
+ gem 'paint'
5
+
6
+ group :development, :test do
7
+ gem 'guard'
8
+ gem 'guard-minitest'
9
+ end
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
@@ -0,0 +1,4 @@
1
+ nyan-cat
2
+ ========
3
+
4
+ [![Build Status](https://travis-ci.org/spyc3r/nyan-cat.png)](https://travis-ci.org/spyc3r/nyan-cat)
data/Rakefile ADDED
@@ -0,0 +1,12 @@
1
+ require 'rake/testtask'
2
+ require 'bundler'
3
+
4
+ task :default => [:test]
5
+
6
+ Rake::TestTask.new do |t|
7
+ t.libs.push "lib"
8
+ t.test_files = FileList['spec/*_spec.rb']
9
+ t.verbose = true
10
+ end
11
+
12
+ Bundler::GemHelper.install_tasks
data/bin/nyan-cat CHANGED
@@ -1,5 +1,9 @@
1
1
  #!/usr/bin/env ruby
2
-
3
- require 'nyan-cat'
2
+ begin
3
+ require 'nyan-cat'
4
+ rescue LoadError
5
+ require 'rubygems'
6
+ require 'nyan-cat'
7
+ end
4
8
 
5
9
  NyanCat::UI.new(NyanCat.new_cat(:trail_length => 20)).render
@@ -0,0 +1,3 @@
1
+ module NyanCat
2
+ VERSION = "0.0.2"
3
+ end
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.1
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
- - lib/nyan_cat.rb
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
- - bin/nyan-cat
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