roberto_barros 0.0.4 → 1.0.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/roberto_barros.rb +20 -69
- metadata +3 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: abb6bac7827f7d31012bed9ab94a3e5f93d05f9f329c8aa79ed38ee56d1b2f80
|
4
|
+
data.tar.gz: 401c380bac079cc2fdb3e06fa4fc8411a2f5b656ed74e32ef94b582ecac5dc82
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: db478aec438f51d520dc7304dc3285152cd5e5032bf7dc37027890677ed4ba5657a8a8ee40ed0985518dead2b0bec76e61980e05f17635bc37dde057126e820a
|
7
|
+
data.tar.gz: 3c1b8d7da88b113a7df61b717df4611ede724d2d82d9a98e9062b384e63004db6a9a7905d469b3e932a9dd976cc925dc890a3155fc701e7513f675d5472033d7
|
data/lib/roberto_barros.rb
CHANGED
@@ -1,81 +1,32 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require 'yaml'
|
4
|
+
|
5
|
+
# Return quotes and truths about the great Roberto Barros
|
1
6
|
class RobertoBarros
|
7
|
+
DATA = YAML.load_file(File.join(__dir__, 'data.yml'))
|
8
|
+
|
9
|
+
# Take no arguments. Return a quote straight from the mouth of the great
|
10
|
+
# Roberto Barros himself.
|
2
11
|
def self.quote
|
3
|
-
|
4
|
-
"A cópia é o primeiro passo para a criação.",
|
5
|
-
"A pessoa escreve Rubens nos Trilhos e desenha uma rodovia.",
|
6
|
-
"A vida é muito curta para desperdiçar programando em Java.",
|
7
|
-
"E aí você toma um erro no meio da fuça!",
|
8
|
-
"Está um ótimo dia para programar.",
|
9
|
-
"Eu acho que quem tatua o rosto não entende como a sociedade funciona.",
|
10
|
-
"Lutador de sumô não limpa a bunda sozinho.",
|
11
|
-
"Mas não faz sentido o que você está fazendo!",
|
12
|
-
"Mas se esse computador está ruim, se você colocar Windows vai ficar pior ainda!",
|
13
|
-
"Não existe projeto simples, existe dev sem imaginação.",
|
14
|
-
"Não existem limites para a criatividade do ser humano.",
|
15
|
-
"Não faz sentido! Ele quer trocar seis por meia dúzia!!",
|
16
|
-
"Né...",
|
17
|
-
"O importante da regra é saber quando quebrar a regra.",
|
18
|
-
"Open Source é a programação mais eficiente que existe.",
|
19
|
-
"Poder, poder, você pode, mas não sei porque você faria isso.",
|
20
|
-
"Quando você está programando, seu pior inimigo é você mesmo.",
|
21
|
-
"Reboot quem dá é a vida.",
|
22
|
-
"Scrum dá para aprender em 15 minutos, rsrsrs",
|
23
|
-
"Se o código não é simples, não é Ruby.",
|
24
|
-
"Ué?",
|
25
|
-
"Um site nunca fica pronto. Mas você precisa entregar em algum momento.",
|
26
|
-
"Essa é a mágica, que é mágica nenhuma que o rails faz.",
|
27
|
-
"Em programação ou tem 0, ou tem 1 ou têm vários."
|
28
|
-
].sample
|
12
|
+
DATA['pt-BR']['quotes'].sample
|
29
13
|
end
|
30
14
|
|
15
|
+
# Take no arguments. Return a quote brilliantly translated into International
|
16
|
+
# Programmers' Language.
|
31
17
|
def self.in_ingrish
|
32
|
-
|
33
|
-
"This is the magic, that isn't magic that rails does.",
|
34
|
-
"In programming has 0, or 1, or many",
|
35
|
-
"Ueh?",
|
36
|
-
"Sumo fighters don't wipe their asses alone.",
|
37
|
-
"I think people who tattoo their faces don't grasp how Society works.",
|
38
|
-
"If it is bad, installing Windows will only make it worse!",
|
39
|
-
"Neh...",
|
40
|
-
"There is no such thing as a simplified project, there are Devs without imagination.",
|
41
|
-
"If it is not simple, it is not Ruby.",
|
42
|
-
"A site is never ready but you need to deliver it at some point.",
|
43
|
-
"And then you get an error message in your pretty face!",
|
44
|
-
"Dude writes Ruby on RAILS and draws a HIGHWAY.",
|
45
|
-
"It makes no sense what you're doing!",
|
46
|
-
"Can do, you can, you may, but I cannot understand why someone would do it.",
|
47
|
-
"Copy is the first step to creation.",
|
48
|
-
"There are no limits to the creativity of the human being.",
|
49
|
-
"Today is a great day to code.",
|
50
|
-
"The important thing about rules is knowing when to break them",
|
51
|
-
"It's life what gives you the real Reboot.",
|
52
|
-
"It doesn't make sense! He wants to exchange six for a half dozen!!",
|
53
|
-
"It only takes 15 minutes to learn scrum, lol",
|
54
|
-
"Life is too short to waste it coding in Java.",
|
55
|
-
"Open Source is the most efficient software ever"
|
56
|
-
].sample
|
18
|
+
DATA['en']['quotes'].sample
|
57
19
|
end
|
58
20
|
|
21
|
+
# Take no arguments. Return a Chuck Norris-style fact (with the difference
|
22
|
+
# that these are true) about the great Roberto Barros.
|
59
23
|
def self.fact
|
60
|
-
|
61
|
-
Um belo dia, Roberto Barros viu um menino cabisbaixo na calçada,
|
62
|
-
precisando de ajuda com Ruby.\n\nEle ensinou ao menino tudo o que sabia
|
63
|
-
sobre a linguagem.\n\nO nome desse menino? Yukihiro Matsumoto.
|
64
|
-
MATZ
|
65
|
-
magaiver = <<~PLOC
|
66
|
-
Quando era pequeno, Roberto Barros construiu um computador usando apenas
|
67
|
-
107cm de fio de cobre, um relógio de pulso Casio, uma figurinha do
|
68
|
-
Campeonato Brasileiro de 89 e dois chicletes Ploc mascados.
|
69
|
-
PLOC
|
70
|
-
return [
|
71
|
-
magaiver,
|
72
|
-
matz,
|
73
|
-
"A branch 'master' nos repositórios de Git foi inspirada em Roberto Barros",
|
74
|
-
"As letras '.rb' no final dos arquivos na verdade significam Roberto Barros",
|
75
|
-
].sample
|
24
|
+
DATA['pt-BR']['facts'].sample
|
76
25
|
end
|
77
26
|
|
78
|
-
|
79
|
-
|
27
|
+
# Take no arguments. Return a boolean of whether the great Roberto Barros is
|
28
|
+
# a genius.
|
29
|
+
def self.genius?
|
30
|
+
true
|
80
31
|
end
|
81
32
|
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: roberto_barros
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0
|
4
|
+
version: 1.0.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- davisjr2000
|
@@ -10,7 +10,8 @@ bindir: bin
|
|
10
10
|
cert_chain: []
|
11
11
|
date: 2019-05-16 00:00:00.000000000 Z
|
12
12
|
dependencies: []
|
13
|
-
description: A simple gem that randomly generates quotes from
|
13
|
+
description: A simple gem that randomly generates quotes from the
|
14
|
+
great Roberto Barros.
|
14
15
|
email: davisrobertosouza@gmail.com
|
15
16
|
executables: []
|
16
17
|
extensions: []
|