red_book 0.0.7 → 0.0.8
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/lib/red_book.rb +58 -2
- metadata +2 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: aca1095545c0d215f7f928158c1b8f423264b7107e658fbaf8dfc891fa0a705f
|
|
4
|
+
data.tar.gz: 342bcb8bfb67573b107b602e855f420634f28dcdd0f7dd8f05b11ee9fce1529a
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: c454242ef56f83852d39a4c43ce1a2117ef24119e16980019593c2717a03b8e5e768b7f96bd717e240434659c7de77bdd161c693061d5ab9ef7b9ae7d4f2df89
|
|
7
|
+
data.tar.gz: 214ee72f00e98dd7ece161ce43a79fbc1953742b1839a0854a7322b49051b7f7fcd78f64aa7546dba3e904cd63155dce3adba4dc8f9dac76ad8f4c8af53f5057
|
data/lib/red_book.rb
CHANGED
|
@@ -1,7 +1,63 @@
|
|
|
1
1
|
module RedBook
|
|
2
|
-
@
|
|
2
|
+
@book_quotes = [
|
|
3
|
+
[
|
|
4
|
+
"When Mr. Bilbo Baggins of Bag End announced that he would shortly be celebrating his eleventy-first birthday with a party of special magnificence, there was much talk and excitement in Hobbiton.",
|
|
5
|
+
"All we have to decide is what to do with the time that is given to us.",
|
|
6
|
+
"All that is gold does not glitter.",
|
|
7
|
+
"Not all those who wander are lost."
|
|
8
|
+
],[
|
|
9
|
+
"Some of my kin look just like trees now, and need something great to rouse them; and they speak only in whispers. But some of my trees are limb-lithe, and many can talk to me."
|
|
10
|
+
],[
|
|
11
|
+
"Deeds will not be less valiant because they are unpraised."
|
|
12
|
+
]
|
|
13
|
+
]
|
|
14
|
+
@movie_quotes = [
|
|
15
|
+
[
|
|
16
|
+
"I made a promise, Mr. Frodo."
|
|
17
|
+
],[
|
|
18
|
+
"They're taking the hobbits to Isengard."
|
|
19
|
+
],[
|
|
20
|
+
"Fool of a Took!"
|
|
21
|
+
]
|
|
22
|
+
]
|
|
3
23
|
|
|
4
24
|
def self.red_book
|
|
5
|
-
p @
|
|
25
|
+
p @book_quotes.sample.sample
|
|
26
|
+
end
|
|
27
|
+
|
|
28
|
+
def self.red_book1
|
|
29
|
+
p @book_quotes[0].sample
|
|
30
|
+
end
|
|
31
|
+
|
|
32
|
+
def self.red_book2
|
|
33
|
+
p @book_quotes[1].sample
|
|
34
|
+
end
|
|
35
|
+
|
|
36
|
+
def self.red_book3
|
|
37
|
+
p @book_quotes[2].sample
|
|
38
|
+
end
|
|
39
|
+
|
|
40
|
+
def self.red_script
|
|
41
|
+
p @book_quotes.sample.sample
|
|
42
|
+
end
|
|
43
|
+
|
|
44
|
+
def self.red_script1
|
|
45
|
+
p @movie_quotes[0].sample
|
|
46
|
+
end
|
|
47
|
+
|
|
48
|
+
def self.red_script2
|
|
49
|
+
p @movie_quotes[1].sample
|
|
50
|
+
end
|
|
51
|
+
|
|
52
|
+
def self.red_script3
|
|
53
|
+
p @movie_quotes[2].sample
|
|
54
|
+
end
|
|
55
|
+
end
|
|
56
|
+
|
|
57
|
+
class ApplicationController
|
|
58
|
+
before_action :red
|
|
59
|
+
|
|
60
|
+
def red
|
|
61
|
+
RedBook::red_book
|
|
6
62
|
end
|
|
7
63
|
end
|
metadata
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: red_book
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.0.
|
|
4
|
+
version: 0.0.8
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Josh Sarna
|
|
@@ -11,7 +11,7 @@ cert_chain: []
|
|
|
11
11
|
date: 2019-03-02 00:00:00.000000000 Z
|
|
12
12
|
dependencies: []
|
|
13
13
|
description: A gem that prints a Lord of the Rings quote to your rails server every
|
|
14
|
-
time
|
|
14
|
+
time a route is hit; see https://github.com/joshsarna/red_book
|
|
15
15
|
email: joshsarna@g.ucla.edu
|
|
16
16
|
executables: []
|
|
17
17
|
extensions: []
|