Skip to content

Commit c3a7398

Browse files
committed
Add Ruby OpenFeature Provider
1 parent 7229a01 commit c3a7398

25 files changed

+798
-2
lines changed

.github/CODEOWNERS

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
* @configcat/developers

.github/dependabot.yml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
version: 2
2+
enable-beta-ecosystems: true
3+
updates:
4+
- package-ecosystem: "github-actions"
5+
directory: "/"
6+
schedule:
7+
interval: "weekly"

.github/workflows/ci.yml

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
name: CI
2+
3+
on:
4+
push:
5+
branches: [ '*' ]
6+
paths-ignore:
7+
- '**.md'
8+
pull_request:
9+
paths-ignore:
10+
- '**.md'
11+
12+
jobs:
13+
standard:
14+
runs-on: ubuntu-latest
15+
steps:
16+
- uses: actions/checkout@v4
17+
- uses: ruby/setup-ruby@v1
18+
with:
19+
ruby-version: 3.2
20+
- run: bundle install
21+
- run: bundle exec rake standard
22+
23+
test:
24+
runs-on: ubuntu-latest
25+
name: Ruby ${{ matrix.ruby }}
26+
strategy:
27+
matrix:
28+
ruby:
29+
- "3.3"
30+
- "3.2"
31+
- "3.1"
32+
33+
steps:
34+
- uses: actions/checkout@v4
35+
- uses: ruby/setup-ruby@v1
36+
with:
37+
ruby-version: ${{ matrix.ruby }}
38+
- run: bundle install
39+
- run: bundle exec rspec

.github/workflows/publish.yml

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
name: Publish
2+
on:
3+
push:
4+
tags: [ 'v[0-9]+.[0-9]+.[0-9]+' ]
5+
6+
jobs:
7+
publish:
8+
runs-on: ubuntu-latest
9+
steps:
10+
- uses: actions/checkout@v4
11+
- uses: ruby/setup-ruby@v1
12+
with:
13+
ruby-version: 3.2
14+
- name: Publish to RubyGems
15+
run: |
16+
mkdir -p $HOME/.gem
17+
touch $HOME/.gem/credentials
18+
chmod 0600 $HOME/.gem/credentials
19+
printf -- "---\n:rubygems_api_key: ${GEM_HOST_API_KEY}\n" > $HOME/.gem/credentials
20+
gem build *.gemspec
21+
gem push *.gem
22+
env:
23+
GEM_HOST_API_KEY: "${{ secrets.GEM_API_KEY }}"

.github/workflows/stale.yml

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
name: Mark stale issues
2+
3+
on:
4+
schedule:
5+
- cron: '0 1 * * *'
6+
7+
workflow_dispatch:
8+
9+
jobs:
10+
stale:
11+
uses: configcat/.github/.github/workflows/stale.yml@master
12+
secrets: inherit

.gitignore

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,3 +54,7 @@ build-iPhoneSimulator/
5454

5555
# Used by RuboCop. Remote config files pulled in from inherit_from directive.
5656
# .rubocop-https?--*
57+
58+
.idea
59+
60+
.rspec_status

.rspec

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
-I lib
2+
--format documentation
3+
--color
4+
--require spec_helper

.standard.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
parallel: true
2+
format: progress
3+
ruby_version: 3.1
4+
plugins:
5+
- standard-performance

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Please check the [Github Releases](https://github.com/configcat/openfeature-ruby/releases) page for the changelog of the ConfigCat OpenFeature Provider for Ruby.

CONTRIBUTING.md

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
# Contributing to the ConfigCat OpenFeature Provider for Ruby
2+
3+
ConfigCat SDK is an open source project. Feedback and contribution are welcome. Contributions are made to this repo via Issues and Pull Requests.
4+
5+
## Submitting bug reports and feature requests
6+
7+
The ConfigCat SDK team monitors the [issue tracker](https://github.com/configcat/openfeature-ruby/issues) in the Provider repository. Bug reports and feature requests specific to this SDK should be filed in this issue tracker. The team will respond to all newly filed issues.
8+
9+
## Submitting pull requests
10+
11+
We encourage pull requests and other contributions from the community.
12+
- Before submitting pull requests, ensure that all temporary or unintended code is removed.
13+
- Be accompanied by a complete Pull Request template (loaded automatically when a PR is created).
14+
- Add unit or integration tests for fixed or changed functionality.
15+
16+
When you submit a pull request or otherwise seek to include your change in the repository, you waive all your intellectual property rights, including your copyright and patent claims for the submission. For more details please read the [contribution agreement](https://github.com/configcat/legal/blob/main/contribution-agreement.md).
17+
18+
In general, we follow the ["fork-and-pull" Git workflow](https://github.com/susam/gitpr)
19+
20+
1. Fork the repository to your own GitHub account
21+
2. Clone the project to your machine
22+
3. Create a branch locally with a succinct but descriptive name
23+
4. Commit changes to the branch
24+
5. Following any formatting and testing guidelines specific to this repo
25+
6. Push changes to your fork
26+
7. Open a PR in our repository and follow the PR template so that we can efficiently review the changes.
27+
28+
## Build instructions
29+
30+
This provider is built with [Bundler](https://bundler.io). To install Bundler, run `gem install bundler`.
31+
32+
To install dependencies:
33+
34+
```bash
35+
bundle install
36+
```
37+
38+
## Running tests
39+
40+
```bash
41+
bundle exec rspec spec
42+
```

0 commit comments

Comments
 (0)