govkit-ca 0.0.3 → 0.0.4

Sign up to get free protection for your applications and to get access to all the features.
@@ -8,20 +8,15 @@ module GovKit
8
8
  class CBCCa < Base
9
9
  base_uri 'www.cbc.ca'
10
10
  http_method :get
11
- path '/news/canadavotes/myriding/postalcodes/<%= @letter %>/<%= @fsa %>/<%= @ldu %>.html'
12
-
13
- def initialize(postal_code)
14
- @fsa, @letter, @ldu = postal_code.downcase.match(/\A((.).{2})(.{3})\z/)[1..3]
15
- super
16
- end
11
+ path '/news/politics/canadavotes2011/myelection/postalcodes/index.php?pc=<%= @postal_code %>'
17
12
 
18
13
  private
19
14
  def electoral_districts!
20
- Yajl::Parser.parse(Iconv.new('UTF-8', 'ISO-8859-1').iconv(response.parsed_response)).map{|x| self.class.rid_to_edid[x['rid']]}
15
+ Yajl::Parser.parse(response.parsed_response).map{|x| self.class.rid_to_edid[x['rid'].to_i]}
21
16
  end
22
17
 
23
18
  def valid?
24
- !!response.headers['expires']
19
+ response.code != 404
25
20
  end
26
21
 
27
22
  # cbc.ca uses an internal riding ID, which must be matched to a
@@ -36,4 +31,4 @@ module GovKit
36
31
  end
37
32
  end
38
33
  end
39
- end
34
+ end
@@ -3,7 +3,8 @@ module GovKit
3
3
  module PostalCode
4
4
  module Strategy
5
5
  # digital-copyright.ca often returns more or fewer electoral districts
6
- # than others. Occasionally suffers from timeout errors.
6
+ # than others. It says it uses makethechange.ca, but makethechange.ca
7
+ # returns different results for, e.g., K0A1K0.
7
8
  class DigitalCopyrightCa < Base
8
9
  base_uri 'www.digital-copyright.ca'
9
10
  http_method :get
@@ -13,7 +13,7 @@ module GovKit
13
13
  private
14
14
 
15
15
  def electoral_districts!
16
- [ response.headers['location'][/&ED=(\d{5})&/, 1] ]
16
+ [ response.headers['location'][/\bED=(\d{5})&/, 1] ]
17
17
  end
18
18
 
19
19
  def valid?
@@ -3,7 +3,8 @@ module GovKit
3
3
  module PostalCode
4
4
  module Strategy
5
5
  # greenparty.ca does not return electoral districts for postal codes
6
- # that contain multiple electoral districts.
6
+ # that contain multiple electoral districts. It has no lookup service
7
+ # between elections.
7
8
  class GreenPartyCa < Base
8
9
  base_uri 'greenparty.ca'
9
10
  http_method :head
@@ -2,8 +2,10 @@ module GovKit
2
2
  module CA
3
3
  module PostalCode
4
4
  module Strategy
5
- # liberal.ca is unreliable during elections.
5
+ # liberal.ca seems unreliable. It returns no ridings for B0J2L0 and
6
+ # three ridings for K0A1K0.
6
7
  class LiberalCa < Base
8
+ follow_redirects true
7
9
  base_uri 'www.liberal.ca'
8
10
  http_method :get
9
11
  path '/riding/postal/<%= @postal_code %>/'
@@ -15,7 +17,7 @@ module GovKit
15
17
  end
16
18
 
17
19
  def valid?
18
- !response.parsed_response.match /\bOopsies!/
20
+ !response.parsed_response["Sorry we couldn't find your riding."]
19
21
  end
20
22
  end
21
23
 
@@ -2,8 +2,7 @@ module GovKit
2
2
  module CA
3
3
  module PostalCode
4
4
  module Strategy
5
- # parl.gc.ca seems unreliable. In the case of K0A1K0, for example, it
6
- # does not return seven ridings like other sources.
5
+ # parl.gc.ca is a reliable source.
7
6
  class ParlGcCa < Base
8
7
  base_uri 'www.parl.gc.ca'
9
8
  http_method :get
@@ -81,6 +81,12 @@ end
81
81
 
82
82
  require 'gov_kit-ca/postal_code/strategy/base'
83
83
  require 'gov_kit-ca/postal_code/strategy/elections_ca'
84
+ #require 'gov_kit-ca/postal_code/strategy/parl_gc_ca'
84
85
  require 'gov_kit-ca/postal_code/strategy/cbc_ca'
85
86
  require 'gov_kit-ca/postal_code/strategy/ndp_ca'
86
- require 'gov_kit-ca/postal_code/strategy/greenparty_ca'
87
+
88
+ # These strategies are suboptimal:
89
+ # require 'gov_kit-ca/postal_code/strategy/conservative_ca'
90
+ # require 'gov_kit-ca/postal_code/strategy/digital-copyright_ca'
91
+ # require 'gov_kit-ca/postal_code/strategy/greenparty_ca'
92
+ # require 'gov_kit-ca/postal_code/strategy/liberal_ca'
@@ -1,5 +1,5 @@
1
1
  module GovKit
2
2
  module CA
3
- VERSION = "0.0.3"
3
+ VERSION = "0.0.4"
4
4
  end
5
5
  end
data/lib/gov_kit-ca.rb CHANGED
@@ -1,7 +1,6 @@
1
1
  $LOAD_PATH.unshift(File.expand_path(File.dirname(__FILE__))) unless $LOAD_PATH.include?(File.expand_path(File.dirname(__FILE__)))
2
2
 
3
3
  require 'erb'
4
- require 'iconv'
5
4
  require 'json'
6
5
  require 'yaml'
7
6
 
data/spec/cbc_ca_spec.rb CHANGED
@@ -6,14 +6,16 @@ class GovKit::CA::PostalCode::Strategy::CBCCa
6
6
  before :all do
7
7
  %w(G0C2Y0 T5S2B9 K0A1K0 H0H0H0 X1B1B1).each do |postal_code|
8
8
  strategy = GovKit::CA::PostalCode::Strategy::CBCCa.new(postal_code)
9
- FakeWeb.register_uri strategy.class.http_method, "#{strategy.class.base_uri}#{strategy.send(:path)}", :response => fixture_path('cbc_ca', "#{postal_code}.response")
9
+ unless FakeWeb.allow_net_connect?
10
+ FakeWeb.register_uri strategy.class.http_method, "#{strategy.class.base_uri}#{strategy.send(:path)}", :response => fixture_path('cbc_ca', "#{postal_code}.response")
11
+ end
10
12
  end
11
13
  end
12
14
 
13
15
  it 'should return the electoral districts within a postal code' do
14
16
  { 'G0C2Y0' => [24019],
15
- 'T5S2B9' => [48015, 48017], # differs from elections.ca, ndp.ca, greenparty.ca
16
- 'K0A1K0' => [35012, 35025, 35040, 35052, 35063, 35064, 35087],
17
+ 'T5S2B9' => [48015, 48017], # differs from elections.ca, ndp.ca, greenparty.ca, liberal.ca
18
+ 'K0A1K0' => [35025, 35052, 35063, 35064], # differs from liberal.ca, digital-copyright.ca
17
19
  }.each do |postal_code,electoral_districts|
18
20
  GovKit::CA::PostalCode::Strategy::CBCCa.new(postal_code).electoral_districts.should == electoral_districts
19
21
  end
@@ -7,14 +7,16 @@ class GovKit::CA::PostalCode::Strategy::DigitalCopyrightCa
7
7
  before :all do
8
8
  %w(G0C2Y0 T5S2B9 K0A1K0 H0H0H0 X1B1B1).each do |postal_code|
9
9
  strategy = GovKit::CA::PostalCode::Strategy::DigitalCopyrightCa.new(postal_code)
