trivium 0.0.0 → 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 +4 -4
- data/bin/trivium +4 -0
- data/lib/trivium.rb +7 -13
- data/lib/trivium/songs/base.rb +24 -0
- data/lib/trivium/songs/in_waves.rb +21 -0
- data/lib/trivium/songs/the_sin_and_the_sentence.rb +15 -0
- metadata +7 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA1:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: ba5f51760080a657992bb04be245e3771065fed6
|
|
4
|
+
data.tar.gz: 9e29ba6f2b81804bb6b83d99fb31728dba54cbba
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 0d1f0ba69247af0070e1e45ef071cae0e933ab73755ecb3dc78e07af869ad9b3c62ce0df1dc5e911da3f8d312bc6ec6f3c26c0c2c52f2e90468d892f78151cc0
|
|
7
|
+
data.tar.gz: 68a297c56fa1756c9c01b4d05599eca870a5d681622f5e6b860ec5a886a32747b1420453a2e7a5fd4062731fcda4bef6f7216646af75defd651f24a2373c78ff
|
data/bin/trivium
ADDED
data/lib/trivium.rb
CHANGED
|
@@ -1,15 +1,9 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
sleep 0.6
|
|
9
|
-
puts "I knew there was no other way"
|
|
10
|
-
sleep 0.6
|
|
11
|
-
puts "You better practice your lines"
|
|
12
|
-
sleep 0.6
|
|
13
|
-
puts "And so on....."
|
|
1
|
+
require_relative 'trivium/songs/base'
|
|
2
|
+
require_relative 'trivium/songs/the_sin_and_the_sentence'
|
|
3
|
+
require_relative 'trivium/songs/in_waves'
|
|
4
|
+
|
|
5
|
+
module Trivium
|
|
6
|
+
def self.play(song)
|
|
7
|
+
Module.const_get("::Trivium::Songs::#{song}").new.play
|
|
14
8
|
end
|
|
15
9
|
end
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
class NotImplemented < RuntimeError; end
|
|
2
|
+
|
|
3
|
+
module Trivium
|
|
4
|
+
module Songs
|
|
5
|
+
class Base
|
|
6
|
+
|
|
7
|
+
def play
|
|
8
|
+
raise NotImplemented
|
|
9
|
+
end
|
|
10
|
+
|
|
11
|
+
private
|
|
12
|
+
|
|
13
|
+
def scream(text)
|
|
14
|
+
puts text.upcase
|
|
15
|
+
sleep 0.5
|
|
16
|
+
end
|
|
17
|
+
|
|
18
|
+
def sing(text)
|
|
19
|
+
puts text
|
|
20
|
+
sleep 0.5
|
|
21
|
+
end
|
|
22
|
+
end
|
|
23
|
+
end
|
|
24
|
+
end
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
module Trivium
|
|
2
|
+
module Songs
|
|
3
|
+
class InWaves < Base
|
|
4
|
+
def play
|
|
5
|
+
in_waves
|
|
6
|
+
verse
|
|
7
|
+
in_waves
|
|
8
|
+
end
|
|
9
|
+
|
|
10
|
+
def in_waves
|
|
11
|
+
4.times { scream "In waves" }
|
|
12
|
+
end
|
|
13
|
+
|
|
14
|
+
def verse
|
|
15
|
+
sing "Do I end this all for the world to see."
|
|
16
|
+
sing "Do I take everybody else down."
|
|
17
|
+
sing "Everybody else down with me."
|
|
18
|
+
end
|
|
19
|
+
end
|
|
20
|
+
end
|
|
21
|
+
end
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
module Trivium
|
|
2
|
+
module Songs
|
|
3
|
+
class TheSinAndTheSentence < Base
|
|
4
|
+
def play
|
|
5
|
+
sing "I heard the passing bells calling out my name"
|
|
6
|
+
sing "I knew I'd never see another day"
|
|
7
|
+
sing "I couldn't swim against the tides of blame"
|
|
8
|
+
sing "I knew there was no other way"
|
|
9
|
+
sing "You better practice your lines"
|
|
10
|
+
sing "You better practice your words"
|
|
11
|
+
sing "And so on....."
|
|
12
|
+
end
|
|
13
|
+
end
|
|
14
|
+
end
|
|
15
|
+
end
|
metadata
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: trivium
|
|
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
|
- Oleh Maikovych
|
|
@@ -12,11 +12,16 @@ date: 2018-11-02 00:00:00.000000000 Z
|
|
|
12
12
|
dependencies: []
|
|
13
13
|
description: Test gem, probably in future it will do something cool
|
|
14
14
|
email: omaik@softserveinc.com
|
|
15
|
-
executables:
|
|
15
|
+
executables:
|
|
16
|
+
- trivium
|
|
16
17
|
extensions: []
|
|
17
18
|
extra_rdoc_files: []
|
|
18
19
|
files:
|
|
20
|
+
- bin/trivium
|
|
19
21
|
- lib/trivium.rb
|
|
22
|
+
- lib/trivium/songs/base.rb
|
|
23
|
+
- lib/trivium/songs/in_waves.rb
|
|
24
|
+
- lib/trivium/songs/the_sin_and_the_sentence.rb
|
|
20
25
|
homepage: http://rubygems.org/gems/trivium
|
|
21
26
|
licenses:
|
|
22
27
|
- MIT
|