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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: d0c6f16ed5bd05072568ba080f77ffebe7837e95
4
- data.tar.gz: b54b5eb8e6931dc9bf4e22248a1df335e5b76b0c
3
+ metadata.gz: df4a4e3cfe41cda6005c04277c3fe74d8d0ebe92
4
+ data.tar.gz: 35d11d25331eb27649c091185fcbc7d74929bbb4
5
5
  SHA512:
6
- metadata.gz: 260110a866a87674dcb535ef69bc1a1a13cb5ac631592b2830e19309a302d5d6c72bd51c421f8e6b68c7ff7dfdafde366c8a7c4b9464dabbe295d8824f5f2876
7
- data.tar.gz: 018c035fdc3640992f4f83a28ece9eee64896d0d127cbfc9381278fd728beef47283768b556ec85cc9aca995ba12f8cd82ea0ab4735c4b698495dc5aa29fd1e5
6
+ metadata.gz: 78f475f464a5b764beba5c8fa7370086d31eb19f405533aba842ab6b8fbdc43a92a9e576a15498c1e5eb1694c8257434a195ad9640c8803d9328b265b8e6acd7
7
+ data.tar.gz: d471a942bb9fd59eaa213c18489c9cd9b3072344542b217142ab42539f8554cbcd214173f46e1c9d7fa980d786eebceee2ad522268908f389a83e32a88231d15
@@ -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
@@ -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
@@ -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/,
@@ -1,3 +1,3 @@
1
1
  module PolarExpress
2
- VERSION = "0.0.6.alpha"
2
+ VERSION = "0.0.7.alpha"
3
3
  end
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.6.alpha
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-13 00:00:00.000000000 Z
11
+ date: 2013-05-27 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler