yeahboi 0.1.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.
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA1:
3
+ metadata.gz: f01c3245e4fbbf7a5508b58623128c669a670339
4
+ data.tar.gz: 7e78462ca1b031b2bd12ee3866cd2d3e5071a48a
5
+ SHA512:
6
+ metadata.gz: 7a38ff9203548e83a4ea82e1000c1a9d019a2c0838bad761ac61f3eb88647f90eecbfad29b1f8ba56cacf306c51f3912d57e9c78e9ca3dbf970bbc70e7ca1881
7
+ data.tar.gz: f199b4cc4be2a3f63c55bedca2faa7b4f66a1f33f47aa0940274867001132d73d412dfb160a8484e76f6a87e507653a0f0a17c2567ac29036847b4d61df0252d
@@ -0,0 +1,4 @@
1
+ #!/usr/bin/env ruby
2
+
3
+ require 'yeahboi'
4
+ puts Yeahboi.short
@@ -0,0 +1,4 @@
1
+ #!/usr/bin/env ruby
2
+
3
+ require 'yeahboi'
4
+ puts Yeahboi.long
@@ -0,0 +1,31 @@
1
+ module Yeahboi
2
+ def self.short #2 secs of 'yeah boy'
3
+ # spawn executes a command and returns it's process ID
4
+ # The parent process should use Process.wait to collect the termination status
5
+ # of its child or use Process.detach to register disinterest in their status;
6
+ # otherwise, the operating system may accumulate zombie processes.
7
+ play_short = spawn("afplay -t 2 #{Yeahboi.file_path}")
8
+ text = spawn('printf "YEAH BOI"; while true; do printf "I"; sleep 0.1; done')
9
+ # could also be text = spawn('printf "YEAH BOI"; while sleep 0.1; do printf "I"; done')
10
+
11
+ Process.wait(play_short)
12
+ Process.kill('TERM', text)
13
+ return
14
+ end
15
+
16
+ def self.long #longest 'yeah boy' ever
17
+ play_long = spawn("afplay #{Yeahboi.file_path}")
18
+ text = spawn('printf "YEAH BOI"; while true; do printf "I"; sleep 0.1; done')
19
+
20
+ Process.wait(play_long)
21
+ Process.kill('TERM', text)
22
+ return
23
+ end
24
+
25
+ def self.file_path #returns absolute path of audiofile
26
+ #http://stackoverflow.com/questions/4474918/file-expand-path-gemfile-file-how-does-this-work-where-is-the-fil#4479926
27
+ File.expand_path('../../audio/longestyeahboyever.wav', __FILE__)
28
+ end
29
+ end
30
+
31
+ # play_long = spawn("afplay #{Yeahboi.file_path}")
metadata ADDED
@@ -0,0 +1,48 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: yeahboi
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.1.0
5
+ platform: ruby
6
+ authors:
7
+ - Patty SantaCruz
8
+ autorequire:
9
+ bindir: bin
10
+ cert_chain: []
11
+ date: 2016-12-17 00:00:00.000000000 Z
12
+ dependencies: []
13
+ description:
14
+ email: patty.stacruz@gmail.com
15
+ executables:
16
+ - yeahboi
17
+ - yeahboilong
18
+ extensions: []
19
+ extra_rdoc_files: []
20
+ files:
21
+ - audio/longestyeahboyever.wav
22
+ - bin/yeahboi
23
+ - bin/yeahboilong
24
+ - lib/yeahboi.rb
25
+ homepage: http://github.com/pattysc
26
+ licenses: []
27
+ metadata: {}
28
+ post_install_message:
29
+ rdoc_options: []
30
+ require_paths:
31
+ - lib
32
+ required_ruby_version: !ruby/object:Gem::Requirement
33
+ requirements:
34
+ - - ">="
35
+ - !ruby/object:Gem::Version
36
+ version: '0'
37
+ required_rubygems_version: !ruby/object:Gem::Requirement
38
+ requirements:
39
+ - - ">="
40
+ - !ruby/object:Gem::Version
41
+ version: '0'
42
+ requirements: []
43
+ rubyforge_project:
44
+ rubygems_version: 2.6.8
45
+ signing_key:
46
+ specification_version: 4
47
+ summary: yeah boiiiiiii
48
+ test_files: []