echelon 0.0.5 → 1.0.0

Sign up to get free protection for your applications and to get access to all the features.
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- echelon (0.0.4)
4
+ echelon (1.0.0)
5
5
  json_pure (= 1.4.6)
6
6
  xml-simple (= 1.0.12)
7
7
  zip (= 2.0.2)
data/History.txt CHANGED
@@ -1,3 +1,15 @@
1
+ === 1.0.0 2012-06-09
2
+
3
+ * Added park Disney World Orlando Parks
4
+ * Added park Disneyland California Parks
5
+ * Moved the Seaworld parks to their own namespace to match the new parks
6
+
7
+ === 0.0.6 2012-04-19
8
+
9
+ * Added park Alton Towers
10
+ * Added 'The Swarm' ride to Thorpe Park
11
+ * Fixed Disneyland Paris encoding issue
12
+
1
13
  === 0.0.4 2011-01-12
2
14
 
3
15
  * Added Seaworld San Antonio
data/README.rdoc CHANGED
@@ -10,16 +10,32 @@ RubyGem to give quick access to Theme Park queue times
10
10
 
11
11
  Currently only the following parks are supported...
12
12
 
13
- * Thorpe Park
13
+ === France
14
+
14
15
  * Disneyland Paris
16
+
17
+ === United Kingdom
18
+
19
+ * Alton Towers
20
+ * Thorpe Park
21
+
22
+ === United States of America
23
+
24
+ * Disney World Animal Kingdom
25
+ * Disney World Epcot
26
+ * Disney World Hollywood Studios
27
+ * Disney World Magic Kingdom
28
+ * Disneyland
29
+ * Disneyland California Adventure
30
+ * Seaworld Orlando
15
31
  * Seaworld San Antonio
16
32
  * Seaworld San Diego
17
- * Seaworld Orlando
33
+
18
34
 
19
35
  == SYNOPSIS:
20
36
 
21
37
  require 'echelon'
22
- seaworld = Echelon::SeaworldSanAntonio.new()
38
+ seaworld = Echelon::Seaworld::SanAntonio.new()
23
39
  seaworld.find_by_name("Steel Eel")
24
40
  => #<Echelon::Ride:0xb7179ca8 @updated_at=#<DateTime>, @name="Steel Eel", @active=1, @queue_time=30>
25
41
  seaworld.rides
@@ -31,6 +47,29 @@ Currently only the following parks are supported...
31
47
  #<Echelon::Ride:0xb716cd8c @updated_at=#<DateTime>, @name="Lost Lagoon", @active=0, @queue_time=0>,
32
48
  #<Echelon::Ride:0xb716afc8 @updated_at=#<DateTime>, @name="Shamu Express", @active=1, @queue_time=15>]
33
49
 
50
+ == PARK LISTS
51
+
52
+ # Seaworld
53
+ Echelon::Seaworld::SanAntonio.new()
54
+ Echelon::Seaworld::Orlando.new()
55
+ Echelon::Seaworld::SanDiego.new()
56
+
57
+ # Disney World
58
+ Echelon::DisneyWorld::AnimalKingdom.new()
59
+ Echelon::DisneyWorld::Epcot.new()
60
+ Echelon::DisneyWorld::HollywoodStudios.new()
61
+ Echelon::DisneyWorld::MagicKingdom.new()
62
+
63
+ # Disneyland California
64
+ Echelon::Disneyland::Disneyland.new()
65
+ Echelon::Disneyland::CaliforniaAdventure.new()
66
+
67
+ # Disneyland Paris
68
+ Echelon::DisneylandParis.new()
69
+
70
+ # UK Parks
71
+ Echelon::AltonTowers.new()
72
+ Echelon::ThorpePark.new()
34
73
 
35
74
  == INSTALL:
36
75
 
@@ -40,7 +79,7 @@ Currently only the following parks are supported...
40
79
 
41
80
  (The MIT License)
42
81
 
43
- Copyright (c) 2010 Lloyd Pick
82
+ Copyright (c) 2010-2012 Lloyd Pick
44
83
 
45
84
  Permission is hereby granted, free of charge, to any person obtaining
