Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
36 changes: 36 additions & 0 deletions .github/ISSUE_TEMPLATE/bug_report.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
---
name: Bug report
about: Report a bug to help us improve
title: ''
labels: bug
assignees: ''

---

## Description

<!-- A clear and concise description of the bug. -->

## Steps to reproduce

1.
2.
3.

## Expected behavior

<!-- What did you expect to happen? -->

## Actual behavior

<!-- What actually happened? -->

## Environment

- Ruby version:
- Gem version:
- OS:

## Additional context

<!-- Any other relevant information. -->
5 changes: 5 additions & 0 deletions .github/ISSUE_TEMPLATE/config.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
blank_issues_enabled: true
contact_links:
- name: Genius API Documentation
url: https://github.com/unurgunite/genius-api
about: Genius API documentation
24 changes: 24 additions & 0 deletions .github/ISSUE_TEMPLATE/feature_request.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
---
name: Feature request
about: Suggest a new feature or improvement
title: ''
labels: enhancement
assignees: ''

---

## Problem

<!-- Describe the problem or limitation you're facing. -->

## Proposed solution

<!-- Describe the solution you'd like. -->

## Alternatives

<!-- Describe any alternatives you've considered. -->

## Additional context

<!-- Any other relevant information. -->
23 changes: 23 additions & 0 deletions .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
## Summary

<!-- Describe the changes and the motivation behind them. -->

## Related issues

<!-- Link to any related issues (e.g., closes #123). -->

## Checklist

- [ ] `rubocop` — 0 offenses
- [ ] `rspec` — all tests pass
- [ ] `rbs validate` — OK
- [ ] `steep check` — no type errors
- [ ] `docscribe lib` — OK

## Type of change

- [ ] Bug fix
- [ ] New feature
- [ ] Refactoring
- [ ] Documentation
- [ ] CI / infrastructure
8 changes: 8 additions & 0 deletions .github/workflows/check-source-branch.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
name: Check source branch
on:
pull_request:
branches: [master]

jobs:
check:
uses: FlorexLabs/shared-workflows/.github/workflows/check-source-branch.yml@master
38 changes: 38 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
name: CI

on: [ push, pull_request ]

jobs:
test:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
ruby: [ '3.2', '3.3', '3.4', '4.0' ]

steps:
- uses: actions/checkout@v4

- name: Install Ruby ${{ matrix.ruby }}
uses: ruby/setup-ruby@v1
with:
ruby-version: ${{ matrix.ruby }}
bundler-cache: true

- name: Install RBS collection
run: bundle exec rbs collection install

- name: RuboCop
run: bundle exec rubocop

- name: RSpec
run: bundle exec rspec

- name: RBS validate
run: bundle exec rbs validate

- name: Docscribe
run: bundle exec docscribe lib --rbs-collection

- name: Steep check
run: bundle exec steep check
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -11,3 +11,5 @@
rakelib
.env
Rakefile
.gem_rbs_collection/
/docs/
25 changes: 16 additions & 9 deletions .rubocop.yml
Original file line number Diff line number Diff line change
@@ -1,13 +1,20 @@
plugins:
- rubocop-performance
- rubocop-rspec
- rubocop-sorted_methods_by_call
- rubocop-rake

AllCops:
TargetRubyVersion: 2.7
TargetRubyVersion: 3.2
NewCops: enable

Style/StringLiterals:
Enabled: true
EnforcedStyle: double_quotes
Performance/BindCall:
Enabled: false

Style/StringLiteralsInInterpolation:
Enabled: true
EnforcedStyle: double_quotes
Gemspec/DevelopmentDependencies:
EnforcedStyle: gemspec

Layout/LineLength:
Max: 120
RSpec/SpecFilePathFormat:
Exclude:
- spec/api/*
- spec/extensions/*
1 change: 1 addition & 0 deletions .ruby-version
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
3.2.11
32 changes: 30 additions & 2 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,37 @@
## [Unreleased]

## [0.1.0] - 2021-03-23
## [0.3.0] - 2026-06-12

- Initial release
### Added

- Ruby >= 3.2 requirement
- RBS type signatures for all API modules and extensions
- RBS collection via `rbs_collection.yaml`
- Steep type checker setup
- `docscribe` gem for automated YARD documentation generation
- `.docscribe.yml` config with RBS integration (`rbs.enabled: true`, `rbs.collection: true`, `collapse_generics: true`)
- YARD documentation (100% documented, 0 warnings)
- CI/CD pipeline with GitHub Actions (rubocop, rspec, docscribe checks)
- CHANGELOG.md, CONTRIBUTING.md, CODE_OF_CONDUCT.md
- `bin/release` release script

### Changed

- Updated `actions/checkout` to v4, `ruby/setup-ruby` to v1
- Updated `dotenv`, `parallel`, `rspec`, `rubocop`, `yard`, `coderay` dependencies
- Improved YARD annotations with meaningful descriptions and RBS-derived types
- README.md: updated requirements, added RBS/Steep/docscribe sections

### Fixed

- RuboCop offenses across all source files
- Anonymous block parameter YARD warning in `errors.rb`
- Type annotations aligned with RBS signatures

## [0.2.0] - 2022-04-03

- Updated documentation. Added first tests

## [0.1.0] - 2021-03-23

- Initial release
48 changes: 35 additions & 13 deletions CODE_OF_CONDUCT.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,10 @@

## Our Pledge

We as members, contributors, and leaders pledge to make participation in our community a harassment-free experience for everyone, regardless of age, body size, visible or invisible disability, ethnicity, sex characteristics, gender identity and expression, level of experience, education, socio-economic status, nationality, personal appearance, race, religion, or sexual identity and orientation.
We as members, contributors, and leaders pledge to make participation in our community a harassment-free experience for
everyone, regardless of age, body size, visible or invisible disability, ethnicity, sex characteristics, gender identity
and expression, level of experience, education, socio-economic status, nationality, personal appearance, race, religion,
or sexual identity and orientation.

We pledge to act and interact in ways that contribute to an open, welcoming, diverse, inclusive, and healthy community.

Expand All @@ -29,45 +32,62 @@ Examples of unacceptable behavior include:

## Enforcement Responsibilities

Community leaders are responsible for clarifying and enforcing our standards of acceptable behavior and will take appropriate and fair corrective action in response to any behavior that they deem inappropriate, threatening, offensive, or harmful.
Community leaders are responsible for clarifying and enforcing our standards of acceptable behavior and will take
appropriate and fair corrective action in response to any behavior that they deem inappropriate, threatening, offensive,
or harmful.

Community leaders have the right and responsibility to remove, edit, or reject comments, commits, code, wiki edits, issues, and other contributions that are not aligned to this Code of Conduct, and will communicate reasons for moderation decisions when appropriate.
Community leaders have the right and responsibility to remove, edit, or reject comments, commits, code, wiki edits,
issues, and other contributions that are not aligned to this Code of Conduct, and will communicate reasons for
moderation decisions when appropriate.

## Scope

This Code of Conduct applies within all community spaces, and also applies when an individual is officially representing the community in public spaces. Examples of representing our community include using an official e-mail address, posting via an official social media account, or acting as an appointed representative at an online or offline event.
This Code of Conduct applies within all community spaces, and also applies when an individual is officially representing
the community in public spaces. Examples of representing our community include using an official e-mail address, posting
via an official social media account, or acting as an appointed representative at an online or offline event.

## Enforcement

Instances of abusive, harassing, or otherwise unacceptable behavior may be reported to the community leaders responsible for enforcement at the [issues page](https://github.com/unurgunite/genius-api/issues). All complaints will be reviewed and investigated promptly and fairly.
Instances of abusive, harassing, or otherwise unacceptable behavior may be reported to the community leaders responsible
for enforcement at the [issues page](https://github.com/unurgunite/genius-api/issues). All complaints will be reviewed
and investigated promptly and fairly.

All community leaders are obligated to respect the privacy and security of the reporter of any incident.

## Enforcement Guidelines

Community leaders will follow these Community Impact Guidelines in determining the consequences for any action they deem in violation of this Code of Conduct:
Community leaders will follow these Community Impact Guidelines in determining the consequences for any action they deem
in violation of this Code of Conduct:

### 1. Correction

**Community Impact**: Use of inappropriate language or other behavior deemed unprofessional or unwelcome in the community.
**Community Impact**: Use of inappropriate language or other behavior deemed unprofessional or unwelcome in the
community.

**Consequence**: A private, written warning from community leaders, providing clarity around the nature of the violation and an explanation of why the behavior was inappropriate. A public apology may be requested.
**Consequence**: A private, written warning from community leaders, providing clarity around the nature of the violation
and an explanation of why the behavior was inappropriate. A public apology may be requested.

### 2. Warning

**Community Impact**: A violation through a single incident or series of actions.

**Consequence**: A warning with consequences for continued behavior. No interaction with the people involved, including unsolicited interaction with those enforcing the Code of Conduct, for a specified period of time. This includes avoiding interactions in community spaces as well as external channels like social media. Violating these terms may lead to a temporary or permanent ban.
**Consequence**: A warning with consequences for continued behavior. No interaction with the people involved, including
unsolicited interaction with those enforcing the Code of Conduct, for a specified period of time. This includes avoiding
interactions in community spaces as well as external channels like social media. Violating these terms may lead to a
temporary or permanent ban.

### 3. Temporary Ban

**Community Impact**: A serious violation of community standards, including sustained inappropriate behavior.

**Consequence**: A temporary ban from any sort of interaction or public communication with the community for a specified period of time. No public or private interaction with the people involved, including unsolicited interaction with those enforcing the Code of Conduct, is allowed during this period. Violating these terms may lead to a permanent ban.
**Consequence**: A temporary ban from any sort of interaction or public communication with the community for a specified
period of time. No public or private interaction with the people involved, including unsolicited interaction with those
enforcing the Code of Conduct, is allowed during this period. Violating these terms may lead to a permanent ban.

### 4. Permanent Ban

**Community Impact**: Demonstrating a pattern of violation of community standards, including sustained inappropriate behavior, harassment of an individual, or aggression toward or disparagement of classes of individuals.
**Community Impact**: Demonstrating a pattern of violation of community standards, including sustained inappropriate
behavior, harassment of an individual, or aggression toward or disparagement of classes of individuals.

**Consequence**: A permanent ban from any sort of public interaction within the community.

Expand All @@ -76,9 +96,11 @@ Community leaders will follow these Community Impact Guidelines in determining t
This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 2.0,
available at https://www.contributor-covenant.org/version/2/0/code_of_conduct.html.

Community Impact Guidelines were inspired by [Mozilla's code of conduct enforcement ladder](https://github.com/mozilla/diversity).
Community Impact Guidelines were inspired
by [Mozilla's code of conduct enforcement ladder](https://github.com/mozilla/diversity).

[homepage]: https://www.contributor-covenant.org

For answers to common questions about this code of conduct, see the FAQ at
https://www.contributor-covenant.org/faq. Translations are available at https://www.contributor-covenant.org/translations.
https://www.contributor-covenant.org/faq. Translations are available
at https://www.contributor-covenant.org/translations.
59 changes: 58 additions & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,11 @@ This file includes code style references which can help when contributing to pro
3. [Define methods][4.3]
5. [Contributing][5]
1. [Git commits][5.1]
2. [Rubocop][5.2]
2. [RuboCop][5.2]
3. [RSpec][5.3]
4. [Docscribe][5.4]
5. [RBS][5.5]
6. [Steep][5.6]
6. [TODO][6]
7. [License][7]

Expand Down Expand Up @@ -256,6 +260,51 @@ See: [RuboCop documentation](https://docs.rubocop.org/rubocop/index.html)
Before pushing, you must be sure that the code you write is correct, so it should always be formatted through a static
analyzer. Look towards the `rubocop -D` and `rubocop -A` commands.

### RSpec

Before pushing, run the test suite to ensure nothing is broken:

```shell
bundle exec rspec
```

The test suite currently has 84 examples with 0 failures.

### Docscribe

Docscribe keeps YARD annotations in sync with the codebase. After making changes to method signatures, run:

```shell
bundle exec docscribe lib
```

This will check for missing or outdated documentation. To regenerate annotations automatically:

```shell
bundle exec docscribe -A --rbs-collection lib
```

The project's docscribe configuration is in `docscribe.yml` at the project root.

### RBS

RBS type signatures are located in `sig/` directory. After adding or changing methods, update the corresponding `.rbs`
files. Validate signatures with:

```shell
bundle exec rbs validate
```

### Steep

Steep performs static type checking using RBS signatures. Run the type checker:

```shell
bundle exec steep check
```

All type errors must be resolved before committing.

## TODO

- [ ] Look at the documentation with fresh eyes
Expand Down Expand Up @@ -306,6 +355,14 @@ the [CC BY-SA 4.0 License](https://creativecommons.org/licenses/by-sa/4.0/)

[5.2]:https://github.com/unurgunite/genius-api/blob/master/CONTRIBUTING.md#rubocop

[5.3]:https://github.com/unurgunite/genius-api/blob/master/CONTRIBUTING.md#rspec

[5.4]:https://github.com/unurgunite/genius-api/blob/master/CONTRIBUTING.md#docscribe

[5.5]:https://github.com/unurgunite/genius-api/blob/master/CONTRIBUTING.md#rbs

[5.6]:https://github.com/unurgunite/genius-api/blob/master/CONTRIBUTING.md#steep

[6]:https://github.com/unurgunite/genius-api/blob/master/CONTRIBUTING.md#todo

[7]:https://github.com/unurgunite/genius-api/blob/master/CONTRIBUTING.md#license
Loading
Loading