{"id":18026793,"url":"https://github.com/yegor256/syncem","last_synced_at":"2025-03-27T01:31:26.001Z","repository":{"id":59157080,"uuid":"174205346","full_name":"yegor256/syncem","owner":"yegor256","description":"A simple Ruby decorator to make all methods of your object thread-safe","archived":false,"fork":false,"pushed_at":"2024-10-15T15:39:49.000Z","size":94,"stargazers_count":11,"open_issues_count":1,"forks_count":0,"subscribers_count":4,"default_branch":"master","last_synced_at":"2024-10-16T19:34:16.582Z","etag":null,"topics":["ruby","ruby-gem","thread-safety","threading"],"latest_commit_sha":null,"homepage":"https://rubygems.org/gems/syncem","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/yegor256.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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2019-03-06T19:14:51.000Z","updated_at":"2024-10-15T15:39:40.000Z","dependencies_parsed_at":"2024-05-09T12:42:39.411Z","dependency_job_id":"48df9655-2863-4156-b29b-db3969c54c6f","html_url":"https://github.com/yegor256/syncem","commit_stats":{"total_commits":12,"total_committers":1,"mean_commits":12.0,"dds":0.0,"last_synced_commit":"7a4ec540ed733b8e43a74d167a38c08e49ddf29f"},"previous_names":[],"tags_count":4,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yegor256%2Fsyncem","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yegor256%2Fsyncem/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yegor256%2Fsyncem/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yegor256%2Fsyncem/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/yegor256","download_url":"https://codeload.github.com/yegor256/syncem/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245764704,"owners_count":20668462,"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":["ruby","ruby-gem","thread-safety","threading"],"created_at":"2024-10-30T08:08:05.050Z","updated_at":"2025-03-27T01:31:25.887Z","avatar_url":"https://github.com/yegor256.png","language":"Ruby","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003cimg src=\"/logo.svg\" width=\"64px\" height=\"64px\"/\u003e\n\n[![EO principles respected here](https://www.elegantobjects.org/badge.svg)](https://www.elegantobjects.org)\n[![DevOps By Rultor.com](http://www.rultor.com/b/yegor256/syncem)](http://www.rultor.com/p/yegor256/syncem)\n[![We recommend RubyMine](https://www.elegantobjects.org/rubymine.svg)](https://www.jetbrains.com/ruby/)\n\n[![rake](https://github.com/yegor256/syncem/actions/workflows/rake.yml/badge.svg)](https://github.com/yegor256/syncem/actions/workflows/rake.yml)\n[![Gem Version](https://badge.fury.io/rb/syncem.svg)](http://badge.fury.io/rb/syncem)\n[![Maintainability](https://api.codeclimate.com/v1/badges/5528e182bb5e4a2ecc1f/maintainability)](https://codeclimate.com/github/yegor256/syncem/maintainability)\n[![Yard Docs](http://img.shields.io/badge/yard-docs-blue.svg)](http://rubydoc.info/github/yegor256/syncem/master/frames)\n[![Hits-of-Code](https://hitsofcode.com/github/yegor256/syncem)](https://hitsofcode.com/view/github/yegor256/syncem)\n[![License](https://img.shields.io/badge/license-MIT-green.svg)](https://github.com/yegor256/syncem/blob/master/LICENSE.txt)\n\nRead this blog post:\n[_SyncEm: Thread-Safe Decorators in Ruby_](https://www.yegor256.com/2019/06/26/syncem.html).\n\nSometimes you have an object that is not thread-safe,\nbut you need to make sure each of its methods is thread-safe, because they\ndeal with some resources, like files or databases and you want them to\nmanage those resources sequentially. This small gem will help you achieve\nexactly that without any re-design of the objects you already have. Just\ndecorate them with `SyncEm` [thread-safe decorator](https://www.yegor256.com/2017/01/17/synchronized-decorators.html)\nand that is it.\n\nFirst, install it:\n\n```bash\n$ gem install syncem\n```\n\nThen, use it like this:\n\n```ruby\nrequire 'syncem'\nobj = SyncEm.new(obj)\n```\n\nThat's it.\n\n## How to contribute\n\nRead [these guidelines](https://www.yegor256.com/2014/04/15/github-guidelines.html).\nMake sure your build is green before you contribute\nyour pull request. You will need to have [Ruby](https://www.ruby-lang.org/en/) 2.3+ and\n[Bundler](https://bundler.io/) installed. Then:\n\n```\n$ bundle update\n$ bundle exec rake\n```\n\nIf it's clean and you don't see any error messages, submit your pull request.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fyegor256%2Fsyncem","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fyegor256%2Fsyncem","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fyegor256%2Fsyncem/lists"}