infinity2008 1.0.7 → 1.1.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 +5 -5
- data/README.md +1 -1
- data/bin/infinity2008 +21 -1
- data/bin/infinity2008-dense +7 -7
- data/infinity2008.gemspec +3 -2
- data/lib/infinity2008/infinity2008.rb +60 -0
- data/lib/infinity2008/version.rb +3 -0
- data/lib/infinity2008.rb +2 -59
- data/spec/spec_helper.rb +2 -2
- metadata +12 -11
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
|
-
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
2
|
+
SHA256:
|
3
|
+
metadata.gz: 2dcb71de894f5924017d442366780e05f0224a63c6ade3ec08bdc38f39a48880
|
4
|
+
data.tar.gz: 2bf2e8ded1b99d002e10c069987897fcf2c8f197b94cd7a97b7e735bdc3b08df
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 405d76fc346764455ea3197a6297f9e5f1acf5d42efd0b41d147d7c24af6f3bdce30edb535187cfb22a10b981c0d88b5cfafd7edfc2f1bf9138ea5f398e248ae
|
7
|
+
data.tar.gz: 8f5b840848ff9323aa9f933a6371fe2ba278c9d1c81df8b205a41a9c9be34da6ce20935c51c79a187010e8c92d665c7450805e61734b1aeffc5196b0ce92ee0b
|
data/README.md
CHANGED
@@ -1,4 +1,4 @@
|
|
1
|
-
[](https://travis-ci.org/unleashed/infinity2008) [](https://codeclimate.com/github/unleashed/infinity2008) [](https://codeclimate.com/github/unleashed/infinity2008)
|
1
|
+
[](http://badge.fury.io/rb/infinity2008) [](https://travis-ci.org/unleashed/infinity2008) [](https://codeclimate.com/github/unleashed/infinity2008) [](https://codeclimate.com/github/unleashed/infinity2008)
|
2
2
|
|
3
3
|
# The Infinity 2008 (Klaas Vocal Edit) gem
|
4
4
|
|
data/bin/infinity2008
CHANGED
@@ -2,6 +2,21 @@
|
|
2
2
|
$: << File.expand_path('../../lib', __FILE__)
|
3
3
|
require 'infinity2008'
|
4
4
|
|
5
|
+
def version(do_exit = true)
|
6
|
+
puts "infinity2008 version #{Infinity2008::VERSION}"
|
7
|
+
exit 0 if do_exit
|
8
|
+
end
|
9
|
+
|
10
|
+
def help
|
11
|
+
version false
|
12
|
+
puts "\nusage: infinity2008 [option]\n\n" \
|
13
|
+
"Available options:\n" \
|
14
|
+
"\t--video\t\tOpen up a browser with the song's video\n" \
|
15
|
+
"\t--version\tShow this program's version\n" \
|
16
|
+
"\t--help\t\tShow this help screen\n"
|
17
|
+
exit 0
|
18
|
+
end
|
19
|
+
|
5
20
|
def open_cmd
|
6
21
|
case RbConfig::CONFIG['host_os']
|
7
22
|
when /darwin/i
|
@@ -24,7 +39,12 @@ rescue
|
|
24
39
|
end
|
25
40
|
|
26
41
|
begin
|
27
|
-
|
42
|
+
help if ARGV.include? '--help'
|
43
|
+
version if ARGV.include? '--version'
|
44
|
+
if ARGV.include? '--video'
|
45
|
+
video Infinity2008::Song::URL
|
46
|
+
sleep Infinity2008::Song::StartWait
|
47
|
+
end
|
28
48
|
Infinity2008::Song.sing
|
29
49
|
rescue Interrupt
|
30
50
|
puts
|
data/bin/infinity2008-dense
CHANGED
@@ -6,11 +6,11 @@ class Freak; { key: ",\n", needs: " " }.each { |m, s|
|
|
6
6
|
define_method m do "#{m}#{s}#{arg}" end end } end
|
7
7
|
|
8
8
|
class You
|
9
|
-
{ INFINITY =>
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
9
|
+
{ INFINITY => -> { puts "... #{Float::INFINITY}!" }, relax!: -> { puts
|
10
|
+
true }, time: -> { [->(_) { print '.'; sleep 1 }].cycle } }.each { |m,
|
11
|
+
l| define_method(m) { print "#{m} "; l.call } }; def in? o; (@t ||= (
|
12
|
+
[false] * 188).each).next rescue (puts " trust in #{o.class}"; true)
|
13
|
+
end; def method_missing(m, *args); m == :find ? send(*args) : self
|
14
14
|
end end
|
15
15
|
|
16
16
|
class Me < Freak
|
@@ -19,5 +19,5 @@ class Me < Freak
|
|
19
19
|
time.(goes_by: :naturally) } and you.will.find INFINITY
|
20
20
|
end end
|
21
21
|
|
22
|
-
me = Me.new; puts "Here's my #{me.key}\n\nA #{me.class.superclass}
|
23
|
-
" #{me.class},\njust #{me.needs}\n"; me.send :infinity, You.new
|
22
|
+
me = Me.new; puts "Here's my #{me.key}\n\nA #{me.class.superclass} " \
|
23
|
+
"like #{me.class},\njust #{me.needs}\n"; me.send :infinity, You.new
|
data/infinity2008.gemspec
CHANGED
@@ -1,10 +1,11 @@
|
|
1
1
|
# coding: utf-8
|
2
2
|
lib = File.expand_path('../lib', __FILE__)
|
3
3
|
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
4
|
+
require 'infinity2008/version'
|
4
5
|
|
5
6
|
Gem::Specification.new do |spec|
|
6
7
|
spec.name = 'infinity2008'
|
7
|
-
spec.version =
|
8
|
+
spec.version = Infinity2008::VERSION
|
8
9
|
spec.authors = ["Alejandro Martinez Ruiz"]
|
9
10
|
spec.email = ['alex@flawedcode.org']
|
10
11
|
spec.description = %q{This gem makes Ruby sing along with you the Guru Project's Infinity 2008 (Klaas Vocal Edit) hit}
|
@@ -19,7 +20,7 @@ Gem::Specification.new do |spec|
|
|
19
20
|
|
20
21
|
spec.required_ruby_version = '>= 1.9.3'
|
21
22
|
|
22
|
-
spec.add_development_dependency "bundler", "
|
23
|
+
spec.add_development_dependency "bundler", ">= 2.2.33"
|
23
24
|
spec.add_development_dependency "rake"
|
24
25
|
spec.add_development_dependency "rspec", "~> 3.0"
|
25
26
|
end
|
@@ -0,0 +1,60 @@
|
|
1
|
+
module Infinity2008
|
2
|
+
INFINITY = 2.times.map { :infinity } * ', '
|
3
|
+
|
4
|
+
class Freak
|
5
|
+
{ key: ",\n", needs: " " }.each do |m, s|
|
6
|
+
(class << self; self; end).send :define_method, m do |arg|
|
7
|
+
define_method(m) { "#{m}#{s}#{arg}" }
|
8
|
+
end
|
9
|
+
end
|
10
|
+
|
11
|
+
def self.to_s
|
12
|
+
super.split(':').last
|
13
|
+
end
|
14
|
+
end
|
15
|
+
|
16
|
+
class You
|
17
|
+
{ INFINITY => -> { puts "... #{Float::INFINITY}!" },
|
18
|
+
relax!: -> { puts; true },
|
19
|
+
time: -> do
|
20
|
+
[->(_) { print '.'; sleep 1 }].cycle
|
21
|
+
end
|
22
|
+
}.each do |m, l|
|
23
|
+
define_method(m) { print "#{m} "; l.call }
|
24
|
+
end
|
25
|
+
|
26
|
+
def in?(o)
|
27
|
+
(@t ||= ([false] * Song::Duration).each).next
|
28
|
+
rescue
|
29
|
+
true.tap { puts " trust in #{o.class}" }
|
30
|
+
end
|
31
|
+
|
32
|
+
def method_missing(m, *args)
|
33
|
+
m == :find ? send(*args) : self
|
34
|
+
end
|
35
|
+
end
|
36
|
+
|
37
|
+
class Me < Freak
|
38
|
+
key :philosophy
|
39
|
+
needs :infinity
|
40
|
+
|
41
|
+
def infinity(you)
|
42
|
+
you.relax! and you.r.time.take_while { |time|
|
43
|
+
!you.trust.in? self and time.(goes_by: :naturally)
|
44
|
+
} and you.will.find INFINITY
|
45
|
+
end
|
46
|
+
end
|
47
|
+
|
48
|
+
module Song
|
49
|
+
StartWait = 4
|
50
|
+
Duration = 188
|
51
|
+
URL = 'https://youtube.com/watch?v=yeKpRl3-Uh0'
|
52
|
+
|
53
|
+
def self.sing
|
54
|
+
me = Me.new
|
55
|
+
puts "Here's my #{me.key}\n\nA #{me.class.superclass} like" \
|
56
|
+
" #{me.class},\njust #{me.needs}\n"
|
57
|
+
me.send :infinity, You.new
|
58
|
+
end
|
59
|
+
end
|
60
|
+
end
|
data/lib/infinity2008.rb
CHANGED
@@ -1,59 +1,2 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
|
4
|
-
class Freak
|
5
|
-
{ key: ",\n", needs: " " }.each do |m, s|
|
6
|
-
(class << self; self; end).send :define_method, m do |arg|
|
7
|
-
define_method(m) { "#{m}#{s}#{arg}" }
|
8
|
-
end
|
9
|
-
end
|
10
|
-
|
11
|
-
def self.to_s
|
12
|
-
super.split(':').last
|
13
|
-
end
|
14
|
-
end
|
15
|
-
|
16
|
-
class You
|
17
|
-
{ INFINITY => lambda { puts "... #{Float::INFINITY}!" },
|
18
|
-
relax!: lambda { puts; true },
|
19
|
-
time: lambda do
|
20
|
-
[lambda { |_| print '.'; sleep 1 }].cycle
|
21
|
-
end
|
22
|
-
}.each do |m, l|
|
23
|
-
define_method(m) { print "#{m} "; l.call }
|
24
|
-
end
|
25
|
-
|
26
|
-
def in?(o)
|
27
|
-
(@t ||= ([false] * Song::Duration).each).next
|
28
|
-
rescue
|
29
|
-
true.tap { puts " trust in #{o.class}" }
|
30
|
-
end
|
31
|
-
|
32
|
-
def method_missing(m, *args)
|
33
|
-
m == :find ? send(*args) : self
|
34
|
-
end
|
35
|
-
end
|
36
|
-
|
37
|
-
class Me < Freak
|
38
|
-
key :philosophy
|
39
|
-
needs :infinity
|
40
|
-
|
41
|
-
def infinity(you)
|
42
|
-
you.relax! and you.r.time.take_while { |time|
|
43
|
-
!you.trust.in? self and time.(goes_by: :naturally)
|
44
|
-
} and you.will.find INFINITY
|
45
|
-
end
|
46
|
-
end
|
47
|
-
|
48
|
-
module Song
|
49
|
-
Duration = 188
|
50
|
-
URL = 'https://www.youtube.com/watch?v=w9KnuJZkBjg'
|
51
|
-
|
52
|
-
def self.sing
|
53
|
-
me = Me.new
|
54
|
-
puts "Here's my #{me.key}\n\nA #{me.class.superclass} like" \
|
55
|
-
" #{me.class},\njust #{me.needs}\n"
|
56
|
-
me.send :infinity, You.new
|
57
|
-
end
|
58
|
-
end
|
59
|
-
end
|
1
|
+
require 'infinity2008/infinity2008'
|
2
|
+
require 'infinity2008/version'
|
data/spec/spec_helper.rb
CHANGED
metadata
CHANGED
@@ -1,29 +1,29 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: infinity2008
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.
|
4
|
+
version: 1.1.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Alejandro Martinez Ruiz
|
8
|
-
autorequire:
|
8
|
+
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2022-07-20 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
15
15
|
requirement: !ruby/object:Gem::Requirement
|
16
16
|
requirements:
|
17
|
-
- - "
|
17
|
+
- - ">="
|
18
18
|
- !ruby/object:Gem::Version
|
19
|
-
version:
|
19
|
+
version: 2.2.33
|
20
20
|
type: :development
|
21
21
|
prerelease: false
|
22
22
|
version_requirements: !ruby/object:Gem::Requirement
|
23
23
|
requirements:
|
24
|
-
- - "
|
24
|
+
- - ">="
|
25
25
|
- !ruby/object:Gem::Version
|
26
|
-
version:
|
26
|
+
version: 2.2.33
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
28
|
name: rake
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
@@ -72,6 +72,8 @@ files:
|
|
72
72
|
- bin/infinity2008-dense
|
73
73
|
- infinity2008.gemspec
|
74
74
|
- lib/infinity2008.rb
|
75
|
+
- lib/infinity2008/infinity2008.rb
|
76
|
+
- lib/infinity2008/version.rb
|
75
77
|
- spec/freak_spec.rb
|
76
78
|
- spec/integration_spec.rb
|
77
79
|
- spec/me_spec.rb
|
@@ -81,7 +83,7 @@ homepage: http://github.com/unleashed/infinity2008
|
|
81
83
|
licenses:
|
82
84
|
- MIT
|
83
85
|
metadata: {}
|
84
|
-
post_install_message:
|
86
|
+
post_install_message:
|
85
87
|
rdoc_options: []
|
86
88
|
require_paths:
|
87
89
|
- lib
|
@@ -96,9 +98,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
96
98
|
- !ruby/object:Gem::Version
|
97
99
|
version: '0'
|
98
100
|
requirements: []
|
99
|
-
|
100
|
-
|
101
|
-
signing_key:
|
101
|
+
rubygems_version: 3.3.7
|
102
|
+
signing_key:
|
102
103
|
specification_version: 4
|
103
104
|
summary: The Guru Project's Infinity 2008 (Klaas Vocal Edit) gem
|
104
105
|
test_files:
|