simpsons_world 0.1.0 → 0.1.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/data/season-20.yml +29 -18
- data/lib/data/season-23.yml +19 -14
- data/lib/data/season-24.yml +9 -4
- data/lib/data/season-26.yml +12 -0
- data/lib/simpsons_world.rb +2 -0
- data/lib/simpsons_world/season.rb +1 -1
- data/lib/simpsons_world/version.rb +1 -1
- data/lib/simpsons_world/view_helpers.rb +5 -1
- data/spec/simpsons_world_spec.rb +9 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: b860d7716a425e5e6d010c6925be35b785700f65
|
4
|
+
data.tar.gz: bea9a4300d5743d876d5f689e42d15dd30fcc3b2
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 06999fa73137be3a90a730d59f105a928c4761fbd8fa98acfac2961a1821047a6b61c7d5bc4fd7bf554f8691faf7536d168c7e8a780b73a25c14e3d51ce94200
|
7
|
+
data.tar.gz: acfbc93c1eba98c0c51acbb8ecca817e01c090218116e8324784487533f55bda5c709a4e9790c9a186139458e407c5e5442c5ee01f05c13300ed51fc6df1f4b2
|
data/lib/data/season-20.yml
CHANGED
@@ -1,105 +1,116 @@
|
|
1
1
|
---
|
2
2
|
- 20
|
3
3
|
- 1:
|
4
|
+
:title: Sex, Pies and Idiot Scrapes
|
5
|
+
:description: Homer and Flanders team-up as bounty hunters; Marge makes confections
|
6
|
+
for an erotic bakery.
|
7
|
+
:url: "/video/311088195682"
|
8
|
+
2:
|
4
9
|
:title: Lost Verizon
|
5
10
|
:description: When Bart steals actor Denis Leary's cell phone, Marge uses its
|
6
11
|
built-in GPS signal to track her son... leading the family to the ancient ruins
|
7
12
|
of Machu Picchu.
|
8
13
|
:url: "/video/304458307742"
|
9
|
-
|
14
|
+
3:
|
10
15
|
:title: Double, Double, Boy in Trouble
|
11
16
|
:description: Bart swaps places with his exact double-unaware that the double's
|
12
17
|
wealthy siblings are plotting murder.
|
13
18
|
:url: "/video/304460355919"
|
14
|
-
|
19
|
+
4:
|
15
20
|
:title: Treehouse of Horror XIX
|
16
21
|
:description: On Halloween... Transformer-like robots duke it out in Springfield;
|
17
22
|
Homer kills off celebrities so their likenesses can be exploited; the Simpsons
|
18
23
|
appear in a spoof of a 'Peanuts' Halloween special.
|
19
24
|
:url: "/video/307181635911"
|
20
|
-
|
25
|
+
5:
|
21
26
|
:title: Dangerous Curves
|
22
27
|
:description: In a series of flashbacks... Homer and Marge end up in a cabin in
|
23
28
|
the woods with newlyweds Flanders and Maude; Homer and Marge's marriage is nearly
|
24
29
|
ruined when they meet exciting new people during a party.
|
25
30
|
:url: "/video/311675459549"
|
26
|
-
|
31
|
+
6:
|
27
32
|
:title: Homer and Lisa Exchange Cross Words
|
28
33
|
:description: When Lisa discovers a talent for solving crossword puzzles, she
|
29
34
|
enters a crossword tournament-unaware that Homer bet against her.
|
30
35
|
:url: "/video/310541891517"
|
31
|
-
|
36
|
+
7:
|
32
37
|
:title: Mypods and Boomsticks
|
33
38
|
:description: Homer thinks Bart's new Muslim friend belongs to a family of terrorists;
|
34
39
|
Lisa acquires her first iPod-like device.
|
35
40
|
:url: "/video/310498883779"
|
36
|
-
|
41
|
+
8:
|
37
42
|
:title: The Burns and the Bees
|
38
43
|
:description: As Lisa tries to find a habitat for endangered bees, Mr. Burns builds
|
39
44
|
a state-of-the-art sports arena-which happens to look like a giant hive.
|
40
45
|
:url: "/video/310506051725"
|
41
|
-
|
46
|
+
9:
|
42
47
|
:title: Lisa the Drama Queen
|
43
48
|
:description: Lisa's new best friend creates a fantasy world so real it threatens
|
44
49
|
to drive them apart.
|
45
50
|
:url: "/video/292944963870"
|
46
|
-
|
51
|
+
10:
|
47
52
|
:title: Take My Life, Please
|
48
53
|
:description: When Homer discovers that he was almost elected class president
|
49
54
|
in high school, an old Italian cook uses a magic pot of tomato sauce to show
|
50
55
|
him an alternate version of his life.
|
51
56
|
:url: "/video/273728067781"
|
52
|
-
|
57
|
+
11:
|
53
58
|
:title: How the Test Was Won
|
54
59
|
:description: Lisa freezes during a federal school assessment test; Homer tries
|
55
60
|
to prevent accidents from happening after he forgets to pay an insurance bill;
|
56
61
|
Skinner accompanies Bart and other underachievers on a trip to Capital City.
|
57
62
|
:url: "/video/277134915702"
|
58
|
-
|
63
|
+
12:
|
59
64
|
:title: No Loan Again, Naturally
|
60
65
|
:description: When Homer and Marge's adjustable mortgage rate skyrockets, they're
|
61
66
|
forced to move out of the house... until Flanders purchases the property and
|
62
67
|
becomes their landlord.
|
63
68
|
:url: "/video/273029699673"
|
64
|
-
|
69
|
+
13:
|
65
70
|
:title: Gone Maggie Gone
|
66
71
|
:description: In this 'National Treasure'-like story... when Maggie disappears
|
67
72
|
at a convent, Lisa goes undercover as a nun to solve a mystery involving a rare
|
68
73
|
jewel.
|
69
74
|
:url: "/video/273030211958"
|
70
|
-
|
75
|
+
14:
|
71
76
|
:title: In the Name of the Grandfather
|
72
77
|
:description: The Simpsons travel to Ireland, where Homer and Grampa purchase
|
73
78
|
an old pub that's fallen on hard times.
|
74
79
|
:url: "/video/307849283838"
|
75
|
-
|
80
|
+
15:
|
81
|
+
:title: Wedding for Disaster
|
82
|
+
:description: When their marriage license turns out to be invalid, Homer asks
|
83
|
+
Marge to marry him in style. But when Homer mysteriously disappears just before
|
84
|
+
the wedding, Bart and Lisa search for answers.
|
85
|
+
:url: "/video/273024579646"
|
86
|
+
16:
|
76
87
|
:title: Eeny Teeny Maya Moe
|
77
88
|
:description: Moe meets a beautiful woman in an Internet chat room who turns out
|
78
89
|
to be three feet tall; Homer tries to spend more time with Maggie.
|
79
90
|
:url: "/video/273066051746"
|
80
|
-
|
91
|
+
17:
|
81
92
|
:title: The Good, The Sad, and The Drugly
|
82
93
|
:description: Bart dumps Milhouse in favor of a cute girl who volunteers her time
|
83
94
|
at the retirement home; Lisa is prescribed antidepressants after she reads predictions
|
84
95
|
about what Springfield will look like in 50 years.
|
85
96
|
:url: "/video/273057347598"
|
86
|
-
|
97
|
+
18:
|
87
98
|
:title: Father Knows Worst
|
88
99
|
:description: As a result of Homer's "helicopter parenting," Lisa employs a trendy
|
89
100
|
technique for boosting her popularity, while Bart enters a balsa-wood model-building
|
90
101
|
contest; Marge discovers a sauna in the basement.
|
91
102
|
:url: "/video/273070659848"
|
92
|
-
|
103
|
+
19:
|
93
104
|
:title: Waverly Hills 9-0-2-1-D'oh
|
94
105
|
:description: Homer and Marge rent an apartment in tony Waverly Hills so Bart
|
95
106
|
and Lisa can attend a better elementary school.
|
96
107
|
:url: "/video/299732035764"
|
97
|
-
|
108
|
+
20:
|
98
109
|
:title: Four Great Women and a Manicure
|
99
110
|
:description: 'As Marge and Lisa have their nails done, they spin four tales involving
|
100
111
|
famous women: Queen Elizabeth, Snow White, Lady Macbeth and Ayn Rand.'
|
101
112
|
:url: "/video/273732163923"
|
102
|
-
|
113
|
+
21:
|
103
114
|
:title: Coming To Homerica
|
104
115
|
:description: Springfield grapples with an immigration problem when the economy
|
105
116
|
of nearby Ogdenville collapses.
|
data/lib/data/season-23.yml
CHANGED
@@ -36,81 +36,86 @@
|
|
36
36
|
in millions.
|
37
37
|
:url: "/video/264559171655"
|
38
38
|
7:
|
39
|
+
:title: The Man in the Blue Flannel Pants
|
40
|
+
:description: Burns appoints Homer the nuclear power plant's new account man,
|
41
|
+
damning him to a 'Mad Men'-like existence; Lisa becomes Bart's mentor.
|
42
|
+
:url: "/video/233192515983"
|
43
|
+
8:
|
39
44
|
:title: The Ten-Per-Cent Solution
|
40
45
|
:description: After being fired from his popular kids' show, Krusty stages a comeback
|
41
46
|
with help from an agent who's also an old flame.
|
42
47
|
:url: "/video/230516291714"
|
43
|
-
|
48
|
+
9:
|
44
49
|
:title: Holidays Of Future Passed
|
45
50
|
:description: Thirty years in the future, Bart and Lisa attempt to bond with their
|
46
51
|
children on Christmas; an unwed Maggie gives birth while heading home for the
|
47
52
|
holidays.
|
48
53
|
:url: "/video/230516803889"
|
49
|
-
|
54
|
+
10:
|
50
55
|
:title: Politically Inept, With Homer Simpson
|
51
56
|
:description: Homer becomes a celebrity after he voices his conservative opinions
|
52
57
|
on a cable talk show, and attempts to convince leaders of the Republican party
|
53
58
|
to nominate singer Ted Nugent for president.
|
54
59
|
:url: "/video/230549059731"
|
55
|
-
|
60
|
+
11:
|
56
61
|
:title: The D'oh-cial Network
|
57
62
|
:description: Lisa's idea for an online social network becomes a tremendous hit,
|
58
63
|
but so many people become addicted to posting on the site, it leads to chaos.
|
59
64
|
:url: "/video/230552131592"
|
60
|
-
|
65
|
+
12:
|
61
66
|
:title: Moe Goes From Rags To Riches
|
62
67
|
:description: Moe's bar rag tells the story of his existence; Milhouse tires of
|
63
68
|
taking abuse from Bart.
|
64
69
|
:url: "/video/230553667901"
|
65
|
-
|
70
|
+
13:
|
66
71
|
:title: The Daughter Also Rises
|
67
72
|
:description: As Valentine's Day approaches, Marge grows concerned when Lisa finds
|
68
73
|
a boyfriend; Bart and Milhouse set out on a 'mythbusting' mission at Springfield
|
69
74
|
Elementary.
|
70
75
|
:url: "/video/230562371905"
|
71
|
-
|
76
|
+
14:
|
72
77
|
:title: At Long Last Leave
|
73
78
|
:description: Fed up with the family's negative impact on the city, townspeople
|
74
79
|
banish the Simpsons from Springfield. Presented by FXX.
|
75
80
|
:url: "/video/230541891832"
|
76
|
-
|
81
|
+
15:
|
77
82
|
:title: Exit Through The Kwik-E-Mart
|
78
83
|
:description: Bart becomes a famous street artist after he plasters Springfield
|
79
84
|
with unflattering graffiti of Homer's likeness; Apu panics when he's forced
|
80
85
|
to compete with a friendly grocery store chain featuring a South Pacific motif.
|
81
86
|
:url: "/video/304468035701"
|
82
|
-
|
87
|
+
16:
|
83
88
|
:title: How I Wet Your Mother
|
84
89
|
:description: With help from one of Professor Frink's inventions, Marge and the
|
85
90
|
kids enter Homer's dreams in hopes of curing him of incontinence.
|
86
91
|
:url: "/video/230597187582"
|
87
|
-
|
92
|
+
17:
|
88
93
|
:title: Them, Robot
|
89
94
|
:description: Homer becomes the last human employee at the nuclear power plant
|
90
95
|
after Mr. Burns orders a mass firing and replaces staffers with robots.
|
91
96
|
:url: "/video/230592067926"
|
92
|
-
|
97
|
+
18:
|
93
98
|
:title: Beware My Cheating Bart
|
94
99
|
:description: Bart falls for Jimbo's girlfriend Shauna; Homer buys a tricked-out
|
95
100
|
treadmill so he can watch old episodes of a 'Lost'-like television show.
|
96
101
|
:url: "/video/311189571768"
|
97
|
-
|
102
|
+
19:
|
98
103
|
:title: A Totally Fun Thing Bart Will Never Do Again
|
99
104
|
:description: The Simpsons vacation on a cruise liner, where Bart has so much
|
100
105
|
fun he concocts a scheme to keep his family aboard the ship forever.
|
101
106
|
:url: "/video/273522243657"
|
102
|
-
|
107
|
+
20:
|
103
108
|
:title: The Spy Who Learned Me
|
104
109
|
:description: After being injured at work, Homer is given eight weeks of paid
|
105
110
|
vacation, and decides to keep the news secret from his family; Bart gets Nelson
|
106
111
|
hooked on Krustyburgers so he'll gain weight and stop picking on him.
|
107
112
|
:url: "/video/230588995967"
|
108
|
-
|
113
|
+
21:
|
109
114
|
:title: Ned 'n Edna's Blend Agenda
|
110
115
|
:description: Complications ensue when Flanders and Krabappel admit they're secretly
|
111
116
|
married.
|
112
117
|
:url: "/video/277098051530"
|
113
|
-
|
118
|
+
22:
|
114
119
|
:title: Lisa Goes Gaga
|
115
120
|
:description: Singer Lady Gaga attempts to cheer Lisa after she's voted the most
|
116
121
|
unpopular kid at school.
|
data/lib/data/season-24.yml
CHANGED
@@ -88,27 +88,32 @@
|
|
88
88
|
a 'Batman'-like superhero.
|
89
89
|
:url: "/video/257714243647"
|
90
90
|
17:
|
91
|
+
:title: What Animated Women Want
|
92
|
+
:description: In an episode that focuses on the choices people make and their
|
93
|
+
outcomes... Homer attempts to save his marriage; Milhouse woos Lisa.
|
94
|
+
:url: "/video/257724483545"
|
95
|
+
18:
|
91
96
|
:title: Pulpit Friction
|
92
97
|
:description: Lovejoy quits the church after the Parson appoints a charismatic
|
93
98
|
reverend to reinvigorate the parish; Marge tracks down her old wedding dress.
|
94
99
|
:url: "/video/257728579751"
|
95
|
-
|
100
|
+
19:
|
96
101
|
:title: Whiskey Business
|
97
102
|
:description: Moe's new suit catches the attention of venture capitalists, leading
|
98
103
|
to the distribution of Moe's own brand of whiskey; Bart cares for Grampa; Lisa
|
99
104
|
realizes that her favorite musicians have been turned into holograms.
|
100
105
|
:url: "/video/257737283653"
|
101
|
-
|
106
|
+
20:
|
102
107
|
:title: The Fabulous Faker Boy
|
103
108
|
:description: Bart takes piano lessons in hopes of impressing his beautiful young
|
104
109
|
teacher; Homer goes completely bald; Marge teaches a Russian man how to drive.
|
105
110
|
:url: "/video/257760323921"
|
106
|
-
|
111
|
+
21:
|
107
112
|
:title: The Saga of Carl
|
108
113
|
:description: Homer, Moe and Lenny travel to Iceland to retrieve lottery winnings
|
109
114
|
that Carl ran off with.
|
110
115
|
:url: "/video/257753667515"
|
111
|
-
|
116
|
+
22:
|
112
117
|
:title: Dangers on a Train
|
113
118
|
:description: Homer secretly reconstructs a kiddy train as Marge's anniversary
|
114
119
|
present; Marge attracts the attention of a potential paramour online.
|
data/lib/data/season-26.yml
CHANGED
@@ -47,3 +47,15 @@
|
|
47
47
|
:title: Bart's New Friend
|
48
48
|
:description: Bart and Homer become BFF's.
|
49
49
|
:url: "/video/383002179865"
|
50
|
+
12:
|
51
|
+
:title: The Musk Who Fell to Earth
|
52
|
+
:description: Homer becomes muse to Elon Musk.
|
53
|
+
:url: "/video/388773443652"
|
54
|
+
13:
|
55
|
+
:title: Walking Big and Tall
|
56
|
+
:description: Springfield gets a new town anthem.
|
57
|
+
:url: "/video/395694659511"
|
58
|
+
14:
|
59
|
+
:title: My Fare Lady
|
60
|
+
:description: Marge trades in her mom-chauffeur hat for a real one.
|
61
|
+
:url: "/video/399385667625"
|
data/lib/simpsons_world.rb
CHANGED
@@ -8,6 +8,8 @@ module SimpsonsWorld
|
|
8
8
|
DATA_DIR = ENV['environment'] && ENV['environment'] == 'test' ?
|
9
9
|
File.join(File.dirname(__FILE__), '..', 'spec', 'data') :
|
10
10
|
File.join(File.dirname(__FILE__), 'data')
|
11
|
+
|
12
|
+
class NoEpisodeError < StandardError; end
|
11
13
|
end
|
12
14
|
|
13
15
|
require 'simpsons_world/railtie' if defined?(Rails)
|
@@ -5,7 +5,11 @@ module SimpsonsWorld
|
|
5
5
|
season = 1 + Season.all.take_while { |k, episodes|
|
6
6
|
episode -= episodes.size if episode > episodes.size
|
7
7
|
}.size unless season
|
8
|
-
|
8
|
+
begin
|
9
|
+
"#{BASE_URL}#{Season.all[season][episode][:url]}"
|
10
|
+
rescue NoEpisodeError, NoMethodError
|
11
|
+
''
|
12
|
+
end
|
9
13
|
end
|
10
14
|
|
11
15
|
end
|
data/spec/simpsons_world_spec.rb
CHANGED
@@ -80,7 +80,7 @@ describe SimpsonsWorld do
|
|
80
80
|
end
|
81
81
|
|
82
82
|
it "should not find a non-existent season" do
|
83
|
-
expect
|
83
|
+
expect { SimpsonsWorld::Season.find(50) }.to raise_error
|
84
84
|
end
|
85
85
|
|
86
86
|
it 'should return the correct episode' do
|
@@ -120,6 +120,14 @@ describe SimpsonsWorld do
|
|
120
120
|
create_season(season_two_data) and create_season(season_three_data)
|
121
121
|
expect( @view.simpsons_world_episode_url(episode: 14) ).to match(/s3-e4/)
|
122
122
|
end
|
123
|
+
|
124
|
+
it "should return an empty string if the season doesn't exist" do
|
125
|
+
expect( @view.simpsons_world_episode_url(season: 5, episode: 1) ).to eql('')
|
126
|
+
end
|
127
|
+
|
128
|
+
it "should return an empty string if the episode doesn't exist" do
|
129
|
+
expect( @view.simpsons_world_episode_url(episode: 9999) ).to eql('')
|
130
|
+
end
|
123
131
|
end
|
124
132
|
|
125
133
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: simpsons_world
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- mcianni
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-
|
11
|
+
date: 2015-02-19 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|