series_timer 0.1 → 0.1.1

Sign up to get free protection for your applications and to get access to all the features.
data/bin/series_timer CHANGED
@@ -7,10 +7,13 @@ require 'date'
7
7
  require "optparse"
8
8
  require_relative '../lib/series_timer'
9
9
 
10
+ usage = "usage: series_timer [-lac] [series1 series2 ...]"
10
11
  begin
11
12
  SeriesTimer::Application.new(ARGV).run
12
13
  rescue OptionParser::InvalidOption => err
13
- abort "series_timer: #{err.message}\nusage: series_timer [-lac] [serie1 serie2 ...]"
14
+ abort "series_timer: #{err.message}\n#{usage}"
14
15
  rescue SeriesTimer::InvalidSerieException
15
- abort "series_timer: invalid serie"
16
+ abort "series_timer: invalid series"
17
+ rescue ArgumentError
18
+ abort "series_timer: you need to provide at least one series\n#{usage}"
16
19
  end
data/cache/House.cache ADDED
@@ -0,0 +1 @@
1
+ [["22", "Pilot", "2004-11-16"], ["2", "Paternity", "2004-11-23"], ["3", "Occam", "2004-11-30"], ["4", "Maternity", "2004-12-07"], ["5", "Damned If You Do", "2004-12-14"], ["6", "The Socratic Method", "2004-12-21"], ["7", "Fidelity", "2004-12-28"], ["8", "Poison", "2005-01-25"], ["9", "DNR", "2005-02-01"], ["10", "Histories", "2005-02-08"], ["11", "Detox", "2005-02-15"], ["12", "Sports Medicine", "2005-02-22"], ["13", "Cursed", "2005-03-01"], ["14", "Control", "2005-03-15"], ["15", "Mob Rules", "2005-03-22"], ["16", "Heavy", "2005-03-29"], ["17", "Role Model", "2005-04-12"], ["18", "Babies ", "2005-04-19"], ["19", "Kids", "2005-05-03"], ["20", "Love Hurts", "2005-05-10"], ["21", "Three Stories", "2005-05-17"], ["22", "Honeymoon", "2005-05-24"], ["1", "Acceptance", "2005-09-13"], ["2", "Autopsy", "2005-09-20"], ["3", "Humpty Dumpty", "2005-09-27"], ["4", "TB or Not TB", "2005-11-01"], ["5", "Daddy", "2005-11-08"], ["6", "Spin", "2005-11-15"], ["7", "Hunting", "2005-11-22"], ["8", "The Mistake", "2005-11-29"], ["9", "Deception", "2005-12-13"], ["10", "Failure to Communicate", "2006-01-10"], ["11", "Need to Know", "2006-02-07"], ["12", "Distractions", "2006-02-14"], ["13", "Skin Deep", "2006-02-20"], ["14", "Sex Kills", "2006-03-07"], ["15", "Clueless", "2006-03-28"], ["16", "Safe", "2006-04-04"], ["17", "All In", "2006-04-11"], ["18", "Sleeping Dogs Lie", "2006-04-18"], ["19", "House vs", "2006-04-25"], ["20", "Euphoria ", "2006-05-02"], ["21", "Euphoria ", "2006-05-03"], ["22", "Forever", "2006-05-09"], ["23", "Who", "2006-05-16"], ["24", "No Reason", "2006-05-23"], ["1", "Meaning", "2006-09-05"], ["2", "Cane and Able", "2006-09-12"], ["3", "Informed Consent", "2006-09-19"], ["4", "Lines in the Sand", "2006-09-26"], ["5", "Fools for Love", "2006-10-31"], ["6", "Que Ser", "2006-11-07"], ["7", "Son of Coma Guy", "2006-11-14"], ["8", "Whac", "2006-11-21"], ["9", "Finding Judas", "2006-11-28"], ["10", "Merry Little Christmas", "2006-12-12"], ["11", "Words and Deeds", "2007-01-09"], ["12", "One Day", "2007-01-30"], ["13", "Needle in a Haystack", "2007-02-06"], ["14", "Insensitive", "2007-02-13"], ["15", "Half", "2007-03-06"], ["16", "Top Secret", "2007-03-27"], ["17", "Fetal Position", "2007-04-03"], ["18", "Airborne", "2007-04-10"], ["19", "Act Your Age", "2007-04-17"], ["20", "House Training", "2007-04-24"], ["21", "Family", "2007-05-01"], ["22", "Resignation", "2007-05-08"], ["23", "The Jerk", "2007-05-15"], ["24", "Human Error", "2007-05-29"], ["1", "Alone", "2007-09-25"], ["2", "The Right Stuff", "2007-10-02"], ["3", "97 Seconds", "2007-10-09"], ["4", "Guardian Angels", "2007-10-23"], ["5", "Mirror Mirror", "2007-10-30"], ["6", "Whatever It Takes", "2007-11-06"], ["7", "Ugly", "2007-11-13"], ["8", "You Don", "2007-11-20"], ["9", "Games", "2007-11-27"], ["10", "It", "2008-01-29"], ["11", "Frozen", "2008-02-03"], ["12", "Don", "2008-02-05"], ["13", "No More Mr", "2008-04-28"], ["14", "Living the Dream", "2008-05-05"], ["15", "House", "2008-05-12"], ["16", "Wilson", "2008-05-19"], ["1", "Dying Changes Everything", "2008-09-16"], ["2", "Not Cancer", "2008-09-23"], ["3", "Adverse Events", "2008-09-30"], ["4", "Birthmarks", "2008-10-14"], ["5", "Lucky Thirteen", "2008-10-21"], ["6", "Joy", "2008-10-28"], ["7", "The Itch", "2008-11-11"], ["8", "Emancipation", "2008-11-18"], ["9", "Last Resort", "2008-11-25"], ["10", "Let Them Eat Cake", "2008-12-02"], ["11", "Joy to the World", "2008-12-09"], ["12", "Painless", "2009-01-19"], ["13", "Big Baby", "2009-01-26"], ["14", "The Greater Good", "2009-02-02"], ["15", "Unfaithful", "2009-02-16"], ["16", "The Softer Side", "2009-02-23"], ["17", "The Social Contract", "2009-03-09"], ["18", "Here Kitty", "2009-03-16"], ["19", "Locked In", "2009-03-30"], ["20", "Simple Explanation", "2009-04-06"], ["21", "Saviors", "2009-04-13"], ["22", "House Divided", "2009-04-27"], ["23", "Under My Skin", "2009-05-04"], ["24", "Both Sides Now", "2009-05-11"], ["1", "Broken ", "2009-09-21"], ["2", "Broken ", "2009-09-21"], ["3", "Epic Fail", "2009-09-28"], ["4", "The Tyrant", "2009-10-05"], ["5", "Instant Karma", "2009-10-12"], ["6", "Brave Heart", "2009-10-19"], ["7", "Known Unknowns", "2009-11-09"], ["8", "Teamwork", "2009-11-16"], ["9", "Ignorance Is Bliss", "2009-11-23"], ["10", "Wilson", "2009-11-30"], ["11", "The Down Low", "2010-01-11"], ["12", "Remorse", "2010-01-25"], ["13", "Moving the Chains", "2010-02-01"], ["14", "5 to 9", "2010-02-08"], ["15", "Private Lives", "2010-03-08"], ["16", "Black Hole", "2010-03-15"], ["17", "Lockdown", "2010-04-12"], ["18", "Knight Fall", "2010-04-19"], ["19", "Open and Shut", "2010-04-26"], ["20", "The Choice", "2010-05-03"], ["21", "Baggage", "2010-05-10"], ["22", "Help Me", "2010-05-17"], ["1", "Now What", "2010-09-20"], ["2", "Selfish", "2010-09-27"], ["3", "Unwritten", "2010-10-04"], ["4", "Massage Therapy", "2010-10-11"], ["5", "Unplanned Parenthood", "2010-10-18"], ["6", "Office Politics", "2010-11-08"], ["7", "A Pox on Our House", "2010-11-15"], ["8", "Small Sacrifices", "2010-11-22"], ["9", "Larger Than Life", "2011-01-17"], ["10", "Carrot or Stick", "2011-01-24"], ["11", "Family Practice", "2011-02-07"], ["12", "You Must Remember This", "2011-02-14"], ["13", "Two Stories", "2011-02-21"], ["14", "Recession Proof", "2011-02-28"], ["15", "Bombshells", "2011-03-07"], ["16", "Out of the Chute", "2011-03-14"], ["17", "Fall from Grace", "2011-03-21"], ["18", "The Dig", "2011-04-11"], ["19", "Last Temptation", "2011-04-18"], ["20", "Changes", "2011-05-02"], ["21", "The Fix", "2011-05-09"], ["22", "After Hours", "2011-05-16"], ["23", "Moving On", "2011-05-23"], ["1", "Twenty Vicodin", "2011-10-03"], ["2", "Transplant", "2011-10-10"], ["3", "Charity Case", "2011-10-17"], ["4", "Risky Business", "2011-10-31"], ["5", "The Confession", "2011-11-07"], ["6", "Parents", "2011-11-14"], ["7", "Dead ", "2011-11-21"], ["8", "Perils of Paranoia", "2011-11-28"], ["9", "Better Half", "2012-01-23"], ["10", "Runaways", "2012-01-30"], ["11", "Nobody", "2012-02-06"], ["12", "Chase", "2012-02-13"], ["13", "Man of the House", "2012-02-20"], ["14", "Love is Blind", "2012-03-19"], ["15", "", "2005-08-30"]]
@@ -1,3 +1,3 @@
1
1
  module SeriesTimer
2
- VERSION = "0.1"
2
+ VERSION = "0.1.1"
3
3
  end
data/lib/series_timer.rb CHANGED
@@ -15,6 +15,7 @@ module SeriesTimer
15
15
  parser.on("-l") { params[:episodes] = :last }
16
16
  parser.on("-a") { params[:episodes] = :all }
17
17
  series = parser.parse(argv)
18
+ raise ArgumentError if series.empty?
18
19
  [params, series]
19
20
  end
20
21
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: series_timer
3
3
  version: !ruby/object:Gem::Version
4
- version: '0.1'
4
+ version: 0.1.1
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2012-01-29 00:00:00.000000000 Z
12
+ date: 2012-01-30 00:00:00.000000000 Z
13
13
  dependencies: []
14
14
  description: scrapes the list of episodes of any series from wikipedia
15
15
  email:
@@ -27,6 +27,7 @@ files:
27
27
  - lib/series_timer/episode.rb
28
28
  - lib/series_timer.rb
29
29
  - cache/empty
30
+ - cache/House.cache
30
31
  - README.md
31
32
  homepage: http://github.com/series_timer
32
33
  licenses: []