46
85
  a copy of this software and associated documentation files (the
data/echelon.gemspec CHANGED
@@ -10,7 +10,7 @@ Gem::Specification.new do |s|
10
10
  s.email = ["lloydpick@gmail.com"]
11
11
  s.homepage = "http://github.com/lloydpick/echelon"
12
12
  s.summary = "RubyGem to give quick access to Theme Park queue times"
13
- s.description = "RubyGem to give quick access to Theme Park queue times (Disneyland Paris, Thorpe Park, Seaworld San Antonio supported)"
13
+ s.description = "RubyGem to give quick access to Theme Park queue times (Alton Towers, Disney World Animal Kingdom, Disney World Epcot, Disney World Hollywood Studios, Disney World Magic Kingdom, Disneyland, Disneyland California Adventure, Disneyland Paris, Seaworld San Antonio, Seaworld San Diego, Seaworld Orlando, Thorpe Park)"
14
14
 
15
15
  s.required_rubygems_version = ">= 1.3.6"
16
16
  s.rubyforge_project = "echelon"
@@ -10,8 +10,15 @@ module Echelon
10
10
  def ride_list
11
11
  {
12
12
  1 => 'Air',
13
- 2 => 'Enterprise',
14
- 3 => 'Rita'
13
+ 2 => 'Nemesis',
14
+ 3 => 'TH13TEEN',
15
+ 6 => 'Oblivion',
16
+ 8 => 'Rita',
17
+ 10 => 'Congo River Rapids',
18
+ 11 => 'Sonic Spinball',
19
+ 14 => 'Runaway Mine Train',
20
+ 15 => 'The Flume',
21
+ 31 => 'Nemesis Sub-Terra'
15
22
  }
16
23
  end
17
24
 
@@ -0,0 +1,40 @@
1
+ require 'rubygems'
2
+ require 'json'
3
+ require 'net/http'
4
+
5
+ module Echelon
6
+ module DisneyWorld
7
+ class AnimalKingdom < Park
8
+
9
+ attr_reader :json_data
10
+
11
+ def ride_list
12
+ self.json_data.keys.inject({}) { |r,k| r[k] = k; r }
13
+ end
14
+
15
+ def initialize
16
+ # fetch the json feed
17
+ url = "http://dparks.uiemedia.net/dmm_v2/jsondata/JsonUpdateData?version=14&p=80007823"
18
+ resp = Net::HTTP.get_response(URI.parse(url))
19
+ data = resp.body[2..-1]
20
+
21
+ # were only interested in the ride data, throw everything else away
22
+ json_data = JSON.parse(data)
23
+ ride_data = json_data["attractions"]["homeLabels"]
24
+ queue_data = json_data["attractions"]["homeValues"].map { |v| v.to_i }
25
+ @json_data = json_data["attractions"]["homeLabels"].each_with_index.inject({}) { |r,i| r[i.first] = queue_data[i.last]; r }
26
+ end
27
+
28
+ private
29
+
30
+ def create_ride_object(ref)
31
+ self.json_data.each do |ride|
32
+ if ride[0] == ref
33
+ return Ride.new(:name => ride[0], :queue_time => ride[1])
34
+ end
35
+ end
36
+ end
37
+
38
+ end
39
+ end
40
+ end
@@ -0,0 +1,40 @@
1
+ require 'rubygems'
2
+ require 'json'
3
+ require 'net/http'
4
+
5
+ module Echelon
6
+ module DisneyWorld
7
+ class Epcot < Park
8
+
9
+ attr_reader :json_data
10
+
11
+ def ride_list
12
+ self.json_data.keys.inject({}) { |r,k| r[k] = k; r }
13
+ end
14
+
15
+ def initialize
16
+ # fetch the json feed
17
+ url = "http://dparks.uiemedia.net/dmm_v2/jsondata/JsonUpdateData?version=14&p=80007838"
18
+ resp = Net::HTTP.get_response(URI.parse(url))
19
+ data = resp.body[2..-1]
20
+
21
+ # were only interested in the ride data, throw everything else away
22
+ json_data = JSON.parse(data)
23
+ ride_data = json_data["attractions"]["homeLabels"]
24
+ queue_data = json_data["attractions"]["homeValues"].map { |v| v.to_i }
25
+ @json_data = json_data["attractions"]["homeLabels"].each_with_index.inject({}) { |r,i| r[i.first] = queue_data[i.last]; r }
26
+ end
27
+
28
+ private
29
+
30
+ def create_ride_object(ref)
31
+ self.json_data.each do |ride|
32
+ if ride[0] == ref
33
+ return Ride.new(:name => ride[0], :queue_time => ride[1])
34
+ end
35
+ end
36
+ end
37
+
38
+ end
39
+ end
40
+ end
@@ -0,0 +1,40 @@
1
+ require 'rubygems'
2
+ require 'json'
3
+ require 'net/http'
4
+
5
+ module Echelon
6
+ module DisneyWorld
7
+ class HollywoodStudios < Park
8
+
9
+ attr_reader :json_data
10
+
11
+ def ride_list
12
+ self.json_data.keys.inject({}) { |r,k| r[k] = k; r }
13
+ end
14
+
15
+ def initialize
16
+ # fetch the json feed
17
+ url = "http://dparks.uiemedia.net/dmm_v2/jsondata/JsonUpdateData?version=14&p=80007998"
18
+ resp = Net::HTTP.get_response(URI.parse(url))
19
+ data = resp.body[2..-1]
20
+
21
+ # were only interested in the ride data, throw everything else away
22
+ json_data = JSON.parse(data)
23
+ ride_data = json_data["attractions"]["homeLabels"]
24
+ queue_data = json_data["attractions"]["homeValues"].map { |v| v.to_i }
25
+ @json_data = json_data["attractions"]["homeLabels"].each_with_index.inject({}) { |r,i| r[i.first] = queue_data[i.last]; r }
26
+ end
27
+
28
+ private
29
+
30
+ def create_ride_object(ref)
31
+ self.json_data.each do |ride|
32
+ if ride[0] == ref
33
+ return Ride.new(:name => ride[0], :queue_time => ride[1])
34
+ end
35
+ end
36
+ end
37
+
38
+ end
39
+ end
40
+ end
@@ -0,0 +1,40 @@
1
+ require 'rubygems'
2
+ require 'json'
3
+ require 'net/http'
4
+
5
+ module Echelon
6
+ module DisneyWorld
7
+ class MagicKingdom < Park
8
+
9
+ attr_reader :json_data
10
+
11
+ def ride_list
12
+ self.json_data.keys.inject({}) { |r,k| r[k] = k; r }
13
+ end
14
+
15
+ def initialize
16
+ # fetch the json feed
17
+ url = "http://dparks.uiemedia.net/dmm_v2/jsondata/JsonUpdateData?version=14&p=80007944"
18
+ resp = Net::HTTP.get_response(URI.parse(url))
19
+ data = resp.body[2..-1]
20
+
21
+ # were only interested in the ride data, throw everything else away
22
+ json_data = JSON.parse(data)
23
+ ride_data = json_data["attractions"]["homeLabels"]
24
+ queue_data = json_data["attractions"]["homeValues"].map { |v| v.to_i }
25
+ @json_data = json_data["attractions"]["homeLabels"].each_with_index.inject({}) { |r,i| r[i.first] = queue_data[i.last]; r }
26
+ end
27
+
28
+ private
29
+
30
+ def create_ride_object(ref)
31
+ self.json_data.each do |ride|
32
+ if ride[0] == ref
33
+ return Ride.new(:name => ride[0], :queue_time => ride[1])
34
+ end
35
+ end
36
+ end
37
+
38
+ end
39
+ end
40
+ end
@@ -0,0 +1,40 @@
1
+ require 'rubygems'
2
+ require 'json'
3
+ require 'net/http'
4
+
5
+ module Echelon
6
+ module Disneyland
7
+ class CaliforniaAdventure < Park
8
+
9
+ attr_reader :json_data
10
+
11
+ def ride_list
12
+ self.json_data.keys.inject({}) { |r,k| r[k] = k; r }
13
+ end
14
+
15
+ def initialize
16
+ # fetch the json feed
17
+ url = "http://dparks.uiemedia.net/dmm_v2/jsondata/JsonUpdateData?version=14&p=336894"
18
+ resp = Net::HTTP.get_response(URI.parse(url))
19
+ data = resp.body[2..-1]
20
+
21
+ # were only interested in the ride data, throw everything else away
22
+ json_data = JSON.parse(data)
23
+ ride_data = json_data["attractions"]["homeLabels"]
24
+ queue_data = json_data["attractions"]["homeValues"].map { |v| v.to_i }
25
+ @json_data = json_data["attractions"]["homeLabels"].each_with_index.inject({}) { |r,i| r[i.first.gsub("\302\240",'')] = queue_data[i.last]; r }
26
+ end
27
+
28
+ private
29
+
30
+ def create_ride_object(ref)
31
+ self.json_data.each do |ride|
32
+ if ride[0] == ref
33
+ return Ride.new(:name => ride[0], :queue_time => ride[1])
34
+ end
35
+ end
36
+ end
37
+
38
+ end
39
+ end
40
+ end
@@ -0,0 +1,40 @@
1
+ require 'rubygems'
2
+ require 'json'
3
+ require 'net/http'
4
+
5
+ module Echelon
6
+ module Disneyland
7
+ class Disneyland < Park
8
+
9
+ attr_reader :json_data
10
+
11
+ def ride_list
12
+ self.json_data.keys.inject({}) { |r,k| r[k] = k; r }
13
+ end
14
+
15
+ def initialize
16
+ # fetch the json feed
17
+ url = "http://dparks.uiemedia.net/dmm_v2/jsondata/JsonUpdateData?version=14&p=330339"
18
+ resp = Net::HTTP.get_response(URI.parse(url))
19
+ data = resp.body[2..-1]
20
+
21
+ # were only interested in the ride data, throw everything else away
22
+ json_data = JSON.parse(data)
23
+ ride_data = json_data["attractions"]["homeLabels"]
24
+ queue_data = json_data["attractions"]["homeValues"].map { |v| v.to_i }
25
+ @json_data = json_data["attractions"]["homeLabels"].each_with_index.inject({}) { |r,i| r[i.first.gsub("\302\240",'')] = queue_data[i.last]; r }
26
+ end
27
+
28
+ private
29
+
30
+ def create_ride_object(ref)
31
+ self.json_data.each do |ride|
32
+ if ride[0] == ref
33
+ return Ride.new(:name => ride[0], :queue_time => ride[1])
34
+ end
35
+ end
36
+ end
37
+
38
+ end
39
+ end
40
+ end
@@ -1,3 +1,5 @@
1
+ # encoding: UTF-8
2
+
1
3
  require 'rubygems'
2
4
  require 'json'
3
5
  require 'net/http'
@@ -0,0 +1,70 @@
1
+ require 'rubygems'
2
+ require 'xmlsimple'
3
+ require 'net/http'
4
+ require 'date'
5
+
6
+ module Echelon
7
+ module Seaworld
8
+ class Orlando < Park
9
+
10
+ attr_reader :xml_data
11
+
12
+ def ride_list
13
+ {
14
+ 2002 => 'Wild Arctic Ride',
15
+ 2048 => 'Flying Fiddler',
16
+ 2049 => 'Swishy Fishies',
17
+ 2034 => 'Kraken',
18
+ 2018 => 'Sky Tower',
19
+ 2036 => 'Journey to Atlantis',
20
+ 2037 => 'Manta',
21
+ 2008 => 'Sea Carousel',
22
+ 2044 => 'Shamu Express',
23
+ 2045 => 'Ocean Commotion',
24
+ 2046 => 'Jazzy Jellies'
25
+ }
26
+ end
27
+
28
+ def initialize
29
+ # fetch the xml file
30
+ http = Net::HTTP.new('lab.defimobile.com', 443)
31
+ http.use_ssl = true
32
+ http.verify_mode = OpenSSL::SSL::VERIFY_NONE
33
+ resp, data = http.get('/orlando/rides')
34
+
35
+ # were only interested in the ride data, throw everything else away
36
+ xml_data = XmlSimple.xml_in(data)
37
+ @xml_data = xml_data['ride']
38
+ end
39
+
40
+ private
41
+
42
+ def create_ride_object(ref)
43
+ self.xml_data.each do |ride|
44
+ if ride["id"].to_s.to_i == ref
45
+ active, queue_time = parse_wait_time(ride["waitTime"].to_s)
46
+ updated_at = DateTime.parse(ride["lastModified"].to_s)
47
+ return Ride.new(:name => self.ride_list[ref], :queue_time => queue_time, :active => active, :updated_at => updated_at)
48
+ end
49
+ end
50
+ end
51
+
52
+ def parse_wait_time(wait)
53
+ if wait == "Closed"
54
+ queue_time = 0
55
+ active = 0
56
+ elsif wait == "No Wait"
57
+ queue_time = 0
58
+ active = 1
59
+ elsif wait =~ /(\d*) min/
60
+ queue_time = $1.to_i
61
+ active = 1
62
+ else
63
+ queue_time = 0
64
+ active = 0
65
+ end
66
+ return active, queue_time
67
+ end
68
+ end
69
+ end
70
+ end
@@ -0,0 +1,66 @@
1
+ require 'rubygems'
2
+ require 'xmlsimple'
3
+ require 'net/http'
4
+ require 'date'
5
+
6
+ module Echelon
7
+ module Seaworld
8
+ class SanAntonio < Park
9
+
10
+ attr_reader :xml_data
11
+
12
+ def ride_list
13
+ {
14
+ 10 => 'Shamu Express',
15
+ 11 => 'Steel Eel',
16
+ 12 => 'Texas Splashdown',
17
+ 13 => 'Great White',
18
+ 14 => 'Rio Loco',
19
+ 15 => 'Journey to Atlantis',
20
+ 164 => 'Lost Lagoon'
21
+ }
22
+ end
23
+
24
+ def initialize
25
+ # fetch the xml file
26
+ http = Net::HTTP.new('lab.defimobile.com', 443)
27
+ http.use_ssl = true
28
+ http.verify_mode = OpenSSL::SSL::VERIFY_NONE
29
+ resp, data = http.get('/seaworld/rides')
30
+
31
+ # were only interested in the ride data, throw everything else away
32
+ xml_data = XmlSimple.xml_in(data)
33
+ @xml_data = xml_data['ride']
34
+ end
35
+
36
+ private
37
+
38
+ def create_ride_object(ref)
39
+ self.xml_data.each do |ride|
40
+ if ride["id"].to_s.to_i == ref
41
+ active, queue_time = parse_wait_time(ride["waitTime"].to_s)
42
+ updated_at = DateTime.parse(ride["lastModified"].to_s)
43
+ return Ride.new(:name => self.ride_list[ref], :queue_time => queue_time, :active => active, :updated_at => updated_at)
44
+ end
45
+ end
46
+ end
47
+
48
+ def parse_wait_time(wait)
49
+ if wait == "Closed"
50
+ queue_time = 0
51
+ active = 0
52
+ elsif wait == "No Wait"
53
+ queue_time = 0
54
+ active = 1
55
+ elsif wait =~ /(\d*) min/
56
+ queue_time = $1.to_i
57
+ active = 1
58
+ else
59
+ queue_time = 0
60
+ active = 0
61
+ end
62
+ return active, queue_time
63
+ end
64
+ end
65
+ end
66
+ end
@@ -0,0 +1,67 @@
1
+ require 'rubygems'
2
+ require 'xmlsimple'
3
+ require 'net/http'
4
+ require 'date'
5
+
6
+ module Echelon
7
+ module Seaworld
8
+ class SanDiego < Park
9
+
10
+ attr_reader :xml_data
11
+
12
+ def ride_list
13
+ {
14
+ 1034 => 'Shipwreck Rapids',
15
+ 1024 => 'Skytower',
16
+ 1010 => 'Journey to Atlantis',
17
+ 1011 => 'Wild Arctic Ride',
18
+ 1122 => 'Elmo\'s Flying Fish',
19
+ 1029 => 'Skyride',
20
+ 1123 => 'Abby\'s Sea Star Spin',
21
+ 1121 => 'Oscar\'s Rocking Eel'
22
+ }
23
+ end
24
+
25
+ def initialize
26
+ # fetch the xml file
27
+ http = Net::HTTP.new('lab.defimobile.com', 443)
28
+ http.use_ssl = true
29
+ http.verify_mode = OpenSSL::SSL::VERIFY_NONE
30
+ resp, data = http.get('/san_diego/rides')
31
+
32
+ # were only interested in the ride data, throw everything else away
33
+ xml_data = XmlSimple.xml_in(data)
34
+ @xml_data = xml_data['ride']
35
+ end
36
+
37
+ private
38
+
39
+ def create_ride_object(ref)
40
+ self.xml_data.each do |ride|
41
+ if ride["id"].to_s.to_i == ref
42
+ active, queue_time = parse_wait_time(ride["waitTime"].to_s)
43
+ updated_at = DateTime.parse(ride["lastModified"].to_s)
44
+ return Ride.new(:name => self.ride_list[ref], :queue_time => queue_time, :active => active, :updated_at => updated_at)
45
+ end
46
+ end
47
+ end
48
+
49
+ def parse_wait_time(wait)
50
+ if wait == "Closed"
51
+ queue_time = 0
52
+ active = 0
53
+ elsif wait == "No Wait"
54
+ queue_time = 0
55
+ active = 1
56
+ elsif wait =~ /(\d*) min/
57
+ queue_time = $1.to_i
58
+ active = 1
59
+ else
60
+ queue_time = 0
61
+ active = 0
62
+ end
63
+ return active, queue_time
64
+ end
65
+ end
66
+ end
67
+ end
@@ -34,7 +34,8 @@ module Echelon
34
34
  24 => 'Wet Wet Wet',
35
35
  25 => 'Neptune\'s Beach',
36
36
  26 => 'Chief Ranger\'s Carousel',
37
- 27 => 'Storm Surge'
37
+ 27 => 'Storm Surge',
38
+ 28 => 'The Swarm'
38
39
  }
