{"id":19936288,"url":"https://github.com/sourcey/symple-client-ruby","last_synced_at":"2025-03-01T12:20:51.856Z","repository":{"id":15584220,"uuid":"18319929","full_name":"sourcey/symple-client-ruby","owner":"sourcey","description":"Symple client for Ruby","archived":false,"fork":false,"pushed_at":"2014-04-06T05:43:49.000Z","size":124,"stargazers_count":1,"open_issues_count":0,"forks_count":2,"subscribers_count":4,"default_branch":"master","last_synced_at":"2025-01-12T02:42:11.088Z","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":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/sourcey.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":"2014-04-01T06:30:27.000Z","updated_at":"2021-02-21T01:28:26.000Z","dependencies_parsed_at":"2022-09-08T00:10:13.934Z","dependency_job_id":null,"html_url":"https://github.com/sourcey/symple-client-ruby","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sourcey%2Fsymple-client-ruby","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sourcey%2Fsymple-client-ruby/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sourcey%2Fsymple-client-ruby/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sourcey%2Fsymple-client-ruby/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/sourcey","download_url":"https://codeload.github.com/sourcey/symple-client-ruby/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":241362634,"owners_count":19950593,"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-11-12T23:24:54.414Z","updated_at":"2025-03-01T12:20:51.833Z","avatar_url":"https://github.com/sourcey.png","language":"Ruby","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Symple Ruby Client\n\nThe Symple client module for Ruby which enables one to send Symple messages from a Ruby app to the server using the intermediary redis instance. \n\n## What is Symple?\n\nSymple is a presence and messaging protocol which is semantically similar to XMPP, except that it is unrestrictive and vastly simplified, and it uses JSON instead of XML for encoding messages. Symple also has a C++ client which makes it ideas for messaging and remoting between desktop, mobile and browser clients.\n\n## How to use it\n\n1. Clone the `symple-ruby-client`\n2. Simply `require` the `symple.rb` file in your Ruby app\n3. Call `broadcast`, `broadcast_user` or `broadcast_group` to send a JSON serialized object to peers.\n\n## Examples\n\nHere is an example of using Symple in a Rails app. Lets say we have an Event model, and we want to broadcast the object to all connected peers in the group when a new Event is created:\n\n```ruby\nclass Event \u003c ActiveRecord::Base\n  belongs_to :user      \n  after_create :symple_broadcast\n  \n  def symple_broadcast\n    Symple.broadcast_group(self.user.group_id, {\n        name: self.name,                                     # name of the event\n        type: self.class.name,                               # the name of the object being serialized\n        from: \"#{self.user.username}@#{self.user.group_id}\", # sender symple address\n        data: self                                           # pass the instance to be serialized using to_json\n      })\n  end\nend\n```\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\n## Contact\n\nFor more information please check out the Symple homepage: http://sourcey.com/symple/  \nIf you have a bug or an issue then please use our new Github issue tracker: https://github.com/sourcey/symple-client-ruby/issues\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsourcey%2Fsymple-client-ruby","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsourcey%2Fsymple-client-ruby","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsourcey%2Fsymple-client-ruby/lists"}