{"id":23799558,"url":"https://github.com/vizir/corrails-gem","last_synced_at":"2025-10-14T09:07:39.482Z","repository":{"id":5789099,"uuid":"7003284","full_name":"Vizir/corrails-gem","owner":"Vizir","description":"Gem utilizada para rastrear despachados através de diversos agentes de logísticas, atualmente é possível rastrear itens despachados através das seguintes empresas:  Correios e DirectLog","archived":false,"fork":false,"pushed_at":"2014-04-23T23:19:44.000Z","size":185,"stargazers_count":8,"open_issues_count":0,"forks_count":4,"subscribers_count":66,"default_branch":"master","last_synced_at":"2025-10-07T14:59:03.447Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Ruby","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Vizir.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2012-12-04T16:42:01.000Z","updated_at":"2018-11-09T17:48:34.000Z","dependencies_parsed_at":"2022-09-23T23:41:10.584Z","dependency_job_id":null,"html_url":"https://github.com/Vizir/corrails-gem","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/Vizir/corrails-gem","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Vizir%2Fcorrails-gem","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Vizir%2Fcorrails-gem/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Vizir%2Fcorrails-gem/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Vizir%2Fcorrails-gem/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Vizir","download_url":"https://codeload.github.com/Vizir/corrails-gem/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Vizir%2Fcorrails-gem/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":279018498,"owners_count":26086383,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-10-14T02:00:06.444Z","response_time":60,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2025-01-01T21:17:15.440Z","updated_at":"2025-10-14T09:07:39.462Z","avatar_url":"https://github.com/Vizir.png","language":"Ruby","funding_links":[],"categories":[],"sub_categories":[],"readme":"# corrails-gem\n\nGem utilizada para rastrear despachados através de diversos agentes de logísticas, atualmente é possível rastrear itens despachados através das seguintes empresas:\n* [Correios](http://www.correios.com.br)\n* [DirectLog](http://www.directlog.com.br)\n\n## Instalação\n\n### Ambiente sem Rails\ngem install corrails\n\n### Instalação em ambiente rails\nAdicionar a gem corrails ao Gemfile conforme abaixo\n\n```ruby\ngem 'corrails'\n```\n\nExecutar o comando bundle install para instalar a gem.\n\n\n## Exemplo Directlog\n\n```ruby\nrequire 'rubygems'\nrequire 'corrails'\n\nlogin = '1234'\npassword = '5678'\npedido = '91011'\n\ndirectlog = Corrails::Directlog.new\nresponse = directlog.rastrear(login, password, pedido)\n\nif(response.ok?)\n  item = response.item\n  item_pedido = item[:pedido]\n  item_notafiscal = item[:notafiscal]\n  item_serianota = item[:serianota]\n  item_historico = item[:historico]\n\n  item_historico.each do |h|\n    codigo = h[:codigo]\n    status = h[:status]\n    data = h[:data]\n    ...\n  end\nelse\n  error = response.error_msg\nend\n\n```\n\n## Exemplo Correios\n```ruby\nrequire 'rubygems'\nrequire 'corrails'\n\ncorreios = Corrails::Correios.new\nresponse = correios.rastrear('SS123456789BR')\n\nif response.ok?\n  historico =  response.item[:historico]\n  historico.each do |h|\n    status = h[:status]\n    data =  h[:data]\n    local = h[:local]\n    ...\n  end\nelse\n  error = response.error_msg\nend\n\n```\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvizir%2Fcorrails-gem","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fvizir%2Fcorrails-gem","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvizir%2Fcorrails-gem/lists"}