{"id":50594638,"url":"https://github.com/getstream/getstream-ruby","last_synced_at":"2026-06-09T23:00:39.500Z","repository":{"id":318391304,"uuid":"1071092213","full_name":"GetStream/getstream-ruby","owner":"GetStream","description":null,"archived":false,"fork":false,"pushed_at":"2026-06-01T10:30:55.000Z","size":1501,"stargazers_count":0,"open_issues_count":5,"forks_count":3,"subscribers_count":0,"default_branch":"master","last_synced_at":"2026-06-05T13:21:29.586Z","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/GetStream.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":null,"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,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2025-10-06T21:16:50.000Z","updated_at":"2026-06-01T10:30:58.000Z","dependencies_parsed_at":"2025-10-06T23:32:27.859Z","dependency_job_id":"407b4bdc-8fdc-4bb7-86a2-4cab37f1d600","html_url":"https://github.com/GetStream/getstream-ruby","commit_stats":null,"previous_names":["getstream/getstream-ruby"],"tags_count":26,"template":false,"template_full_name":null,"purl":"pkg:github/GetStream/getstream-ruby","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/GetStream%2Fgetstream-ruby","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/GetStream%2Fgetstream-ruby/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/GetStream%2Fgetstream-ruby/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/GetStream%2Fgetstream-ruby/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/GetStream","download_url":"https://codeload.github.com/GetStream/getstream-ruby/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/GetStream%2Fgetstream-ruby/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":34129072,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-06-09T02:00:06.510Z","response_time":63,"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":"2026-06-05T13:01:23.813Z","updated_at":"2026-06-09T23:00:39.491Z","avatar_url":"https://github.com/GetStream.png","language":"Ruby","funding_links":[],"categories":[],"sub_categories":[],"readme":"# GetStream Ruby SDK this\n\nOfficial Ruby SDK for GetStream's activity feeds and chat APIs.\n\n## Installation\n\nAdd this line to your application's Gemfile:\n\n```ruby\ngem 'getstream-ruby'\n```\n\nAnd then execute:\n\n```bash\n$ bundle install\n```\n\nOr install it yourself as:\n\n```bash\n$ gem install getstream-ruby\n```\n\n## Migrating from stream-chat-ruby?\n\nIf you are currently using [`stream-chat-ruby`](https://github.com/GetStream/stream-chat-ruby), we have a detailed migration guide with side-by-side code examples for common Chat use cases. See the [Migration Guide](docs/migration-from-stream-chat-ruby/README.md).\n\n## Configuration\n\n### Method 1: Manual (Highest Priority)\n\n```ruby\nrequire 'getstream_ruby'\n\nclient = GetStreamRuby.manual(\n  api_key: \"your_api_key\",\n  api_secret: \"your_api_secret\",\n  # Optional HTTP tuning for keep-alive / connection reuse\n  connection_keep_alive: true,\n  # Optional: bring your own Faraday adapter (default is Faraday.default_adapter)\n  faraday_adapter: :net_http,\n  faraday_adapter_options: {\n    # adapter-specific options\n  }\n)\n```\n\nYou can also set these via environment variables:\n\n```bash\nSTREAM_CONNECTION_KEEP_ALIVE=true\nSTREAM_FARADAY_ADAPTER=net_http\n```\n\n### Method 2: .env File\n\nCreate a `.env` file in your project root:\n\n```bash\n# Copy the example file\ncp env.example .env\n\n# Edit .env with your actual credentials\nSTREAM_API_KEY=your_api_key\nSTREAM_API_SECRET=your_api_secret\n```\n\n```ruby\nrequire 'getstream_ruby'\n\n# Uses .env file automatically\nclient = GetStreamRuby.env\n# or\nclient = GetStreamRuby.client  # defaults to .env\n```\n\n### Method 3: Environment Variables\n\n```bash\nexport STREAM_API_KEY=your_api_key\nexport STREAM_API_SECRET=your_api_secret\n```\n\n```ruby\nrequire 'getstream_ruby'\n\nclient = GetStreamRuby.env_vars\n```\n\n## Usage\n\n### Basic Setup\n\n```ruby\n# Create a client instance\nclient = GetStreamRuby.client\n\n# Or create with custom configuration\nclient = GetStreamRuby::Client.new(config)\n```\n\n### Feed Operations\n\n#### Create a Feed\n\n```ruby\n# Create a user feed\nfeed_response = client.feed.create(\"user\", \"123\", {\n  name: \"John Doe\",\n  email: \"john@example.com\"\n})\n```\n\n#### Add Activity to Feed\n\n```ruby\n# Add an activity\nactivity_response = client.feed.add_activity(\"user\", \"123\", {\n  actor: \"user:123\",\n  verb: \"post\",\n  object: \"post:456\",\n  message: \"Hello, world!\",\n  published: Time.now.iso8601\n})\n```\n\n#### Get Feed Activities\n\n```ruby\n# Get activities from a feed\nactivities = client.feed.get_activities(\"user\", \"123\", {\n  limit: 10,\n  offset: 0\n})\n```\n\n#### Follow/Unfollow Feeds\n\n```ruby\n# Follow another user\nfollow_response = client.feed.follow(\"user:123\", \"user:456\", {\n  activity_copy_limit: 5\n})\n\n# Unfollow a user\nunfollow_response = client.feed.unfollow(\"user:123\", \"user:456\")\n```\n\n## Error Handling\n\nThe SDK provides specific error classes for different types of errors:\n\n```ruby\nbegin\n  client.feed.create(\"user\", \"123\")\nrescue GetStreamRuby::AuthenticationError =\u003e e\n  puts \"Authentication failed: #{e.message}\"\nrescue GetStreamRuby::ValidationError =\u003e e\n  puts \"Validation error: #{e.message}\"\nrescue GetStreamRuby::APIError =\u003e e\n  puts \"API error: #{e.message}\"\nend\n```\n\n## Development\n\n### Quick Start\n\n```bash\n# Clone the repository\ngit clone https://github.com/getstream/getstream-ruby.git\ncd getstream-ruby\n\n# Setup development environment\nmake dev-setup\n\n# Run all checks\nmake dev-check\n```\n\n### Project Structure\n\n```\ngetstream_ruby/\n├── lib/getstream_ruby/          # Main SDK code\n├── spec/                        # Test files\n│   ├── integration/             # Integration tests\n│   └── *.rb                     # Unit tests\n├── .github/workflows/           # CI/CD workflows\n├── .rubocop.yml                 # Code style configuration\n├── .env.example                 # Environment template\n├── Makefile                     # Development commands\n├── Rakefile                     # Ruby task runner\n└── Gemfile                      # Dependencies\n```\n\n### Development Commands\n\nThis project includes a simple Makefile with essential commands:\n\n#### Setup \u0026 Installation\n```bash\nmake install          # Install dependencies\nmake setup            # Setup development environment\nmake dev-setup        # Complete development setup\n```\n\n#### Testing\n```bash\nmake test             # Run unit tests only\nmake test-integration # Run integration tests only\nmake test-all         # Run all tests (unit + integration)\n```\n\n#### Code Quality\n```bash\nmake format           # Auto-format code with RuboCop\nmake format-check     # Check formatting (CI-friendly)\nmake lint             # Run RuboCop linter\nmake security         # Run security audit\nmake dev-check        # Run all development checks\n```\n\n#### Utilities\n```bash\nmake clean            # Clean up generated files\nmake console          # Start IRB console with SDK loaded\nmake version          # Show current version\nmake help             # Show all available commands\n```\n\n### Environment Setup\n\n1. **Copy environment template:**\n   ```bash\n   cp .env.example .env\n   ```\n\n2. **Edit `.env` with your GetStream credentials:**\n   ```bash\n   STREAM_API_KEY=your_api_key\n   STREAM_API_SECRET=your_api_secret\n   ```\n\n3. **Run tests:**\n   ```bash\n   make test-all\n   ```\n\n### Ruby \u0026 Bundler Compatibility\n\nThis project supports Ruby 2.6+ and uses the default bundler version for simplicity.\n\n**Requirements:**\n- Ruby 2.6.0+ (see `.ruby-version`)\n- Bundler (latest compatible version)\n\n### Code Style\n\nThis project uses RuboCop for code style enforcement. The configuration is in `.rubocop.yml`.\n\n- **Auto-fix issues:** `make format-fix`\n- **Check style:** `make format-check`\n- **View all issues:** `make lint`\n\n### Development Tools\n\nThe project includes several development tools configured and ready to use:\n\n- **RuboCop** - Code style and quality enforcement\n- **RSpec** - Testing framework\n- **SimpleCov** - Code coverage reporting\n- **YARD** - Documentation generation\n- **Bundler Audit** - Security vulnerability scanning\n- **WebMock** - HTTP request mocking (disabled for integration tests)\n\n### Available Makefile Commands\n\nRun `make help` to see all available commands, or check the sections above for categorized commands.\n\n### Integration Tests\n\nIntegration tests require valid GetStream API credentials. They test real API interactions:\n\n```bash\n# Run integration tests (requires .env file)\nmake test-integration\n\n# Run specific integration test\nbundle exec rspec spec/integration/feed_integration_spec.rb\nbundle exec rspec spec/integration/moderation_integration_spec.rb\n```\n\n### CI/CD\n\nThe project includes simple GitHub Actions workflows:\n\n- **CI Pipeline:** Runs on every push and pull request\n  - Unit tests\n  - Code formatting checks\n  - Security audit\n  - Integration tests (on master/main branches only)\n\n- **Release Pipeline:** Manual releases via git tags\n  - Create a tag: `git tag v1.0.0 \u0026\u0026 git push origin v1.0.0`\n  - Automated gem build and release\n\n- **Pre-releasee Pipeline:** Create a pre-release to trigger the workflow\n  - Push a tag (e.g. `1.0.0.beta.1`), then go to **GitHub Releases -\u003e Draft a new release**, select the tag, check **\"Set as a pre-release\"**, and publish. The CI job will trigger automatically and publish the package.\n\n#### GitHub Environment Variables\n\nTo enable integration tests in CI, configure these GitHub repository settings:\n\n1. **Create a \"ci\" environment:**\n   - Go to Settings → Environments\n   - Click \"New environment\"\n   - Name it \"ci\"\n\n2. **Configure environment variables:**\n   - In the \"ci\" environment, go to Environment variables\n   - Add: `STREAM_API_KEY` = your GetStream API key\n\n3. **Configure environment secrets:**\n   - In the \"ci\" environment, go to Environment secrets\n   - Add: `STREAM_API_SECRET` = your GetStream API secret\n\n### Contributing\n\n1. Fork the repository\n2. Create a feature branch: `git checkout -b feature-name`\n3. Make your changes\n4. Run tests: `make dev-check`\n5. Commit with conventional messages: `git commit -m \"feat: add new feature\"`\n6. Push and create a pull request\n\n**Commit Message Format:**\n- `feat:` - New features\n- `fix:` - Bug fixes\n- `docs:` - Documentation changes\n- `style:` - Code style changes\n- `refactor:` - Code refactoring\n- `test:` - Test changes\n- `chore:` - Maintenance tasks\n\n## Contributing\n\nBug reports and pull requests are welcome on GitHub at https://github.com/getstream/getstream-ruby.\n\n## Release Process\n\nReleases use two paths, both handled by `.github/workflows/release.yml`:\n\n- **Default**: automatic release when a PR is merged to `main`/`master`. The PR title (and body) drives the semver bump.\n- **Fallback**: manual release via the `Release` workflow's `workflow_dispatch` (admin use). Select a `version_bump` (`patch`/`minor`/`major`). `use_current_version=true` skips the bump and publishes whatever is already in `lib/getstream_ruby/version.rb`.\n\nAutomatic semver bump rules:\n\n- `feat:` -\u003e minor\n- `fix:` (or `bug:`) -\u003e patch\n- `feat!:`, `\u003ctype\u003e(scope)!:`, or `BREAKING CHANGE` in the PR body/title -\u003e major\n\nPRs with any other prefix do not trigger a release.\n\nThe release pipeline runs lint (`make format-check \u0026\u0026 make lint \u0026\u0026 make security`), the unit suite (`make test`), and all three integration suites (chat, feed, video) on the merged commit before publishing to RubyGems. Each step is idempotent; a failed run can be re-dispatched from the Actions UI.\n\n## License\n\nThe gem is available as open source under the terms of the [MIT License](https://opensource.org/licenses/MIT).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgetstream%2Fgetstream-ruby","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgetstream%2Fgetstream-ruby","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgetstream%2Fgetstream-ruby/lists"}