39
40
  end
40
41
 
@@ -1,3 +1,3 @@
1
1
  module Echelon
2
- VERSION = '0.0.5'
2
+ VERSION = '1.0.0'
3
3
  end
data/lib/echelon.rb CHANGED
@@ -4,11 +4,27 @@ $:.unshift(File.dirname(__FILE__)) unless
4
4
  require "#{File.dirname(__FILE__)}/echelon/ride.rb"
5
5
  require "#{File.dirname(__FILE__)}/echelon/park.rb"
6
6
 
7
+ # UK Parks
7
8
  require "#{File.dirname(__FILE__)}/echelon/parks/thorpe_park.rb"
9
+ require "#{File.dirname(__FILE__)}/echelon/parks/alton_towers.rb"
10
+
11
+ # Seaworld
12
+ require "#{File.dirname(__FILE__)}/echelon/parks/seaworld/san_antonio.rb"
13
+ require "#{File.dirname(__FILE__)}/echelon/parks/seaworld/san_diego.rb"
14
+ require "#{File.dirname(__FILE__)}/echelon/parks/seaworld/orlando.rb"
15
+
16
+ # Disney World Resort
17
+ require "#{File.dirname(__FILE__)}/echelon/parks/disney_world/magic_kingdom.rb"
18
+ require "#{File.dirname(__FILE__)}/echelon/parks/disney_world/epcot.rb"
19
+ require "#{File.dirname(__FILE__)}/echelon/parks/disney_world/hollywood_studios.rb"
20
+ require "#{File.dirname(__FILE__)}/echelon/parks/disney_world/animal_kingdom.rb"
21
+
22
+ # Disneyland Resort California
23
+ require "#{File.dirname(__FILE__)}/echelon/parks/disneyland/disneyland.rb"
24
+ require "#{File.dirname(__FILE__)}/echelon/parks/disneyland/california_adventure.rb"
25
+
26
+ # Disneyland Resort Paris
8
27
  require "#{File.dirname(__FILE__)}/echelon/parks/disneyland_paris.rb"
