roflcopter 0.0.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.
- data.tar.gz.sig +2 -0
- data/.gitignore +17 -0
- data/Gemfile +2 -0
- data/LICENSE.txt +22 -0
- data/README.md +15 -0
- data/Rakefile +1 -0
- data/bin/roflcopter +3 -0
- data/lib/roflcopter.rb +69 -0
- data/lib/roflcopter/version.rb +3 -0
- data/roflcopter.gemspec +21 -0
- metadata +86 -0
- metadata.gz.sig +2 -0
data.tar.gz.sig
ADDED
data/.gitignore
ADDED
data/Gemfile
ADDED
data/LICENSE.txt
ADDED
@@ -0,0 +1,22 @@
|
|
1
|
+
Copyright (c) 2013 Shannon Skipper
|
2
|
+
|
3
|
+
MIT License
|
4
|
+
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining
|
6
|
+
a copy of this software and associated documentation files (the
|
7
|
+
"Software"), to deal in the Software without restriction, including
|
8
|
+
without limitation the rights to use, copy, modify, merge, publish,
|
9
|
+
distribute, sublicense, and/or sell copies of the Software, and to
|
10
|
+
permit persons to whom the Software is furnished to do so, subject to
|
11
|
+
the following conditions:
|
12
|
+
|
13
|
+
The above copyright notice and this permission notice shall be
|
14
|
+
included in all copies or substantial portions of the Software.
|
15
|
+
|
16
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
17
|
+
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
18
|
+
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
19
|
+
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
20
|
+
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
21
|
+
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
22
|
+
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
data/README.md
ADDED
@@ -0,0 +1,15 @@
|
|
1
|
+
# Roflcopter
|
2
|
+
|
3
|
+
An OS X roflcopter gem for flying a roflcopter around your screen with whoosh whoosh noises.
|
4
|
+
|
5
|
+
## Installation
|
6
|
+
|
7
|
+
$ gem install roflcopter
|
8
|
+
|
9
|
+
## Usage
|
10
|
+
|
11
|
+
$ roflcopter
|
12
|
+
|
13
|
+
## Credits
|
14
|
+
|
15
|
+
I forked glucero's roflcopter repo on the Githubs (https://github.com/glucero/roflcopter), added altitude variation, and gemified things. Thanks to glucero for this fine copter!
|
data/Rakefile
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
require "bundler/gem_tasks"
|
data/bin/roflcopter
ADDED
data/lib/roflcopter.rb
ADDED
@@ -0,0 +1,69 @@
|
|
1
|
+
require 'roflcopter/version'
|
2
|
+
require 'curses'
|
3
|
+
|
4
|
+
class Roflcopter
|
5
|
+
include Curses
|
6
|
+
|
7
|
+
def initialize
|
8
|
+
curs_set @frame = 0
|
9
|
+
@altitude = 5
|
10
|
+
@chopper = [
|
11
|
+
%| |,
|
12
|
+
%| 4321043210LOL4321043210 |,
|
13
|
+
%| ^ |,
|
14
|
+
%|012 /------------- |,
|
15
|
+
%|3O3======= [ ] \\ |,
|
16
|
+
%|210 \\ \\ |,
|
17
|
+
%| \\____________] |,
|
18
|
+
%| I I |,
|
19
|
+
%| --------------/ |,
|
20
|
+
%| |
|
21
|
+
]
|
22
|
+
end
|
23
|
+
|
24
|
+
def fly
|
25
|
+
audio
|
26
|
+
video
|
27
|
+
end
|
28
|
+
|
29
|
+
def audio
|
30
|
+
Thread.new do
|
31
|
+
system "say -v Alex the rofl copter says #{'siff ' * 1000}"
|
32
|
+
exit
|
33
|
+
end
|
34
|
+
end
|
35
|
+
|
36
|
+
def video
|
37
|
+
init_screen
|
38
|
+
|
39
|
+
while @frame += 1
|
40
|
+
@chopper.each_with_index do |line, index|
|
41
|
+
{ 1 => [':LFOR', 5], (3..5) => ['L ', 4] }.each do |key, (ch, n)|
|
42
|
+
if key === index
|
43
|
+
n.times do |i|
|
44
|
+
line.tr!(i.to_s, ch.chars.to_a[(i + @frame) % n])
|
45
|
+
end
|
46
|
+
end
|
47
|
+
|
48
|
+
copter = (line + (' ' * (cols - 31))).chars.to_a
|
49
|
+
@frame.times { copter.unshift copter.pop }
|
50
|
+
|
51
|
+
setpos @altitude + index, 0
|
52
|
+
addstr copter.join
|
53
|
+
end
|
54
|
+
|
55
|
+
case rand 1..10
|
56
|
+
when 1
|
57
|
+
@altitude -= 1
|
58
|
+
when 10
|
59
|
+
@altitude += 1
|
60
|
+
end
|
61
|
+
|
62
|
+
refresh
|
63
|
+
sleep 0.08
|
64
|
+
end
|
65
|
+
|
66
|
+
at_exit { close_screen }
|
67
|
+
end
|
68
|
+
end
|
69
|
+
end
|
data/roflcopter.gemspec
ADDED
@@ -0,0 +1,21 @@
|
|
1
|
+
# -*- encoding: utf-8 -*-
|
2
|
+
lib = File.expand_path('../lib', __FILE__)
|
3
|
+
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
4
|
+
require 'roflcopter/version'
|
5
|
+
|
6
|
+
Gem::Specification.new do |gem|
|
7
|
+
gem.name = 'roflcopter'
|
8
|
+
gem.version = Roflcopter::VERSION
|
9
|
+
gem.authors = ['Shannon Skipper']
|
10
|
+
gem.email = ['shannonskipper@gmail.com']
|
11
|
+
gem.description = %q{An OS X roflcopter gem}
|
12
|
+
gem.summary = %q{This roflcopter runs on OS X, flys around, and makes a whoosh whoosh sound.}
|
13
|
+
gem.homepage = 'https://github.com/havenwood/roflcopter'
|
14
|
+
|
15
|
+
gem.files = `git ls-files`.split($/)
|
16
|
+
gem.executables = gem.files.grep(%r{^bin/}).map{ |f| File.basename(f) }
|
17
|
+
gem.require_paths = ['lib']
|
18
|
+
|
19
|
+
gem.signing_key = '/Users/shannonskipper/.gem/private/gem-private_key.pem'
|
20
|
+
gem.cert_chain = ['/Users/shannonskipper/.gem/private/gem-public_cert.pem']
|
21
|
+
end
|
metadata
ADDED
@@ -0,0 +1,86 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: roflcopter
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 0.0.1
|
5
|
+
prerelease:
|
6
|
+
platform: ruby
|
7
|
+
authors:
|
8
|
+
- Shannon Skipper
|
9
|
+
autorequire:
|
10
|
+
bindir: bin
|
11
|
+
cert_chain:
|
12
|
+
- !binary |-
|
13
|
+
LS0tLS1CRUdJTiBDRVJUSUZJQ0FURS0tLS0tCk1JSURpakNDQW5LZ0F3SUJB
|
14
|
+
Z0lCQVRBTkJna3Foa2lHOXcwQkFRVUZBREJGTVJjd0ZRWURWUVFEREE1emFH
|
15
|
+
RnUKYm05dWMydHBjSEJsY2pFVk1CTUdDZ21TSm9tVDhpeGtBUmtXQldkdFlX
|
16
|
+
bHNNUk13RVFZS0NaSW1pWlB5TEdRQgpHUllEWTI5dE1CNFhEVEV6TURJd01q
|
17
|
+
SXlNalExTUZvWERURTBNREl3TWpJeU1qUTFNRm93UlRFWE1CVUdBMVVFCkF3
|
18
|
+
d09jMmhoYm01dmJuTnJhWEJ3WlhJeEZUQVRCZ29Ka2lhSmsvSXNaQUVaRmdW
|
19
|
+
bmJXRnBiREVUTUJFR0NnbVMKSm9tVDhpeGtBUmtXQTJOdmJUQ0NBU0l3RFFZ
|
20
|
+
SktvWklodmNOQVFFQkJRQURnZ0VQQURDQ0FRb0NnZ0VCQU1scwo1WVQ5UHpW
|
21
|
+
bjM0NWVhL0NaN1hjdHZaVEVGK0d0MWxEbTRWNDFXVkcyR1FnTmEwejlyZFlh
|
22
|
+
RkF2MzNDNUpqQlg1CkM5ajBKZDU1REREZkdGejh5YTd3WFRTVzdIUGFiNjZx
|
23
|
+
aFpEWDFYQ2s3OXZmMmFCMFJkVlJnR3dKL1FYa1N3UEgKOGhPV0ZoTTc5L2pM
|
24
|
+
VEFRcU8yN0pUbHdTSmhHND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SWIwbWtUcGg0M3lxOVp4
|
40
|
+
T3h3VDNmYld0RkorUDAwNEl2ZnFwUmpqelgvRXFTRTVBUi94RjFwYTUyRjd3
|
41
|
+
PT0KLS0tLS1FTkQgQ0VSVElGSUNBVEUtLS0tLQo=
|
42
|
+
date: 2013-02-08 00:00:00.000000000 Z
|
43
|
+
dependencies: []
|
44
|
+
description: An OS X roflcopter gem
|
45
|
+
email:
|
46
|
+
- shannonskipper@gmail.com
|
47
|
+
executables:
|
48
|
+
- roflcopter
|
49
|
+
extensions: []
|
50
|
+
extra_rdoc_files: []
|
51
|
+
files:
|
52
|
+
- .gitignore
|
53
|
+
- Gemfile
|
54
|
+
- LICENSE.txt
|
55
|
+
- README.md
|
56
|
+
- Rakefile
|
57
|
+
- bin/roflcopter
|
58
|
+
- lib/roflcopter.rb
|
59
|
+
- lib/roflcopter/version.rb
|
60
|
+
- roflcopter.gemspec
|
61
|
+
homepage: https://github.com/havenwood/roflcopter
|
62
|
+
licenses: []
|
63
|
+
post_install_message:
|
64
|
+
rdoc_options: []
|
65
|
+
require_paths:
|
66
|
+
- lib
|
67
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
68
|
+
none: false
|
69
|
+
requirements:
|
70
|
+
- - ! '>='
|
71
|
+
- !ruby/object:Gem::Version
|
72
|
+
version: '0'
|
73
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
74
|
+
none: false
|
75
|
+
requirements:
|
76
|
+
- - ! '>='
|
77
|
+
- !ruby/object:Gem::Version
|
78
|
+
version: '0'
|
79
|
+
requirements: []
|
80
|
+
rubyforge_project:
|
81
|
+
rubygems_version: 1.8.23
|
82
|
+
signing_key:
|
83
|
+
specification_version: 3
|
84
|
+
summary: This roflcopter runs on OS X, flys around, and makes a whoosh whoosh sound.
|
85
|
+
test_files: []
|
86
|
+
has_rdoc:
|
metadata.gz.sig
ADDED