poczta_polska 0.1.2 → 0.1.3

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: eea8e1967aed63385c82aa06cbbb3b2cee69e544
4
- data.tar.gz: c5d31f0563dd1a25599552e174a1b54ade6867b7
3
+ metadata.gz: 344a0f5fb4f282f0db7ba0ccb937832c9ceba4e7
4
+ data.tar.gz: dbb2ebf0aa1f7db622517481ee35a7d7dd0dbe34
5
5
  SHA512:
6
- metadata.gz: 5ec5695c2850a4aa127c88d57717e7c0fc1f1d1be4ff15172e2665ff09ffe3e8071c5ca6efa6234d5ad6db0597934949d82f623c0e7071b59da1d8833ee08043
7
- data.tar.gz: a7b46b8dc81ea93f09517e6703969563337421b224ff4d8210ded5440ca8ab5054b81c5300411acd940c5e673464a178e25bb60f3e4985dc6c1d06a531073de6
6
+ metadata.gz: 5136d28e55eb4c15a92c8c00f38c8b4ffa26555fde8b5d88ba028bf0ac00a3ec2a3dbd1a71b384449960741e651348e48393e2cfe7c56fd5324bca01695a0ca4
7
+ data.tar.gz: 760b6b27e3c97d4ec7225430ba6b9f56cf0f19b30826f05497bcefaa4bac9afc90229125780d4b767560f830d18bed3fe643033bb0b3eaab737578bad4df4857
data/README.md CHANGED
@@ -1,6 +1,6 @@
1
1
  # PocztaPolska
2
2
 
3
- [Gem at RubyGems.org](https://rubygems.org/gems/poczta_polska) | [Documentation](http://www.rubydoc.info/gems/poczta_polska/0.1.2)
3
+ [Gem at RubyGems.org](https://rubygems.org/gems/poczta_polska) | [Documentation](http://www.rubydoc.info/gems/poczta_polska/0.1.3)
4
4
 
5
5
  With this gem you can monitor Polish Post parcels and registered mail
6
6
  as well as packages shipped by Pocztex. It allows you to see basic data
@@ -67,6 +67,15 @@ with explicitly wrote (and documented) methods.
67
67
  ### 0.1.2
68
68
  Fixed the `Tracker#check_many` method, it didn't work at all before.
69
69
 
70
+ ### 0.1.3
71
+ Fixed more bugs in the `Tracker#check_many` method, created a test suite.
72
+
73
+ ## Testing
74
+
75
+ I've created a test suite for all the requests and data structures. You
76
+ can run it with `rspec` command, but note that the business API tests won't
77
+ work unless you put your credentials in the environment variables `POCZTA_USER` and `POCZTA_PASS`.
78
+
70
79
  ## Contributing
71
80
 
72
81
  1. Fork it (https://github.com/hejmsdz/poczta_polska.rb/fork)
@@ -81,7 +81,14 @@ module PocztaPolska
81
81
  when -99 then raise Error
82
82
  end
83
83
 
84
- data[:przesylki][:przesylka].map { |p| Package.new(p) }
84
+ pkgs = data[:przesylki][:przesylka]
85
+
86
+ if pkgs.is_a?(Hash)
87
+ # actually checked only one package
88
+ [Package.new(pkgs)]
89
+ else
90
+ pkgs.map { |pkg| Package.new(pkg) }
91
+ end
85
92
  end
86
93
  end
87
94
  end
@@ -1,3 +1,3 @@
1
1
  module PocztaPolska
2
- VERSION = "0.1.2"
2
+ VERSION = "0.1.3"
3
3
  end
@@ -14,7 +14,7 @@ Gem::Specification.new do |spec|
14
14
  "as well as packages shipped by Pocztex. It allows you to see basic data " \
15
15
  "about the consignment as well as all the post offices it has gone through " \
16
16
  "(including their locations and opening hours). The data is downloaded from " \
17
- "[a public SOAP API of the Polish Post](http://www.poczta-polska.pl/pliki/webservices/" \
17
+ "a public SOAP API of the Polish Post (http://www.poczta-polska.pl/pliki/webservices/" \
18
18
  "Metody%20i%20struktury%20uslugi%20sieciowej%20Poczty%20Polskiej%20SA.pdf) " \
19
19
  "and wrapped into Ruby classes for your convenience."
20
20
  spec.homepage = "https://github.com/hejmsdz/poczta_polska.rb"
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: poczta_polska
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.2
4
+ version: 0.1.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Mikołaj Rozwadowski
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2015-06-16 00:00:00.000000000 Z
11
+ date: 2015-06-28 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: savon
@@ -103,8 +103,8 @@ dependencies:
103
103
  description: With this gem you can monitor Polish Post parcels and registered mail
104
104
  as well as packages shipped by Pocztex. It allows you to see basic data about the
105
105
  consignment as well as all the post offices it has gone through (including their
106
- locations and opening hours). The data is downloaded from [a public SOAP API of
107
- the Polish Post](http://www.poczta-polska.pl/pliki/webservices/Metody%20i%20struktury%20uslugi%20sieciowej%20Poczty%20Polskiej%20SA.pdf)
106
+ locations and opening hours). The data is downloaded from a public SOAP API of the
107
+ Polish Post (http://www.poczta-polska.pl/pliki/webservices/Metody%20i%20struktury%20uslugi%20sieciowej%20Poczty%20Polskiej%20SA.pdf)
108
108
  and wrapped into Ruby classes for your convenience.
109
109
  email:
110
110
  - mikolaj.rozwadowski@outlook.com
@@ -149,7 +149,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
149
149
  version: '0'
150
150
  requirements: []
151
151
  rubyforge_project:
152
- rubygems_version: 2.4.6
152
+ rubygems_version: 2.4.8
153
153
  signing_key:
154
154
  specification_version: 4
155
155
  summary: Track Polish Post packages in Ruby