9
- require "#{File.dirname(__FILE__)}/echelon/parks/seaworld_san_antonio.rb"
10
- require "#{File.dirname(__FILE__)}/echelon/parks/seaworld_san_diego.rb"
11
- require "#{File.dirname(__FILE__)}/echelon/parks/seaworld_orlando.rb"
12
28
 
13
29
  module Echelon
14
30
  end
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: echelon
3
3
  version: !ruby/object:Gem::Version
4
- hash: 21
4
+ hash: 23
5
5
  prerelease:
6
6
  segments:
7
+ - 1
7
8
  - 0
8
9
  - 0
9
- - 5
10
- version: 0.0.5
10
+ version: 1.0.0
11
11
  platform: ruby
12
12
  authors:
13
13
  - Lloyd Pick
@@ -15,7 +15,7 @@ autorequire:
15
15
  bindir: bin
16
16
  cert_chain: []
17
17
 
18
- date: 2011-05-26 00:00:00 Z
18
+ date: 2012-06-08 00:00:00 Z
19
19
  dependencies:
20
20
  - !ruby/object:Gem::Dependency
21
21
  name: bundler
@@ -97,7 +97,7 @@ dependencies:
97
97
  version: 1.0.12
98
98
  type: :runtime
99
99
  version_requirements: *id005
