tyt 0.1.0
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 +7 -0
- data/.document +5 -0
- data/.ruby-gemset +1 -0
- data/.ruby-version +1 -0
- data/Gemfile +19 -0
- data/Gemfile.lock +66 -0
- data/LICENSE.txt +20 -0
- data/README.rdoc +19 -0
- data/Rakefile +45 -0
- data/VERSION +1 -0
- data/lib/tyt.rb +59 -0
- data/lib/tyt/bachelor.rb +73 -0
- data/lib/tyt/run_detail.rb +24 -0
- data/lib/tyt/season.rb +22 -0
- data/lib/tyt/ski_day.rb +25 -0
- data/test/cassettes/04-13-13_date_page.yml +96 -0
- data/test/cassettes/04-14-13_date_page.yml +53 -0
- data/test/cassettes/12_13_season_page.yml +128 -0
- data/test/cassettes/13_14_season_page.yml +72 -0
- data/test/helper.rb +28 -0
- data/test/test_bachelor.rb +98 -0
- data/test/test_run_detail.rb +15 -0
- data/test/test_season.rb +51 -0
- data/test/test_ski_day.rb +15 -0
- data/tyt.gemspec +76 -0
- metadata +140 -0
checksums.yaml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
SHA1:
|
3
|
+
metadata.gz: 5f08340a07c26fa891c3c15aff22a147f18b52ee
|
4
|
+
data.tar.gz: 7c969c28b6a0491f3cf543e991bc2831b6bcc1b5
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: be1d5363ff5d7b3c69928e80e53d871cdd0ea1e956ce52af74a4df8ac8cf92636d50de68016141a884b840b62a05c64de04c27549ed1b515372ef37410953269
|
7
|
+
data.tar.gz: 85f307276a903be4cf14c34b8ee31140711d201c8e1ce722ce21b2a6e1fa509d1604f5f3e271d65aaac6cd1245bd3871b4a2353ad1e5efe75aeb2dd36b1a3341
|
data/.document
ADDED
data/.ruby-gemset
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
tyt
|
data/.ruby-version
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
ruby-2.0.0-p247
|
data/Gemfile
ADDED
@@ -0,0 +1,19 @@
|
|
1
|
+
source "http://rubygems.org"
|
2
|
+
# Add dependencies required to use your gem here.
|
3
|
+
# Example:
|
4
|
+
# gem "activesupport", ">= 2.3.5"
|
5
|
+
gem 'nokogiri'
|
6
|
+
gem 'hashie'
|
7
|
+
|
8
|
+
# Add dependencies to develop your gem here.
|
9
|
+
# Include everything needed to run rake, tests, features, etc.
|
10
|
+
group :development do
|
11
|
+
gem "rdoc", "~> 3.12"
|
12
|
+
gem "bundler", "~> 1.0"
|
13
|
+
gem "jeweler", "~> 1.8.7"
|
14
|
+
end
|
15
|
+
group :test do
|
16
|
+
gem "minitest"
|
17
|
+
gem 'vcr', '2.4.0'
|
18
|
+
gem 'webmock', '~>1.8.3'
|
19
|
+
end
|
data/Gemfile.lock
ADDED
@@ -0,0 +1,66 @@
|
|
1
|
+
GEM
|
2
|
+
remote: http://rubygems.org/
|
3
|
+
specs:
|
4
|
+
addressable (2.3.5)
|
5
|
+
builder (3.2.2)
|
6
|
+
crack (0.4.1)
|
7
|
+
safe_yaml (~> 0.9.0)
|
8
|
+
faraday (0.8.8)
|
9
|
+
multipart-post (~> 1.2.0)
|
10
|
+
git (1.2.6)
|
11
|
+
github_api (0.10.1)
|
12
|
+
addressable
|
13
|
+
faraday (~> 0.8.1)
|
14
|
+
hashie (>= 1.2)
|
15
|
+
multi_json (~> 1.4)
|
16
|
+
nokogiri (~> 1.5.2)
|
17
|
+
oauth2
|
18
|
+
hashie (2.0.5)
|
19
|
+
highline (1.6.20)
|
20
|
+
httpauth (0.2.0)
|
21
|
+
jeweler (1.8.8)
|
22
|
+
builder
|
23
|
+
bundler (~> 1.0)
|
24
|
+
git (>= 1.2.5)
|
25
|
+
github_api (= 0.10.1)
|
26
|
+
highline (>= 1.6.15)
|
27
|
+
nokogiri (= 1.5.10)
|
28
|
+
rake
|
29
|
+
rdoc
|
30
|
+
json (1.8.1)
|
31
|
+
jwt (0.1.8)
|
32
|
+
multi_json (>= 1.5)
|
33
|
+
minitest (5.0.8)
|
34
|
+
multi_json (1.8.2)
|
35
|
+
multi_xml (0.5.5)
|
36
|
+
multipart-post (1.2.0)
|
37
|
+
nokogiri (1.5.10)
|
38
|
+
oauth2 (0.9.2)
|
39
|
+
faraday (~> 0.8)
|
40
|
+
httpauth (~> 0.2)
|
41
|
+
jwt (~> 0.1.4)
|
42
|
+
multi_json (~> 1.0)
|
43
|
+
multi_xml (~> 0.5)
|
44
|
+
rack (~> 1.2)
|
45
|
+
rack (1.5.2)
|
46
|
+
rake (10.1.0)
|
47
|
+
rdoc (3.12.2)
|
48
|
+
json (~> 1.4)
|
49
|
+
safe_yaml (0.9.7)
|
50
|
+
vcr (2.4.0)
|
51
|
+
webmock (1.8.11)
|
52
|
+
addressable (>= 2.2.7)
|
53
|
+
crack (>= 0.1.7)
|
54
|
+
|
55
|
+
PLATFORMS
|
56
|
+
ruby
|
57
|
+
|
58
|
+
DEPENDENCIES
|
59
|
+
bundler (~> 1.0)
|
60
|
+
hashie
|
61
|
+
jeweler (~> 1.8.7)
|
62
|
+
minitest
|
63
|
+
nokogiri
|
64
|
+
rdoc (~> 3.12)
|
65
|
+
vcr (= 2.4.0)
|
66
|
+
webmock (~> 1.8.3)
|
data/LICENSE.txt
ADDED
@@ -0,0 +1,20 @@
|
|
1
|
+
Copyright (c) 2013 Timmy Crawford
|
2
|
+
|
3
|
+
Permission is hereby granted, free of charge, to any person obtaining
|
4
|
+
a copy of this software and associated documentation files (the
|
5
|
+
"Software"), to deal in the Software without restriction, including
|
6
|
+
without limitation the rights to use, copy, modify, merge, publish,
|
7
|
+
distribute, sublicense, and/or sell copies of the Software, and to
|
8
|
+
permit persons to whom the Software is furnished to do so, subject to
|
9
|
+
the following conditions:
|
10
|
+
|
11
|
+
The above copyright notice and this permission notice shall be
|
12
|
+
included in all copies or substantial portions of the Software.
|
13
|
+
|
14
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
15
|
+
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
16
|
+
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
17
|
+
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
18
|
+
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
19
|
+
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
20
|
+
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
data/README.rdoc
ADDED
@@ -0,0 +1,19 @@
|
|
1
|
+
= tyt
|
2
|
+
|
3
|
+
Track Your Turns. Back in 2001 I wrote a classic ASP web app so skiers at Mt. Bachelor could track their ski runs online. Twelve years later I'm writing a ruby gem to scrape the data. Its like rain on a wedding date... a free ride when you've already paid.
|
4
|
+
|
5
|
+
== Contributing to tyt
|
6
|
+
|
7
|
+
* Check out the latest master to make sure the feature hasn't been implemented or the bug hasn't been fixed yet.
|
8
|
+
* Check out the issue tracker to make sure someone already hasn't requested it and/or contributed it.
|
9
|
+
* Fork the project.
|
10
|
+
* Start a feature/bugfix branch.
|
11
|
+
* Commit and push until you are happy with your contribution.
|
12
|
+
* Make sure to add tests for it. This is important so I don't break it in a future version unintentionally.
|
13
|
+
* Please try not to mess with the Rakefile, version, or history. If you want to have your own version, or is otherwise necessary, that is fine, but please isolate to its own commit so I can cherry-pick around it.
|
14
|
+
|
15
|
+
== Copyright
|
16
|
+
|
17
|
+
Copyright (c) 2013 Timmy Crawford. See LICENSE.txt for
|
18
|
+
further details.
|
19
|
+
|
data/Rakefile
ADDED
@@ -0,0 +1,45 @@
|
|
1
|
+
# encoding: utf-8
|
2
|
+
|
3
|
+
require 'rubygems'
|
4
|
+
require 'bundler'
|
5
|
+
begin
|
6
|
+
Bundler.setup(:default, :development)
|
7
|
+
rescue Bundler::BundlerError => e
|
8
|
+
$stderr.puts e.message
|
9
|
+
$stderr.puts "Run `bundle install` to install missing gems"
|
10
|
+
exit e.status_code
|
11
|
+
end
|
12
|
+
require 'rake'
|
13
|
+
|
14
|
+
require 'jeweler'
|
15
|
+
Jeweler::Tasks.new do |gem|
|
16
|
+
# gem is a Gem::Specification... see http://docs.rubygems.org/read/chapter/20 for more options
|
17
|
+
gem.name = "tyt"
|
18
|
+
gem.homepage = "http://github.com/timmyc/tyt"
|
19
|
+
gem.license = "MIT"
|
20
|
+
gem.summary = "A wrapper for accessing vertical turn tracking information from ski areas"
|
21
|
+
gem.description = "Track Your Turns (tyt) provides a wrapper to ski area turn tracking data sets"
|
22
|
+
gem.email = "timmydcrawford@gmail.com"
|
23
|
+
gem.authors = ["Timmy Crawford"]
|
24
|
+
# dependencies defined in Gemfile
|
25
|
+
end
|
26
|
+
Jeweler::RubygemsDotOrgTasks.new
|
27
|
+
|
28
|
+
require 'rake/testtask'
|
29
|
+
Rake::TestTask.new(:test) do |test|
|
30
|
+
test.libs << 'lib' << 'test'
|
31
|
+
test.pattern = 'test/**/test_*.rb'
|
32
|
+
test.verbose = true
|
33
|
+
end
|
34
|
+
|
35
|
+
task :default => :test
|
36
|
+
|
37
|
+
require 'rdoc/task'
|
38
|
+
Rake::RDocTask.new do |rdoc|
|
39
|
+
version = File.exist?('VERSION') ? File.read('VERSION') : ""
|
40
|
+
|
41
|
+
rdoc.rdoc_dir = 'rdoc'
|
42
|
+
rdoc.title = "tyt #{version}"
|
43
|
+
rdoc.rdoc_files.include('README*')
|
44
|
+
rdoc.rdoc_files.include('lib/**/*.rb')
|
45
|
+
end
|
data/VERSION
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
0.1.0
|
data/lib/tyt.rb
ADDED
@@ -0,0 +1,59 @@
|
|
1
|
+
module Tyt
|
2
|
+
require 'hashie'
|
3
|
+
require 'date'
|
4
|
+
|
5
|
+
# :stopdoc:
|
6
|
+
LIBPATH = ::File.expand_path('..', __FILE__) + ::File::SEPARATOR
|
7
|
+
PATH = ::File.dirname(LIBPATH) + ::File::SEPARATOR
|
8
|
+
# :startdoc:
|
9
|
+
|
10
|
+
# Returns the library path for the module. If any arguments are given,
|
11
|
+
# they will be joined to the end of the libray path using
|
12
|
+
# <tt>File.join</tt>.
|
13
|
+
#
|
14
|
+
def self.libpath( *args )
|
15
|
+
rv = args.empty? ? LIBPATH : ::File.join(LIBPATH, args.flatten)
|
16
|
+
if block_given?
|
17
|
+
begin
|
18
|
+
$LOAD_PATH.unshift LIBPATH
|
19
|
+
rv = yield
|
20
|
+
ensure
|
21
|
+
$LOAD_PATH.shift
|
22
|
+
end
|
23
|
+
end
|
24
|
+
return rv
|
25
|
+
end
|
26
|
+
|
27
|
+
# Returns the lpath for the module. If any arguments are given,
|
28
|
+
# they will be joined to the end of the path using
|
29
|
+
# <tt>File.join</tt>.
|
30
|
+
#
|
31
|
+
def self.path( *args )
|
32
|
+
rv = args.empty? ? PATH : ::File.join(PATH, args.flatten)
|
33
|
+
if block_given?
|
34
|
+
begin
|
35
|
+
$LOAD_PATH.unshift PATH
|
36
|
+
rv = yield
|
37
|
+
ensure
|
38
|
+
$LOAD_PATH.shift
|
39
|
+
end
|
40
|
+
end
|
41
|
+
return rv
|
42
|
+
end
|
43
|
+
|
44
|
+
# Utility method used to require all files ending in .rb that lie in the
|
45
|
+
# directory below this file that has the same name as the filename passed
|
46
|
+
# in. Optionally, a specific _directory_ name can be passed in such that
|
47
|
+
# the _filename_ does not have to be equivalent to the directory.
|
48
|
+
#
|
49
|
+
def self.require_all_libs_relative_to( fname, dir = nil )
|
50
|
+
dir ||= ::File.basename(fname, '.*')
|
51
|
+
search_me = ::File.expand_path(
|
52
|
+
::File.join(::File.dirname(fname), dir, '**', '*.rb'))
|
53
|
+
|
54
|
+
Dir.glob(search_me).sort.each {|rb| require rb}
|
55
|
+
end
|
56
|
+
|
57
|
+
end # module Ullr
|
58
|
+
|
59
|
+
Tyt.require_all_libs_relative_to(__FILE__)
|
data/lib/tyt/bachelor.rb
ADDED
@@ -0,0 +1,73 @@
|
|
1
|
+
module Tyt
|
2
|
+
class Bachelor
|
3
|
+
require 'open-uri'
|
4
|
+
require 'nokogiri'
|
5
|
+
DEFAULT_SEASON = '13-14'
|
6
|
+
MTB_ENDPOINT = "http://track.mtbachelor.com/mobile/tyt.asp"
|
7
|
+
|
8
|
+
attr_accessor :pass, :season, :currentday, :mtb_endpoint, :doc
|
9
|
+
def initialize(options={})
|
10
|
+
raise(ArgumentError, "pass is required!") if !options[:pass] || !options[:pass].instance_of?(String)
|
11
|
+
raise(ArgumentError, "Invalid Season Format!") if options[:season] && !(options[:season] =~ /\d{2}\-\d{2}/)
|
12
|
+
@pass = options[:pass]
|
13
|
+
@season = options[:season] ? options[:season] : DEFAULT_SEASON
|
14
|
+
@currentday = nil
|
15
|
+
@mtb_endpoint = MTB_ENDPOINT
|
16
|
+
end
|
17
|
+
|
18
|
+
def get_doc
|
19
|
+
@doc = Nokogiri::HTML(open(data_endpoint))
|
20
|
+
end
|
21
|
+
|
22
|
+
def season_data
|
23
|
+
@currentday = nil
|
24
|
+
get_doc
|
25
|
+
date_rows = doc.css('a[href]').select{|e| e['href'] =~ /currentday\=\d{2}\/\d{2}\/\d{4}/ }.collect{|a| a.parent().parent() }
|
26
|
+
season = Tyt::Season.new
|
27
|
+
date_rows.each do |row|
|
28
|
+
cells = row.children.css('td')
|
29
|
+
date = cells[0] ? Date.strptime(cells[0].text, '%m/%d/%Y') : nil
|
30
|
+
runs = cells[1] ? cells[1].text : nil
|
31
|
+
vertical_feet = cells[2] ? cells[2].text : nil
|
32
|
+
vertical_meters = cells[3] ? cells[3].text : nil
|
33
|
+
ski_day = Tyt::SkiDay.new(date: date, runs: runs, vertical_feet: vertical_feet, vertical_meters: vertical_meters)
|
34
|
+
season.days << ski_day
|
35
|
+
end
|
36
|
+
return season
|
37
|
+
end
|
38
|
+
|
39
|
+
def date_data(date)
|
40
|
+
begin
|
41
|
+
@currentday = date.strftime('%m/%d/%Y')
|
42
|
+
get_doc
|
43
|
+
ride_rows = doc.css('td').select{|n| n.text =~ /\d{1,2}\/\d{2}\/\d{4}\s{1}\d{1,2}\:\d{2}\:\d{2}/ }.collect{|a| a.parent() }
|
44
|
+
ride_data = []
|
45
|
+
ride_rows.each do |row|
|
46
|
+
cells = row.children.css('td')
|
47
|
+
date = cells[0] ? DateTime.strptime(cells[0].text,'%m/%d/%Y %l:%M:%S %p') : nil
|
48
|
+
chair = cells[1] ? cells[1].text : nil
|
49
|
+
vertical_feet = cells[2] ? cells[2].text : nil
|
50
|
+
vertical_meters = cells[3] ? cells[3].text : nil
|
51
|
+
run_detail = Tyt::RunDetail.new(datetime: date, chair: chair, vertical_feet: vertical_feet, vertical_meters: vertical_meters)
|
52
|
+
ride_data << run_detail
|
53
|
+
end
|
54
|
+
return ride_data
|
55
|
+
rescue OpenURI::HTTPError
|
56
|
+
return nil
|
57
|
+
end
|
58
|
+
end
|
59
|
+
|
60
|
+
def data_endpoint
|
61
|
+
args = [
|
62
|
+
"passmediacode=#{@pass}",
|
63
|
+
"season=#{@season}"
|
64
|
+
]
|
65
|
+
if @currentday
|
66
|
+
args << "currentday=#{@currentday}"
|
67
|
+
else
|
68
|
+
args << "currentday=null"
|
69
|
+
end
|
70
|
+
return [@mtb_endpoint,args.join('&')].join('?')
|
71
|
+
end
|
72
|
+
end
|
73
|
+
end
|
@@ -0,0 +1,24 @@
|
|
1
|
+
module Tyt
|
2
|
+
class RunDetail < Hashie::Dash
|
3
|
+
property :datetime
|
4
|
+
property :chair
|
5
|
+
property :vertical_feet
|
6
|
+
property :vertical_meters
|
7
|
+
|
8
|
+
def initialize(hash = {})
|
9
|
+
hash[:vertical_feet] = string_to_i(hash[:vertical_feet])
|
10
|
+
hash[:vertical_meters] = string_to_i(hash[:vertical_meters])
|
11
|
+
super
|
12
|
+
end
|
13
|
+
|
14
|
+
def string_to_i(str)
|
15
|
+
if str
|
16
|
+
str = str.gsub(',','')
|
17
|
+
return str.to_i
|
18
|
+
else
|
19
|
+
return nil
|
20
|
+
end
|
21
|
+
end
|
22
|
+
|
23
|
+
end
|
24
|
+
end
|
data/lib/tyt/season.rb
ADDED
@@ -0,0 +1,22 @@
|
|
1
|
+
module Tyt
|
2
|
+
class Season < Hashie::Dash
|
3
|
+
property :name
|
4
|
+
property :days, :default => []
|
5
|
+
|
6
|
+
def total_runs
|
7
|
+
days.inject(0){|all_year,ski_day| all_year += ski_day.runs}
|
8
|
+
end
|
9
|
+
|
10
|
+
def total_days
|
11
|
+
days.count
|
12
|
+
end
|
13
|
+
|
14
|
+
def total_vertical_feet
|
15
|
+
days.inject(0){|all_year,ski_day| all_year += ski_day.vertical_feet}
|
16
|
+
end
|
17
|
+
|
18
|
+
def total_vertical_meters
|
19
|
+
days.inject(0){|all_year,ski_day| all_year += ski_day.vertical_meters}
|
20
|
+
end
|
21
|
+
end
|
22
|
+
end
|
data/lib/tyt/ski_day.rb
ADDED
@@ -0,0 +1,25 @@
|
|
1
|
+
module Tyt
|
2
|
+
class SkiDay < Hashie::Dash
|
3
|
+
property :date
|
4
|
+
property :runs
|
5
|
+
property :vertical_feet
|
6
|
+
property :vertical_meters
|
7
|
+
|
8
|
+
def initialize(hash = {})
|
9
|
+
hash[:vertical_feet] = string_to_i(hash[:vertical_feet])
|
10
|
+
hash[:runs] = string_to_i(hash[:runs])
|
11
|
+
hash[:vertical_meters] = string_to_i(hash[:vertical_meters])
|
12
|
+
super
|
13
|
+
end
|
14
|
+
|
15
|
+
def string_to_i(str)
|
16
|
+
if str
|
17
|
+
str = str.gsub(',','')
|
18
|
+
return str.to_i
|
19
|
+
else
|
20
|
+
return nil
|
21
|
+
end
|
22
|
+
end
|
23
|
+
|
24
|
+
end
|
25
|
+
end
|
@@ -0,0 +1,96 @@
|
|
1
|
+
---
|
2
|
+
http_interactions:
|
3
|
+
- request:
|
4
|
+
method: get
|
5
|
+
uri: http://track.mtbachelor.com/mobile/tyt.asp?currentday=04/13/2013&passmediacode=MBJ6445733&season=12-13
|
6
|
+
body:
|
7
|
+
encoding: US-ASCII
|
8
|
+
string: ''
|
9
|
+
headers:
|
10
|
+
Accept-Encoding:
|
11
|
+
- gzip;q=1.0,deflate;q=0.6,identity;q=0.3
|
12
|
+
Accept:
|
13
|
+
- '*/*'
|
14
|
+
User-Agent:
|
15
|
+
- Ruby
|
16
|
+
response:
|
17
|
+
status:
|
18
|
+
code: 200
|
19
|
+
message: OK
|
20
|
+
headers:
|
21
|
+
Date:
|
22
|
+
- Mon, 02 Dec 2013 20:37:02 GMT
|
23
|
+
Server:
|
24
|
+
- Microsoft-IIS/6.0
|
25
|
+
X-Powered-By:
|
26
|
+
- ASP.NET
|
27
|
+
Content-Length:
|
28
|
+
- '4767'
|
29
|
+
Content-Type:
|
30
|
+
- text/html
|
31
|
+
Set-Cookie:
|
32
|
+
- ASPSESSIONIDAATQQBSA=MNIPDIFCPHHHCGOKBKOMILIC; path=/
|
33
|
+
Cache-Control:
|
34
|
+
- private
|
35
|
+
body:
|
36
|
+
encoding: UTF-8
|
37
|
+
string: "\r\n\r\n<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.0 Transitional//EN\"
|
38
|
+
>\r\n\r\n\r\n<html>\r\n<head>\r\n\r\n\t<title>MTB TYT Mobile</title>\r\n \t<link
|
39
|
+
rel=\"stylesheet\" href=\"main.css\" >\r\n\r\n</head>\r\n\r\n\r\n<script type=\"text/javascript\">\r\nvar
|
40
|
+
gaJsHost = ((\"https:\" == document.location.protocol) ? \"https://ssl.\"
|
41
|
+
: \"http://www.\");\r\ndocument.write(unescape(\"%3Cscript src='\" + gaJsHost
|
42
|
+
+ \"google-analytics.com/ga.js' type='text/javascript'%3E%3C/script%3E\"));\r\n</script>\r\n<script
|
43
|
+
type=\"text/javascript\">\r\ntry {\r\nvar pageTracker = _gat._getTracker(\"UA-3857258-2\");\r\npageTracker._trackPageview();\r\n}
|
44
|
+
catch(err) {}</script>\r\n\r\n<body topmargin=\"0\" leftmargin=\"0\" marginwidth=\"0\"
|
45
|
+
marginheight=\"0\">\r\n\r\n\r\n<table width=\"285\" border=1 align=\"center\">\r\n<tr>\r\n<td
|
46
|
+
\ align=\"center\"><img src=\"logo.gif\" alt=\"Mt. Bachelor\" border=\"0\">\r\n</td>\r\n<td
|
47
|
+
colspan=\"3\">\r\n<a href=\"index.asp\">Track Another Pass</a>\r\n<div class=\"customerContent\"><strong>TURNS
|
48
|
+
FOR: TIMOTHYc</strong>\r\n<br />\r\n<b>04/13/2013</b>\r\n</td>\r\n</tr>\r\n\t\r\n\r\n\t\t<tr>\r\n\t\t\t<td><b>Date<br/>Time</b></td>\r\n\t\t\t<td
|
49
|
+
align=center><b>Chair</td>\r\n\t\t\t<td align=right><b>Vert(ft)</b></td>\r\n\t\t\t<td
|
50
|
+
align=right><b>Vert(m)</td>\r\n\t\t</tr>\r\n\t\r\n\t\t\r\n\t\t<tr>\r\n\t\t\t<td>4/13/2013
|
51
|
+
9:40:05 AM</td>\r\n\t\t\t<td align=center>Sunshine</td>\r\n\t\t\t<td align=right>257</td>\r\n\t\t\t<td
|
52
|
+
align=right>78</td>\r\n\t\t</tr>\r\n\t\r\n\t\t\r\n\t\t<tr>\r\n\t\t\t<td>4/13/2013
|
53
|
+
10:04:12 AM</td>\r\n\t\t\t<td align=center>Sunshine</td>\r\n\t\t\t<td align=right>257</td>\r\n\t\t\t<td
|
54
|
+
align=right>78</td>\r\n\t\t</tr>\r\n\t\r\n\t\t\r\n\t\t<tr>\r\n\t\t\t<td>4/13/2013
|
55
|
+
10:09:14 AM</td>\r\n\t\t\t<td align=center>Skyliner</td>\r\n\t\t\t<td align=right>1,306</td>\r\n\t\t\t<td
|
56
|
+
align=right>398</td>\r\n\t\t</tr>\r\n\t\r\n\t\t\r\n\t\t<tr>\r\n\t\t\t<td>4/13/2013
|
57
|
+
10:25:03 AM</td>\r\n\t\t\t<td align=center>Skyliner</td>\r\n\t\t\t<td align=right>1,306</td>\r\n\t\t\t<td
|
58
|
+
align=right>398</td>\r\n\t\t</tr>\r\n\t\r\n\t\t\r\n\t\t<tr>\r\n\t\t\t<td>4/13/2013
|
59
|
+
10:42:10 AM</td>\r\n\t\t\t<td align=center>Skyliner</td>\r\n\t\t\t<td align=right>1,306</td>\r\n\t\t\t<td
|
60
|
+
align=right>398</td>\r\n\t\t</tr>\r\n\t\r\n\t\t\r\n\t\t<tr>\r\n\t\t\t<td>4/13/2013
|
61
|
+
11:08:43 AM</td>\r\n\t\t\t<td align=center>Sunrise</td>\r\n\t\t\t<td align=right>808</td>\r\n\t\t\t<td
|
62
|
+
align=right>246</td>\r\n\t\t</tr>\r\n\t\r\n\t\t\r\n\t\t<tr>\r\n\t\t\t<td>4/13/2013
|
63
|
+
11:17:30 AM</td>\r\n\t\t\t<td align=center>Skyliner</td>\r\n\t\t\t<td align=right>1,306</td>\r\n\t\t\t<td
|
64
|
+
align=right>398</td>\r\n\t\t</tr>\r\n\t\r\n\t\t\r\n\t\t<tr>\r\n\t\t\t<td>4/13/2013
|
65
|
+
1:01:12 PM</td>\r\n\t\t\t<td align=center>Pine Marten</td>\r\n\t\t\t<td align=right>1,367</td>\r\n\t\t\t<td
|
66
|
+
align=right>416</td>\r\n\t\t</tr>\r\n\t\r\n\t\t\r\n\t\t<tr>\r\n\t\t\t<td>4/13/2013
|
67
|
+
1:56:18 PM</td>\r\n\t\t\t<td align=center>Sunshine</td>\r\n\t\t\t<td align=right>257</td>\r\n\t\t\t<td
|
68
|
+
align=right>78</td>\r\n\t\t</tr>\r\n\t\r\n\t\t\r\n\t\t<tr>\r\n\t\t\t<td>4/13/2013
|
69
|
+
2:01:13 PM</td>\r\n\t\t\t<td align=center>Skyliner</td>\r\n\t\t\t<td align=right>1,306</td>\r\n\t\t\t<td
|
70
|
+
align=right>398</td>\r\n\t\t</tr>\r\n\t\r\n\t\t\r\n\t\t<tr>\r\n\t\t\t<td>4/13/2013
|
71
|
+
2:10:54 PM</td>\r\n\t\t\t<td align=center>Skyliner</td>\r\n\t\t\t<td align=right>1,306</td>\r\n\t\t\t<td
|
72
|
+
align=right>398</td>\r\n\t\t</tr>\r\n\t\r\n\t\t\r\n\t\t<tr>\r\n\t\t\t<td>4/13/2013
|
73
|
+
2:21:12 PM</td>\r\n\t\t\t<td align=center>Skyliner</td>\r\n\t\t\t<td align=right>1,306</td>\r\n\t\t\t<td
|
74
|
+
align=right>398</td>\r\n\t\t</tr>\r\n\t\r\n\t\t\r\n\t\t<tr>\r\n\t\t\t<td>4/13/2013
|
75
|
+
2:38:30 PM</td>\r\n\t\t\t<td align=center>Sunshine</td>\r\n\t\t\t<td align=right>257</td>\r\n\t\t\t<td
|
76
|
+
align=right>78</td>\r\n\t\t</tr>\r\n\t\r\n\t\t<tr>\r\n\t\t\t<td><b>TOTAL</b></td>\r\n\t\t\t<td
|
77
|
+
align=\"center\"><b>13</b></td>\r\n\t\t\t<td align=right><b>12,345</b></td>\r\n\t\t\t<td
|
78
|
+
align=right><b>3,760</b></td>\r\n\t\t</tr>\r\n\t\t<tr>\r\n\t\t\t<td colspan=2><b>Day
|
79
|
+
AVG</b></td>\r\n\r\n\t\t\t<td align=right><b>950</b></td>\r\n\t\t\t<td align=right><b>289</b></td>\r\n\t\t</tr>\r\n\t</table>\r\n\r\n\r\n<table
|
80
|
+
cellpadding=\"2\" width=\"285\" align=\"center\">\r\n<tr>\r\n<td>\r\n<form>\r\n\t<INPUT
|
81
|
+
TYPE=\"button\" VALUE=\"Back\" onClick=\"history.go(-1);return true;\"> </form>\r\n</td>\r\n</tr>\r\n\t<tr>\r\n\t\t<td>\r\nVIEW
|
82
|
+
OTHER SEASONS:\r\n<br />\r\n<a href=\"tyt.asp?passmediacode=MBJ6445733&season=11-12¤tday=null\">12-13
|
83
|
+
Season</a>\r\n<br />\r\n<br />\r\n<a href=\"tyt.asp?passmediacode=MBJ6445733&season=11-12¤tday=null\">11-12
|
84
|
+
Season</a>\r\n<br />\r\n<br />\r\n<a href=\"tyt.asp?passmediacode=MBJ6445733&season=10-11¤tday=null\">10-11
|
85
|
+
Season</a>\r\n<br />\r\n<br />\r\n<a href=\"tyt.asp?passmediacode=MBJ6445733&season=09-10¤tday=null\">09-10
|
86
|
+
Season</a>\r\n<br />\r\n<br />\r\n<a href=\"tyt.asp?passmediacode=MBJ6445733&season=08-09¤tday=null\">08-09
|
87
|
+
Season</a>\r\n<br />\r\n<br />\r\n<a href=\"tyt.asp?passmediacode=MBJ6445733&season=07-08¤tday=null\">07-08
|
88
|
+
Season</a>\r\n<br />\r\n<br />\r\n<a href=\"tyt.asp?passmediacode=MBJ6445733&season=06-07¤tday=null\">06-07
|
89
|
+
Season</a>\r\n<br />\r\n<br />\r\n<a href=\"tyt.asp?passmediacode=MBJ6445733&season=05-06¤tday=null\">05-06
|
90
|
+
Season</a>\r\n\t\t</td>\r\n\t</tr>\r\n</table>\r\n\r\n\r\n\r\n\r\n\r\n\t\t</td>\r\n\t</tr>\r\n</table>\r\n
|
91
|
+
\ </td>\r\n </tr>\r\n\t\t </tbody>\r\n\t\t </table>\r\n\r\n<table
|
92
|
+
width=\"285\" align=\"center\">\r\n<tr>\r\n<td>© Copyright 2002 - 2012
|
93
|
+
by Mt. Bachelor. All rights reserved.\r\n</td>\r\n</tr>\r\n</table>\r\n</body>\r\n</html>\r\n\r\n"
|
94
|
+
http_version:
|
95
|
+
recorded_at: Mon, 02 Dec 2013 20:37:06 GMT
|
96
|
+
recorded_with: VCR 2.4.0
|
@@ -0,0 +1,53 @@
|
|
1
|
+
---
|
2
|
+
http_interactions:
|
3
|
+
- request:
|
4
|
+
method: get
|
5
|
+
uri: http://track.mtbachelor.com/mobile/tyt.asp?currentday=04/14/2013&passmediacode=MBJ6445733&season=12-13
|
6
|
+
body:
|
7
|
+
encoding: US-ASCII
|
8
|
+
string: ''
|
9
|
+
headers:
|
10
|
+
Accept-Encoding:
|
11
|
+
- gzip;q=1.0,deflate;q=0.6,identity;q=0.3
|
12
|
+
Accept:
|
13
|
+
- '*/*'
|
14
|
+
User-Agent:
|
15
|
+
- Ruby
|
16
|
+
response:
|
17
|
+
status:
|
18
|
+
code: 500
|
19
|
+
message: Internal Server Error
|
20
|
+
headers:
|
21
|
+
Date:
|
22
|
+
- Tue, 03 Dec 2013 02:32:33 GMT
|
23
|
+
Server:
|
24
|
+
- Microsoft-IIS/6.0
|
25
|
+
X-Powered-By:
|
26
|
+
- ASP.NET
|
27
|
+
Content-Length:
|
28
|
+
- '1067'
|
29
|
+
Content-Type:
|
30
|
+
- text/html
|
31
|
+
Set-Cookie:
|
32
|
+
- ASPSESSIONIDAATQQBSA=MAJPDIFCPECAECDFHLIMBBEP; path=/
|
33
|
+
Cache-Control:
|
34
|
+
- private
|
35
|
+
body:
|
36
|
+
encoding: UTF-8
|
37
|
+
string: "\r\n\r\n<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.0 Transitional//EN\"
|
38
|
+
>\r\n\r\n\r\n<html>\r\n<head>\r\n\r\n\t<title>MTB TYT Mobile</title>\r\n \t<link
|
39
|
+
rel=\"stylesheet\" href=\"main.css\" >\r\n\r\n</head>\r\n\r\n\r\n<script type=\"text/javascript\">\r\nvar
|
40
|
+
gaJsHost = ((\"https:\" == document.location.protocol) ? \"https://ssl.\"
|
41
|
+
: \"http://www.\");\r\ndocument.write(unescape(\"%3Cscript src='\" + gaJsHost
|
42
|
+
+ \"google-analytics.com/ga.js' type='text/javascript'%3E%3C/script%3E\"));\r\n</script>\r\n<script
|
43
|
+
type=\"text/javascript\">\r\ntry {\r\nvar pageTracker = _gat._getTracker(\"UA-3857258-2\");\r\npageTracker._trackPageview();\r\n}
|
44
|
+
catch(err) {}</script>\r\n\r\n<body topmargin=\"0\" leftmargin=\"0\" marginwidth=\"0\"
|
45
|
+
marginheight=\"0\">\r\n\r\n\r\n<table width=\"285\" border=1 align=\"center\">\r\n<tr>\r\n<td
|
46
|
+
\ align=\"center\"><img src=\"logo.gif\" alt=\"Mt. Bachelor\" border=\"0\">\r\n</td>\r\n<td
|
47
|
+
colspan=\"3\">\r\n<a href=\"index.asp\">Track Another Pass</a>\r\n<div class=\"customerContent\"><strong>TURNS
|
48
|
+
FOR: <font face=\"Arial\" size=2>error '80020009'</font>\n<p>\n<font
|
49
|
+
face=\"Arial\" size=2>/mobile/tyt.asp</font><font face=\"Arial\" size=2>,
|
50
|
+
line 285</font> "
|
51
|
+
http_version:
|
52
|
+
recorded_at: Tue, 03 Dec 2013 02:32:38 GMT
|
53
|
+
recorded_with: VCR 2.4.0
|
@@ -0,0 +1,128 @@
|
|
1
|
+
---
|
2
|
+
http_interactions:
|
3
|
+
- request:
|
4
|
+
method: get
|
5
|
+
uri: http://track.mtbachelor.com/mobile/tyt.asp?currentday=null&passmediacode=MBJ6445733&season=12-13
|
6
|
+
body:
|
7
|
+
encoding: US-ASCII
|
8
|
+
string: ''
|
9
|
+
headers:
|
10
|
+
Accept-Encoding:
|
11
|
+
- gzip;q=1.0,deflate;q=0.6,identity;q=0.3
|
12
|
+
Accept:
|
13
|
+
- '*/*'
|
14
|
+
User-Agent:
|
15
|
+
- Ruby
|
16
|
+
response:
|
17
|
+
status:
|
18
|
+
code: 200
|
19
|
+
message: OK
|
20
|
+
headers:
|
21
|
+
Date:
|
22
|
+
- Fri, 29 Nov 2013 02:40:03 GMT
|
23
|
+
Server:
|
24
|
+
- Microsoft-IIS/6.0
|
25
|
+
X-Powered-By:
|
26
|
+
- ASP.NET
|
27
|
+
Content-Length:
|
28
|
+
- '9079'
|
29
|
+
Content-Type:
|
30
|
+
- text/html
|
31
|
+
Set-Cookie:
|
32
|
+
- ASPSESSIONIDAARRSATB=OBGBPAPDHFCGFCJDMIEEFMOC; path=/
|
33
|
+
Cache-Control:
|
34
|
+
- private
|
35
|
+
body:
|
36
|
+
encoding: UTF-8
|
37
|
+
string: "\r\n\r\n<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.0 Transitional//EN\"
|
38
|
+
>\r\n\r\n\r\n<html>\r\n<head>\r\n\r\n\t<title>MTB TYT Mobile</title>\r\n \t<link
|
39
|
+
rel=\"stylesheet\" href=\"main.css\" >\r\n\r\n</head>\r\n\r\n\r\n<script type=\"text/javascript\">\r\nvar
|
40
|
+
gaJsHost = ((\"https:\" == document.location.protocol) ? \"https://ssl.\"
|
41
|
+
: \"http://www.\");\r\ndocument.write(unescape(\"%3Cscript src='\" + gaJsHost
|
42
|
+
+ \"google-analytics.com/ga.js' type='text/javascript'%3E%3C/script%3E\"));\r\n</script>\r\n<script
|
43
|
+
type=\"text/javascript\">\r\ntry {\r\nvar pageTracker = _gat._getTracker(\"UA-3857258-2\");\r\npageTracker._trackPageview();\r\n}
|
44
|
+
catch(err) {}</script>\r\n\r\n<body topmargin=\"0\" leftmargin=\"0\" marginwidth=\"0\"
|
45
|
+
marginheight=\"0\">\r\n\r\n\r\n\r\n\r\n\r\n<table width=\"285\" border=1 align=\"center\">\r\n<tr>\r\n<td
|
46
|
+
align=\"center\"><img src=\"logo.gif\" alt=\"Mt. Bachelor\" border=\"0\">\r\n</td>\r\n<td
|
47
|
+
colspan=\"3\">\r\n<a href=\"index.asp\">Track Another Pass</a>\r\n<div class=\"customerContent\"><strong>TURNS
|
48
|
+
FOR: TIMOTHYc</strong>\r\n<br />\r\n<b>12-13 Season </b>\r\n</td>\r\n</tr>\r\n\t\t<tr>\r\n\t\t\t<td><b>Dates</b></td>\r\n\t\t\t<td
|
49
|
+
align=center><b>Turns</td>\r\n\t\t\t<td align=right><b>Vert (ft)</b></td>\r\n\t\t\t<td
|
50
|
+
align=right><b>Vert (m)</td>\r\n\t\t</tr>\r\n\t\r\n\t\t\r\n\t\t<tr>\r\n\t\t\t<td><a
|
51
|
+
href=\"tyt.asp?passmediacode=MBJ6445733&season=12-13¤tday=11/22/2012\">11/22/2012</a></td>\r\n\t\t\t<td
|
52
|
+
align=center>4</td>\r\n\t\t\t<td align=right>1,028</td>\r\n\t\t\t<td align=right>312</td>\r\n\t\t</tr>\r\n\t\r\n\t\t\r\n\t\t<tr>\r\n\t\t\t<td><a
|
53
|
+
href=\"tyt.asp?passmediacode=MBJ6445733&season=12-13¤tday=11/25/2012\">11/25/2012</a></td>\r\n\t\t\t<td
|
54
|
+
align=center>2</td>\r\n\t\t\t<td align=right>514</td>\r\n\t\t\t<td align=right>156</td>\r\n\t\t</tr>\r\n\t\r\n\t\t\r\n\t\t<tr>\r\n\t\t\t<td><a
|
55
|
+
href=\"tyt.asp?passmediacode=MBJ6445733&season=12-13¤tday=12/01/2012\">12/1/2012</a></td>\r\n\t\t\t<td
|
56
|
+
align=center>7</td>\r\n\t\t\t<td align=right>8,215</td>\r\n\t\t\t<td align=right>2,502</td>\r\n\t\t</tr>\r\n\t\r\n\t\t\r\n\t\t<tr>\r\n\t\t\t<td><a
|
57
|
+
href=\"tyt.asp?passmediacode=MBJ6445733&season=12-13¤tday=12/02/2012\">12/2/2012</a></td>\r\n\t\t\t<td
|
58
|
+
align=center>7</td>\r\n\t\t\t<td align=right>10,212</td>\r\n\t\t\t<td align=right>3,110</td>\r\n\t\t</tr>\r\n\t\r\n\t\t\r\n\t\t<tr>\r\n\t\t\t<td><a
|
59
|
+
href=\"tyt.asp?passmediacode=MBJ6445733&season=12-13¤tday=12/08/2012\">12/8/2012</a></td>\r\n\t\t\t<td
|
60
|
+
align=center>9</td>\r\n\t\t\t<td align=right>10,852</td>\r\n\t\t\t<td align=right>3,304</td>\r\n\t\t</tr>\r\n\t\r\n\t\t\r\n\t\t<tr>\r\n\t\t\t<td><a
|
61
|
+
href=\"tyt.asp?passmediacode=MBJ6445733&season=12-13¤tday=12/15/2012\">12/15/2012</a></td>\r\n\t\t\t<td
|
62
|
+
align=center>8</td>\r\n\t\t\t<td align=right>12,579</td>\r\n\t\t\t<td align=right>3,830</td>\r\n\t\t</tr>\r\n\t\r\n\t\t\r\n\t\t<tr>\r\n\t\t\t<td><a
|
63
|
+
href=\"tyt.asp?passmediacode=MBJ6445733&season=12-13¤tday=12/18/2012\">12/18/2012</a></td>\r\n\t\t\t<td
|
64
|
+
align=center>9</td>\r\n\t\t\t<td align=right>12,020</td>\r\n\t\t\t<td align=right>3,660</td>\r\n\t\t</tr>\r\n\t\r\n\t\t\r\n\t\t<tr>\r\n\t\t\t<td><a
|
65
|
+
href=\"tyt.asp?passmediacode=MBJ6445733&season=12-13¤tday=12/22/2012\">12/22/2012</a></td>\r\n\t\t\t<td
|
66
|
+
align=center>11</td>\r\n\t\t\t<td align=right>14,793</td>\r\n\t\t\t<td align=right>4,504</td>\r\n\t\t</tr>\r\n\t\r\n\t\t\r\n\t\t<tr>\r\n\t\t\t<td><a
|
67
|
+
href=\"tyt.asp?passmediacode=MBJ6445733&season=12-13¤tday=12/31/2012\">12/31/2012</a></td>\r\n\t\t\t<td
|
68
|
+
align=center>4</td>\r\n\t\t\t<td align=right>5,146</td>\r\n\t\t\t<td align=right>1,567</td>\r\n\t\t</tr>\r\n\t\r\n\t\t\r\n\t\t<tr>\r\n\t\t\t<td><a
|
69
|
+
href=\"tyt.asp?passmediacode=MBJ6445733&season=12-13¤tday=01/01/2013\">1/1/2013</a></td>\r\n\t\t\t<td
|
70
|
+
align=center>5</td>\r\n\t\t\t<td align=right>4,941</td>\r\n\t\t\t<td align=right>1,504</td>\r\n\t\t</tr>\r\n\t\r\n\t\t\r\n\t\t<tr>\r\n\t\t\t<td><a
|
71
|
+
href=\"tyt.asp?passmediacode=MBJ6445733&season=12-13¤tday=01/10/2013\">1/10/2013</a></td>\r\n\t\t\t<td
|
72
|
+
align=center>9</td>\r\n\t\t\t<td align=right>15,746</td>\r\n\t\t\t<td align=right>4,794</td>\r\n\t\t</tr>\r\n\t\r\n\t\t\r\n\t\t<tr>\r\n\t\t\t<td><a
|
73
|
+
href=\"tyt.asp?passmediacode=MBJ6445733&season=12-13¤tday=01/11/2013\">1/11/2013</a></td>\r\n\t\t\t<td
|
74
|
+
align=center>2</td>\r\n\t\t\t<td align=right>2,418</td>\r\n\t\t\t<td align=right>736</td>\r\n\t\t</tr>\r\n\t\r\n\t\t\r\n\t\t<tr>\r\n\t\t\t<td><a
|
75
|
+
href=\"tyt.asp?passmediacode=MBJ6445733&season=12-13¤tday=01/19/2013\">1/19/2013</a></td>\r\n\t\t\t<td
|
76
|
+
align=center>4</td>\r\n\t\t\t<td align=right>4,175</td>\r\n\t\t\t<td align=right>1,272</td>\r\n\t\t</tr>\r\n\t\r\n\t\t\r\n\t\t<tr>\r\n\t\t\t<td><a
|
77
|
+
href=\"tyt.asp?passmediacode=MBJ6445733&season=12-13¤tday=01/20/2013\">1/20/2013</a></td>\r\n\t\t\t<td
|
78
|
+
align=center>8</td>\r\n\t\t\t<td align=right>5,264</td>\r\n\t\t\t<td align=right>1,602</td>\r\n\t\t</tr>\r\n\t\r\n\t\t\r\n\t\t<tr>\r\n\t\t\t<td><a
|
79
|
+
href=\"tyt.asp?passmediacode=MBJ6445733&season=12-13¤tday=01/27/2013\">1/27/2013</a></td>\r\n\t\t\t<td
|
80
|
+
align=center>5</td>\r\n\t\t\t<td align=right>3,436</td>\r\n\t\t\t<td align=right>1,046</td>\r\n\t\t</tr>\r\n\t\r\n\t\t\r\n\t\t<tr>\r\n\t\t\t<td><a
|
81
|
+
href=\"tyt.asp?passmediacode=MBJ6445733&season=12-13¤tday=01/29/2013\">1/29/2013</a></td>\r\n\t\t\t<td
|
82
|
+
align=center>3</td>\r\n\t\t\t<td align=right>4,101</td>\r\n\t\t\t<td align=right>1,248</td>\r\n\t\t</tr>\r\n\t\r\n\t\t\r\n\t\t<tr>\r\n\t\t\t<td><a
|
83
|
+
href=\"tyt.asp?passmediacode=MBJ6445733&season=12-13¤tday=02/18/2013\">2/18/2013</a></td>\r\n\t\t\t<td
|
84
|
+
align=center>6</td>\r\n\t\t\t<td align=right>8,967</td>\r\n\t\t\t<td align=right>2,730</td>\r\n\t\t</tr>\r\n\t\r\n\t\t\r\n\t\t<tr>\r\n\t\t\t<td><a
|
85
|
+
href=\"tyt.asp?passmediacode=MBJ6445733&season=12-13¤tday=02/24/2013\">2/24/2013</a></td>\r\n\t\t\t<td
|
86
|
+
align=center>6</td>\r\n\t\t\t<td align=right>6,163</td>\r\n\t\t\t<td align=right>1,876</td>\r\n\t\t</tr>\r\n\t\r\n\t\t\r\n\t\t<tr>\r\n\t\t\t<td><a
|
87
|
+
href=\"tyt.asp?passmediacode=MBJ6445733&season=12-13¤tday=03/06/2013\">3/6/2013</a></td>\r\n\t\t\t<td
|
88
|
+
align=center>6</td>\r\n\t\t\t<td align=right>12,242</td>\r\n\t\t\t<td align=right>3,728</td>\r\n\t\t</tr>\r\n\t\r\n\t\t\r\n\t\t<tr>\r\n\t\t\t<td><a
|
89
|
+
href=\"tyt.asp?passmediacode=MBJ6445733&season=12-13¤tday=03/09/2013\">3/9/2013</a></td>\r\n\t\t\t<td
|
90
|
+
align=center>8</td>\r\n\t\t\t<td align=right>14,302</td>\r\n\t\t\t<td align=right>4,355</td>\r\n\t\t</tr>\r\n\t\r\n\t\t\r\n\t\t<tr>\r\n\t\t\t<td><a
|
91
|
+
href=\"tyt.asp?passmediacode=MBJ6445733&season=12-13¤tday=03/30/2013\">3/30/2013</a></td>\r\n\t\t\t<td
|
92
|
+
align=center>19</td>\r\n\t\t\t<td align=right>27,789</td>\r\n\t\t\t<td align=right>8,460</td>\r\n\t\t</tr>\r\n\t\r\n\t\t\r\n\t\t<tr>\r\n\t\t\t<td><a
|
93
|
+
href=\"tyt.asp?passmediacode=MBJ6445733&season=12-13¤tday=04/06/2013\">4/6/2013</a></td>\r\n\t\t\t<td
|
94
|
+
align=center>12</td>\r\n\t\t\t<td align=right>16,427</td>\r\n\t\t\t<td align=right>5,002</td>\r\n\t\t</tr>\r\n\t\r\n\t\t\r\n\t\t<tr>\r\n\t\t\t<td><a
|
95
|
+
href=\"tyt.asp?passmediacode=MBJ6445733&season=12-13¤tday=04/07/2013\">4/7/2013</a></td>\r\n\t\t\t<td
|
96
|
+
align=center>8</td>\r\n\t\t\t<td align=right>10,448</td>\r\n\t\t\t<td align=right>3,184</td>\r\n\t\t</tr>\r\n\t\r\n\t\t\r\n\t\t<tr>\r\n\t\t\t<td><a
|
97
|
+
href=\"tyt.asp?passmediacode=MBJ6445733&season=12-13¤tday=04/09/2013\">4/9/2013</a></td>\r\n\t\t\t<td
|
98
|
+
align=center>7</td>\r\n\t\t\t<td align=right>11,653</td>\r\n\t\t\t<td align=right>3,548</td>\r\n\t\t</tr>\r\n\t\r\n\t\t\r\n\t\t<tr>\r\n\t\t\t<td><a
|
99
|
+
href=\"tyt.asp?passmediacode=MBJ6445733&season=12-13¤tday=04/13/2013\">4/13/2013</a></td>\r\n\t\t\t<td
|
100
|
+
align=center>13</td>\r\n\t\t\t<td align=right>12,345</td>\r\n\t\t\t<td align=right>3,760</td>\r\n\t\t</tr>\r\n\t\r\n\t\t\r\n\t\t<tr>\r\n\t\t\t<td><a
|
101
|
+
href=\"tyt.asp?passmediacode=MBJ6445733&season=12-13¤tday=04/19/2013\">4/19/2013</a></td>\r\n\t\t\t<td
|
102
|
+
align=center>3</td>\r\n\t\t\t<td align=right>4,101</td>\r\n\t\t\t<td align=right>1,248</td>\r\n\t\t</tr>\r\n\t\r\n\t\t\r\n\t\t<tr>\r\n\t\t\t<td><a
|
103
|
+
href=\"tyt.asp?passmediacode=MBJ6445733&season=12-13¤tday=04/20/2013\">4/20/2013</a></td>\r\n\t\t\t<td
|
104
|
+
align=center>9</td>\r\n\t\t\t<td align=right>15,249</td>\r\n\t\t\t<td align=right>4,642</td>\r\n\t\t</tr>\r\n\t\r\n\t\t\r\n\t\t<tr>\r\n\t\t\t<td><a
|
105
|
+
href=\"tyt.asp?passmediacode=MBJ6445733&season=12-13¤tday=04/21/2013\">4/21/2013</a></td>\r\n\t\t\t<td
|
106
|
+
align=center>5</td>\r\n\t\t\t<td align=right>6,591</td>\r\n\t\t\t<td align=right>2,008</td>\r\n\t\t</tr>\r\n\t\r\n\t\t\r\n\t\t<tr>\r\n\t\t\t<td><a
|
107
|
+
href=\"tyt.asp?passmediacode=MBJ6445733&season=12-13¤tday=05/07/2013\">5/7/2013</a></td>\r\n\t\t\t<td
|
108
|
+
align=center>5</td>\r\n\t\t\t<td align=right>6,994</td>\r\n\t\t\t<td align=right>2,130</td>\r\n\t\t</tr>\r\n\t\r\n\t\t<tr>\r\n\t\t\t<td><b>TOTAL
|
109
|
+
<br />(29 days)</b></td>\r\n\t\t\t<td align=\"center\"><b>204</b></td>\r\n\t\t\t<td
|
110
|
+
align=right><b>268,711</b></td>\r\n\t\t\t<td align=right><b>81,818</b></td>\r\n\t\t</tr>\r\n\t\t<tr>\r\n\t\t\t<td><b>AVG
|
111
|
+
Day</b></td>\r\n\t\t\t<td align=\"center\"><b>7</b></td>\r\n\t\t\t<td align=right><b>9,266</b></td>\r\n\t\t\t<td
|
112
|
+
align=right><b>2,821</b></td>\r\n\t\t</tr>\r\n\t</table>\r\n\r\n<table cellpadding=\"2\"
|
113
|
+
width=\"285\" align=\"center\">\r\n\t<tr>\r\n\t\t<td>\r\nVIEW OTHER SEASONS:\r\n<br
|
114
|
+
/>\r\n<a href=\"tyt.asp?passmediacode=MBJ6445733&season=12-13¤tday=null\">12-13
|
115
|
+
Season</a>\r\n<br />\r\n<br />\r\n<a href=\"tyt.asp?passmediacode=MBJ6445733&season=11-12¤tday=null\">11-12
|
116
|
+
Season</a>\r\n<br />\r\n<br />\r\n<a href=\"tyt.asp?passmediacode=MBJ6445733&season=10-11¤tday=null\">10-11
|
117
|
+
Season</a>\r\n<br />\r\n<br />\r\n<a href=\"tyt.asp?passmediacode=MBJ6445733&season=09-10¤tday=null\">09-10
|
118
|
+
Season</a>\r\n<br />\r\n<br />\r\n<a href=\"tyt.asp?passmediacode=MBJ6445733&season=08-09¤tday=null\">08-09
|
119
|
+
Season</a>\r\n<br />\r\n<br />\r\n<a href=\"tyt.asp?passmediacode=MBJ6445733&season=07-08¤tday=null\">07-08
|
120
|
+
Season</a>\r\n<br />\r\n<br />\r\n<a href=\"tyt.asp?passmediacode=MBJ6445733&season=06-07¤tday=null\">06-07
|
121
|
+
Season</a>\r\n<br />\r\n<br />\r\n<a href=\"tyt.asp?passmediacode=MBJ6445733&season=05-06¤tday=null\">05-06
|
122
|
+
Season</a>\r\n\t\t</td>\r\n\t</tr>\r\n</table>\r\n\r\n\r\n\r\n\r\n\t\r\n\r\n\r\n\r\n\r\n\t\t</td>\r\n\t</tr>\r\n</table>\r\n
|
123
|
+
\ </td>\r\n </tr>\r\n\t\t </tbody>\r\n\t\t </table>\r\n\r\n<table
|
124
|
+
width=\"285\" align=\"center\">\r\n<tr>\r\n<td>© Copyright 2002 - 2012
|
125
|
+
by Mt. Bachelor. All rights reserved.\r\n</td>\r\n</tr>\r\n</table>\r\n</body>\r\n</html>\r\n\r\n"
|
126
|
+
http_version:
|
127
|
+
recorded_at: Fri, 29 Nov 2013 02:40:04 GMT
|
128
|
+
recorded_with: VCR 2.4.0
|
@@ -0,0 +1,72 @@
|
|
1
|
+
---
|
2
|
+
http_interactions:
|
3
|
+
- request:
|
4
|
+
method: get
|
5
|
+
uri: http://track.mtbachelor.com/mobile/tyt.asp?currentday=null&passmediacode=MBJ6445733&season=13-14
|
6
|
+
body:
|
7
|
+
encoding: US-ASCII
|
8
|
+
string: ''
|
9
|
+
headers:
|
10
|
+
Accept-Encoding:
|
11
|
+
- gzip;q=1.0,deflate;q=0.6,identity;q=0.3
|
12
|
+
Accept:
|
13
|
+
- '*/*'
|
14
|
+
User-Agent:
|
15
|
+
- Ruby
|
16
|
+
response:
|
17
|
+
status:
|
18
|
+
code: 200
|
19
|
+
message: OK
|
20
|
+
headers:
|
21
|
+
Date:
|
22
|
+
- Fri, 29 Nov 2013 02:25:34 GMT
|
23
|
+
Server:
|
24
|
+
- Microsoft-IIS/6.0
|
25
|
+
X-Powered-By:
|
26
|
+
- ASP.NET
|
27
|
+
Content-Length:
|
28
|
+
- '2927'
|
29
|
+
Content-Type:
|
30
|
+
- text/html
|
31
|
+
Set-Cookie:
|
32
|
+
- ASPSESSIONIDAARRSATB=LBGBPAPDEELBOGGHNHCJPLOF; path=/
|
33
|
+
Cache-Control:
|
34
|
+
- private
|
35
|
+
body:
|
36
|
+
encoding: UTF-8
|
37
|
+
string: "\r\n\r\n<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.0 Transitional//EN\"
|
38
|
+
>\r\n\r\n\r\n<html>\r\n<head>\r\n\r\n\t<title>MTB TYT Mobile</title>\r\n \t<link
|
39
|
+
rel=\"stylesheet\" href=\"main.css\" >\r\n\r\n</head>\r\n\r\n\r\n<script type=\"text/javascript\">\r\nvar
|
40
|
+
gaJsHost = ((\"https:\" == document.location.protocol) ? \"https://ssl.\"
|
41
|
+
: \"http://www.\");\r\ndocument.write(unescape(\"%3Cscript src='\" + gaJsHost
|
42
|
+
+ \"google-analytics.com/ga.js' type='text/javascript'%3E%3C/script%3E\"));\r\n</script>\r\n<script
|
43
|
+
type=\"text/javascript\">\r\ntry {\r\nvar pageTracker = _gat._getTracker(\"UA-3857258-2\");\r\npageTracker._trackPageview();\r\n}
|
44
|
+
catch(err) {}</script>\r\n\r\n<body topmargin=\"0\" leftmargin=\"0\" marginwidth=\"0\"
|
45
|
+
marginheight=\"0\">\r\n\r\n\r\n\r\n\r\n\r\n<table width=\"285\" border=1 align=\"center\">\r\n<tr>\r\n<td
|
46
|
+
align=\"center\"><img src=\"logo.gif\" alt=\"Mt. Bachelor\" border=\"0\">\r\n</td>\r\n<td
|
47
|
+
colspan=\"3\">\r\n<a href=\"index.asp\">Track Another Pass</a>\r\n<div class=\"customerContent\"><strong>TURNS
|
48
|
+
FOR: TIMOTHYc</strong>\r\n<br />\r\n<b>13-14 Season </b>\r\n</td>\r\n</tr>\r\n\t\t<tr>\r\n\t\t\t<td><b>Dates</b></td>\r\n\t\t\t<td
|
49
|
+
align=center><b>Turns</td>\r\n\t\t\t<td align=right><b>Vert (ft)</b></td>\r\n\t\t\t<td
|
50
|
+
align=right><b>Vert (m)</td>\r\n\t\t</tr>\r\n\t\r\n\t\t\r\n\t\t<tr>\r\n\t\t\t<td><a
|
51
|
+
href=\"tyt.asp?passmediacode=MBJ6445733&season=13-14¤tday=11/27/2013\">11/27/2013</a></td>\r\n\t\t\t<td
|
52
|
+
align=center>5</td>\r\n\t\t\t<td align=right>1,285</td>\r\n\t\t\t<td align=right>390</td>\r\n\t\t</tr>\r\n\t\r\n\t\t<tr>\r\n\t\t\t<td><b>TOTAL
|
53
|
+
<br />(1 days)</b></td>\r\n\t\t\t<td align=\"center\"><b>5</b></td>\r\n\t\t\t<td
|
54
|
+
align=right><b>1,285</b></td>\r\n\t\t\t<td align=right><b>390</b></td>\r\n\t\t</tr>\r\n\t\t<tr>\r\n\t\t\t<td><b>AVG
|
55
|
+
Day</b></td>\r\n\t\t\t<td align=\"center\"><b>5</b></td>\r\n\t\t\t<td align=right><b>1,285</b></td>\r\n\t\t\t<td
|
56
|
+
align=right><b>390</b></td>\r\n\t\t</tr>\r\n\t</table>\r\n\r\n<table cellpadding=\"2\"
|
57
|
+
width=\"285\" align=\"center\">\r\n\t<tr>\r\n\t\t<td>\r\nVIEW OTHER SEASONS:\r\n<br
|
58
|
+
/>\r\n<a href=\"tyt.asp?passmediacode=MBJ6445733&season=12-13¤tday=null\">12-13
|
59
|
+
Season</a>\r\n<br />\r\n<br />\r\n<a href=\"tyt.asp?passmediacode=MBJ6445733&season=11-12¤tday=null\">11-12
|
60
|
+
Season</a>\r\n<br />\r\n<br />\r\n<a href=\"tyt.asp?passmediacode=MBJ6445733&season=10-11¤tday=null\">10-11
|
61
|
+
Season</a>\r\n<br />\r\n<br />\r\n<a href=\"tyt.asp?passmediacode=MBJ6445733&season=09-10¤tday=null\">09-10
|
62
|
+
Season</a>\r\n<br />\r\n<br />\r\n<a href=\"tyt.asp?passmediacode=MBJ6445733&season=08-09¤tday=null\">08-09
|
63
|
+
Season</a>\r\n<br />\r\n<br />\r\n<a href=\"tyt.asp?passmediacode=MBJ6445733&season=07-08¤tday=null\">07-08
|
64
|
+
Season</a>\r\n<br />\r\n<br />\r\n<a href=\"tyt.asp?passmediacode=MBJ6445733&season=06-07¤tday=null\">06-07
|
65
|
+
Season</a>\r\n<br />\r\n<br />\r\n<a href=\"tyt.asp?passmediacode=MBJ6445733&season=05-06¤tday=null\">05-06
|
66
|
+
Season</a>\r\n\t\t</td>\r\n\t</tr>\r\n</table>\r\n\r\n\r\n\r\n\r\n\t\r\n\r\n\r\n\r\n\r\n\t\t</td>\r\n\t</tr>\r\n</table>\r\n
|
67
|
+
\ </td>\r\n </tr>\r\n\t\t </tbody>\r\n\t\t </table>\r\n\r\n<table
|
68
|
+
width=\"285\" align=\"center\">\r\n<tr>\r\n<td>© Copyright 2002 - 2012
|
69
|
+
by Mt. Bachelor. All rights reserved.\r\n</td>\r\n</tr>\r\n</table>\r\n</body>\r\n</html>\r\n\r\n"
|
70
|
+
http_version:
|
71
|
+
recorded_at: Fri, 29 Nov 2013 02:25:35 GMT
|
72
|
+
recorded_with: VCR 2.4.0
|
data/test/helper.rb
ADDED
@@ -0,0 +1,28 @@
|
|
1
|
+
require 'rubygems'
|
2
|
+
require 'bundler'
|
3
|
+
begin
|
4
|
+
Bundler.setup(:default, :development)
|
5
|
+
rescue Bundler::BundlerError => e
|
6
|
+
$stderr.puts e.message
|
7
|
+
$stderr.puts "Run `bundle install` to install missing gems"
|
8
|
+
exit e.status_code
|
9
|
+
end
|
10
|
+
|
11
|
+
$LOAD_PATH.unshift(File.join(File.dirname(__FILE__), '..', 'lib'))
|
12
|
+
$LOAD_PATH.unshift(File.dirname(__FILE__))
|
13
|
+
|
14
|
+
|
15
|
+
require 'vcr'
|
16
|
+
|
17
|
+
VCR.configure do |c|
|
18
|
+
c.cassette_library_dir = 'test/cassettes'
|
19
|
+
c.hook_into :webmock
|
20
|
+
end
|
21
|
+
|
22
|
+
require 'tyt'
|
23
|
+
|
24
|
+
def setup_season
|
25
|
+
@pass = 'MBJ6445733' #That is actually my pass. See how rad I am. Do it.
|
26
|
+
@default_season = Tyt::Bachelor::DEFAULT_SEASON
|
27
|
+
@tyt = Tyt::Bachelor.new(pass: @pass)
|
28
|
+
end
|
@@ -0,0 +1,98 @@
|
|
1
|
+
require 'helper'
|
2
|
+
require "minitest/autorun"
|
3
|
+
|
4
|
+
class TestBachelor < Minitest::Test
|
5
|
+
def setup
|
6
|
+
setup_season
|
7
|
+
end
|
8
|
+
|
9
|
+
def test_that_pass_is_required
|
10
|
+
assert_raises(ArgumentError){ Tyt::Bachelor.new }
|
11
|
+
end
|
12
|
+
|
13
|
+
def test_that_pass_is_set
|
14
|
+
assert @tyt.pass == @pass
|
15
|
+
end
|
16
|
+
|
17
|
+
def test_that_season_is_set
|
18
|
+
assert_respond_to @tyt, :season
|
19
|
+
assert @tyt.season == @default_season
|
20
|
+
end
|
21
|
+
|
22
|
+
def test_that_mtb_endpoint_is_set
|
23
|
+
assert_respond_to @tyt, :mtb_endpoint
|
24
|
+
assert @tyt.mtb_endpoint == Tyt::Bachelor::MTB_ENDPOINT
|
25
|
+
end
|
26
|
+
|
27
|
+
def test_that_season_can_be_set
|
28
|
+
@tyt = Tyt::Bachelor.new(pass: @pass, season: '12-13')
|
29
|
+
assert @tyt.season == '12-13', 'Season should be set to 12-13'
|
30
|
+
end
|
31
|
+
|
32
|
+
def test_that_season_must_be_in_yy_yy_format
|
33
|
+
assert_raises(ArgumentError){ Tyt::Bachelor.new(pass: @pass, season: '1213') }
|
34
|
+
end
|
35
|
+
|
36
|
+
def test_that_data_endpoint_is_correct
|
37
|
+
expected_endpoint = "#{Tyt::Bachelor::MTB_ENDPOINT}?passmediacode=#{@pass}&season=#{@tyt.season}¤tday=null"
|
38
|
+
assert @tyt.data_endpoint == expected_endpoint, "expected #{expected_endpoint} got #{@tyt.data_endpoint}"
|
39
|
+
end
|
40
|
+
|
41
|
+
def test_that_get_doc_populates_doc
|
42
|
+
@tyt.season = '12-13'
|
43
|
+
VCR.use_cassette('12_13_season_page') do
|
44
|
+
@tyt.get_doc
|
45
|
+
assert @tyt.doc.instance_of?(Nokogiri::HTML::Document) == true
|
46
|
+
end
|
47
|
+
end
|
48
|
+
|
49
|
+
def test_that_get_season_returns_season
|
50
|
+
@tyt.season = '12-13'
|
51
|
+
VCR.use_cassette('12_13_season_page') do
|
52
|
+
season_data = @tyt.season_data
|
53
|
+
assert season_data.instance_of?(Tyt::Season)
|
54
|
+
end
|
55
|
+
end
|
56
|
+
|
57
|
+
def test_that_get_season_day_sets_right_data
|
58
|
+
@tyt.season = '12-13'
|
59
|
+
VCR.use_cassette('12_13_season_page') do
|
60
|
+
season_data = @tyt.season_data
|
61
|
+
opening_day = season_data.days.first
|
62
|
+
assert opening_day.runs == 4, "runs expected 4 got #{opening_day.runs}"
|
63
|
+
assert opening_day.vertical_feet == 1028, "vertical_feet expected 1028 got #{opening_day.vertical_feet}"
|
64
|
+
assert opening_day.vertical_meters == 312, "vertical_meters expected 312 got #{opening_day.vertical_meters}"
|
65
|
+
end
|
66
|
+
end
|
67
|
+
|
68
|
+
def test_that_date_data_returns_array
|
69
|
+
@tyt.season = '12-13'
|
70
|
+
date = Date.strptime('04/13/2013', '%m/%d/%Y')
|
71
|
+
VCR.use_cassette('04-13-13_date_page') do
|
72
|
+
date_data = @tyt.date_data(date)
|
73
|
+
assert date_data.instance_of?(Array)
|
74
|
+
end
|
75
|
+
end
|
76
|
+
|
77
|
+
def test_that_date_data_sets_right_data
|
78
|
+
@tyt.season = '12-13'
|
79
|
+
date = Date.strptime('04/13/2013', '%m/%d/%Y')
|
80
|
+
VCR.use_cassette('04-13-13_date_page') do
|
81
|
+
date_data = @tyt.date_data(date)
|
82
|
+
first_run = date_data[0]
|
83
|
+
assert first_run.chair == 'Sunshine'
|
84
|
+
assert first_run.vertical_feet == 257
|
85
|
+
assert first_run.vertical_meters == 78
|
86
|
+
assert first_run.datetime.strftime('%m/%d/%Y %l:%M:%S %p') == '04/13/2013 9:40:05 AM'
|
87
|
+
end
|
88
|
+
end
|
89
|
+
|
90
|
+
def test_that_date_with_no_data_returns_nil
|
91
|
+
@tyt.season = '12-13'
|
92
|
+
date = Date.strptime('04/14/2013', '%m/%d/%Y')
|
93
|
+
VCR.use_cassette('04-14-13_date_page') do
|
94
|
+
date_data = @tyt.date_data(date)
|
95
|
+
assert date_data == nil
|
96
|
+
end
|
97
|
+
end
|
98
|
+
end
|
@@ -0,0 +1,15 @@
|
|
1
|
+
require 'helper'
|
2
|
+
require "minitest/autorun"
|
3
|
+
|
4
|
+
class RunDetail < Minitest::Test
|
5
|
+
def setup
|
6
|
+
@run_detail = Tyt::RunDetail.new
|
7
|
+
end
|
8
|
+
|
9
|
+
def test_attributes
|
10
|
+
[:datetime, :chair, :vertical_feet, :vertical_meters].each do |attr|
|
11
|
+
assert_respond_to @run_detail, attr
|
12
|
+
end
|
13
|
+
end
|
14
|
+
|
15
|
+
end
|
data/test/test_season.rb
ADDED
@@ -0,0 +1,51 @@
|
|
1
|
+
require 'helper'
|
2
|
+
require "minitest/autorun"
|
3
|
+
|
4
|
+
class TestSeason < Minitest::Test
|
5
|
+
def setup
|
6
|
+
@season = Tyt::Season.new
|
7
|
+
setup_season
|
8
|
+
@tyt.season = '12-13'
|
9
|
+
end
|
10
|
+
|
11
|
+
def test_attributes
|
12
|
+
[:name, :days].each do |attr|
|
13
|
+
assert_respond_to @season, attr
|
14
|
+
end
|
15
|
+
end
|
16
|
+
|
17
|
+
def test_total_runs
|
18
|
+
assert_respond_to @season, :total_runs
|
19
|
+
VCR.use_cassette('12_13_season_page') do
|
20
|
+
season = @tyt.season_data
|
21
|
+
assert season.total_runs == 204
|
22
|
+
end
|
23
|
+
end
|
24
|
+
|
25
|
+
def test_total_days
|
26
|
+
assert_respond_to @season, :total_days
|
27
|
+
VCR.use_cassette('12_13_season_page') do
|
28
|
+
season = @tyt.season_data
|
29
|
+
assert season.total_days == 29
|
30
|
+
end
|
31
|
+
end
|
32
|
+
|
33
|
+
def test_total_vertical_feet
|
34
|
+
assert_respond_to @season, :total_vertical_feet
|
35
|
+
VCR.use_cassette('12_13_season_page') do
|
36
|
+
season = @tyt.season_data
|
37
|
+
total_vert = season.total_vertical_feet
|
38
|
+
assert total_vert == 268711, "Expect total_vertical_feet to be 268711 got #{total_vert}"
|
39
|
+
end
|
40
|
+
end
|
41
|
+
|
42
|
+
def test_total_vertical_meters
|
43
|
+
assert_respond_to @season, :total_vertical_meters
|
44
|
+
VCR.use_cassette('12_13_season_page') do
|
45
|
+
season = @tyt.season_data
|
46
|
+
total_meters = season.total_vertical_meters
|
47
|
+
assert total_meters == 81818, "Expect total_vertical_meters to be 81818 got #{total_meters}"
|
48
|
+
end
|
49
|
+
end
|
50
|
+
|
51
|
+
end
|
@@ -0,0 +1,15 @@
|
|
1
|
+
require 'helper'
|
2
|
+
require "minitest/autorun"
|
3
|
+
|
4
|
+
class TestSkiDay < Minitest::Test
|
5
|
+
def setup
|
6
|
+
@ski_day = Tyt::SkiDay.new
|
7
|
+
end
|
8
|
+
|
9
|
+
def test_attributes
|
10
|
+
[:date, :runs, :vertical_feet, :vertical_meters].each do |attr|
|
11
|
+
assert_respond_to @ski_day, attr
|
12
|
+
end
|
13
|
+
end
|
14
|
+
|
15
|
+
end
|
data/tyt.gemspec
ADDED
@@ -0,0 +1,76 @@
|
|
1
|
+
# Generated by jeweler
|
2
|
+
# DO NOT EDIT THIS FILE DIRECTLY
|
3
|
+
# Instead, edit Jeweler::Tasks in Rakefile, and run 'rake gemspec'
|
4
|
+
# -*- encoding: utf-8 -*-
|
5
|
+
# stub: tyt 0.1.0 ruby lib
|
6
|
+
|
7
|
+
Gem::Specification.new do |s|
|
8
|
+
s.name = "tyt"
|
9
|
+
s.version = "0.1.0"
|
10
|
+
|
11
|
+
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
|
12
|
+
s.authors = ["Timmy Crawford"]
|
13
|
+
s.date = "2013-12-03"
|
14
|
+
s.description = "Track Your Turns (tyt) provides a wrapper to ski area turn tracking data sets"
|
15
|
+
s.email = "timmydcrawford@gmail.com"
|
16
|
+
s.extra_rdoc_files = [
|
17
|
+
"LICENSE.txt",
|
18
|
+
"README.rdoc"
|
19
|
+
]
|
20
|
+
s.files = [
|
21
|
+
".document",
|
22
|
+
".ruby-gemset",
|
23
|
+
".ruby-version",
|
24
|
+
"Gemfile",
|
25
|
+
"Gemfile.lock",
|
26
|
+
"LICENSE.txt",
|
27
|
+
"README.rdoc",
|
28
|
+
"Rakefile",
|
29
|
+
"VERSION",
|
30
|
+
"lib/tyt.rb",
|
31
|
+
"lib/tyt/bachelor.rb",
|
32
|
+
"lib/tyt/run_detail.rb",
|
33
|
+
"lib/tyt/season.rb",
|
34
|
+
"lib/tyt/ski_day.rb",
|
35
|
+
"test/cassettes/04-13-13_date_page.yml",
|
36
|
+
"test/cassettes/04-14-13_date_page.yml",
|
37
|
+
"test/cassettes/12_13_season_page.yml",
|
38
|
+
"test/cassettes/13_14_season_page.yml",
|
39
|
+
"test/helper.rb",
|
40
|
+
"test/test_bachelor.rb",
|
41
|
+
"test/test_run_detail.rb",
|
42
|
+
"test/test_season.rb",
|
43
|
+
"test/test_ski_day.rb",
|
44
|
+
"tyt.gemspec"
|
45
|
+
]
|
46
|
+
s.homepage = "http://github.com/timmyc/tyt"
|
47
|
+
s.licenses = ["MIT"]
|
48
|
+
s.require_paths = ["lib"]
|
49
|
+
s.rubygems_version = "2.1.11"
|
50
|
+
s.summary = "A wrapper for accessing vertical turn tracking information from ski areas"
|
51
|
+
|
52
|
+
if s.respond_to? :specification_version then
|
53
|
+
s.specification_version = 4
|
54
|
+
|
55
|
+
if Gem::Version.new(Gem::VERSION) >= Gem::Version.new('1.2.0') then
|
56
|
+
s.add_runtime_dependency(%q<nokogiri>, [">= 0"])
|
57
|
+
s.add_runtime_dependency(%q<hashie>, [">= 0"])
|
58
|
+
s.add_development_dependency(%q<rdoc>, ["~> 3.12"])
|
59
|
+
s.add_development_dependency(%q<bundler>, ["~> 1.0"])
|
60
|
+
s.add_development_dependency(%q<jeweler>, ["~> 1.8.7"])
|
61
|
+
else
|
62
|
+
s.add_dependency(%q<nokogiri>, [">= 0"])
|
63
|
+
s.add_dependency(%q<hashie>, [">= 0"])
|
64
|
+
s.add_dependency(%q<rdoc>, ["~> 3.12"])
|
65
|
+
s.add_dependency(%q<bundler>, ["~> 1.0"])
|
66
|
+
s.add_dependency(%q<jeweler>, ["~> 1.8.7"])
|
67
|
+
end
|
68
|
+
else
|
69
|
+
s.add_dependency(%q<nokogiri>, [">= 0"])
|
70
|
+
s.add_dependency(%q<hashie>, [">= 0"])
|
71
|
+
s.add_dependency(%q<rdoc>, ["~> 3.12"])
|
72
|
+
s.add_dependency(%q<bundler>, ["~> 1.0"])
|
73
|
+
s.add_dependency(%q<jeweler>, ["~> 1.8.7"])
|
74
|
+
end
|
75
|
+
end
|
76
|
+
|
metadata
ADDED
@@ -0,0 +1,140 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: tyt
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 0.1.0
|
5
|
+
platform: ruby
|
6
|
+
authors:
|
7
|
+
- Timmy Crawford
|
8
|
+
autorequire:
|
9
|
+
bindir: bin
|
10
|
+
cert_chain: []
|
11
|
+
date: 2013-12-03 00:00:00.000000000 Z
|
12
|
+
dependencies:
|
13
|
+
- !ruby/object:Gem::Dependency
|
14
|
+
name: nokogiri
|
15
|
+
requirement: !ruby/object:Gem::Requirement
|
16
|
+
requirements:
|
17
|
+
- - '>='
|
18
|
+
- !ruby/object:Gem::Version
|
19
|
+
version: '0'
|
20
|
+
type: :runtime
|
21
|
+
prerelease: false
|
22
|
+
version_requirements: !ruby/object:Gem::Requirement
|
23
|
+
requirements:
|
24
|
+
- - '>='
|
25
|
+
- !ruby/object:Gem::Version
|
26
|
+
version: '0'
|
27
|
+
- !ruby/object:Gem::Dependency
|
28
|
+
name: hashie
|
29
|
+
requirement: !ruby/object:Gem::Requirement
|
30
|
+
requirements:
|
31
|
+
- - '>='
|
32
|
+
- !ruby/object:Gem::Version
|
33
|
+
version: '0'
|
34
|
+
type: :runtime
|
35
|
+
prerelease: false
|
36
|
+
version_requirements: !ruby/object:Gem::Requirement
|
37
|
+
requirements:
|
38
|
+
- - '>='
|
39
|
+
- !ruby/object:Gem::Version
|
40
|
+
version: '0'
|
41
|
+
- !ruby/object:Gem::Dependency
|
42
|
+
name: rdoc
|
43
|
+
requirement: !ruby/object:Gem::Requirement
|
44
|
+
requirements:
|
45
|
+
- - ~>
|
46
|
+
- !ruby/object:Gem::Version
|
47
|
+
version: '3.12'
|
48
|
+
type: :development
|
49
|
+
prerelease: false
|
50
|
+
version_requirements: !ruby/object:Gem::Requirement
|
51
|
+
requirements:
|
52
|
+
- - ~>
|
53
|
+
- !ruby/object:Gem::Version
|
54
|
+
version: '3.12'
|
55
|
+
- !ruby/object:Gem::Dependency
|
56
|
+
name: bundler
|
57
|
+
requirement: !ruby/object:Gem::Requirement
|
58
|
+
requirements:
|
59
|
+
- - ~>
|
60
|
+
- !ruby/object:Gem::Version
|
61
|
+
version: '1.0'
|
62
|
+
type: :development
|
63
|
+
prerelease: false
|
64
|
+
version_requirements: !ruby/object:Gem::Requirement
|
65
|
+
requirements:
|
66
|
+
- - ~>
|
67
|
+
- !ruby/object:Gem::Version
|
68
|
+
version: '1.0'
|
69
|
+
- !ruby/object:Gem::Dependency
|
70
|
+
name: jeweler
|
71
|
+
requirement: !ruby/object:Gem::Requirement
|
72
|
+
requirements:
|
73
|
+
- - ~>
|
74
|
+
- !ruby/object:Gem::Version
|
75
|
+
version: 1.8.7
|
76
|
+
type: :development
|
77
|
+
prerelease: false
|
78
|
+
version_requirements: !ruby/object:Gem::Requirement
|
79
|
+
requirements:
|
80
|
+
- - ~>
|
81
|
+
- !ruby/object:Gem::Version
|
82
|
+
version: 1.8.7
|
83
|
+
description: Track Your Turns (tyt) provides a wrapper to ski area turn tracking data
|
84
|
+
sets
|
85
|
+
email: timmydcrawford@gmail.com
|
86
|
+
executables: []
|
87
|
+
extensions: []
|
88
|
+
extra_rdoc_files:
|
89
|
+
- LICENSE.txt
|
90
|
+
- README.rdoc
|
91
|
+
files:
|
92
|
+
- .document
|
93
|
+
- .ruby-gemset
|
94
|
+
- .ruby-version
|
95
|
+
- Gemfile
|
96
|
+
- Gemfile.lock
|
97
|
+
- LICENSE.txt
|
98
|
+
- README.rdoc
|
99
|
+
- Rakefile
|
100
|
+
- VERSION
|
101
|
+
- lib/tyt.rb
|
102
|
+
- lib/tyt/bachelor.rb
|
103
|
+
- lib/tyt/run_detail.rb
|
104
|
+
- lib/tyt/season.rb
|
105
|
+
- lib/tyt/ski_day.rb
|
106
|
+
- test/cassettes/04-13-13_date_page.yml
|
107
|
+
- test/cassettes/04-14-13_date_page.yml
|
108
|
+
- test/cassettes/12_13_season_page.yml
|
109
|
+
- test/cassettes/13_14_season_page.yml
|
110
|
+
- test/helper.rb
|
111
|
+
- test/test_bachelor.rb
|
112
|
+
- test/test_run_detail.rb
|
113
|
+
- test/test_season.rb
|
114
|
+
- test/test_ski_day.rb
|
115
|
+
- tyt.gemspec
|
116
|
+
homepage: http://github.com/timmyc/tyt
|
117
|
+
licenses:
|
118
|
+
- MIT
|
119
|
+
metadata: {}
|
120
|
+
post_install_message:
|
121
|
+
rdoc_options: []
|
122
|
+
require_paths:
|
123
|
+
- lib
|
124
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
125
|
+
requirements:
|
126
|
+
- - '>='
|
127
|
+
- !ruby/object:Gem::Version
|
128
|
+
version: '0'
|
129
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
130
|
+
requirements:
|
131
|
+
- - '>='
|
132
|
+
- !ruby/object:Gem::Version
|
133
|
+
version: '0'
|
134
|
+
requirements: []
|
135
|
+
rubyforge_project:
|
136
|
+
rubygems_version: 2.1.11
|
137
|
+
signing_key:
|
138
|
+
specification_version: 4
|
139
|
+
summary: A wrapper for accessing vertical turn tracking information from ski areas
|
140
|
+
test_files: []
|