polar_express 0.0.6.alpha → 0.0.7.alpha
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/polar_express/dhl.rb +2 -1
- data/lib/polar_express/gls.rb +2 -1
- data/lib/polar_express/hermes.rb +4 -3
- data/lib/polar_express/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: df4a4e3cfe41cda6005c04277c3fe74d8d0ebe92
|
4
|
+
data.tar.gz: 35d11d25331eb27649c091185fcbc7d74929bbb4
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 78f475f464a5b764beba5c8fa7370086d31eb19f405533aba842ab6b8fbdc43a92a9e576a15498c1e5eb1694c8257434a195ad9640c8803d9328b265b8e6acd7
|
7
|
+
data.tar.gz: d471a942bb9fd59eaa213c18489c9cd9b3072344542b217142ab42539f8554cbcd214173f46e1c9d7fa980d786eebceee2ad522268908f389a83e32a88231d15
|
data/lib/polar_express/dhl.rb
CHANGED
@@ -35,7 +35,8 @@ module PolarExpress
|
|
35
35
|
date: DateTime.parse(get_date(tr.css('td.overflow').text)),
|
36
36
|
city: (city = tr.css('td.location').text.strip) == '--' ? nil : city,
|
37
37
|
status: text_to_status(status_text),
|
38
|
-
text: status_text
|
38
|
+
text: status_text,
|
39
|
+
date_text: get_date(tr.css('td.overflow').text)
|
39
40
|
}
|
40
41
|
end.compact
|
41
42
|
end
|
data/lib/polar_express/gls.rb
CHANGED
@@ -23,7 +23,8 @@ module PolarExpress
|
|
23
23
|
{
|
24
24
|
city: event['address']['city'],
|
25
25
|
date: DateTime.parse(event['date'] + ' ' + event['time'].split(':')[0] + ':00'),
|
26
|
-
text: event['evtDscr']
|
26
|
+
text: event['evtDscr'],
|
27
|
+
date_text: event['date'] + ' ' + event['time'].split(':')[0] + ':00'
|
27
28
|
}
|
28
29
|
end.uniq.reverse
|
29
30
|
end
|
data/lib/polar_express/hermes.rb
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
# encoding: utf-8
|
2
2
|
module PolarExpress
|
3
|
-
module Hermes
|
3
|
+
module Hermes
|
4
4
|
class Tracker
|
5
5
|
attr_accessor :number
|
6
6
|
def initialize(number)
|
@@ -32,7 +32,8 @@ module PolarExpress
|
|
32
32
|
date: DateTime.parse(tds[0].text + " " + tds[1].text),
|
33
33
|
city: nil,
|
34
34
|
status: text_to_status(status_text),
|
35
|
-
text: status_text
|
35
|
+
text: status_text,
|
36
|
+
date_text: tds[0].text + " " + tds[1].text
|
36
37
|
}
|
37
38
|
end.reverse
|
38
39
|
end
|
@@ -43,7 +44,7 @@ module PolarExpress
|
|
43
44
|
(match && match.first) || :other
|
44
45
|
end
|
45
46
|
end
|
46
|
-
|
47
|
+
|
47
48
|
Statuses = {
|
48
49
|
:at_distribution_hub => [
|
49
50
|
/Die Sendung wurde im Hermes (.+) sortiert/,
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: polar_express
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.7.alpha
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- José Tomás Albornoz
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2013-05-
|
11
|
+
date: 2013-05-27 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|