collect_plus 0.0.1

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.
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA1:
3
+ metadata.gz: f7dfb0d5003c1aef08e28138a106f6b295d467ae
4
+ data.tar.gz: 1edb4ba769f497b7d3a7f0a06149fca8ebfb079c
5
+ SHA512:
6
+ metadata.gz: beef37a6c29fce4a0a1a59bb0f39810233a2d650dd32854193d5a549780b7119017df02bff20335a5b4c79394717f2d291ac3779e1485793aff577856e068298
7
+ data.tar.gz: 7cddec00c1da53da17bca5bff6d3e831f39297d26dba2a1dba9c0d86ea33acceec657a993c3fb18a948c9e57ce188e7b9fc35c8d9a1e30c3620d6e12abeb8cc9
@@ -0,0 +1,23 @@
1
+ *.gem
2
+ *.rbc
3
+ .bundle
4
+ .config
5
+ .yardoc
6
+ Gemfile.lock
7
+ InstalledFiles
8
+ _yardoc
9
+ coverage
10
+ doc/
11
+ lib/bundler/man
12
+ pkg
13
+ rdoc
14
+ spec/reports
15
+ test/tmp
16
+ test/version_tmp
17
+ tmp
18
+ *.bundle
19
+ *.so
20
+ *.o
21
+ *.a
22
+ mkmf.log
23
+ .DS_Store
data/Gemfile ADDED
@@ -0,0 +1,4 @@
1
+ source 'https://rubygems.org'
2
+
3
+ # Specify your gem's dependencies in collect_plus.gemspec
4
+ gemspec
@@ -0,0 +1,22 @@
1
+ Copyright (c) 2014 Alessandro
2
+
3
+ MIT License
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining
6
+ a copy of this software and associated documentation files (the
7
+ "Software"), to deal in the Software without restriction, including
8
+ without limitation the rights to use, copy, modify, merge, publish,
9
+ distribute, sublicense, and/or sell copies of the Software, and to
10
+ permit persons to whom the Software is furnished to do so, subject to
11
+ the following conditions:
12
+
13
+ The above copyright notice and this permission notice shall be
14
+ included in all copies or substantial portions of the Software.
15
+
16
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
17
+ EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
18
+ MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
19
+ NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
20
+ LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
21
+ OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
22
+ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
@@ -0,0 +1,63 @@
1
+ # CollectPlus
2
+
3
+ A simple gem to retrieve the status of parcels sent via [CollectPlus](http://collectplus.co.uk).
4
+
5
+ ## Installation
6
+
7
+ Add this line to your application's Gemfile:
8
+
9
+ gem 'collect_plus'
10
+
11
+ And then execute:
12
+
13
+ $ bundle
14
+
15
+ Or install it yourself as:
16
+
17
+ $ gem install collect_plus
18
+
19
+ ## Usage
20
+
21
+ ``` ruby
22
+ # Initialise a new CollectPlus::Tracker by passing in the tracking number
23
+ tracker = CollectPlus::Tracker.new("ABC123")
24
+
25
+ # Get the current tracking status
26
+ tracker.current_status
27
+ => "Despatched from LONDON DEPOT - 15:58, Mon, 07 Jul 2014"
28
+
29
+ # Get previous tracking statuses
30
+ # Returns an array of status strings
31
+ tracker.status_history
32
+ => ["Loaded onto VAN - 06:35, Wed, 09 Jul 2014",
33
+ "Processed at National Hub - 11:45, Tue, 08 Jul 2014",
34
+ "Processed at National Hub - 11:39, Tue, 08 Jul 2014",
35
+ "Despatched from LONDON DEPOT - 15:58, Mon, 07 Jul 2014",
36
+ "Parcel collected - 11:46, Mon, 07 Jul 2014",
37
+ "Received at SPAR, LDN - 08:21, Mon, 07 Jul 2014",
38
+ "Delivery booked - 13:25, Sun, 06 Jul 2014"]
39
+
40
+ # Get a print-friendly summary of all tracking statues so far
41
+ puts tracker.status_summary
42
+ => CURRENT STATUS
43
+ Loaded onto VAN - 06:35, Wed, 09 Jul 2014
44
+
45
+ STATUS HISTORY
46
+ Processed at National Hub - 11:45, Tue, 08 Jul 2014
47
+
48
+ Processed at National Hub - 11:39, Tue, 08 Jul 2014
49
+
50
+ Despatched from LONDON DEPOT - 15:58, Mon, 07 Jul 2014
51
+
52
+ Parcel collected - 11:46, Mon, 07 Jul 2014
53
+
54
+ Received at SPAR, LDN - 08:21, Mon, 07 Jul 2014
55
+
56
+ Delivery booked - 13:25, Sun, 06 Jul 2014
57
+
58
+ # Update tracking info
59
+ tracker.track
60
+ tracker.current_status
61
+ => "Delivered to Customer at 11:14, Wed, 09 Jul 2014"
62
+ ```
63
+
@@ -0,0 +1,8 @@
1
+ require "bundler/gem_tasks"
2
+
3
+ require "rspec/core/rake_task"
4
+
5
+ RSpec::Core::RakeTask.new
6
+
7
+ task :default => :spec
8
+ task :test => :spec
@@ -0,0 +1,28 @@
1
+ # coding: utf-8
2
+ lib = File.expand_path('../lib', __FILE__)
3
+ $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
4
+ require 'collect_plus/version'
5
+
6
+ Gem::Specification.new do |spec|
7
+ spec.name = "collect_plus"
8
+ spec.version = CollectPlus::VERSION
9
+ spec.authors = ["Alessandro"]
10
+ spec.email = ["hello@alessndro.co.uk"]
11
+ spec.summary = %q{Track parcels sent via CollectPlus}
12
+ spec.description = %q{Track parcels sent via CollectPlus}
13
+ spec.homepage = "https://github.com/alssndro/collect_plus"
14
+ spec.license = "MIT"
15
+
16
+ spec.files = `git ls-files -z`.split("\x0")
17
+ spec.executables = spec.files.grep(%r{^bin/}) { |f| File.basename(f) }
18
+ spec.test_files = spec.files.grep(%r{^(test|spec|features)/})
19
+ spec.require_paths = ["lib"]
20
+
21
+ spec.add_development_dependency "bundler", "~> 1.6"
22
+ spec.add_development_dependency "rake"
23
+ spec.add_development_dependency "rspec"
24
+ spec.add_development_dependency "webmock"
25
+ spec.add_development_dependency "pry"
26
+
27
+ spec.add_runtime_dependency "nokogiri"
28
+ end
@@ -0,0 +1,5 @@
1
+ require "collect_plus/version"
2
+ require 'collect_plus/tracker'
3
+
4
+ module CollectPlus
5
+ end
@@ -0,0 +1,47 @@
1
+ require 'open-uri'
2
+ require 'nokogiri'
3
+
4
+ module CollectPlus
5
+ class Tracker
6
+ attr_accessor :tracking_no
7
+
8
+ def initialize(tracking_no)
9
+ @tracking_no = tracking_no
10
+ track
11
+ end
12
+
13
+ # Retrieves the HTML page that contains tracking info,
14
+ # ready for parsing
15
+ def track
16
+ # Only need to extract the fragment of HTML that contains the tracking info
17
+ @html_doc = Nokogiri::HTML(open("https://www.collectplus.co.uk/track/#{@tracking_no}")) { |config| config.nonet }.at_css("#left_pane")
18
+ end
19
+
20
+ def current_status
21
+ # Parse the status info from the appropriate HTML element, if it exists
22
+ # If not, parse the error message from the HTML and return it instead
23
+ if status_node = @html_doc.at_css(".current_tracking_status")
24
+ status_node.text.gsub(/\n/, " ").strip
25
+ else
26
+ @html_doc.at_css(".tracking_events").text.gsub(/\n/, " ").strip
27
+ end
28
+ end
29
+
30
+ def status_history
31
+ # Parse the list of statuses from the appropriate HTML element, if it exists
32
+ # If not, parse the error message from the HTML and return it instead
33
+ if status_list = @html_doc.css(".tracking_events > li")
34
+ status_list.map do |status|
35
+ status.css("span").map(&:text).join(" - ")
36
+ end
37
+ else
38
+ @html_doc.at_css(".tracking_events").text.gsub(/\n/, " ").strip
39
+ end
40
+ end
41
+
42
+ def status_summary
43
+ summary = "CURRENT STATUS\n" << current_status << "\n\nSTATUS HISTORY\n"
44
+ summary << status_history.join("\n\n")
45
+ end
46
+ end
47
+ end
@@ -0,0 +1,3 @@
1
+ module CollectPlus
2
+ VERSION = "0.0.1"
3
+ end
@@ -0,0 +1,8 @@
1
+ require 'collect_plus'
2
+
3
+ require 'rspec'
4
+ require 'webmock/rspec'
5
+
6
+ RSpec.configure do |config|
7
+ WebMock.disable_net_connect!(allow_localhost: true)
8
+ end
@@ -0,0 +1,322 @@
1
+ <!DOCTYPE html>
2
+ <html lang='en' xml:lang='en' xmlns='http://www.w3.org/1999/xhtml'>
3
+ <head>
4
+ <meta content='text/html; charset=UTF-8' http-equiv='content-type'>
5
+ <meta content='Tracking your parcels with CollectPlus is easy. Online tracking on all parcels, coverage up to £50 free.' name='description'>
6
+ <meta content='CollectPlus , Send parcels, Return parcels to retailers, 5500 CollectPlus shops, nationwide, online tracking, compensation cover included,7 days a week, Collect Plus,Marketplaces,Ebay,Amazon,Local Shops, Open till late' name='keywords'>
7
+ <meta content='IE=EmulateIE8; charset=UTF-8' http-equiv='X-UA-Compatible'>
8
+ <script type="text/javascript">window.NREUM||(NREUM={});NREUM.info={"beacon":"beacon-1.newrelic.com","errorBeacon":"bam.nr-data.net","licenseKey":"29a2f924e8","applicationID":"450344","transactionName":"d19YRURcCl9QQB5CAEZTU11pRxRSVllUQBIbQ15eQQ==","queueTime":0,"applicationTime":50,"ttGuid":"","agentToken":null,"agent":"js-agent.newrelic.com/nr-411.min.js"}</script>
9
+ <script type="text/javascript">(window.NREUM||(NREUM={})).loader_config={xpid:"UwcOU1VADAYAV1VW"};window.NREUM||(NREUM={}),__nr_require=function(t,e,n){function r(n){if(!e[n]){var o=e[n]={exports:{}};t[n][0].call(o.exports,function(e){var o=t[n][1][e];return r(o?o:e)},o,o.exports)}return e[n].exports}if("function"==typeof __nr_require)return __nr_require;for(var o=0;o<n.length;o++)r(n[o]);return r}({1:[function(t,e){function n(t,e,n){n||(n={});for(var r=o[t],a=r&&r.length||0,s=n[i]||(n[i]={}),u=0;a>u;u++)r[u].apply(s,e);return s}function r(t,e){var n=o[t]||(o[t]=[]);n.push(e)}var o={},i="nr@context";e.exports={on:r,emit:n}},{}],2:[function(t){function e(t,e,n,i,s){return u?u-=1:r("err",[s||new UncaughtException(t,e,n)]),"function"==typeof a?a.apply(this,o(arguments)):!1}function UncaughtException(t,e,n){this.message=t||"Uncaught error with no additional information",this.sourceURL=e,this.line=n}function n(t){r("err",[t,(new Date).getTime()])}var r=t("handle"),o=t(6),i=t(5),a=window.onerror,s=!1,u=0;t("loader").features.push("err"),window.onerror=e,NREUM.noticeError=n;try{throw new Error}catch(d){"stack"in d&&(t(1),t(2),"addEventListener"in window&&t(3),window.XMLHttpRequest&&XMLHttpRequest.prototype&&XMLHttpRequest.prototype.addEventListener&&t(4),s=!0)}i.on("fn-start",function(){s&&(u+=1)}),i.on("fn-err",function(t,e,r){s&&(this.thrown=!0,n(r))}),i.on("fn-end",function(){s&&!this.thrown&&u>0&&(u-=1)}),i.on("internal-error",function(t){r("ierr",[t,(new Date).getTime(),!0])})},{1:5,2:4,3:3,4:6,5:1,6:14,handle:"D5DuLP",loader:"G9z0Bl"}],3:[function(t){function e(t){r.inPlace(t,["addEventListener","removeEventListener"],"-",n)}function n(t){return t[1]}var r=t(1),o=(t(3),t(2));if(e(window),"getPrototypeOf"in Object){for(var i=document;i&&!i.hasOwnProperty("addEventListener");)i=Object.getPrototypeOf(i);i&&e(i);for(var a=XMLHttpRequest.prototype;a&&!a.hasOwnProperty("addEventListener");)a=Object.getPrototypeOf(a);a&&e(a)}else XMLHttpRequest.prototype.hasOwnProperty("addEventListener")&&e(XMLHttpRequest.prototype);o.on("addEventListener-start",function(t){if(t[1]){var e=t[1];"function"==typeof e?this.wrapped=e["nr@wrapped"]?t[1]=e["nr@wrapped"]:e["nr@wrapped"]=t[1]=r(e,"fn-"):"function"==typeof e.handleEvent&&r.inPlace(e,["handleEvent"],"fn-")}}),o.on("removeEventListener-start",function(t){var e=this.wrapped;e&&(t[1]=e)})},{1:15,2:1,3:14}],4:[function(t){var e=(t(3),t(1)),n=t(2);e.inPlace(window,["requestAnimationFrame","mozRequestAnimationFrame","webkitRequestAnimationFrame","msRequestAnimationFrame"],"raf-"),n.on("raf-start",function(t){t[0]=e(t[0],"fn-")})},{1:15,2:1,3:14}],5:[function(t){function e(t){var e=t[0];"string"==typeof e&&(e=new Function(e)),t[0]=n(e,"fn-")}var n=(t(3),t(1)),r=t(2);n.inPlace(window,["setTimeout","setInterval","setImmediate"],"setTimer-"),r.on("setTimer-start",e)},{1:15,2:1,3:14}],6:[function(t){function e(){o.inPlace(this,s,"fn-")}function n(t,e){o.inPlace(e,["onreadystatechange"],"fn-")}function r(t,e){return e}var o=t(1),i=t(2),a=window.XMLHttpRequest,s=["onload","onerror","onabort","onloadstart","onloadend","onprogress","ontimeout"];window.XMLHttpRequest=function(t){var n=new a(t);try{i.emit("new-xhr",[],n),o.inPlace(n,["addEventListener","removeEventListener"],"-",function(t,e){return e}),n.addEventListener("readystatechange",e,!1)}catch(r){try{i.emit("internal-error",r)}catch(s){}}return n},window.XMLHttpRequest.prototype=a.prototype,o.inPlace(XMLHttpRequest.prototype,["open","send"],"-xhr-",r),i.on("send-xhr-start",n),i.on("open-xhr-start",n)},{1:15,2:1}],7:[function(t){function e(){function e(t){if("string"==typeof t&&t.length)return t.length;if("object"!=typeof t)return void 0;if("undefined"!=typeof ArrayBuffer&&t instanceof ArrayBuffer&&t.byteLength)return t.byteLength;if("undefined"!=typeof Blob&&t instanceof Blob&&t.size)return t.size;if("undefined"!=typeof FormData&&t instanceof FormData)return void 0;try{return JSON.stringify(t).length}catch(e){return void 0}}function n(t){var n=this.params,r=this.metrics;if(!this.ended){this.ended=!0;for(var i=0;u>i;i++)t.removeEventListener(s[i],this.listener,!1);if(!n.aborted){if(r.duration=(new Date).getTime()-this.startTime,4===t.readyState){n.status=t.status;var a=t.responseType,d="arraybuffer"===a||"blob"===a||"json"===a?t.response:t.responseText,f=e(d);if(f&&(r.rxSize=f),this.sameOrigin){var c=t.getResponseHeader("X-NewRelic-App-Data");c&&(n.cat=c.split(", ").pop())}}else n.status=0;r.cbTime=this.cbTime,o("xhr",[n,r])}}}function r(t,e){var n=i(e),r=t.params;r.host=n.hostname+":"+n.port,r.pathname=n.pathname,t.sameOrigin=n.sameOrigin}t("loader").features.push("xhr");var o=t("handle"),i=t(1),a=t(5),s=["load","error","abort","timeout"],u=s.length,d=t(2);t(3),t(4),a.on("new-xhr",function(){this.totalCbs=0,this.called=0,this.cbTime=0,this.end=n,this.ended=!1,this.xhrGuids={}}),a.on("open-xhr-start",function(t){this.params={method:t[0]},r(this,t[1]),this.metrics={}}),a.on("open-xhr-end",function(t,e){"loader_config"in NREUM&&"xpid"in NREUM.loader_config&&this.sameOrigin&&e.setRequestHeader("X-NewRelic-ID",NREUM.loader_config.xpid)}),a.on("send-xhr-start",function(t,n){var r=this.metrics,o=t[0],i=this;if(r&&o){var d=e(o);d&&(r.txSize=d)}this.startTime=(new Date).getTime(),this.listener=function(t){try{"abort"===t.type&&(i.params.aborted=!0),("load"!==t.type||i.called===i.totalCbs&&(i.onloadCalled||"function"!=typeof n.onload))&&i.end(n)}catch(e){try{a.emit("internal-error",e)}catch(r){}}};for(var f=0;u>f;f++)n.addEventListener(s[f],this.listener,!1)}),a.on("xhr-cb-time",function(t,e,n){this.cbTime+=t,e?this.onloadCalled=!0:this.called+=1,this.called!==this.totalCbs||!this.onloadCalled&&"function"==typeof n.onload||this.end(n)}),a.on("xhr-load-added",function(t,e){var n=""+d(t)+!!e;this.xhrGuids&&!this.xhrGuids[n]&&(this.xhrGuids[n]=!0,this.totalCbs+=1)}),a.on("xhr-load-removed",function(t,e){var n=""+d(t)+!!e;this.xhrGuids&&this.xhrGuids[n]&&(delete this.xhrGuids[n],this.totalCbs-=1)}),a.on("addEventListener-end",function(t,e){e instanceof XMLHttpRequest&&"load"===t[0]&&a.emit("xhr-load-added",[t[1],t[2]],e)}),a.on("removeEventListener-end",function(t,e){e instanceof XMLHttpRequest&&"load"===t[0]&&a.emit("xhr-load-removed",[t[1],t[2]],e)}),a.on("fn-start",function(t,e,n){e instanceof XMLHttpRequest&&("onload"===n&&(this.onload=!0),("load"===(t[0]&&t[0].type)||this.onload)&&(this.xhrCbStart=(new Date).getTime()))}),a.on("fn-end",function(t,e){this.xhrCbStart&&a.emit("xhr-cb-time",[(new Date).getTime()-this.xhrCbStart,this.onload,e],e)})}window.XMLHttpRequest&&XMLHttpRequest.prototype&&XMLHttpRequest.prototype.addEventListener&&!/CriOS/.test(navigator.userAgent)&&e()},{1:8,2:11,3:3,4:6,5:1,handle:"D5DuLP",loader:"G9z0Bl"}],8:[function(t,e){e.exports=function(t){var e=document.createElement("a"),n=window.location,r={};e.href=t,r.port=e.port;var o=e.href.split("://");return!r.port&&o[1]&&(r.port=o[1].split("/")[0].split(":")[1]),r.port&&"0"!==r.port||(r.port="https"===o[0]?"443":"80"),r.hostname=e.hostname||n.hostname,r.pathname=e.pathname,"/"!==r.pathname.charAt(0)&&(r.pathname="/"+r.pathname),r.sameOrigin=!e.hostname||e.hostname===document.domain&&e.port===n.port&&e.protocol===n.protocol,r}},{}],handle:[function(t,e){e.exports=t("D5DuLP")},{}],D5DuLP:[function(t,e){function n(t,e){var n=r[t];return n?n.apply(this,e):(o[t]||(o[t]=[]),void o[t].push(e))}var r={},o={};e.exports=n,n.queues=o,n.handlers=r},{}],11:[function(t,e){function n(t){if(!t||"object"!=typeof t&&"function"!=typeof t)return-1;if(t===window)return 0;if(o.call(t,"__nr"))return t.__nr;try{return Object.defineProperty(t,"__nr",{value:r,writable:!0,enumerable:!1}),r}catch(e){return t.__nr=r,r}finally{r+=1}}var r=1,o=Object.prototype.hasOwnProperty;e.exports=n},{}],loader:[function(t,e){e.exports=t("G9z0Bl")},{}],G9z0Bl:[function(t,e){function n(){var t=p.info=NREUM.info;if(t&&t.agent&&t.licenseKey&&t.applicationID&&u&&u.body){p.proto="https"===c.split(":")[0]||t.sslForHttp?"https://":"http://",a("mark",["onload",i()]);var e=u.createElement("script");e.src=p.proto+t.agent,u.body.appendChild(e)}}function r(){"complete"===u.readyState&&o()}function o(){a("mark",["domContent",i()])}function i(){return(new Date).getTime()}var a=t("handle"),s=window,u=s.document,d="addEventListener",f="attachEvent",c=(""+location).split("?")[0],p=e.exports={offset:i(),origin:c,features:[]};u[d]?(u[d]("DOMContentLoaded",o,!1),s[d]("load",n,!1)):(u[f]("onreadystatechange",r),s[f]("onload",n)),a("mark",["firstbyte",i()])},{handle:"D5DuLP"}],14:[function(t,e){function n(t,e,n){e||(e=0),"undefined"==typeof n&&(n=t?t.length:0);for(var r=-1,o=n-e||0,i=Array(0>o?0:o);++r<o;)i[r]=t[e+r];return i}e.exports=n},{}],15:[function(t,e){function n(t,e,r,s){function nrWrapper(){try{var n,a=u(arguments),d=this,f=r&&r(a,d)||{}}catch(c){i([c,"",[a,d,s],f])}o(e+"start",[a,d,s],f);try{return n=t.apply(d,a)}catch(p){throw o(e+"err",[a,d,p],f),p}finally{o(e+"end",[a,d,n],f)}}return a(t)?t:(e||(e=""),nrWrapper[n.flag]=!0,nrWrapper)}function r(t,e,r,o){r||(r="");var i,s,u,d="-"===r.charAt(0);for(u=0;u<e.length;u++)s=e[u],i=t[s],a(i)||(t[s]=n(i,d?s+r:r,o,s,t))}function o(t,e,n){try{s.emit(t,e,n)}catch(r){i([r,t,e,n])}}function i(t){try{s.emit("internal-error",t)}catch(e){}}function a(t){return!(t&&"function"==typeof t&&t.apply&&!t[n.flag])}var s=t(1),u=t(2);e.exports=n,n.inPlace=r,n.flag="nr@wrapper"},{1:1,2:14}]},{},["G9z0Bl",2,7]);</script>
10
+ <meta content='-t0eQq9l7G9k9QC1lWlZA-tOhcVQmpzBOafnVgvVlgY' name='google-site-verification'>
11
+ <meta content='width=device-width, initial-scale=1.0' name='viewport'>
12
+ <link href="https://www.collectplus.co.uk/favicon.ico" rel="icon" />
13
+
14
+ <title>Tracking your parcels made easy with CollectPlus</title>
15
+ <link href="https://www.collectplus.co.uk/assets/application-705241f763b683f1cbd6618c10490e14.css" media="screen" rel="stylesheet" type="text/css" />
16
+ <link href="https://www.collectplus.co.uk/assets/print-72a3694794ac228dad9f6ccbe0d04a3b.css" media="print" rel="stylesheet" type="text/css" />
17
+ <!--[if IE]>
18
+ <link href="https://www.collectplus.co.uk/assets/ie-80a7d0030795a44034dad42c7d047f13.css" media="screen" rel="stylesheet" type="text/css" />
19
+ <![endif]-->
20
+ <!--[if gte IE 8]>
21
+ <link href="https://www.collectplus.co.uk/assets/ie8-968f7e2d1a6aa0437e02029dd7b01176.css" media="screen" rel="stylesheet" type="text/css" />
22
+ <![endif]-->
23
+ <!--[if IE 7]>
24
+ <link href="https://www.collectplus.co.uk/assets/ie7-f25363962a0cb75fa1c30dad92bc8b95.css" media="screen" rel="stylesheet" type="text/css" />
25
+ <![endif]-->
26
+ <!--[if lte IE 6]>
27
+ <link href="https://www.collectplus.co.uk/assets/ie6-77cd56050873a011c7d73f735e29ee1b.css" media="screen" rel="stylesheet" type="text/css" />
28
+ <script src="https://www.collectplus.co.uk/assets/DD_belatedPNG_0.0.8a-min-79ea5b16160a7f4ea3e45ee41b7109c1.js" type="text/javascript"></script>
29
+ <script>
30
+ DD_belatedPNG.fix('.parcel_weight, #add_new_parcel, input.delete_parcel, #tracking_events ul li, img.popup_pointer');
31
+ </script>
32
+ <![endif]-->
33
+ <script src="https://www.collectplus.co.uk/assets/application-8c8d06ac5c4abec1bd863d718e947631.js" type="text/javascript"></script>
34
+ <script src='https://s7.addthis.com/js/250/addthis_widget.js#username=collectplus' type='text/javascript'></script>
35
+ <script src="https://www.collectplus.co.uk/assets/jquery_fancy_box/jquery.fancybox-1.3.1.pack-d61fb7b965548bf739e67ee79e7a343a.js" type="text/javascript"></script>
36
+ <script src="https://www.collectplus.co.uk/assets/jquery_fancy_box/jquery.easing-1.3.pack-bf8cab20397f3d453ae2e58ab3717cf3.js" type="text/javascript"></script>
37
+ <script src="https://www.collectplus.co.uk/assets/jquery_fancy_box/load_fancybox-b88de5adc05200fc78f5a486b1337e9b.js" type="text/javascript"></script>
38
+ <script src="https://www.collectplus.co.uk/assets/jquery_fancy_box/jquery.mousewheel-3.0.2.pack-a224796d31b2d12a5fe2c34579c451bc.js" type="text/javascript"></script>
39
+ <link href="https://www.collectplus.co.uk/assets/jquery.fancybox-40fee8732c36f964245aa5f66cd1c9c4.css" media="screen" rel="stylesheet" type="text/css" />
40
+
41
+
42
+
43
+ <script async defer src='//d3c3cq33003psk.cloudfront.net/opentag-59215-304468.js'></script>
44
+ </head>
45
+
46
+ <body class='fixed two_col_right no-liquid-js track show_page parcel_trackers_section' id='parcel_trackers_section'>
47
+ <div id='skipnav'>
48
+ <p>
49
+ <strong>Accessibility links</strong>
50
+ </p>
51
+ <ul>
52
+ <li>
53
+ <a accesskey='c' href='#content'>Jump to main content [Access key 'C']</a>
54
+ </li>
55
+ <li>
56
+ <a accesskey='n' href='#navigation'>Jump to primary navigation [Access key 'N']</a>
57
+ </li>
58
+ <li>
59
+ <a accesskey='s' href='#content'>Skip navigation [Access key 'S']</a>
60
+ </li>
61
+ </ul>
62
+ </div>
63
+
64
+ <div class='clearfix' id='container'>
65
+ <header>
66
+ <nav id='nav'>
67
+ <div class='brand'>
68
+ <a href="http://www.collectplus.co.uk/"><img alt="Collect Plus parcels made easy" src="https://www.collectplus.co.uk/assets/collect_plus_logo-ab75a000e9fb3f7644b339253e2cf7ff.jpg" />
69
+ </a></div>
70
+ <a href="#nav">Show navigation</a>
71
+ <a href="#">Hide navigation</a>
72
+ <div class='eyebrow'>
73
+ <div class='store-locator-form'>
74
+ <form accept-charset="UTF-8" action="https://www.collectplus.co.uk/orders/new" class="eyebrow-store-locator" method="get"><div style="margin:0;padding:0;display:inline"><input name="utf8" type="hidden" value="&#x2713;" /></div>
75
+ <label for="from_postcode">Find a store</label>
76
+ <input id="from_postcode" name="from_postcode" placeholder="Town or postcode" type="text" />
77
+ <input id="search_from" name="Search" type="submit" value="Search" />
78
+ </form>
79
+
80
+
81
+ <a href="/orders/new" class="ipad-store-locator">Find a store</a>
82
+ </div>
83
+ <ul class='user-nav'>
84
+ <li>
85
+ <a href="http://www.collectplus.co.uk/contact" title="Help">Help</a>
86
+ </li>
87
+ <li>
88
+ <a href="/user_sessions/new" title="Sign In">Sign In</a>
89
+ </li>
90
+ <li>
91
+ <a href="/user/new" title="Sign Up">Sign Up</a>
92
+ </li>
93
+ </ul>
94
+ </div>
95
+
96
+ <ul class='full-screen'>
97
+ <li class='services'>
98
+ <a href="" aria-haspopup="true" title="Our Services"><span>
99
+ Our Services
100
+ </span>
101
+ </a><ul>
102
+ <li>
103
+ <a href="http://www.collectplus.co.uk/our-services" title="more on our services">At a glance</a>
104
+ </li>
105
+ <li>
106
+ <a href="/send" title="Send a parcel">Send</a>
107
+ </li>
108
+ <li>
109
+ <a href="/retailers" title="Return a parcel">Return</a>
110
+ </li>
111
+ <li>
112
+ <a href="/faqs-new/?p=639" title="Click &amp; Collect">Click &amp; Collect</a>
113
+ </li>
114
+ </ul>
115
+ </li>
116
+ <li>
117
+ <a href="" aria-haspopup="true" title="Business Users"><span>
118
+ Business Users
119
+ </span>
120
+ </a><ul>
121
+ <li>
122
+ <a href="http://www.collectplus.co.uk/selling-online" title="Merchants">Merchants</a>
123
+ </li>
124
+ <li>
125
+ <a href="http://www.collectplus.co.uk/for_ebay" title="eBay Sellers">eBay Sellers</a>
126
+ </li>
127
+ </ul>
128
+ </li>
129
+ <li>
130
+ <a href="/about-us" class="about" title="About Us">About Us</a>
131
+ </li>
132
+ <li class='parcel-tracker'>
133
+ <a href="/track/new" title="Track a Parcel">Track a Parcel</a>
134
+ </li>
135
+ </ul>
136
+
137
+ <ul class='mobile'>
138
+ <li>
139
+ <a href="/send" title="Send a parcel">Send a parcel</a>
140
+ </li>
141
+ <li>
142
+ <a href="/retailers" title="Return a parcel">Return a parcel</a>
143
+ </li>
144
+ <li>
145
+ <a href="/track/new" title="Track my parcel">Track a parcel</a>
146
+ </li>
147
+ <li>
148
+ <a href="/orders/new" title="local store locator">Find a local store</a>
149
+ </li>
150
+ <li>
151
+ <a href="/contact" title="Help">Help</a>
152
+ </li>
153
+ <li>
154
+ <a href="/user_sessions/new" title="Sign in">Sign in</a>
155
+ </li>
156
+ </ul>
157
+
158
+ <div class='parcel-tracker'>
159
+ <form accept-charset="UTF-8" action="https://www.collectplus.co.uk/track" class="header-parcel-tracker" method="post"><div style="margin:0;padding:0;display:inline"><input name="utf8" type="hidden" value="&#x2713;" /><input name="authenticity_token" type="hidden" value="LFOmsod7UBtc8LVsUSgJ9eJmKzvtdqAVxb+dbla8eRM=" /></div>
160
+ <label for="parcel_tracker_id">Track Parcel:</label>
161
+ <input id="parcel_tracker_id" name="parcel_tracker[id]" placeholder="Tracking No." size="30" type="text" />
162
+ <input class="track" name="track" type="submit" value="Track" />
163
+ </form>
164
+
165
+ </div>
166
+
167
+ </nav>
168
+
169
+ </header>
170
+ <div class='site-alert'><div class='site_alert_inner '>Remember that the Tour de France started this weekend. Good luck to all the riders. <a href="http://www.collectplus.co.uk/news/the-tour-de-france-is-coming-to-the-uk-july-5th-2014/">Click here to find out how some of our services are affected.</a></div></div>
171
+
172
+ <div id='content-wrapper'>
173
+ <div id='content'>
174
+ <div class='col_1' id='left_pane'>
175
+ <ol>
176
+ <li>
177
+ <h2>
178
+ Tracking
179
+ </h2>
180
+ <form accept-charset="UTF-8" action="https://www.collectplus.co.uk/track" method="post"><div style="margin:0;padding:0;display:inline"><input name="utf8" type="hidden" value="&#x2713;" /><input name="authenticity_token" type="hidden" value="LFOmsod7UBtc8LVsUSgJ9eJmKzvtdqAVxb+dbla8eRM=" /></div>
181
+ <span class='inline'>
182
+ <label for="parcel_tracker_id">Tracking this code:</label>
183
+ <input id="parcel_tracker_id" name="parcel_tracker[id]" size="16" type="text" />
184
+ </span>
185
+ <input class="track" name="track" type="submit" value="Track" />
186
+ </form>
187
+
188
+
189
+ <p class='tracking_events'>
190
+ Sorry, the tracking code
191
+ <strong>NOTATRACKINGNUMBER</strong>
192
+ could not be found. Please check your CollectPlus receipt for a 7-character tracking code.
193
+ </p>
194
+ <div id='tracking_events'>
195
+ </div>
196
+ <p class='apologise'>
197
+ <br>
198
+ Please allow 5 working days before contacting us.
199
+ <br>
200
+ <br>
201
+ 'Click &amp; CollectPlus' parcels will be delivered as specified by your retailer at the time of purchase.
202
+ </p>
203
+
204
+ </li>
205
+ </ol>
206
+ <div id='footer'>
207
+ <ul class='links'>
208
+ <li><a href="http://www.collectplus.co.uk/terms-and-conditions">Terms &amp; Conditions</a></li>
209
+ <li><a href="http://www.collectplus.co.uk/terms-of-use">Terms of Use</a></li>
210
+ <li class='last'><a href="http://www.collectplus.co.uk/privacy-policy">Privacy Policy</a></li>
211
+ </ul>
212
+ <ul>
213
+ <li>&copy; 2014 Drop and Collect Ltd. trading as CollectPlus</li>
214
+ <li>Registered Number: 06593233 | VAT Number: 946830691</li>
215
+ <li>Registered Address: CollectPlus, Victoria House, 49 Clarendon Road, Watford,</li>
216
+ <li>Hertfordshire, WD17 1HP</li>
217
+ </ul>
218
+ </div>
219
+
220
+ </div>
221
+ <div class='col_2 no_map' id='right_pane'>
222
+ <div class='aside'>
223
+ <h2>
224
+ Returns &amp; Economy Service
225
+ </h2>
226
+ <div class='tracking-graphic'><img alt="Tracking-graphic-economy" src="https://www.collectplus.co.uk/assets/tracking-graphic-economy-77b8e89bf7a3176bbd87f2705d1f1c22.png" /></div>
227
+ <h2>
228
+ Standard Service
229
+ </h2>
230
+ <div class='tracking-graphic'><img alt="Tracking-graphic-standard" src="https://www.collectplus.co.uk/assets/tracking-graphic-standard-706f25bb9993ca5890072a6fc3cf3842.png" /></div>
231
+ <table class='timings'>
232
+ <thead>
233
+ <tr>
234
+ <th>
235
+ <strong>Parcel dropped off at a shop</strong>
236
+ </th>
237
+ <th>
238
+ <strong>Returns &amp; Economy Service</strong>
239
+ Typically delivered in 3-5 working days
240
+ </th>
241
+ <th>
242
+ <strong>Standard Service</strong>
243
+ Typically delivered in 2 working days
244
+ </th>
245
+ </tr>
246
+ </thead>
247
+ <tbody>
248
+ <tr class='odd'>
249
+ <td>Monday</td>
250
+ <td>Thursday - Monday</td>
251
+ <td>Wednesday</td>
252
+ </tr>
253
+ <tr class='even'>
254
+ <td>Tuesday</td>
255
+ <td>Friday - Tuesday</td>
256
+ <td>Thursday</td>
257
+ </tr>
258
+ <tr class='odd'>
259
+ <td>Wednesday</td>
260
+ <td>Monday - Wednesday</td>
261
+ <td>Friday</td>
262
+ </tr>
263
+ <tr class='even'>
264
+ <td>Thursday</td>
265
+ <td>Tuesday - Thursday</td>
266
+ <td>Monday</td>
267
+ </tr>
268
+ <tr class='odd'>
269
+ <td>Friday - Sunday</td>
270
+ <td>Wednesday - Friday</td>
271
+ <td>Tuesday</td>
272
+ </tr>
273
+ </tbody>
274
+ </table>
275
+ <div class='timing_notes'>
276
+ <p>Please note</p>
277
+ <ul id='timing_bullets'>
278
+ <li>If you are returning an item, allow a few days from the delivery date before contacting the retailer</li>
279
+ <li>Deliveries to non-mainland addresses may take up to 5 working days longer</li>
280
+ <li>Bank holidays are not treated as a 'working day'</li>
281
+ </ul>
282
+ </div>
283
+
284
+ </div>
285
+ </div>
286
+
287
+ </div>
288
+ </div>
289
+ </div>
290
+ <div id='google_analytics'>
291
+ <!-- These two blocks need to stay separate, otherwise we risk synchronisation issues -->
292
+ <script type="text/javascript">
293
+ var gaJsHost = (("https:" == document.location.protocol) ? "https://ssl." : "http://www.");
294
+ document.write(unescape("%3Cscript src='" + gaJsHost + "google-analytics.com/ga.js' type='text/javascript'%3E%3C/script%3E"));
295
+ </script>
296
+ <script type="text/javascript">
297
+ try {
298
+ var pageTracker = _gat._getTracker("UA-9174885-1");
299
+ pageTracker._trackPageview();pageTracker._setDomainName('.collectplus.co.uk');
300
+ pageTracker._setAllowLinker(true);
301
+ pageTracker._setAllowHash(false);
302
+ } catch(err) { if (false) { console.log(err.message); } }
303
+ </script>
304
+
305
+ <script>
306
+ //<![CDATA[
307
+ $('form.pagetracker').submit(function() {
308
+ //var callback = $('form#paypoint input#callback').val();
309
+ //$('form#paypoint input#callback').val( pageTracker._getLinkerUrl(callback) );
310
+ try {
311
+ // in some envs such as staging, dev, or if GA is turned off it becomes an issue
312
+ pageTracker._linkByPost(this);
313
+ } catch(err) { if (false) { console.log(err.message); } }
314
+
315
+ });
316
+ //]]>
317
+ </script>
318
+ </div>
319
+
320
+
321
+ </body>
322
+ </html>
@@ -0,0 +1,320 @@
1
+ <!DOCTYPE html>
2
+ <html lang='en' xml:lang='en' xmlns='http://www.w3.org/1999/xhtml'>
3
+ <head>
4
+ <meta content='text/html; charset=UTF-8' http-equiv='content-type'>
5
+ <meta content='Tracking your parcels with CollectPlus is easy. Online tracking on all parcels, coverage up to £50 free.' name='description'>
6
+ <meta content='CollectPlus , Send parcels, Return parcels to retailers, 5500 CollectPlus shops, nationwide, online tracking, compensation cover included,7 days a week, Collect Plus,Marketplaces,Ebay,Amazon,Local Shops, Open till late' name='keywords'>
7
+ <meta content='IE=EmulateIE8; charset=UTF-8' http-equiv='X-UA-Compatible'>
8
+ <script type="text/javascript">window.NREUM||(NREUM={});NREUM.info={"beacon":"beacon-1.newrelic.com","errorBeacon":"bam.nr-data.net","licenseKey":"29a2f924e8","applicationID":"450344","transactionName":"d19YRURcCl9QQB5CAEZTU11pRxRSVllUQBIbQ15eQQ==","queueTime":0,"applicationTime":89,"ttGuid":"","agentToken":null,"agent":"js-agent.newrelic.com/nr-411.min.js"}</script>
9
+ <meta content='-t0eQq9l7G9k9QC1lWlZA-tOhcVQmpzBOafnVgvVlgY' name='google-site-verification'>
10
+ <meta content='width=device-width, initial-scale=1.0' name='viewport'>
11
+ <link href="https://www.collectplus.co.uk/favicon.ico" rel="icon" />
12
+
13
+ <title>Tracking your parcels made easy with CollectPlus</title>
14
+ <link href="https://www.collectplus.co.uk/assets/application-705241f763b683f1cbd6618c10490e14.css" media="screen" rel="stylesheet" type="text/css" />
15
+ <link href="https://www.collectplus.co.uk/assets/print-72a3694794ac228dad9f6ccbe0d04a3b.css" media="print" rel="stylesheet" type="text/css" />
16
+ <script src="https://www.collectplus.co.uk/assets/application-8c8d06ac5c4abec1bd863d718e947631.js" type="text/javascript"></script>
17
+ <script src='https://s7.addthis.com/js/250/addthis_widget.js#username=collectplus' type='text/javascript'></script>
18
+ <script src="https://www.collectplus.co.uk/assets/jquery_fancy_box/jquery.fancybox-1.3.1.pack-d61fb7b965548bf739e67ee79e7a343a.js" type="text/javascript"></script>
19
+ <script src="https://www.collectplus.co.uk/assets/jquery_fancy_box/jquery.easing-1.3.pack-bf8cab20397f3d453ae2e58ab3717cf3.js" type="text/javascript"></script>
20
+ <script src="https://www.collectplus.co.uk/assets/jquery_fancy_box/load_fancybox-b88de5adc05200fc78f5a486b1337e9b.js" type="text/javascript"></script>
21
+ <script src="https://www.collectplus.co.uk/assets/jquery_fancy_box/jquery.mousewheel-3.0.2.pack-a224796d31b2d12a5fe2c34579c451bc.js" type="text/javascript"></script>
22
+ <link href="https://www.collectplus.co.uk/assets/jquery.fancybox-40fee8732c36f964245aa5f66cd1c9c4.css" media="screen" rel="stylesheet" type="text/css" />
23
+
24
+
25
+
26
+ <script async defer src='//d3c3cq33003psk.cloudfront.net/opentag-59215-304468.js'></script>
27
+ </head>
28
+
29
+ <body class='fixed two_col_right no-liquid-js track show_page parcel_trackers_section' id='parcel_trackers_section'>
30
+ <div id='skipnav'>
31
+ <p>
32
+ <strong>Accessibility links</strong>
33
+ </p>
34
+ <ul>
35
+ <li>
36
+ <a accesskey='c' href='#content'>Jump to main content [Access key 'C']</a>
37
+ </li>
38
+ <li>
39
+ <a accesskey='n' href='#navigation'>Jump to primary navigation [Access key 'N']</a>
40
+ </li>
41
+ <li>
42
+ <a accesskey='s' href='#content'>Skip navigation [Access key 'S']</a>
43
+ </li>
44
+ </ul>
45
+ </div>
46
+
47
+ <div class='clearfix' id='container'>
48
+ <header>
49
+ <nav id='nav'>
50
+ <div class='brand'>
51
+ <a href="http://www.collectplus.co.uk/"><img alt="Collect Plus parcels made easy" src="https://www.collectplus.co.uk/assets/collect_plus_logo-ab75a000e9fb3f7644b339253e2cf7ff.jpg" />
52
+ </a></div>
53
+ <a href="#nav">Show navigation</a>
54
+ <a href="#">Hide navigation</a>
55
+ <div class='eyebrow'>
56
+ <div class='store-locator-form'>
57
+ <form accept-charset="UTF-8" action="https://www.collectplus.co.uk/orders/new" class="eyebrow-store-locator" method="get"><div style="margin:0;padding:0;display:inline"><input name="utf8" type="hidden" value="&#x2713;" /></div>
58
+ <label for="from_postcode">Find a store</label>
59
+ <input id="from_postcode" name="from_postcode" placeholder="Town or postcode" type="text" />
60
+ <input id="search_from" name="Search" type="submit" value="Search" />
61
+ </form>
62
+
63
+
64
+ <a href="/orders/new" class="ipad-store-locator">Find a store</a>
65
+ </div>
66
+ <ul class='user-nav'>
67
+ <li>
68
+ <a href="http://www.collectplus.co.uk/contact" title="Help">Help</a>
69
+ </li>
70
+ <li>
71
+ <a href="/user_sessions/new" title="Sign In">Sign In</a>
72
+ </li>
73
+ <li>
74
+ <a href="/user/new" title="Sign Up">Sign Up</a>
75
+ </li>
76
+ </ul>
77
+ </div>
78
+
79
+ <ul class='full-screen'>
80
+ <li class='services'>
81
+ <a href="" aria-haspopup="true" title="Our Services"><span>
82
+ Our Services
83
+ </span>
84
+ </a><ul>
85
+ <li>
86
+ <a href="http://www.collectplus.co.uk/our-services" title="more on our services">At a glance</a>
87
+ </li>
88
+ <li>
89
+ <a href="/send" title="Send a parcel">Send</a>
90
+ </li>
91
+ <li>
92
+ <a href="/retailers" title="Return a parcel">Return</a>
93
+ </li>
94
+ <li>
95
+ <a href="/faqs-new/?p=639" title="Click &amp; Collect">Click &amp; Collect</a>
96
+ </li>
97
+ </ul>
98
+ </li>
99
+ <li>
100
+ <a href="" aria-haspopup="true" title="Business Users"><span>
101
+ Business Users
102
+ </span>
103
+ </a><ul>
104
+ <li>
105
+ <a href="http://www.collectplus.co.uk/selling-online" title="Merchants">Merchants</a>
106
+ </li>
107
+ <li>
108
+ <a href="http://www.collectplus.co.uk/for_ebay" title="eBay Sellers">eBay Sellers</a>
109
+ </li>
110
+ </ul>
111
+ </li>
112
+ <li>
113
+ <a href="/about-us" class="about" title="About Us">About Us</a>
114
+ </li>
115
+ <li class='parcel-tracker'>
116
+ <a href="/track/new" title="Track a Parcel">Track a Parcel</a>
117
+ </li>
118
+ </ul>
119
+
120
+ <ul class='mobile'>
121
+ <li>
122
+ <a href="/send" title="Send a parcel">Send a parcel</a>
123
+ </li>
124
+ <li>
125
+ <a href="/retailers" title="Return a parcel">Return a parcel</a>
126
+ </li>
127
+ <li>
128
+ <a href="/track/new" title="Track my parcel">Track a parcel</a>
129
+ </li>
130
+ <li>
131
+ <a href="/orders/new" title="local store locator">Find a local store</a>
132
+ </li>
133
+ <li>
134
+ <a href="/contact" title="Help">Help</a>
135
+ </li>
136
+ <li>
137
+ <a href="/user_sessions/new" title="Sign in">Sign in</a>
138
+ </li>
139
+ </ul>
140
+
141
+ <div class='parcel-tracker'>
142
+ <form accept-charset="UTF-8" action="https://www.collectplus.co.uk/track" class="header-parcel-tracker" method="post"><div style="margin:0;padding:0;display:inline"><input name="utf8" type="hidden" value="&#x2713;" /><input name="authenticity_token" type="hidden" value="LFOmsod7UBtc8LVsUSgJ9eJmKzvtdqAVxb+dbla8eRM=" /></div>
143
+ <label for="parcel_tracker_id">Track Parcel:</label>
144
+ <input id="parcel_tracker_id" name="parcel_tracker[id]" placeholder="Tracking No." size="30" type="text" value="SE12345" />
145
+ <input class="track" name="track" type="submit" value="Track" />
146
+ </form>
147
+
148
+ </div>
149
+
150
+ </nav>
151
+
152
+ </header>
153
+ <div class='site-alert'><div class='site_alert_inner '>Remember that the Tour de France started this weekend. Good luck to all the riders. <a href="http://www.collectplus.co.uk/news/the-tour-de-france-is-coming-to-the-uk-july-5th-2014/">Click here to find out how some of our services are affected.</a></div></div>
154
+
155
+ <div id='content-wrapper'>
156
+ <div id='content'>
157
+ <div class='col_1' id='left_pane'>
158
+ <ol>
159
+ <li>
160
+ <h2>
161
+ Tracking
162
+ </h2>
163
+ <form accept-charset="UTF-8" action="https://www.collectplus.co.uk/track" method="post"><div style="margin:0;padding:0;display:inline"><input name="utf8" type="hidden" value="&#x2713;" /><input name="authenticity_token" type="hidden" value="LFOmsod7UBtc8LVsUSgJ9eJmKzvtdqAVxb+dbla8eRM=" /></div>
164
+ <span class='inline'>
165
+ <label for="parcel_tracker_id">Tracking this code:</label>
166
+ <input id="parcel_tracker_id" name="parcel_tracker[id]" size="16" type="text" value="SE12345" />
167
+ </span>
168
+ <input class="track" name="track" type="submit" value="Track" />
169
+ </form>
170
+
171
+
172
+ <div class='current_tracking_status'>
173
+ <h2>Despatched from SOME LONDON DEPOT</h2>
174
+ <p>at 15:58, Mon, 07 Jul 2014</p>
175
+ <p></p>
176
+ </div>
177
+ <div id='tracking_events'>
178
+ <ul class='tracking_events'>
179
+ <li>
180
+ <span class='status'>Parcel collected</span>
181
+ <span>11:46, Mon, 07 Jul 2014</span>
182
+ </li>
183
+ <li>
184
+ <span class='status'>Received at SPAR, ABC 123</span>
185
+ <span>08:21, Mon, 07 Jul 2014</span>
186
+ </li>
187
+ <li>
188
+ <span class='status'>Delivery booked</span>
189
+ <span>20:06, Sun, 06 Jul 2014</span>
190
+ </li>
191
+
192
+ </ul>
193
+ </div>
194
+ <p class='apologise'>
195
+ <br>
196
+ Please allow 5 working days before contacting us.
197
+ <br>
198
+ <br>
199
+ 'Click &amp; CollectPlus' parcels will be delivered as specified by your retailer at the time of purchase.
200
+ </p>
201
+
202
+ </li>
203
+ </ol>
204
+ <div id='footer'>
205
+ <ul class='links'>
206
+ <li><a href="http://www.collectplus.co.uk/terms-and-conditions">Terms &amp; Conditions</a></li>
207
+ <li><a href="http://www.collectplus.co.uk/terms-of-use">Terms of Use</a></li>
208
+ <li class='last'><a href="http://www.collectplus.co.uk/privacy-policy">Privacy Policy</a></li>
209
+ </ul>
210
+ <ul>
211
+ <li>&copy; 2014 Drop and Collect Ltd. trading as CollectPlus</li>
212
+ <li>Registered Number: 06593233 | VAT Number: 946830691</li>
213
+ <li>Registered Address: CollectPlus, Victoria House, 49 Clarendon Road, Watford,</li>
214
+ <li>Hertfordshire, WD17 1HP</li>
215
+ </ul>
216
+ </div>
217
+
218
+ </div>
219
+ <div class='col_2 no_map' id='right_pane'>
220
+ <div class='aside'>
221
+ <h2>
222
+ Returns &amp; Economy Service
223
+ </h2>
224
+ <div class='tracking-graphic'><img alt="Tracking-graphic-economy" src="https://www.collectplus.co.uk/assets/tracking-graphic-economy-77b8e89bf7a3176bbd87f2705d1f1c22.png" /></div>
225
+ <h2>
226
+ Standard Service
227
+ </h2>
228
+ <div class='tracking-graphic'><img alt="Tracking-graphic-standard" src="https://www.collectplus.co.uk/assets/tracking-graphic-standard-706f25bb9993ca5890072a6fc3cf3842.png" /></div>
229
+ <table class='timings'>
230
+ <thead>
231
+ <tr>
232
+ <th>
233
+ <strong>Parcel dropped off at a shop</strong>
234
+ </th>
235
+ <th>
236
+ <strong>Returns &amp; Economy Service</strong>
237
+ Typically delivered in 3-5 working days
238
+ </th>
239
+ <th>
240
+ <strong>Standard Service</strong>
241
+ Typically delivered in 2 working days
242
+ </th>
243
+ </tr>
244
+ </thead>
245
+ <tbody>
246
+ <tr class='odd'>
247
+ <td>Monday</td>
248
+ <td>Thursday - Monday</td>
249
+ <td>Wednesday</td>
250
+ </tr>
251
+ <tr class='even'>
252
+ <td>Tuesday</td>
253
+ <td>Friday - Tuesday</td>
254
+ <td>Thursday</td>
255
+ </tr>
256
+ <tr class='odd'>
257
+ <td>Wednesday</td>
258
+ <td>Monday - Wednesday</td>
259
+ <td>Friday</td>
260
+ </tr>
261
+ <tr class='even'>
262
+ <td>Thursday</td>
263
+ <td>Tuesday - Thursday</td>
264
+ <td>Monday</td>
265
+ </tr>
266
+ <tr class='odd'>
267
+ <td>Friday - Sunday</td>
268
+ <td>Wednesday - Friday</td>
269
+ <td>Tuesday</td>
270
+ </tr>
271
+ </tbody>
272
+ </table>
273
+ <div class='timing_notes'>
274
+ <p>Please note</p>
275
+ <ul id='timing_bullets'>
276
+ <li>If you are returning an item, allow a few days from the delivery date before contacting the retailer</li>
277
+ <li>Deliveries to non-mainland addresses may take up to 5 working days longer</li>
278
+ <li>Bank holidays are not treated as a 'working day'</li>
279
+ </ul>
280
+ </div>
281
+
282
+ </div>
283
+ </div>
284
+
285
+ </div>
286
+ </div>
287
+ </div>
288
+ <div id='google_analytics'>
289
+ <!-- These two blocks need to stay separate, otherwise we risk synchronisation issues -->
290
+ <script type="text/javascript">
291
+ var gaJsHost = (("https:" == document.location.protocol) ? "https://ssl." : "http://www.");
292
+ document.write(unescape("%3Cscript src='" + gaJsHost + "google-analytics.com/ga.js' type='text/javascript'%3E%3C/script%3E"));
293
+ </script>
294
+ <script type="text/javascript">
295
+ try {
296
+ var pageTracker = _gat._getTracker("UA-9174885-1");
297
+ pageTracker._trackPageview();pageTracker._setDomainName('.collectplus.co.uk');
298
+ pageTracker._setAllowLinker(true);
299
+ pageTracker._setAllowHash(false);
300
+ } catch(err) { if (false) { console.log(err.message); } }
301
+ </script>
302
+
303
+ <script>
304
+ //<![CDATA[
305
+ $('form.pagetracker').submit(function() {
306
+ //var callback = $('form#paypoint input#callback').val();
307
+ //$('form#paypoint input#callback').val( pageTracker._getLinkerUrl(callback) );
308
+ try {
309
+ // in some envs such as staging, dev, or if GA is turned off it becomes an issue
310
+ pageTracker._linkByPost(this);
311
+ } catch(err) { if (false) { console.log(err.message); } }
312
+
313
+ });
314
+ //]]>
315
+ </script>
316
+ </div>
317
+
318
+
319
+ </body>
320
+ </html>
@@ -0,0 +1,42 @@
1
+ require 'spec_helper'
2
+
3
+ describe CollectPlus::Tracker do
4
+ context "when the tracking number exists" do
5
+ before(:each) do
6
+ # Stub net requests with HTML files in spec's support directory
7
+ WebMock.stub_request(:get, "https://www.collectplus.co.uk/track/SE12345").
8
+ to_return(:status => 200, :body => File.new("spec/support/parcel_status.html"), :headers => {})
9
+ end
10
+
11
+ let(:tracker) { CollectPlus::Tracker.new("SE12345") }
12
+
13
+ it "can return the current status of the parcel" do
14
+ expect(tracker.current_status).to eq("Despatched from SOME LONDON DEPOT at 15:58, Mon, 07 Jul 2014")
15
+ end
16
+
17
+ it "can return previous statuses" do
18
+ status_history = tracker.status_history
19
+ expect(status_history).to eq(["Parcel collected - 11:46, Mon, 07 Jul 2014",
20
+ "Received at SPAR, ABC 123 - 08:21, Mon, 07 Jul 2014",
21
+ "Delivery booked - 20:06, Sun, 06 Jul 2014"])
22
+ end
23
+
24
+ it "can return a summary of the delivery status" do
25
+ expect(tracker.status_summary).to eq("CURRENT STATUS\nDespatched from SOME LONDON DEPOT at 15:58, Mon, 07 Jul 2014\n\nSTATUS HISTORY\nParcel collected - 11:46, Mon, 07 Jul 2014\n\nReceived at SPAR, ABC 123 - 08:21, Mon, 07 Jul 2014\n\nDelivery booked - 20:06, Sun, 06 Jul 2014")
26
+ end
27
+ end
28
+
29
+ context "when the tracking number does not exists" do
30
+ before(:each) do
31
+ # Stub net requests with HTML files in spec's support directory
32
+ WebMock.stub_request(:get, "https://www.collectplus.co.uk/track/NOTATRACKINGNUMBER").
33
+ to_return(:status => 200, :body => File.new("spec/support/parcel_doesnt_exist.html"), :headers => {})
34
+ end
35
+
36
+ let(:tracker) { CollectPlus::Tracker.new("NOTATRACKINGNUMBER") }
37
+
38
+ it "notifies that parcel info cannot be found" do
39
+ expect(tracker.current_status).to eq("Sorry, the tracking code NOTATRACKINGNUMBER could not be found. Please check your CollectPlus receipt for a 7-character tracking code.")
40
+ end
41
+ end
42
+ end
metadata ADDED
@@ -0,0 +1,145 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: collect_plus
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.0.1
5
+ platform: ruby
6
+ authors:
7
+ - Alessandro
8
+ autorequire:
9
+ bindir: bin
10
+ cert_chain: []
11
+ date: 2014-07-12 00:00:00.000000000 Z
12
+ dependencies:
13
+ - !ruby/object:Gem::Dependency
14
+ name: bundler
15
+ requirement: !ruby/object:Gem::Requirement
16
+ requirements:
17
+ - - "~>"
18
+ - !ruby/object:Gem::Version
19
+ version: '1.6'
20
+ type: :development
21
+ prerelease: false
22
+ version_requirements: !ruby/object:Gem::Requirement
23
+ requirements:
24
+ - - "~>"
25
+ - !ruby/object:Gem::Version
26
+ version: '1.6'
27
+ - !ruby/object:Gem::Dependency
28
+ name: rake
29
+ requirement: !ruby/object:Gem::Requirement
30
+ requirements:
31
+ - - ">="
32
+ - !ruby/object:Gem::Version
33
+ version: '0'
34
+ type: :development
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: rspec
43
+ requirement: !ruby/object:Gem::Requirement
44
+ requirements:
45
+ - - ">="
46
+ - !ruby/object:Gem::Version
47
+ version: '0'
48
+ type: :development
49
+ prerelease: false
50
+ version_requirements: !ruby/object:Gem::Requirement
51
+ requirements:
52
+ - - ">="
53
+ - !ruby/object:Gem::Version
54
+ version: '0'
55
+ - !ruby/object:Gem::Dependency
56
+ name: webmock
57
+ requirement: !ruby/object:Gem::Requirement
58
+ requirements:
59
+ - - ">="
60
+ - !ruby/object:Gem::Version
61
+ version: '0'
62
+ type: :development
63
+ prerelease: false
64
+ version_requirements: !ruby/object:Gem::Requirement
65
+ requirements:
66
+ - - ">="
67
+ - !ruby/object:Gem::Version
68
+ version: '0'
69
+ - !ruby/object:Gem::Dependency
70
+ name: pry
71
+ requirement: !ruby/object:Gem::Requirement
72
+ requirements:
73
+ - - ">="
74
+ - !ruby/object:Gem::Version
75
+ version: '0'
76
+ type: :development
77
+ prerelease: false
78
+ version_requirements: !ruby/object:Gem::Requirement
79
+ requirements:
80
+ - - ">="
81
+ - !ruby/object:Gem::Version
82
+ version: '0'
83
+ - !ruby/object:Gem::Dependency
84
+ name: nokogiri
85
+ requirement: !ruby/object:Gem::Requirement
86
+ requirements:
87
+ - - ">="
88
+ - !ruby/object:Gem::Version
89
+ version: '0'
90
+ type: :runtime
91
+ prerelease: false
92
+ version_requirements: !ruby/object:Gem::Requirement
93
+ requirements:
94
+ - - ">="
95
+ - !ruby/object:Gem::Version
96
+ version: '0'
97
+ description: Track parcels sent via CollectPlus
98
+ email:
99
+ - hello@alessndro.co.uk
100
+ executables: []
101
+ extensions: []
102
+ extra_rdoc_files: []
103
+ files:
104
+ - ".gitignore"
105
+ - Gemfile
106
+ - LICENSE.txt
107
+ - README.md
108
+ - Rakefile
109
+ - collect_plus.gemspec
110
+ - lib/collect_plus.rb
111
+ - lib/collect_plus/tracker.rb
112
+ - lib/collect_plus/version.rb
113
+ - spec/spec_helper.rb
114
+ - spec/support/parcel_doesnt_exist.html
115
+ - spec/support/parcel_status.html
116
+ - spec/unit/tracker_spec.rb
117
+ homepage: https://github.com/alssndro/collect_plus
118
+ licenses:
119
+ - MIT
120
+ metadata: {}
121
+ post_install_message:
122
+ rdoc_options: []
123
+ require_paths:
124
+ - lib
125
+ required_ruby_version: !ruby/object:Gem::Requirement
126
+ requirements:
127
+ - - ">="
128
+ - !ruby/object:Gem::Version
129
+ version: '0'
130
+ required_rubygems_version: !ruby/object:Gem::Requirement
131
+ requirements:
132
+ - - ">="
133
+ - !ruby/object:Gem::Version
134
+ version: '0'
135
+ requirements: []
136
+ rubyforge_project:
137
+ rubygems_version: 2.2.2
138
+ signing_key:
139
+ specification_version: 4
140
+ summary: Track parcels sent via CollectPlus
141
+ test_files:
142
+ - spec/spec_helper.rb
143
+ - spec/support/parcel_doesnt_exist.html
144
+ - spec/support/parcel_status.html
145
+ - spec/unit/tracker_spec.rb