postmon_ruby 3.0.0 → 3.0.1

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
- SHA1:
3
- data.tar.gz: 30f1b8a965d093ec41b5dc99c4439be4c4bf2352
4
- metadata.gz: ca37ddb91f9690f52307fdc011ced0a12d0b7efd
5
2
  SHA512:
6
- data.tar.gz: 69a7601c53867846ab7fb90044b406a7812d1fc4098502a22807d058be059ff66d089a491f3e9225c834d490b4bc45be7fcb78ba2325cd4606c964c7d4e2a3f9
7
- metadata.gz: 2f571d9ef5c274a6da7ee3da96168651f12523e5dd042d6d711efd37bf102b9b1cd3ed0b34bccc18587dd7e30d23594ae5dda0a8b8b2031c0d276d8a708dbe06
3
+ data.tar.gz: 43183f5888d416eb5338c901901d8a0252a6ac9d92946948a39b14cd817e01a5732868b11038d2dc28f22cce3c7d63632b4c17a9853612686a27ca87553b9c64
4
+ metadata.gz: 760511a2965d59d2b92d27187e76aa15b7d188ababc681639e778ee97ab88705c823e64ed17ac4f2d19d390976ca816b11c8b82403ee12e7f0d573eb081a27b4
5
+ SHA1:
6
+ data.tar.gz: 14b23a2d7371002df444fab481e48091752b77d3
7
+ metadata.gz: e089f69ec98aa04dbe9f4def6aacef2fd3092e10
@@ -0,0 +1,9 @@
1
+ language: ruby
2
+ before_install:
3
+ - gem install bundler -v '~> 1.5'
4
+ rvm:
5
+ - 1.8.7
6
+ - 1.9.3
7
+ - 2.0.0
8
+ - 2.1.1
9
+ - jruby-19mode
data/README.md CHANGED
@@ -1,4 +1,4 @@
1
- # PostmonRuby
1
+ # PostmonRuby [![Build Status](https://travis-ci.org/PostmonAPI/postmon-ruby.svg?branch=master)](https://travis-ci.org/PostmonAPI/postmon-ruby)
2
2
 
3
3
  postmon_ruby permite consultar cep's através da api do postmon
4
4
 
@@ -1,3 +1,4 @@
1
+ # encoding: utf-8
1
2
  require "postmon_ruby/version"
2
3
  require "json"
3
4
  require "postmon_ruby/http/http"
@@ -1,3 +1,4 @@
1
+ # encoding: utf-8
1
2
  module PostmonRuby
2
3
  class Address
3
4
  @@address_attributes = [ :complemento, :bairro, :cidade, :logradouro, :estado, :cep ]
@@ -1,3 +1,4 @@
1
+ # encoding: utf-8
1
2
  module PostmonRuby
2
3
  class City
3
4
  @@city_attributes = [ :area_km2, :codigo_ibge ]
@@ -14,4 +15,4 @@ module PostmonRuby
14
15
  private
15
16
  attr_writer *@@city_attributes
16
17
  end
17
- end
18
+ end
@@ -1,3 +1,4 @@
1
+ # encoding: utf-8
1
2
  module PostmonRuby
2
3
  class Client
3
4
  def self.search(finder, *arguments)
@@ -1,3 +1,4 @@
1
+ # encoding: utf-8
1
2
  module PostmonRuby
2
3
  module Finders
3
4
  class CepFinder < PostmonRuby::Finders::Finder
@@ -15,4 +16,4 @@ module PostmonRuby
15
16
  end
16
17
  end
17
18
  end
18
- end
19
+ end
@@ -1,3 +1,4 @@
1
+ # encoding: utf-8
1
2
  module PostmonRuby
2
3
  module Finders
3
4
  class CityFinder < PostmonRuby::Finders::Finder
@@ -15,4 +16,4 @@ module PostmonRuby
15
16
  end
16
17
  end
17
18
  end
18
- end
19
+ end
@@ -1,3 +1,4 @@
1
+ # encoding: utf-8
1
2
  module PostmonRuby
2
3
  module Finders
3
4
  class Finder
@@ -21,4 +22,4 @@ module PostmonRuby
21
22
  end
22
23
  end
23
24
  end
24
- end
25
+ end
@@ -1,3 +1,4 @@
1
+ # encoding: utf-8
1
2
  module PostmonRuby
2
3
  module Finders
3
4
  class Finders
@@ -14,4 +15,4 @@ module PostmonRuby
14
15
 
15
16
  end
16
17
  end
17
- end
18
+ end
@@ -1,3 +1,4 @@
1
+ # encoding: utf-8
1
2
  module PostmonRuby
2
3
  module Finders
3
4
  class StateFinder < PostmonRuby::Finders::Finder
@@ -15,4 +16,4 @@ module PostmonRuby
15
16
  end
16
17
  end
17
18
  end
18
- end
19
+ end
@@ -1,3 +1,4 @@
1
+ # encoding: utf-8
1
2
  module PostmonRuby
2
3
  module Finders
3
4
  module Tracker
@@ -17,4 +18,4 @@ module PostmonRuby
17
18
  end
18
19
  end
19
20
  end
20
- end
21
+ end
@@ -1,3 +1,4 @@
1
+ # encoding: utf-8
1
2
  module PostmonRuby
2
3
  module Finders
3
4
  class TrackerFinder < PostmonRuby::Finders::Finder
@@ -15,4 +16,4 @@ module PostmonRuby
15
16
 
16
17
  end
17
18
  end
18
- end
19
+ end
@@ -1,3 +1,4 @@
1
+ # encoding: utf-8
1
2
  module PostmonRuby