10
- FakeWeb.register_uri strategy.class.http_method, "#{strategy.class.base_uri}#{strategy.send(:path)}", :response => fixture_path('digital-copyright_ca', "#{postal_code}.response")
10
+ unless FakeWeb.allow_net_connect?
11
+ FakeWeb.register_uri strategy.class.http_method, "#{strategy.class.base_uri}#{strategy.send(:path)}", :response => fixture_path('digital-copyright_ca', "#{postal_code}.response")
12
+ end
11
13
  end
12
14
  end
13
15
 
14
16
  it 'should return the electoral districts within a postal code' do
15
17
  { 'G0C2Y0' => [24019, 24039], # differs from all
16
18
  'T5S2B9' => [48012, 48013, 48014, 48015, 48017, 48018], # differs from all
17
- 'K0A1K0' => [35025, 35052, 35063], # differs from all
19
+ 'K0A1K0' => [35025, 35052, 35063], # differs from cbc.ca
18
20
  }.each do |postal_code,electoral_districts|
19
21
  GovKit::CA::PostalCode::Strategy::DigitalCopyrightCa.new(postal_code).electoral_districts.should == electoral_districts
20
22
  end
@@ -6,7 +6,9 @@ class GovKit::CA::PostalCode::Strategy::ElectionsCa
6
6
  before :all do
7
7
  %w(G0C2Y0 T5S2B9 K0A1K0 H0H0H0 X1B1B1).each do |postal_code|
8
8
  strategy = GovKit::CA::PostalCode::Strategy::ElectionsCa.new(postal_code)
9
- FakeWeb.register_uri strategy.class.http_method, "#{strategy.class.base_uri}#{strategy.send(:path)}", :response => fixture_path('elections_ca', "#{postal_code}.response")
9
+ unless FakeWeb.allow_net_connect?
10
+ FakeWeb.register_uri strategy.class.http_method, "#{strategy.class.base_uri}#{strategy.send(:path)}", :response => fixture_path('elections_ca', "#{postal_code}.response")
11
+ end
10
12
  end
11
13
  end
12
14
 
@@ -1,11 +1,11 @@
1
1
  HTTP/1.1 200 OK
2
- Server: Apache/2.2.3 (Red Hat)
3
- Content-Length: 52
2
+ Server: Apache/2.2.3 (Red Hat) PHP/5.1.6
3
+ X-Powered-By: PHP/5.1.6
4
+ X-Origin-Server: web17:sb17
4
5
  Content-Type: text/html
5
- X-Origin-Server: web15:sb10
6
- Cache-Control: max-age=10
7
- Expires: Sun, 05 Jun 2011 03:16:49 GMT
8
- Date: Sun, 05 Jun 2011 03:16:39 GMT
9
- Connection: close
6
+ Cache-Control: max-age=30
7
+ Expires: Wed, 07 Mar 2012 17:13:27 GMT
8
+ Date: Wed, 07 Mar 2012 17:12:57 GMT
9
+ Connection: keep-alive
10
10
 
11
- [{"rid":7,"name":"St. John's South - Mount Pearl"}]
11
+ [{"rid":"007","name":"St. John's South - Mount Pearl"}]
@@ -1,11 +1,11 @@
1
1
  HTTP/1.1 200 OK
2
- Server: Apache/2.2.3 (Red Hat)
3
- Content-Length: 54
2
+ Server: Apache/2.2.3 (Red Hat) PHP/5.1.6
3
+ X-Powered-By: PHP/5.1.6
4
+ X-Origin-Server: web17:sb17
4
5
  Content-Type: text/html
5
- X-Origin-Server: web20:sb10
6
- Cache-Control: max-age=10
7
- Expires: Sun, 05 Jun 2011 03:16:49 GMT
8
- Date: Sun, 05 Jun 2011 03:16:39 GMT
9
- Connection: close
6
+ Cache-Control: max-age=30
7
+ Expires: Wed, 07 Mar 2012 17:13:27 GMT
8
+ Date: Wed, 07 Mar 2012 17:12:57 GMT
9
+ Connection: keep-alive
10
10
 
11
- [{"rid":52,"name":"Gasp�sie - �les-de-la-Madeleine"}]
11
+ [{"rid":"052","name":"Gasp\u00e9sie - \u00celes-de-la-Madeleine"}]
@@ -1,309 +1,11 @@
1
1
  HTTP/1.1 404 Not Found
2
- Server: Apache/2.2.3 (Red Hat)
3
- X-Origin-Server: web20:sb10
2
+ Server: Apache/2.2.3 (Red Hat) PHP/5.1.6
3
+ X-Powered-By: PHP/5.1.6
4
+ X-Origin-Server: web16:sb17
5
+ Content-Length: 0
4
6
  Content-Type: text/html
