strans-client 1.0.0 → 1.1.0.pre.pre

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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 2c0220d420f70ea886685f8ef526c13925167aaf
4
- data.tar.gz: e2cdf6d699e8a32dfc779125d9c36be3300a660b
3
+ metadata.gz: 69454c483de9841b9cd9a6b6b7732f0559b7961a
4
+ data.tar.gz: cb313642a72c6005f171c05cb4d2e26b121017bf
5
5
  SHA512:
6
- metadata.gz: f4decd18f80b977d902c63b898cbb12a2045bdc7587ffbbb09d1c2afd1a202c0dcd6ffeeb020ab70cbba9302dd4f72e40b6b2c5907047695ef5897251de2d5ab
7
- data.tar.gz: fe0c6caf4032de8f80c8cf9207c43f91bb7b39042d38496b09f30eeb2921ba4a96c7eb6b106f89db9c78f5200c7cf5f265801fb57a7d5e03c16ba4a8d5aec311
6
+ metadata.gz: 56d2b8858c78b36729208b1124254019c34765ef9db4d4c62c958b6f36d731f69e21513db1706651868a73ee6c9fe66c854843e58c7ae253622aa6c27c70919e
7
+ data.tar.gz: 6b585da62dfbc401998998259854f8fde4ae12237f0ad654c5ab3ca549097abae9d58efa3f15e64a0f312bc829ecd07ac7f702c00b8f6a3addb7034401ebc08d
data/lib/parada.rb CHANGED
@@ -12,8 +12,8 @@ class Parada
12
12
  @codigoParada = fields['CodigoParada'] || fields[:codigoParada]
13
13
  @denomicao = fields['Denomicao'] || fields[:denomicao]
14
14
  @endereco = fields['Endereco'] || fields[:endereco]
15
- @lat = fields['Lat'] || fields[:lat]
16
- @long = fields['Long'] || fields[:long]
15
+ @lat = (fields['Lat'] || fields[:lat]).to_f
16
+ @long = (fields['Long'] || fields[:long]).to_f
17
17
  end
18
18
 
19
19
  def to_json(*a)
@@ -1,4 +1,5 @@
1
1
  require 'json'
2
+ require 'strans-client'
2
3
 
3
4
  Dir.glob(File.join(File.join(File.dirname(__FILE__), "..", "lib"), "**.rb")).each do |file|
4
5
  require file
data/lib/response.rb CHANGED
@@ -9,7 +9,6 @@ class Response
9
9
  def model(path)
10
10
  @resp = JSON.parse(@resp.body)
11
11
  if(@resp.kind_of?(Hash) && @resp['code'] )
12
- puts @resp
13
12
  return Erro.new(@resp)
14
13
  end
15
14
 
data/lib/veiculo.rb CHANGED
@@ -8,8 +8,8 @@ class Veiculo
8
8
  if(fields)
9
9
  @codigoVeiculo = fields['CodigoVeiculo'] || fields[:codigoVeiculo]
10
10
  @hora = fields['Hora'] || fields[:hora]
11
- @lat = fields['Lat'] || fields[:lat]
12
- @long = fields['Long'] || fields[:long]
11
+ @lat = (fields['Lat'] || fields[:lat]).to_f
12
+ @long = (fields['Long'] || fields[:long]).to_f
13
13
  end
14
14
  end
15
15
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: strans-client
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.0
4
+ version: 1.1.0.pre.pre
5
5
  platform: ruby
6
6
  authors:
7
7
  - Luan Pontes
@@ -40,9 +40,9 @@ required_ruby_version: !ruby/object:Gem::Requirement
40
40
  version: '0'
41
41
  required_rubygems_version: !ruby/object:Gem::Requirement
42
42
  requirements:
43
- - - ">="
43
+ - - ">"
44
44
  - !ruby/object:Gem::Version
45
- version: '0'
45
+ version: 1.3.1
46
46
  requirements: []
47
47
  rubyforge_project:
48
48
  rubygems_version: 2.2.2