2
3
  class Http
3
4
  def self.get(uri)
@@ -1,3 +1,4 @@
1
+ # encoding: utf-8
1
2
  module PostmonRuby
2
3
  class State
3
4
  @@state_attributes = [ :area_km2, :codigo_ibge, :nome ]
@@ -14,4 +15,4 @@ module PostmonRuby
14
15
  private
15
16
  attr_writer *@@state_attributes
16
17
  end
17
- end
18
+ end
@@ -1,3 +1,4 @@
1
+ # encoding: utf-8
1
2
  module PostmonRuby
2
3
  class Track
3
4
  #TODO criar um model para salvar o historico do rastreio
@@ -17,4 +18,4 @@ module PostmonRuby
17
18
  private
18
19
  attr_writer *@@track_attributes
19
20
  end
20
- end
21
+ end
@@ -1,3 +1,4 @@
1
+ # encoding: utf-8
1
2
  module PostmonRuby
2
- VERSION = "3.0.0"
3
+ VERSION = "3.0.1"
3
4
  end
@@ -1,3 +1,4 @@
1
+ # encoding: utf-8
1
2
  require "spec_helper"
2
3
 
3
4
  module PostmonRuby
@@ -1,3 +1,4 @@
1
+ # encoding: utf-8
1
2
  require "spec_helper"
2
3
 
3
4
  module PostmonRuby
@@ -51,4 +52,4 @@ module PostmonRuby
51
52
  end
52
53
  end
53
54
  end
54
- end
55
+ end
@@ -1,6 +1,7 @@
1
+ # encoding: utf-8
1
2
  require "spec_helper"
2
3
 
3
4
  module PostmonRuby
4
5
  describe Client do
5
6
  end
6
- end
7
+ end
@@ -1,3 +1,4 @@
1
+ # encoding: utf-8
1
2
  require "spec_helper"
2
3
 
3
4
  module PostmonRuby
@@ -59,4 +60,4 @@ module PostmonRuby
59
60
  end
60
61
  end
61
62
  end
62
- end
63
+ end
@@ -1,3 +1,4 @@
1
+ # encoding: utf-8
1
2
  require "spec_helper"
2
3
 
3
4
  module PostmonRuby
@@ -41,4 +42,4 @@ module PostmonRuby
41
42
  end
42
43
  end
43
44
  end
44
- end
45
+ end
@@ -1,3 +1,4 @@
1
+ # encoding: utf-8
1
2
  require "postmon_ruby"
2
3
  require "webmock/rspec"
3
4
  include WebMock::API
@@ -0,0 +1,42 @@
1
+ {
2
+ codigo: "TESTE",
3
+ servico: "ect",
4
+ historico: [
5
+ {
6
+ detalhes: null,
7
+ local: "CEE VILA NOVA CACHOEIRINHA - SAO PAULO/SP",
8
+ data: "22/04/2014 17:51",
9
+ situacao: "Postado"
10
+ },
11
+ {
12
+ detalhes: "Em trвnsito para CTE VILA MARIA - SAO PAULO/SP",
13
+ local: "CEE VILA NOVA CACHOEIRINHA - SAO PAULO/SP",
14
+ data: "22/04/2014 20:15",
15
+ situacao: "Encaminhado"
16
+ },
17
+ {
18
+ detalhes: "Encaminhado para CTCE RIBEIRAO PRETO - RIBEIRAO PRETO/SP",
19
+ local: "CTE VILA MARIA - SAO PAULO/SP",
20
+ data: "23/04/2014 15:30",
21
+ situacao: "Encaminhado"
22
+ },
23
+ {
24
+ detalhes: "Em trвnsito para CEE ARARAQUARA - ARARAQUARA/SP",
25
+ local: "CTCE RIBEIRAO PRETO - RIBEIRAO PRETO/SP",
26
+ data: "24/04/2014 16:05",
27
+ situacao: "Encaminhado"
28
+ },
29
+ {
30
+ detalhes: null,
31
+ local: "ARARAQUARA/SP",
32
+ data: "25/04/2014 12:17",
33
+ situacao: "Saiu para entrega ao destinatбrio"
34
+ },
35
+ {
36
+ detalhes: null,
37
+ local: "CEE ARARAQUARA - ARARAQUARA/SP",
38
+ data: "25/04/2014 17:58",
39
+ situacao: "Entrega Efetuada"
40
+ }
41
+ ]
42
+ }
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: postmon_ruby
3
3
  version: !ruby/object:Gem::Version
4
- version: 3.0.0
4
+ version: 3.0.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Carlos Ribeiro
@@ -80,6 +80,7 @@ extra_rdoc_files: []
80
80
  files:
81
81
  - .gitignore
82
82
  - .rspec
83
+ - .travis.yml
83
84
  - Gemfile
84
85
  - LICENSE.txt
85
86
  - README.md
@@ -106,6 +107,7 @@ files:
106
107
  - spec/postmon_ruby/ect_tracker_finder_spec.rb
107
108
  - spec/postmon_ruby/state_finder_spec.rb
108
109
  - spec/spec_helper.rb
110
+ - spec/support/track.json
109
111
  homepage: https://github.com/PostmonAPI/postmon-ruby
110
112
  licenses:
111
113
  - MIT
@@ -136,3 +138,4 @@ test_files:
136
138
  - spec/postmon_ruby/ect_tracker_finder_spec.rb
137
139
  - spec/postmon_ruby/state_finder_spec.rb
138
140
  - spec/spec_helper.rb
141
+ - spec/support/track.json