data247 0.0.2 → 0.0.3

Sign up to get free protection for your applications and to get access to all the features.
Files changed (3) hide show
  1. data/VERSION +1 -1
  2. data/lib/data247.rb +3 -3
  3. metadata +3 -3
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.0.2
1
+ 0.0.3
@@ -38,9 +38,9 @@ class Data247
38
38
  begin
39
39
  Timeout::timeout(self.timeout) do
40
40
  data=Hash.from_xml(open("https://api.data24-7.com/carrier.php?username=#{self.username}&password=#{self.password}&p1=#{msisdn}").read)["response"]["results"]["result"]
41
- status=data["status"]
42
- operator_name=data["carrier_name"]
43
- operator_code=data["carrier_id"]
41
+ status=data["status"].to_s.strip
42
+ operator_name=data["carrier_name"].to_s.strip
43
+ operator_code=data["carrier_id"].to_s.strip
44
44
  unless status != "OK"
45
45
  return new(:operator_name=> operator_name, :operator_code => operator_code, :msisdn => msisdn, :status=>status)
46
46
  else
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: data247
3
3
  version: !ruby/object:Gem::Version
4
- hash: 27
4
+ hash: 25
5
5
  prerelease: false
6
6
  segments:
7
7
  - 0
8
8
  - 0
9
- - 2
10
- version: 0.0.2
9
+ - 3
10
+ version: 0.0.3
11
11
  platform: ruby
12
12
  authors:
13
13
  - Gerard de Brieder