5
- Cache-Control: public, max-age=0
6
- Date: Sun, 05 Jun 2011 03:16:40 GMT
7
- Content-Length: 14172
8
- Connection: close
9
-
10
- <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
11
- "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
12
- <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
13
- <head>
14
- <meta name="application-name" content="www.cbc.ca" />
15
- <meta name="msapplication-tooltip" content="CBC.ca is Canada's Online Information Source." />
16
- <link rel="shortcut icon" type="image/ico" href="/favicon.ico" />
17
- <meta name="msapplication-starturl" content="/" />
18
- <meta name="msapplication-window" content="width=1024;height=768" />
19
- <meta name="msapplication-task" content="name=CBC;action-uri=http://www.cbc.ca/;icon-uri=/favicon.ico"/>
20
- <meta name="msapplication-task" content="name=CBC News;action-uri=http://www.cbc.ca/news;icon-uri=/favicon.ico"/>
21
- <meta name="msapplication-task" content="name=CBC Sports;action-uri=http://www.cbc.ca/sports;icon-uri=/favicon.ico"/>
22
- <meta name="msapplication-task" content="name=CBC Radio;action-uri=http://www.cbc.ca/radio;icon-uri=/favicon.ico"/>
23
- <meta name="msapplication-task" content="name=CBC Television;action-uri=http://www.cbc.ca/television;icon-uri=/favicon.ico"/>
24
- <script type="text/javascript" src="/g/i/global.js" id="yuiglobalnode"></script>
25
- <script type="text/javascript" src="/g/i/loader.js"></script>
26
-
27
- <!-- START INTERCEPTUM -->
28
- <style type="text/css">
29
- <!--
30
- .intercept_link { color: white; }
31
- .intercept_container { color: white; background-color: #115278; font-size: 17px; }
32
- .intercept_window { border-style: solid; border-width: 1px; border-color: #000000; background-color: #FFFFFF; width: 690px; padding: 5px; border-radius: 5px; -moz-border-radius: 5px; -moz-box-shadow: 0 7px 10px #262626; }
33
- -->
34
- </style>
35
- <!-- END INTERCEPTUM -->
36
-
37
- <meta http-equiv="content-type" content="text/html; charset=iso-8859-1" />
38
- <title>Sorry - we can't find that page</title>
39
-
40
- <meta http-equiv="refresh" content="45; url=/sitemap/">
41
-
42
- <link rel="stylesheet" href="/includes/css/error.css" type="text/css" />
43
- <script language="javascript">
44
- advertising_zone = "error";
45
- </script>
46
- </head>
47
- <body>
48
- <script type="text/javascript" src="/g/stats/cbc_sitecatalyst.js"></script>
49
- <script type="text/javascript" src="/g/stats/sccore.js"></script>
50
- <script type="text/javascript" src="/g/stats/linktracker.js"></script>
51
-
52
- <div id="accessibilitylinks">
53
- <h2>Accessibility Links</h2>
54
- <ul>
55
- <li><a href="#content" id="skipnav" title="skip to main content">Skip to main content</a></li>
56
-
57
- <li><a href="/accessibility/" title="skip to cbc accessibility page">Skip to CBC accessibility page</a></li>
58
- </ul>
59
- </div>
60
- <div id="gnwrap">
61
- <div id="gnadww" class="clearfix">
62
- <div id="gnweather">&nbsp;</div>
63
-
64
- <div id="masthead-ad" class="ad-728x90">
65
- <script type="text/javascript" src="/includes/ads/masthead_ads.js"></script>
66
- <script type="text/javascript">
67
- /* <[![CDATA */
68
-
69
- Ads.defaultAdVars();
70
-
71
- try {
72
- if(window.top !== window.self) {
73
- Ads.iframeSrcParse();
74
- }
75
- } catch(e) {}
76
- Ads.displayAd();
77
- /* ]]> */
78
- </script>
79
- <noscript><a href="http://ad.doubleclick.net/ad/cbc.ca/nozone/;pos=topleader;dcopt=ist;tile=1;sz=728x90;page="story";section="null";category="null";ord=123456789?" target="_blank"><img src="http://ad.doubleclick.net/ad/cbc.ca/nozone/;dcopt=ist;tile=1;sz=728x90;page="story";section="null";category="null";ord=123456789?" width="728" height="90" border="0" alt="Advertisment" /></a></noscript>
80
- </div>
81
-
82
-
83
- </div>
84
- <div id="gn" class="v10">
85
- <h2>CBC Global Header Navigation</h2>
86
- <div id="gnav">
87
- <ul id="gnavl">
88
- <li id="gnhome"><a href="http://www.cbc.ca" title="CBC.ca Home Page" target="_top"><span>CBC.ca</span></a></li>
89
- <li id="gnnews" class="btn">
90
- <a class="em" href="http://www.cbc.ca/news" target="_top">News</a>
91
- <a id="gnnewsdd" class="caret" href="http://www.cbc.ca/news" target="_top">news drop down menu</a>
92
- </li>
93
- <li id="gnsports" class="btn">
94
- <a class="em" href="http://www.cbc.ca/sports" target="_top">Sports</a>
95
- <a id="gnsportsdd" class="caret" href="http://www.cbc.ca/sports" target="_top">sports drop down menu</a>
96
- </li>
97
- <li id="gnradio" class="btn">
98
- <a class="em" href="http://www.cbc.ca/radio" target="_top">Radio</a>
99
- <a id="gnradiodd" class="caret" href="http://www.cbc.ca/radio" target="_top">radio drop down menu</a>
100
- </li>
101
- <li id="gntv" class="btn">
102
- <a class="em" href="http://www.cbc.ca/television" target="_top">TV</a>
103
- <a id="gntvdd" class="caret" href="http://www.cbc.ca/television" target="_top">tv drop down menu</a>
104
- </li>
105
- <li id="gnmyr" class="btn lnk">
106
- <a id="gnmyrem" class="em" href="http://www.cbc.ca/canada" target="_top">My Region <em>drop down menu</em></a>
107
- <span id="gnmyrdd" class="caret">&nbsp;</span>
108
- </li>
109
- <li id="gnmore" class="btn lnk">
110
- <a id="gnmoreem" href="http://www.cbc.ca/help/sitemap.html" class="em" target="_top">More <em>drop down menu</em></a>
111
- <span id="gnmoredd" class="caret">&nbsp;</span>
112
- </li>
113
- <li id="gnwatch" class="btn lnk wl">
114
- <a id="gnwatchem" href="http://www.cbc.ca/video" class="em" target="_top">Watch <em>drop down menu</em></a>
115
- <span id="gnwatchdd" class="caret">&nbsp;</span>
116
- </li>
117
- <li id="gnlisten" class="btn lnk wl">
118
- <a id="gnlistenem" href="http://www.cbc.ca/listen" class="em" target="_top">Listen <em>drop down menu</em></a>
119
- <span id="gnlistendd" class="caret">&nbsp;</span>
120
- </li>
121
- </ul>
122
- <form name="gnsearch" action="http://www.cbc.ca/search/cbc" accept-charset="utf-8" method="GET" id="gnsrch" target="_top">
123
- <input type="hidden" name="ie" value="utf8" />
124
- <input type="hidden" name="site" value="CBC" />
125
- <input type="hidden" name="output" value="xml_no_dtd" />
126
- <input type="hidden" name="getfields" value="description" />
127
- <input type="hidden" name="oe" value="utf8" />
128
- <input type="hidden" name="safe" value="high" />
129
- <label for="q">Search CBC.ca</label>
130
- <input type="text" name="q" value="" id="gnq" />
131
- <label for="s">Submit Search</label>
132
- <input type="submit" name="s" id="gns" value="" title="Search"/></form>
133
- <ul id="gnlogin">
134
- <li class="btn"><a id="gnsignupmodal" href="http://www.cbc.ca/membercentre/SignUp.aspx" target="_blank">Sign Up</a></li>
135
- <li class="btn last"><a id="gnloginmodal" href="https://sso.cbc.ca/SSOAuthenticationDomain.ashx?mode=login&redirecturl=http://www.cbc.ca/" target="_top">Log In</a></li>
136
- </ul>
137
- </div>
138
- <div id="dropzone">&nbsp;</div>
139
- </div>
140
-
141
- </div>
142
- <script type="text/javascript">
143
- if (!_CBC_MODULES.modules.cbc_globalnav) _CBC_MODULES.modules.cbc_globalnav = { type:"js", fullpath:"/i/o/globalnav/v10/globalnav-min.js", requires: ['cbc_core', 'node', 'event'] };
144
- if (!_CBC_MODULES.modules.cbc_globalnav_menu_style) _CBC_MODULES.modules.cbc_globalnav_menu_style = { type:"css", fullpath:"/i/o/globalnav/v10/css/dropdown.css" };
145
- YUI(_CBC_MODULES).use('cbc_globalnav', function(Y, result){
146
- if (result.success){
147
- CBC.namespace("CBC.APP").globalnav = new CBC.APP.Globalnav();
148
- var params = {};
149
-
150
- CBC.APP.globalnav.init(Y, params);
151
- CBC.APP.Instances.add("globalnav",CBC.APP.globalnav);
152
- }
153
- });
154
- </script>
155
- <div id="body">
156
- <div id="zonebar">
157
- <div id="zone">
158
- <a href="/help/sitemap.html" title="CBC Site Map"><img src="/includes/gfx/cbc-logo.gif" alt="CBC.ca"/></a>
159
- </div>
160
- </div>
161
- <div id="content" class="clearfix">
162
- <div id="full" class="module clearfix">
163
-
164
- <h2 class="modhead">Sorry, we can't find the page you requested. </h2>
165
- <ol>
166
- <li>Please check the URL in the address bar, or ...</li>
167
- <li>Use the navigation links at left to explore our site, or ...</li>
168
- <li>Enter a term in the Quick Search box at top, or ...</li>
169
- <li>Visit our <a href="/sitemap/">site map </a>page</li>
170
- </ol>
171
- <p>In a few moments, you will be taken to our site map page, which will help you find what you looking for.</p>
172
-
173
- </div>
174
- <div id="footer" class="v10">
175
- <h2>CBC Global Footer Navigation</h2>
176
- <div id="ftr-ptls" class="clearfix">
177
- <div class="main">
178
- <h3>CBC.ca</h3>
179
- <ul>
180
- <!--<li><a target="_top" href="#">CBC Media Player</a></li>-->
181
- <li><a target="_top" href="http://www.cbc.ca/aboriginal/">Aboriginal</a></li>
182
- <li><a target="_top" href="http://www.cbc.ca/books/">Books</a></li>
183
- <li><a target="_top" href="http://www.cbc.ca/contests/">Contests</a></li>
184
- <li><a target="_top" href="http://archives.cbc.ca/">Digital Archives</a></li>
185
- <li><a target="_top" href="http://www.cbc.ca/documentaries/">Documentaries</a></li>
186
- <li><a target="_top" href="http://www.cbc.ca/kids/">Kids</a></li>
187
- <li><a target="_top" href="http://www.cbc.ca/kidscbc/">Kids' CBC Preschool</a></li>
188
- </ul>
189
- <ul>
190
- <li><a target="_top" href="http://www.kidscbcwonderworld.ca/">Kids' CBC Wonder World</a></li>
191
- <li><a target="_top" href="http://www.cbc.ca/news/">News</a></li>
192
- <li><a target="_top" href="http://www.cbc.ca/parents/">Parents</a></li>
193
- <li><a target="_top" href="http://www.cbc.ca/programguide/">Program Guide</a></li>
194
- <li><a target="_top" href="http://www.cbc.ca/radio/">Radio</a></li>
195
- <li><a target="_top" href="http://www.cbc.ca/sports/">Sports</a></li>
196
- <li><a target="_top" href="http://www.cbc.ca/television/">Television</a></li>
197
- </ul>
198
- <ul>
199
- <li><a target="_top" href="https://membercentre.cbc.ca/">CBC Member Centre</a></li>
200
- <li><a target="_top" href="http://www.cbc.ca/video/">CBC Player</a></li>
201
- <li><a target="_top" href="http://www.cbc.ca/shop/">CBC Shop</a></li>
202
- </ul>
203
- </div>
204
- <div class="main corp">
205
- <h3>Corporate</h3>
206
- <ul>
207
- <li><a target="_top" href="http://www.cbc.radio-canada.ca/">About CBC</a></li>
208
- <li><a target="_top" href="http://cbc.radio-canada.ca/jobs/">Jobs</a></li>
209
- <li><a target="_top" href="http://cbc.radio-canada.ca/facilities/toronto">Visit the Canadian Broadcasting Centre</a></li>
210
- <li><a target="_top" href="http://www.cbc.ca/productionfacilities/">Production Facilities</a></li>
211
- <li><a target="_top" href="http://cbcmobileproductions.ca/">Mobile Production Rentals</a></li>
212
- <li><a target="_top" href="http://www.cbc.ca/ombudsman/">Ombudsman</a></li>
213
- <li><a target="_top" href="http://cbc.radio-canada.ca/media/">CBC: Get the Facts</a></li>
214
- </ul>
215
- <ul>
216
- <li><a target="_top" href="http://www.cbc.ca/independentproducers/">Independent Producers</a></li>
217
- <li><a target="_top" href="http://www.cbc.ca/programsales/">Program and Content Sales</a></li>
218
- <li><a target="_top" href="http://www.cbc.ca/archivesales/">Archive Sales</a></li>
219
- <li><a target="_top" href="http://www.cbclearning.ca/">Educational Sales</a></li>
220
- <li><a target="_top" href="http://www.cbc.ca/services/tapes_tr.html">Tapes, Transcripts and Image Assets</a></li>
221
- <li><a target="_top" href="http://www.cbc.radio-canada.ca/dtv/">Digital TV</a></li>
222
- </ul>
223
- </div>
224
- </div>
225
- <div id="ftr-connect" class="clearfix">
226
- <h3>Stay Connected</h3>
227
- <ul>
228
- <li><a target="_top" href="http://www.cbc.ca/mobile/services/">Mobile</a></li>
229
- <li><a target="_top" href="http://www.cbc.ca/rss/">RSS</a></li>
230
- <li><a target="_top" href="http://www.cbc.ca/podcasting/">Podcasts</a></li>
231
- <!--<li><a target="_top" href="http://twitter.com/cbc">Twitter</a></li>-->
232
- <li class="last"><span>Member Services:</span><a target="_top" href="https://membercentre.cbc.ca/CurrentSubscriptions.aspx">Newsletters &amp; Alerts</a></li>
233
- <!--<li class="last"><a target="_top" href="#">More CBC Tools &amp; Services</a></li>-->
234
- </ul>
235
- </div>
236
- <div id="ftr-core" class="clearfix">
237
- <h3>CBC Links</h3>
238
- <ul class="terms clearfix">
239
- <li><a target="_top" href="http://www.cbc.ca/aboutcbc/discover/termsofuse.html">Terms Of Use</a></li>
240
- <li><a target="_top" href="http://www.cbc.ca/permissions/">Reuse &amp; Permissions</a></li>
241
- <li><a target="_top" href="http://www.cbcmediasales.ca/">Advertise</a></li>
242
- <li><a target="_top" href="http://www.cbc.ca/aboutcbc/discover/privacy.html">Privacy</a></li>
243
- <!--<li><a target="_top" href="#">Accessibility</a></li>-->
244
- <li><a target="_top" href="http://www.cbc.ca/sitemap/">Site Map</a></li>
245
- <li><a target="_top" href="http://www.cbc.ca/contact/">Contact Us</a></li>
246
- </ul>
247
- <a id="ftr-cbcrc" target="_top" href="http://www.cbc.radio-canada.ca/">CBC Radio-Canada</a>
248
- <div id="ftr-end" class="clearfix">
249
- <span>Copyright &copy; CBC 2011</span>
250
- <ul class="affs">
251
- <li><a target="_top" href="http://www.cbc.radio-canada.ca/">cbc.radio-canada.ca</a></li>
252
- <li><a target="_top" href="http://www.cbc.ca/">cbc.ca</a></li>
253
- <li><a target="_top" href="http://www.radio-canada.ca/">radio-canada.ca</a></li>
254
- </ul>
255
- </div>
256
- </div>
257
- </div>
258
-
259
- </div>
260
- </div>
261
-
262
- <script type="text/javascript">
263
- //<![CDATA[
264
- try{
265
- if(!CBC) { var CBC = {}; }
266
- if(!CBC.APP) { CBC.APP = {}; }
267
- if(!CBC.APP.SC) { CBC.APP.SC = {}; }
268
-
269
- var pageUrl = window.location.href.replace(/https*:\/\//,'');
270
-
271
- CBC.APP.SC.QueryString = "contentarea=404&amp;contenttype=error&amp;subsection1=" + pageUrl
272
-
273
- }catch(e){
274
- }
275
- //]]>
276
- </script>
277
-
278
- <script type="text/javascript" src="/g/stats/pagetracker.js"></script>
279
- <!-- START INTERCEPTUM -->
280
- <script type="text/javascript" src="/g/i/intercept.js"></script>
281
- <script type="text/javascript">
282
- YUI(_CBC_LOADER).use('node',function(Y,result) {
283
- if(result.success) {
284
- Y.on('domready',function() {
285
- try {
286
- InterceptInitializer.loadInterceptScript( );
287
- } catch ( e ) {}
288
- })
289
- }
290
- });
291
- </script>
292
- <!-- END INTERCEPTUM -->
293
-
294
- <script type="text/javascript">
295
- if (typeof COMSCORE == 'undefined') {
296
- YUI(_CBC_MODULES).use('comscore', function(Y,result) {
297
- if (result.success) {
298
- if (typeof advertising_zone != 'string')
299
- var advertising_zone = '';
300
- COMSCORE.beacon({c1:2,c2:3005684,c3:"",c4:escape(window.location.href),c5:"CBC.ca-CanadianNewsSportsEntertainmentKidsDocsRadioTV",c6:advertising_zone,c7:escape(window.location.href),c8:escape(document.title),c9:escape(document.referrer),c15:""});
301
- }
302
- });
303
- }
304
- </script>
305
- <!-- <noscript><img src="http://b.scorecardresearch.com/p?c1=2&c2=3005684&c3=&c4=cbc.ca&c5=CanadianNewsSportsEntertainmentKidsDocsRadioTV&c6=&c15=&cj=1" alt=""/></noscript> -->
306
-
307
-
308
- </body>
309
- </html>
7
+ Vary: Accept-Encoding
8
+ Cache-Control: max-age=27
9
+ Expires: Wed, 07 Mar 2012 17:13:12 GMT
10
+ Date: Wed, 07 Mar 2012 17:12:45 GMT
11
+ Connection: keep-alive
@@ -1,11 +1,11 @@
1
1
  HTTP/1.1 200 OK
2
- Server: Apache/2.2.3 (Red Hat)
3
- Content-Length: 335
2
+ Server: Apache/2.2.3 (Red Hat) PHP/5.1.6
3
+ X-Powered-By: PHP/5.1.6
4
+ X-Origin-Server: web17:sb17
4
5
  Content-Type: text/html
5
- X-Origin-Server: web18:sb10
6
- Cache-Control: max-age=10
7
- Expires: Sun, 05 Jun 2011 03:16:50 GMT
8
- Date: Sun, 05 Jun 2011 03:16:40 GMT
9
- Connection: close
6
+ Cache-Control: max-age=30
7
+ Expires: Wed, 07 Mar 2012 17:13:27 GMT
8
+ Date: Wed, 07 Mar 2012 17:12:57 GMT
9
+ Connection: keep-alive
10
10
 
11
- [{"rid":194,"name":"Stormont - Dundas - South Glengarry"},{"rid":133,"name":"Glengarry - Prescott - Russell"},{"rid":159,"name":"Nepean - Carleton"},{"rid":120,"name":"Carleton - Mississippi Mills"},{"rid":148,"name":"Lanark - Frontenac - Lennox and Addington"},{"rid":170,"name":"Ottawa - Orl�ans"},{"rid":171,"name":"Ottawa South"}]
11
+ [{"rid":"133","name":"Glengarry - Prescott - Russell"},{"rid":"159","name":"Nepean - Carleton"},{"rid":"170","name":"Ottawa - Orl\u00e9ans"},{"rid":"171","name":"Ottawa South"}]
@@ -1,11 +1,11 @@
1
1
  HTTP/1.1 200 OK
2
- Server: Apache/2.2.3 (Red Hat)
3
- Content-Length: 90
2
+ Server: Apache/2.2.3 (Red Hat) PHP/5.1.6
3
+ X-Powered-By: PHP/5.1.6
4
+ X-Origin-Server: web17:sb17
4
5
  Content-Type: text/html
5
- X-Origin-Server: web15:sb10
6
- Cache-Control: max-age=10
7
- Expires: Sun, 05 Jun 2011 03:16:49 GMT
8
- Date: Sun, 05 Jun 2011 03:16:39 GMT
9
- Connection: close
6
+ Cache-Control: max-age=30
7
+ Expires: Wed, 07 Mar 2012 17:13:27 GMT
8
+ Date: Wed, 07 Mar 2012 17:12:57 GMT
9
+ Connection: keep-alive
10
10
 
11
- [{"rid":257,"name":"Edmonton - Spruce Grove"},{"rid":255,"name":"Edmonton - St. Albert"}]
11
+ [{"rid":"257","name":"Edmonton - Spruce Grove"},{"rid":"255","name":"Edmonton - St. Albert"}]
@@ -1,309 +1,11 @@
1
1
  HTTP/1.1 404 Not Found
2
- Server: Apache/2.2.3 (Red Hat)
3
- X-Origin-Server: web22:sb10
2
+ Server: Apache/2.2.3 (Red Hat) PHP/5.1.6
3
+ X-Powered-By: PHP/5.1.6
4
+ X-Origin-Server: web16:sb17
5
+ Content-Length: 0
4
6
  Content-Type: text/html
5
- Cache-Control: public, max-age=0
6
- Date: Sun, 05 Jun 2011 03:16:41 GMT
7
- Content-Length: 14172
8
- Connection: close
9
-
10
- <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
11
- "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
12
- <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
13
- <head>
14
- <meta name="application-name" content="www.cbc.ca" />
15
- <meta name="msapplication-tooltip" content="CBC.ca is Canada's Online Information Source." />
16
- <link rel="shortcut icon" type="image/ico" href="/favicon.ico" />
17
- <meta name="msapplication-starturl" content="/" />
18
- <meta name="msapplication-window" content="width=1024;height=768" />
19
- <meta name="msapplication-task" content="name=CBC;action-uri=http://www.cbc.ca/;icon-uri=/favicon.ico"/>
20
- <meta name="msapplication-task" content="name=CBC News;action-uri=http://www.cbc.ca/news;icon-uri=/favicon.ico"/>
21
- <meta name="msapplication-task" content="name=CBC Sports;action-uri=http://www.cbc.ca/sports;icon-uri=/favicon.ico"/>
22
- <meta name="msapplication-task" content="name=CBC Radio;action-uri=http://www.cbc.ca/radio;icon-uri=/favicon.ico"/>
23
- <meta name="msapplication-task" content="name=CBC Television;action-uri=http://www.cbc.ca/television;icon-uri=/favicon.ico"/>
24
- <script type="text/javascript" src="/g/i/global.js" id="yuiglobalnode"></script>
25
- <script type="text/javascript" src="/g/i/loader.js"></script>
26
-
27
- <!-- START INTERCEPTUM -->
28
- <style type="text/css">
29
- <!--
30
- .intercept_link { color: white; }
31
- .intercept_container { color: white; background-color: #115278; font-size: 17px; }
32
- .intercept_window { border-style: solid; border-width: 1px; border-color: #000000; background-color: #FFFFFF; width: 690px; padding: 5px; border-radius: 5px; -moz-border-radius: 5px; -moz-box-shadow: 0 7px 10px #262626; }
33
- -->
34
- </style>
35
- <!-- END INTERCEPTUM -->
36
-
37
- <meta http-equiv="content-type" content="text/html; charset=iso-8859-1" />
38
- <title>Sorry - we can't find that page</title>
39
-
40
- <meta http-equiv="refresh" content="45; url=/sitemap/">
41
-
42
- <link rel="stylesheet" href="/includes/css/error.css" type="text/css" />
43
- <script language="javascript">
44
- advertising_zone = "error";
45
- </script>
46
- </head>
47
- <body>
48
- <script type="text/javascript" src="/g/stats/cbc_sitecatalyst.js"></script>
49
- <script type="text/javascript" src="/g/stats/sccore.js"></script>
50
- <script type="text/javascript" src="/g/stats/linktracker.js"></script>
51
-
52
- <div id="accessibilitylinks">
53
- <h2>Accessibility Links</h2>
54
- <ul>
55
- <li><a href="#content" id="skipnav" title="skip to main content">Skip to main content</a></li>
56
-
57
- <li><a href="/accessibility/" title="skip to cbc accessibility page">Skip to CBC accessibility page</a></li>
58
- </ul>
59
- </div>
60
- <div id="gnwrap">
61
- <div id="gnadww" class="clearfix">
62
- <div id="gnweather">&nbsp;</div>
63
-
64
- <div id="masthead-ad" class="ad-728x90">
65
- <script type="text/javascript" src="/includes/ads/masthead_ads.js"></script>
66
- <script type="text/javascript">
67
- /* <[![CDATA */
68
-
69
- Ads.defaultAdVars();
70
-
71
- try {
72
- if(window.top !== window.self) {
73
- Ads.iframeSrcParse();
74
- }
75
- } catch(e) {}
76
- Ads.displayAd();
77
- /* ]]> */
78
- </script>
79
- <noscript><a href="http://ad.doubleclick.net/ad/cbc.ca/nozone/;pos=topleader;dcopt=ist;tile=1;sz=728x90;page="story";section="null";category="null";ord=123456789?" target="_blank"><img src="http://ad.doubleclick.net/ad/cbc.ca/nozone/;dcopt=ist;tile=1;sz=728x90;page="story";section="null";category="null";ord=123456789?" width="728" height="90" border="0" alt="Advertisment" /></a></noscript>
80
- </div>
81
-
82
-
83
- </div>
84
- <div id="gn" class="v10">
85
- <h2>CBC Global Header Navigation</h2>
86
- <div id="gnav">
87
- <ul id="gnavl">
88
- <li id="gnhome"><a href="http://www.cbc.ca" title="CBC.ca Home Page" target="_top"><span>CBC.ca</span></a></li>
89
- <li id="gnnews" class="btn">
90
- <a class="em" href="http://www.cbc.ca/news" target="_top">News</a>
91
- <a id="gnnewsdd" class="caret" href="http://www.cbc.ca/news" target="_top">news drop down menu</a>
92
- </li>
93
- <li id="gnsports" class="btn">
94
- <a class="em" href="http://www.cbc.ca/sports" target="_top">Sports</a>
95
- <a id="gnsportsdd" class="caret" href="http://www.cbc.ca/sports" target="_top">sports drop down menu</a>
96
- </li>
97
- <li id="gnradio" class="btn">
98
- <a class="em" href="http://www.cbc.ca/radio" target="_top">Radio</a>
99
- <a id="gnradiodd" class="caret" href="http://www.cbc.ca/radio" target="_top">radio drop down menu</a>
100
- </li>
101
- <li id="gntv" class="btn">
102
- <a class="em" href="http://www.cbc.ca/television" target="_top">TV</a>
103
- <a id="gntvdd" class="caret" href="http://www.cbc.ca/television" target="_top">tv drop down menu</a>
104
- </li>
105
- <li id="gnmyr" class="btn lnk">
106
- <a id="gnmyrem" class="em" href="http://www.cbc.ca/canada" target="_top">My Region <em>drop down menu</em></a>
107
- <span id="gnmyrdd" class="caret">&nbsp;</span>
108
- </li>
109
- <li id="gnmore" class="btn lnk">
110
- <a id="gnmoreem" href="http://www.cbc.ca/help/sitemap.html" class="em" target="_top">More <em>drop down menu</em></a>
111
- <span id="gnmoredd" class="caret">&nbsp;</span>
112
- </li>
113
- <li id="gnwatch" class="btn lnk wl">
114
- <a id="gnwatchem" href="http://www.cbc.ca/video" class="em" target="_top">Watch <em>drop down menu</em></a>
115
- <span id="gnwatchdd" class="caret">&nbsp;</span>
116
- </li>
117
- <li id="gnlisten" class="btn lnk wl">
118
- <a id="gnlistenem" href="http://www.cbc.ca/listen" class="em" target="_top">Listen <em>drop down menu</em></a>
119
- <span id="gnlistendd" class="caret">&nbsp;</span>
120
- </li>
121
- </ul>
122
- <form name="gnsearch" action="http://www.cbc.ca/search/cbc" accept-charset="utf-8" method="GET" id="gnsrch" target="_top">
123
- <input type="hidden" name="ie" value="utf8" />
124
- <input type="hidden" name="site" value="CBC" />
125
- <input type="hidden" name="output" value="xml_no_dtd" />
126
- <input type="hidden" name="getfields" value="description" />
127
- <input type="hidden" name="oe" value="utf8" />
128
- <input type="hidden" name="safe" value="high" />
129
- <label for="q">Search CBC.ca</label>
130
- <input type="text" name="q" value="" id="gnq" />
131
- <label for="s">Submit Search</label>
132
- <input type="submit" name="s" id="gns" value="" title="Search"/></form>
133
- <ul id="gnlogin">
134
- <li class="btn"><a id="gnsignupmodal" href="http://www.cbc.ca/membercentre/SignUp.aspx" target="_blank">Sign Up</a></li>
135
- <li class="btn last"><a id="gnloginmodal" href="https://sso.cbc.ca/SSOAuthenticationDomain.ashx?mode=login&redirecturl=http://www.cbc.ca/" target="_top">Log In</a></li>
136
- </ul>
137
- </div>
138
- <div id="dropzone">&nbsp;</div>
139
- </div>
140
-
141
- </div>
142
- <script type="text/javascript">
143
- if (!_CBC_MODULES.modules.cbc_globalnav) _CBC_MODULES.modules.cbc_globalnav = { type:"js", fullpath:"/i/o/globalnav/v10/globalnav-min.js", requires: ['cbc_core', 'node', 'event'] };
144
- if (!_CBC_MODULES.modules.cbc_globalnav_menu_style) _CBC_MODULES.modules.cbc_globalnav_menu_style = { type:"css", fullpath:"/i/o/globalnav/v10/css/dropdown.css" };
145
- YUI(_CBC_MODULES).use('cbc_globalnav', function(Y, result){
146
- if (result.success){
147
- CBC.namespace("CBC.APP").globalnav = new CBC.APP.Globalnav();
148
- var params = {};
149
-
150
- CBC.APP.globalnav.init(Y, params);
151
- CBC.APP.Instances.add("globalnav",CBC.APP.globalnav);
152
- }
153
- });
154
- </script>
155
- <div id="body">
156
- <div id="zonebar">
157
- <div id="zone">
158
- <a href="/help/sitemap.html" title="CBC Site Map"><img src="/includes/gfx/cbc-logo.gif" alt="CBC.ca"/></a>
159
- </div>
160
- </div>
161
- <div id="content" class="clearfix">
162
- <div id="full" class="module clearfix">
163
-
164
- <h2 class="modhead">Sorry, we can't find the page you requested. </h2>
165
- <ol>
166
- <li>Please check the URL in the address bar, or ...</li>
167
- <li>Use the navigation links at left to explore our site, or ...</li>
168
- <li>Enter a term in the Quick Search box at top, or ...</li>
169
- <li>Visit our <a href="/sitemap/">site map </a>page</li>
170
- </ol>
171
- <p>In a few moments, you will be taken to our site map page, which will help you find what you looking for.</p>
172
-
173
- </div>
174
- <div id="footer" class="v10">
175
- <h2>CBC Global Footer Navigation</h2>
176
- <div id="ftr-ptls" class="clearfix">
177
- <div class="main">
178
- <h3>CBC.ca</h3>
179
- <ul>
180
- <!--<li><a target="_top" href="#">CBC Media Player</a></li>-->
181
- <li><a target="_top" href="http://www.cbc.ca/aboriginal/">Aboriginal</a></li>
182
- <li><a target="_top" href="http://www.cbc.ca/books/">Books</a></li>
183
- <li><a target="_top" href="http://www.cbc.ca/contests/">Contests</a></li>
184
- <li><a target="_top" href="http://archives.cbc.ca/">Digital Archives</a></li>
185
- <li><a target="_top" href="http://www.cbc.ca/documentaries/">Documentaries</a></li>
186
- <li><a target="_top" href="http://www.cbc.ca/kids/">Kids</a></li>
187
- <li><a target="_top" href="http://www.cbc.ca/kidscbc/">Kids' CBC Preschool</a></li>
188
- </ul>
189
- <ul>
190
- <li><a target="_top" href="http://www.kidscbcwonderworld.ca/">Kids' CBC Wonder World</a></li>
191
- <li><a target="_top" href="http://www.cbc.ca/news/">News</a></li>
192
- <li><a target="_top" href="http://www.cbc.ca/parents/">Parents</a></li>
193
- <li><a target="_top" href="http://www.cbc.ca/programguide/">Program Guide</a></li>
194
- <li><a target="_top" href="http://www.cbc.ca/radio/">Radio</a></li>
195
- <li><a target="_top" href="http://www.cbc.ca/sports/">Sports</a></li>
196
- <li><a target="_top" href="http://www.cbc.ca/television/">Television</a></li>
197
- </ul>
198
- <ul>
199
- <li><a target="_top" href="https://membercentre.cbc.ca/">CBC Member Centre</a></li>
200
- <li><a target="_top" href="http://www.cbc.ca/video/">CBC Player</a></li>
201
- <li><a target="_top" href="http://www.cbc.ca/shop/">CBC Shop</a></li>
202
- </ul>
203
- </div>
204
- <div class="main corp">
205
- <h3>Corporate</h3>
206
- <ul>
207
- <li><a target="_top" href="http://www.cbc.radio-canada.ca/">About CBC</a></li>
208
- <li><a target="_top" href="http://cbc.radio-canada.ca/jobs/">Jobs</a></li>
209
- <li><a target="_top" href="http://cbc.radio-canada.ca/facilities/toronto">Visit the Canadian Broadcasting Centre</a></li>
210
- <li><a target="_top" href="http://www.cbc.ca/productionfacilities/">Production Facilities</a></li>
211
- <li><a target="_top" href="http://cbcmobileproductions.ca/">Mobile Production Rentals</a></li>
212
- <li><a target="_top" href="http://www.cbc.ca/ombudsman/">Ombudsman</a></li>
213
- <li><a target="_top" href="http://cbc.radio-canada.ca/media/">CBC: Get the Facts</a></li>
214
- </ul>
215
- <ul>
216
- <li><a target="_top" href="http://www.cbc.ca/independentproducers/">Independent Producers</a></li>
217
- <li><a target="_top" href="http://www.cbc.ca/programsales/">Program and Content Sales</a></li>
218
- <li><a target="_top" href="http://www.cbc.ca/archivesales/">Archive Sales</a></li>
219
- <li><a target="_top" href="http://www.cbclearning.ca/">Educational Sales</a></li>
220
- <li><a target="_top" href="http://www.cbc.ca/services/tapes_tr.html">Tapes, Transcripts and Image Assets</a></li>
221
- <li><a target="_top" href="http://www.cbc.radio-canada.ca/dtv/">Digital TV</a></li>
222
- </ul>
223
- </div>
224
- </div>
225
- <div id="ftr-connect" class="clearfix">
226
- <h3>Stay Connected</h3>
227
- <ul>
228
- <li><a target="_top" href="http://www.cbc.ca/mobile/services/">Mobile</a></li>
229
- <li><a target="_top" href="http://www.cbc.ca/rss/">RSS</a></li>
230
- <li><a target="_top" href="http://www.cbc.ca/podcasting/">Podcasts</a></li>
231
- <!--<li><a target="_top" href="http://twitter.com/cbc">Twitter</a></li>-->
232
- <li class="last"><span>Member Services:</span><a target="_top" href="https://membercentre.cbc.ca/CurrentSubscriptions.aspx">Newsletters &amp; Alerts</a></li>
233
- <!--<li class="last"><a target="_top" href="#">More CBC Tools &amp; Services</a></li>-->
234
- </ul>
235
- </div>
236
- <div id="ftr-core" class="clearfix">
237
- <h3>CBC Links</h3>
238
- <ul class="terms clearfix">
239
- <li><a target="_top" href="http://www.cbc.ca/aboutcbc/discover/termsofuse.html">Terms Of Use</a></li>
240
- <li><a target="_top" href="http://www.cbc.ca/permissions/">Reuse &amp; Permissions</a></li>
241
- <li><a target="_top" href="http://www.cbcmediasales.ca/">Advertise</a></li>
242
- <li><a target="_top" href="http://www.cbc.ca/aboutcbc/discover/privacy.html">Privacy</a></li>
243
- <!--<li><a target="_top" href="#">Accessibility</a></li>-->
244
- <li><a target="_top" href="http://www.cbc.ca/sitemap/">Site Map</a></li>
245
- <li><a target="_top" href="http://www.cbc.ca/contact/">Contact Us</a></li>
246
- </ul>
247
- <a id="ftr-cbcrc" target="_top" href="http://www.cbc.radio-canada.ca/">CBC Radio-Canada</a>
248
- <div id="ftr-end" class="clearfix">
249
- <span>Copyright &copy; CBC 2011</span>
250
- <ul class="affs">
251
- <li><a target="_top" href="http://www.cbc.radio-canada.ca/">cbc.radio-canada.ca</a></li>
252
- <li><a target="_top" href="http://www.cbc.ca/">cbc.ca</a></li>
253
- <li><a target="_top" href="http://www.radio-canada.ca/">radio-canada.ca</a></li>
254
- </ul>
255
- </div>
256
- </div>
257
- </div>
258
-
259
- </div>
260
- </div>
261
-
262
- <script type="text/javascript">
263
- //<![CDATA[
264
- try{
265
- if(!CBC) { var CBC = {}; }
266
- if(!CBC.APP) { CBC.APP = {}; }
267
- if(!CBC.APP.SC) { CBC.APP.SC = {}; }
268
-
269
- var pageUrl = window.location.href.replace(/https*:\/\//,'');
270
-
271
- CBC.APP.SC.QueryString = "contentarea=404&amp;contenttype=error&amp;subsection1=" + pageUrl
272
-
273
- }catch(e){
274
- }
275
- //]]>
276
- </script>
277
-
278
- <script type="text/javascript" src="/g/stats/pagetracker.js"></script>
279
- <!-- START INTERCEPTUM -->
280
- <script type="text/javascript" src="/g/i/intercept.js"></script>
281
- <script type="text/javascript">
282
- YUI(_CBC_LOADER).use('node',function(Y,result) {
283
- if(result.success) {
284
- Y.on('domready',function() {
285
- try {
286
- InterceptInitializer.loadInterceptScript( );
287
- } catch ( e ) {}
288
- })
289
- }
290
- });
291
- </script>
292
- <!-- END INTERCEPTUM -->
293
-
294
- <script type="text/javascript">
295
- if (typeof COMSCORE == 'undefined') {
296
- YUI(_CBC_MODULES).use('comscore', function(Y,result) {
297
- if (result.success) {
298
- if (typeof advertising_zone != 'string')
299
- var advertising_zone = '';
300
- COMSCORE.beacon({c1:2,c2:3005684,c3:"",c4:escape(window.location.href),c5:"CBC.ca-CanadianNewsSportsEntertainmentKidsDocsRadioTV",c6:advertising_zone,c7:escape(window.location.href),c8:escape(document.title),c9:escape(document.referrer),c15:""});
301
- }
302
- });
303
- }
304
- </script>
305
- <!-- <noscript><img src="http://b.scorecardresearch.com/p?c1=2&c2=3005684&c3=&c4=cbc.ca&c5=CanadianNewsSportsEntertainmentKidsDocsRadioTV&c6=&c15=&cj=1" alt=""/></noscript> -->
306
-
307
-
308
- </body>
309
- </html>
7
+ Vary: Accept-Encoding
8
+ Cache-Control: max-age=27
9
+ Expires: Wed, 07 Mar 2012 17:13:12 GMT
10
+ Date: Wed, 07 Mar 2012 17:12:45 GMT
11
+ Connection: keep-alive
@@ -1,12 +1,14 @@
1
1
  require File.expand_path(File.dirname(__FILE__) + '/spec_helper')
2
2
 
3
3
  class GovKit::CA::PostalCode::Strategy::GreenPartyCa
4
- describe GovKit::CA::PostalCode::Strategy::GreenPartyCa do
4
+ describe GovKit::CA::PostalCode::Strategy::GreenPartyCa, broken: true do
5
5
  describe '#electoral_districts' do
6
6
  before :all do
7
7
  %w(G0C2Y0 T5S2B9 K0A1K0 H0H0H0 X1B1B1).each do |postal_code|
8
8
  strategy = GovKit::CA::PostalCode::Strategy::GreenPartyCa.new(postal_code)
9
- FakeWeb.register_uri strategy.class.http_method, "#{strategy.class.base_uri}#{strategy.send(:path)}", :response => fixture_path('greenparty_ca', "#{postal_code}.response")
9
+ unless FakeWeb.allow_net_connect?
10
+ FakeWeb.register_uri strategy.class.http_method, "#{strategy.class.base_uri}#{strategy.send(:path)}", :response => fixture_path('greenparty_ca', "#{postal_code}.response")
11
+ end
10
12
  end
11
13
  end
12
14
 
@@ -7,14 +7,16 @@ class GovKit::CA::PostalCode::Strategy::LiberalCa
7
7
  before :all do
8
8
  %w(G0C2Y0 T5S2B9 K0A1K0 H0H0H0 X1B1B1).each do |postal_code|
9
9
  strategy = GovKit::CA::PostalCode::Strategy::LiberalCa.new(postal_code)
10
- FakeWeb.register_uri strategy.class.http_method, "#{strategy.class.base_uri}#{strategy.send(:path)}", :response => fixture_path('liberal_ca', "#{postal_code}.response")
10
+ unless FakeWeb.allow_net_connect?
11
+ FakeWeb.register_uri strategy.class.http_method, "#{strategy.class.base_uri}#{strategy.send(:path)}", :response => fixture_path('liberal_ca', "#{postal_code}.response")
12
+ end
11
13
  end
12
14
  end
13
15
 
14
16
  it 'should return the electoral districts within a postal code' do
15
17
  { 'G0C2Y0' => [24019], # this postal code intermittently fails
16
- 'T5S2B9' => [48015, 48017], # differs from elections.ca, ndp.ca, greenparty.ca
17
- 'K0A1K0' => [35012, 35025, 35040, 35052, 35063, 35064, 35087],
18
+ 'T5S2B9' => [48015], # differs from cbc.ca
19
+ 'K0A1K0' => [35025, 35052, 35063], # differs from cbc.ca
18
20
  }.each do |postal_code,electoral_districts|
19
21
  GovKit::CA::PostalCode::Strategy::LiberalCa.new(postal_code).electoral_districts.should == electoral_districts
20
22
  end
data/spec/ndp_ca_spec.rb CHANGED
@@ -6,7 +6,9 @@ class GovKit::CA::PostalCode::Strategy::NDPCa
6
6
  before :all do
7
7
  %w(G0C2Y0 T5S2B9 K0A1K0 H0H0H0 X1B1B1).each do |postal_code|
8
8
  strategy = GovKit::CA::PostalCode::Strategy::NDPCa.new(postal_code)
9
- FakeWeb.register_uri strategy.class.http_method, "#{strategy.class.base_uri}#{strategy.send(:path)}", :response => fixture_path('ndp_ca', "#{postal_code}.response")
9
+ unless FakeWeb.allow_net_connect?
10
+ FakeWeb.register_uri strategy.class.http_method, "#{strategy.class.base_uri}#{strategy.send(:path)}", :response => fixture_path('ndp_ca', "#{postal_code}.response")
11
+ end
10
12
  end
11
13
  end
12
14
 
@@ -37,14 +37,16 @@ module GovKit::CA::PostalCode
37
37
  }.each do |const,path|
38
38
  %w(A1A1A1 K0A1K0 H0H0H0).each do |postal_code|
39
39
  strategy = GovKit::CA::PostalCode::Strategy.const_get(const).new(postal_code)
40
- FakeWeb.register_uri strategy.class.http_method, "#{strategy.class.base_uri}#{strategy.send(:path)}", :response => fixture_path(path, "#{postal_code}.response")
40
+ unless FakeWeb.allow_net_connect?
41
+ FakeWeb.register_uri strategy.class.http_method, "#{strategy.class.base_uri}#{strategy.send(:path)}", :response => fixture_path(path, "#{postal_code}.response")
42
+ end
41
43
  end
42
44
  end
43
45
  end
44
46
 
45
47
  it 'should return the electoral districts within a postal code' do
46
48
  { 'A1A1A1' => [10007],
47
- 'K0A1K0' => [35012, 35025, 35040, 35052, 35063, 35064, 35087],
49
+ 'K0A1K0' => [35025, 35052, 35063, 35064],
48
50
  }.each do |postal_code,electoral_districts|
49
51
  subject.find_electoral_districts_by_postal_code(postal_code).should == electoral_districts
50
52
  end
data/spec/spec_helper.rb CHANGED
@@ -3,7 +3,7 @@ require 'rspec'
3
3
  require 'fakeweb'
4
4
  require File.dirname(__FILE__) + '/../lib/gov_kit-ca'
5
5
 
6
- FakeWeb.allow_net_connect = false
6
+ FakeWeb.allow_net_connect = true
7
7
 
8
8
  module Helpers
9
9
  def fixture_path(*args)
@@ -13,4 +13,5 @@ end
13
13
 
14
14
  RSpec.configure do |config|
15
15
  config.include Helpers
16
+ config.filter_run_excluding broken: true
16
17
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: govkit-ca
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.3
4
+ version: 0.0.4
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,11 +9,11 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2011-09-07 00:00:00.000000000Z
12
+ date: 2012-03-07 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: httparty
16
- requirement: &70168055271360 !ruby/object:Gem::Requirement
16
+ requirement: &70228256054740 !ruby/object:Gem::Requirement
17
17
  none: false
18
18
  requirements:
19
19
  - - ~>
@@ -21,10 +21,10 @@ dependencies:
21
21
  version: 0.7.8
22
22
  type: :runtime
23
23
  prerelease: false
24
- version_requirements: *70168055271360
24
+ version_requirements: *70228256054740
25
25
  - !ruby/object:Gem::Dependency
26
26
  name: nokogiri
27
- requirement: &70168055270320 !ruby/object:Gem::Requirement
27
+ requirement: &70228256041840 !ruby/object:Gem::Requirement
28
28
  none: false
29
29
  requirements:
30
30
  - - ~>
@@ -32,10 +32,10 @@ dependencies:
32
32
  version: 1.5.0
33
33
  type: :runtime
34
34
  prerelease: false
35
- version_requirements: *70168055270320
35
+ version_requirements: *70228256041840
36
36
  - !ruby/object:Gem::Dependency
37
37
  name: yajl-ruby
38
- requirement: &70168055269100 !ruby/object:Gem::Requirement
38
+ requirement: &70228256040260 !ruby/object:Gem::Requirement
39
39
  none: false
40
40
  requirements:
41
41
  - - ~>
@@ -43,10 +43,10 @@ dependencies:
43
43
  version: 0.8.2
44
44
  type: :runtime
45
45
  prerelease: false
46
- version_requirements: *70168055269100
46
+ version_requirements: *70228256040260
47
47
  - !ruby/object:Gem::Dependency
48
48
  name: rspec
49
- requirement: &70168055267600 !ruby/object:Gem::Requirement
49
+ requirement: &70228256037360 !ruby/object:Gem::Requirement
50
50
  none: false
51
51
  requirements:
52
52
  - - ~>
@@ -54,10 +54,10 @@ dependencies:
54
54
  version: 2.6.0
55
55
  type: :development
56
56
  prerelease: false
57
- version_requirements: *70168055267600
57
+ version_requirements: *70228256037360
58
58
  - !ruby/object:Gem::Dependency
59
59
  name: fakeweb
60
- requirement: &70168055247900 !ruby/object:Gem::Requirement
60
+ requirement: &70228256015680 !ruby/object:Gem::Requirement
61
61
  none: false
62
62
  requirements:
63
63
  - - ~>
@@ -65,7 +65,7 @@ dependencies:
65
65
  version: 1.3.0
66
66
  type: :development
67
67
  prerelease: false
68
- version_requirements: *70168055247900
68
+ version_requirements: *70228256015680
69
69
  description: GovKit-CA lets you quickly get encapsulated Ruby objects for Canadian
70
70
  civic data.
71
71
  email:
@@ -176,7 +176,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
176
176
  version: '0'
177
177
  requirements: []
178
178
  rubyforge_project: govkit-ca
179
- rubygems_version: 1.8.6
179
+ rubygems_version: 1.8.12
180
180
  signing_key:
181
181
  specification_version: 3
182
182
  summary: Easy access to Canadian civic data around the web