100
- description: RubyGem to give quick access to Theme Park queue times (Disneyland Paris, Thorpe Park, Seaworld San Antonio supported)
100
+ description: RubyGem to give quick access to Theme Park queue times (Alton Towers, Disney World Animal Kingdom, Disney World Epcot, Disney World Hollywood Studios, Disney World Magic Kingdom, Disneyland, Disneyland California Adventure, Disneyland Paris, Seaworld San Antonio, Seaworld San Diego, Seaworld Orlando, Thorpe Park)
101
101
  email:
102
102
  - lloydpick@gmail.com
103
103
  executables: []
@@ -118,10 +118,16 @@ files:
118
118
  - lib/echelon.rb
119
119
  - lib/echelon/park.rb
120
120
  - lib/echelon/parks/alton_towers.rb
121
+ - lib/echelon/parks/disney_world/animal_kingdom.rb
122
+ - lib/echelon/parks/disney_world/epcot.rb
123
+ - lib/echelon/parks/disney_world/hollywood_studios.rb
124
+ - lib/echelon/parks/disney_world/magic_kingdom.rb
125
+ - lib/echelon/parks/disneyland/california_adventure.rb
126
+ - lib/echelon/parks/disneyland/disneyland.rb
121
127
  - lib/echelon/parks/disneyland_paris.rb
