{"id":15588157,"url":"https://github.com/qbart/rack-synctime","last_synced_at":"2025-07-03T03:05:01.633Z","repository":{"id":7492953,"uuid":"8842138","full_name":"qbart/rack-synctime","owner":"qbart","description":"Rack::Synctime gem","archived":false,"fork":false,"pushed_at":"2013-03-17T23:17:02.000Z","size":136,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-06-27T20:09:08.769Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Ruby","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/qbart.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.txt","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2013-03-17T21:47:15.000Z","updated_at":"2013-10-09T08:56:14.000Z","dependencies_parsed_at":"2022-09-05T04:41:06.347Z","dependency_job_id":null,"html_url":"https://github.com/qbart/rack-synctime","commit_stats":null,"previous_names":["b-wojtowicz/rack-synctime"],"tags_count":2,"template":false,"template_full_name":null,"purl":"pkg:github/qbart/rack-synctime","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/qbart%2Frack-synctime","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/qbart%2Frack-synctime/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/qbart%2Frack-synctime/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/qbart%2Frack-synctime/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/qbart","download_url":"https://codeload.github.com/qbart/rack-synctime/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/qbart%2Frack-synctime/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":263250594,"owners_count":23437288,"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","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":"2024-10-02T22:21:40.277Z","updated_at":"2025-07-03T03:05:01.601Z","avatar_url":"https://github.com/qbart.png","language":"Ruby","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Rack::Synctime\n\nRack::Synctime is a simple Rack middleware that returns sync time (time when request started) in HTTP headers. Header name can be changed also sync time can be modified using time offset i.e. -5 seconds (server time in seconds decreased by 5) etc. This can be useful if you develop mobile applications (Android, iOS, ...) and you need information when request started in response header.\n\n## Installation\n\nAdd this line to your application's Gemfile:\n\n    gem 'rack-synctime'\n\nAnd then execute:\n\n    $ bundle\n\nOr install it yourself as:\n\n    $ gem install rack-synctime\n\n## Usage\n\nPut the following line in your application.rb file:\n\n```ruby\nconfig.middleware.use Rack::Synctime\n```\n\nCustom header name:\n\n```ruby\nconfig.middleware.use Rack::Synctime, \"Custom-Header-Name\"\n```\n\nTime offset:\n\n```ruby\nconfig.middleware.use Rack::Synctime, Rack::Synctime::DEFAULT_HEADER_NAME, -3600 # server time -1 hour\n```\n\n## Note\nIn Rails app sync time header name might be transformed into capitalized string by other mechanisms. So if you use custom header name make sure you have expected result.\n\n## Demo\nYou can check out demo here: [Rack::Synctime demo](https://github.com/b-wojtowicz/rack-synctime-demo)\n\n## Contributing\n\n1. Fork it\n2. Create your feature branch (`git checkout -b my-new-feature`)\n3. Commit your changes (`git commit -am 'Add some feature'`)\n4. Push to the branch (`git push origin my-new-feature`)\n5. Create new Pull Request\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fqbart%2Frack-synctime","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fqbart%2Frack-synctime","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fqbart%2Frack-synctime/lists"}