122
- - lib/echelon/parks/seaworld_orlando.rb
123
- - lib/echelon/parks/seaworld_san_antonio.rb
124
- - lib/echelon/parks/seaworld_san_diego.rb
128
+ - lib/echelon/parks/seaworld/orlando.rb
129
+ - lib/echelon/parks/seaworld/san_antonio.rb
130
+ - lib/echelon/parks/seaworld/san_diego.rb
125
131
  - lib/echelon/parks/thorpe_park.rb
126
132
  - lib/echelon/ride.rb
127
133
  - lib/echelon/version.rb
@@ -161,7 +167,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
161
167
  requirements: []
162
168
 
163
169
  rubyforge_project: echelon
164
- rubygems_version: 1.8.4
170
+ rubygems_version: 1.8.24
165
171
  signing_key:
166
172
  specification_version: 3
167
173
  summary: RubyGem to give quick access to Theme Park queue times
@@ -1,68 +0,0 @@
1
- require 'rubygems'
2
- require 'xmlsimple'
3
- require 'net/http'
4
-
5
- module Echelon
6
- class SeaworldOrlando < Park
7
-
8
- attr_reader :xml_data
9
-
10
- def ride_list
11
- {
12
- 2002 => 'Wild Arctic Ride',
13
- 2048 => 'Flying Fiddler',
14
- 2049 => 'Swishy Fishies',
15
- 2034 => 'Kraken',
16
- 2018 => 'Sky Tower',
17
- 2036 => 'Journey to Atlantis',
18
- 2037 => 'Manta',
19
- 2008 => 'Sea Carousel',
20
- 2044 => 'Shamu Express',
21
- 2045 => 'Ocean Commotion',
22
- 2046 => 'Jazzy Jellies'
23
- }
24
- end
25
-
26
- def initialize
27
- # fetch the xml file
28
- http = Net::HTTP.new('lab.defimobile.com', 443)
29
- http.use_ssl = true
30
- http.verify_mode = OpenSSL::SSL::VERIFY_NONE
31
- resp, data = http.get('/orlando/rides')
32
-
33
- # were only interested in the ride data, throw everything else away
34
- xml_data = XmlSimple.xml_in(data)
35
- @xml_data = xml_data['ride']
36
- end
37
-
38
- private
39
-
40
- def create_ride_object(ref)
41
- self.xml_data.each do |ride|
42
- if ride["id"].to_s.to_i == ref
43
- active, queue_time = parse_wait_time(ride["waitTime"].to_s)
44
- updated_at = DateTime.parse(ride["lastModified"].to_s)
45
- return Ride.new(:name => self.ride_list[ref], :queue_time => queue_time, :active => active, :updated_at => updated_at)
46
- end
47
- end
48
- end
49
-
50
- def parse_wait_time(wait)
51
- if wait == "Closed"
52
- queue_time = 0
53
- active = 0
54
- elsif wait == "No Wait"
55
- queue_time = 0
56
- active = 1
57
- elsif wait =~ /(\d*) min/
58
- queue_time = $1.to_i
59
- active = 1
60
- else
61
- queue_time = 0
62
- active = 0
63
- end
64
- return active, queue_time
65
- end
66
-
67
- end
68
- end
@@ -1,64 +0,0 @@
1
- require 'rubygems'
2
- require 'xmlsimple'
3
- require 'net/http'
4
-
5
- module Echelon
6
- class SeaworldSanAntonio < Park
7
-
8
- attr_reader :xml_data
9
-
10
- def ride_list
11
- {
12
- 10 => 'Shamu Express',
13
- 11 => 'Steel Eel',
14
- 12 => 'Texas Splashdown',
15
- 13 => 'Great White',
16
- 14 => 'Rio Loco',
17
- 15 => 'Journey to Atlantis',
18
- 164 => 'Lost Lagoon'
19
- }
20
- end
21
-
22
- def initialize
23
- # fetch the xml file
24
- http = Net::HTTP.new('lab.defimobile.com', 443)
25
- http.use_ssl = true
26
- http.verify_mode = OpenSSL::SSL::VERIFY_NONE
27
- resp, data = http.get('/seaworld/rides')
28
-
29
- # were only interested in the ride data, throw everything else away
30
- xml_data = XmlSimple.xml_in(data)
31
- @xml_data = xml_data['ride']
32
- end
33
-
34
- private
35
-
36
- def create_ride_object(ref)
37
- self.xml_data.each do |ride|
38
- if ride["id"].to_s.to_i == ref
39
- active, queue_time = parse_wait_time(ride["waitTime"].to_s)
40
- updated_at = DateTime.parse(ride["lastModified"].to_s)
41
- return Ride.new(:name => self.ride_list[ref], :queue_time => queue_time, :active => active, :updated_at => updated_at)
42
- end
43
- end
44
- end
45
-
46
- def parse_wait_time(wait)
47
- if wait == "Closed"
48
- queue_time = 0
49
- active = 0
50
- elsif wait == "No Wait"
51
- queue_time = 0
52
- active = 1
53
- elsif wait =~ /(\d*) min/
54
- queue_time = $1.to_i
55
- active = 1
56
- else
57
- queue_time = 0
58
- active = 0
59
- end
60
- return active, queue_time
61
- end
62
-
63
- end
64
- end
@@ -1,65 +0,0 @@
1
- require 'rubygems'
2
- require 'xmlsimple'
3
- require 'net/http'
4
-
5
- module Echelon
6
- class SeaworldSanDiego < Park
7
-
8
- attr_reader :xml_data
9
-
10
- def ride_list
11
- {
12
- 1034 => 'Shipwreck Rapids',
13
- 1024 => 'Skytower',
14
- 1010 => 'Journey to Atlantis',
15
- 1011 => 'Wild Arctic Ride',
16
- 1122 => 'Elmo\'s Flying Fish',
17
- 1029 => 'Skyride',
18
- 1123 => 'Abby\'s Sea Star Spin',
19
- 1121 => 'Oscar\'s Rocking Eel'
20
- }
21
- end
22
-
23
- def initialize
24
- # fetch the xml file
25
- http = Net::HTTP.new('lab.defimobile.com', 443)
26
- http.use_ssl = true
27
- http.verify_mode = OpenSSL::SSL::VERIFY_NONE
28
- resp, data = http.get('/san_diego/rides')
29
-
30
- # were only interested in the ride data, throw everything else away
31
- xml_data = XmlSimple.xml_in(data)
32
- @xml_data = xml_data['ride']
33
- end
34
-
35
- private
36
-
37
- def create_ride_object(ref)
38
- self.xml_data.each do |ride|
39
- if ride["id"].to_s.to_i == ref
40
- active, queue_time = parse_wait_time(ride["waitTime"].to_s)
41
- updated_at = DateTime.parse(ride["lastModified"].to_s)
42
- return Ride.new(:name => self.ride_list[ref], :queue_time => queue_time, :active => active, :updated_at => updated_at)
43
- end
44
- end
45
- end
46
-
47
- def parse_wait_time(wait)
48
- if wait == "Closed"
49
- queue_time = 0
50
- active = 0
51
- elsif wait == "No Wait"
52
- queue_time = 0
53
- active = 1
54
- elsif wait =~ /(\d*) min/
55
- queue_time = $1.to_i
56
- active = 1
57
- else
58
- queue_time = 0
59
- active = 0
60
- end
61
- return active, queue_time
62
- end
63
-
64
- end
65
- end