genius-api 0.3.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (60) hide show
  1. checksums.yaml +7 -0
  2. data/.github/ISSUE_TEMPLATE/bug_report.md +36 -0
  3. data/.github/ISSUE_TEMPLATE/config.yml +5 -0
  4. data/.github/ISSUE_TEMPLATE/feature_request.md +24 -0
  5. data/.github/PULL_REQUEST_TEMPLATE.md +23 -0
  6. data/.github/workflows/check-source-branch.yml +8 -0
  7. data/.github/workflows/ci.yml +38 -0
  8. data/.gitignore +15 -0
  9. data/.rspec +3 -0
  10. data/.rubocop.yml +20 -0
  11. data/.ruby-version +1 -0
  12. data/CHANGELOG.md +37 -0
  13. data/CODE_OF_CONDUCT.md +106 -0
  14. data/CONTRIBUTING.md +368 -0
  15. data/Gemfile +7 -0
  16. data/Gemfile.lock +174 -0
  17. data/LICENSE.txt +674 -0
  18. data/README.md +288 -0
  19. data/SECURITY.md +14 -0
  20. data/Steepfile +13 -0
  21. data/bin/console +15 -0
  22. data/bin/release +5 -0
  23. data/bin/setup +21 -0
  24. data/docscribe.yml +9 -0
  25. data/exe/genius-api +4 -0
  26. data/genius-api.gemspec +47 -0
  27. data/lib/extensions/deep_find.rb +36 -0
  28. data/lib/extensions/extensions.rb +12 -0
  29. data/lib/extensions/options_helper.rb +17 -0
  30. data/lib/extensions/token_ext.rb +12 -0
  31. data/lib/extensions/unescape.rb +13 -0
  32. data/lib/genius/api/account.rb +35 -0
  33. data/lib/genius/api/annotations.rb +90 -0
  34. data/lib/genius/api/artists.rb +82 -0
  35. data/lib/genius/api/authorization.rb +47 -0
  36. data/lib/genius/api/errors.rb +211 -0
  37. data/lib/genius/api/referents.rb +38 -0
  38. data/lib/genius/api/search.rb +26 -0
  39. data/lib/genius/api/songs.rb +84 -0
  40. data/lib/genius/api/version.rb +8 -0
  41. data/lib/genius/api/web_pages.rb +26 -0
  42. data/lib/genius/api.rb +23 -0
  43. data/rbs_collection.lock.yaml +232 -0
  44. data/rbs_collection.yaml +14 -0
  45. data/sig/lib/extensions/deep_find.rbs +30 -0
  46. data/sig/lib/extensions/options_helper.rbs +3 -0
  47. data/sig/lib/extensions/token_ext.rbs +3 -0
  48. data/sig/lib/extensions/unescape.rbs +3 -0
  49. data/sig/lib/genius/api/account.rbs +23 -0
  50. data/sig/lib/genius/api/annotations.rbs +13 -0
  51. data/sig/lib/genius/api/artists.rbs +15 -0
  52. data/sig/lib/genius/api/authorization.rbs +11 -0
  53. data/sig/lib/genius/api/errors.rbs +46 -0
  54. data/sig/lib/genius/api/referents.rbs +7 -0
  55. data/sig/lib/genius/api/search.rbs +5 -0
  56. data/sig/lib/genius/api/songs.rbs +15 -0
  57. data/sig/lib/genius/api/version.rbs +5 -0
  58. data/sig/lib/genius/api/web_pages.rbs +5 -0
  59. data/sig/lib/genius/api.rbs +9 -0
  60. metadata +313 -0
checksums.yaml ADDED
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA256:
3
+ metadata.gz: d7e765ffaa2558d34e7d138177585ed120d529ce586b8213dfcb477244fa6dc3
4
+ data.tar.gz: 0107b278692209000ae7c6c22196bdb45eaf9725be563ed4a96aa72a25f04b30
5
+ SHA512:
6
+ metadata.gz: a436a07430d555130401d532b2d824ac38c6993f20a278f6fbe3718a88cd28ce478bc3979fae37aa15c4af8c3e8def271ec77c0a45f1ebe769006c00c09d4cf5
7
+ data.tar.gz: e6360dbd68b8668b98fec115c7394db1de88264b5dc040e0494f0e803541c1da17d08996a474191280d59f0ec84a33e36af9635d2f7d20454f5ceb6397fb038a
@@ -0,0 +1,36 @@
1
+ ---
2
+ name: Bug report
3
+ about: Report a bug to help us improve
4
+ title: ''
5
+ labels: bug
6
+ assignees: ''
7
+
8
+ ---
9
+
10
+ ## Description
11
+
12
+ <!-- A clear and concise description of the bug. -->
13
+
14
+ ## Steps to reproduce
15
+
16
+ 1.
17
+ 2.
18
+ 3.
19
+
20
+ ## Expected behavior
21
+
22
+ <!-- What did you expect to happen? -->
23
+
24
+ ## Actual behavior
25
+
26
+ <!-- What actually happened? -->
27
+
28
+ ## Environment
29
+
30
+ - Ruby version:
31
+ - Gem version:
32
+ - OS:
33
+
34
+ ## Additional context
35
+
36
+ <!-- Any other relevant information. -->
@@ -0,0 +1,5 @@
1
+ blank_issues_enabled: true
2
+ contact_links:
3
+ - name: Genius API Documentation
4
+ url: https://github.com/unurgunite/genius-api
5
+ about: Genius API documentation
@@ -0,0 +1,24 @@
1
+ ---
2
+ name: Feature request
3
+ about: Suggest a new feature or improvement
4
+ title: ''
5
+ labels: enhancement
6
+ assignees: ''
7
+
8
+ ---
9
+
10
+ ## Problem
11
+
12
+ <!-- Describe the problem or limitation you're facing. -->
13
+
14
+ ## Proposed solution
15
+
16
+ <!-- Describe the solution you'd like. -->
17
+
18
+ ## Alternatives
19
+
20
+ <!-- Describe any alternatives you've considered. -->
21
+
22
+ ## Additional context
23
+
24
+ <!-- Any other relevant information. -->
@@ -0,0 +1,23 @@
1
+ ## Summary
2
+
3
+ <!-- Describe the changes and the motivation behind them. -->
4
+
5
+ ## Related issues
6
+
7
+ <!-- Link to any related issues (e.g., closes #123). -->
8
+
9
+ ## Checklist
10
+
11
+ - [ ] `rubocop` — 0 offenses
12
+ - [ ] `rspec` — all tests pass
13
+ - [ ] `rbs validate` — OK
14
+ - [ ] `steep check` — no type errors
15
+ - [ ] `docscribe lib` — OK
16
+
17
+ ## Type of change
18
+
19
+ - [ ] Bug fix
20
+ - [ ] New feature
21
+ - [ ] Refactoring
22
+ - [ ] Documentation
23
+ - [ ] CI / infrastructure
@@ -0,0 +1,8 @@
1
+ name: Check source branch
2
+ on:
3
+ pull_request:
4
+ branches: [master]
5
+
6
+ jobs:
7
+ check:
8
+ uses: FlorexLabs/shared-workflows/.github/workflows/check-source-branch.yml@master
@@ -0,0 +1,38 @@
1
+ name: CI
2
+
3
+ on: [ push, pull_request ]
4
+
5
+ jobs:
6
+ test:
7
+ runs-on: ubuntu-latest
8
+ strategy:
9
+ fail-fast: false
10
+ matrix:
11
+ ruby: [ '3.2', '3.3', '3.4', '4.0' ]
12
+
13
+ steps:
14
+ - uses: actions/checkout@v4
15
+
16
+ - name: Install Ruby ${{ matrix.ruby }}
17
+ uses: ruby/setup-ruby@v1
18
+ with:
19
+ ruby-version: ${{ matrix.ruby }}
20
+ bundler-cache: true
21
+
22
+ - name: Install RBS collection
23
+ run: bundle exec rbs collection install
24
+
25
+ - name: RuboCop
26
+ run: bundle exec rubocop
27
+
28
+ - name: RSpec
29
+ run: bundle exec rspec
30
+
31
+ - name: RBS validate
32
+ run: bundle exec rbs validate
33
+
34
+ - name: Docscribe
35
+ run: bundle exec docscribe lib --rbs-collection
36
+
37
+ - name: Steep check
38
+ run: bundle exec steep check
data/.gitignore ADDED
@@ -0,0 +1,15 @@
1
+ /.bundle/
2
+ /.yardoc
3
+ /_yardoc/
4
+ /coverage/
5
+ /doc/
6
+ /pkg/
7
+ /spec/reports/
8
+ /tmp/
9
+ .idea
10
+ *.gem
11
+ rakelib
12
+ .env
13
+ Rakefile
14
+ .gem_rbs_collection/
15
+ /docs/
data/.rspec ADDED
@@ -0,0 +1,3 @@
1
+ --format documentation
2
+ --color
3
+ --require spec_helper
data/.rubocop.yml ADDED
@@ -0,0 +1,20 @@
1
+ plugins:
2
+ - rubocop-performance
3
+ - rubocop-rspec
4
+ - rubocop-sorted_methods_by_call
5
+ - rubocop-rake
6
+
7
+ AllCops:
8
+ TargetRubyVersion: 3.2
9
+ NewCops: enable
10
+
11
+ Performance/BindCall:
12
+ Enabled: false
13
+
14
+ Gemspec/DevelopmentDependencies:
15
+ EnforcedStyle: gemspec
16
+
17
+ RSpec/SpecFilePathFormat:
18
+ Exclude:
19
+ - spec/api/*
20
+ - spec/extensions/*
data/.ruby-version ADDED
@@ -0,0 +1 @@
1
+ 3.2.11
data/CHANGELOG.md ADDED
@@ -0,0 +1,37 @@
1
+ ## [Unreleased]
2
+
3
+ ## [0.3.0] - 2026-06-12
4
+
5
+ ### Added
6
+
7
+ - Ruby >= 3.2 requirement
8
+ - RBS type signatures for all API modules and extensions
9
+ - RBS collection via `rbs_collection.yaml`
10
+ - Steep type checker setup
11
+ - `docscribe` gem for automated YARD documentation generation
12
+ - `.docscribe.yml` config with RBS integration (`rbs.enabled: true`, `rbs.collection: true`, `collapse_generics: true`)
13
+ - YARD documentation (100% documented, 0 warnings)
14
+ - CI/CD pipeline with GitHub Actions (rubocop, rspec, docscribe checks)
15
+ - CHANGELOG.md, CONTRIBUTING.md, CODE_OF_CONDUCT.md
16
+ - `bin/release` release script
17
+
18
+ ### Changed
19
+
20
+ - Updated `actions/checkout` to v4, `ruby/setup-ruby` to v1
21
+ - Updated `dotenv`, `parallel`, `rspec`, `rubocop`, `yard`, `coderay` dependencies
22
+ - Improved YARD annotations with meaningful descriptions and RBS-derived types
23
+ - README.md: updated requirements, added RBS/Steep/docscribe sections
24
+
25
+ ### Fixed
26
+
27
+ - RuboCop offenses across all source files
28
+ - Anonymous block parameter YARD warning in `errors.rb`
29
+ - Type annotations aligned with RBS signatures
30
+
31
+ ## [0.2.0] - 2022-04-03
32
+
33
+ - Updated documentation. Added first tests
34
+
35
+ ## [0.1.0] - 2021-03-23
36
+
37
+ - Initial release
@@ -0,0 +1,106 @@
1
+ # Contributor Covenant Code of Conduct
2
+
3
+ ## Our Pledge
4
+
5
+ We as members, contributors, and leaders pledge to make participation in our community a harassment-free experience for
6
+ everyone, regardless of age, body size, visible or invisible disability, ethnicity, sex characteristics, gender identity
7
+ and expression, level of experience, education, socio-economic status, nationality, personal appearance, race, religion,
8
+ or sexual identity and orientation.
9
+
10
+ We pledge to act and interact in ways that contribute to an open, welcoming, diverse, inclusive, and healthy community.
11
+
12
+ ## Our Standards
13
+
14
+ Examples of behavior that contributes to a positive environment for our community include:
15
+
16
+ * Demonstrating empathy and kindness toward other people
17
+ * Being respectful of differing opinions, viewpoints, and experiences
18
+ * Giving and gracefully accepting constructive feedback
19
+ * Accepting responsibility and apologizing to those affected by our mistakes, and learning from the experience
20
+ * Focusing on what is best not just for us as individuals, but for the overall community
21
+
22
+ Examples of unacceptable behavior include:
23
+
24
+ * The use of sexualized language or imagery, and sexual attention or
25
+ advances of any kind
26
+ * Trolling, insulting or derogatory comments, and personal or political attacks
27
+ * Public or private harassment
28
+ * Publishing others' private information, such as a physical or email
29
+ address, without their explicit permission
30
+ * Other conduct which could reasonably be considered inappropriate in a
31
+ professional setting
32
+
33
+ ## Enforcement Responsibilities
34
+
35
+ Community leaders are responsible for clarifying and enforcing our standards of acceptable behavior and will take
36
+ appropriate and fair corrective action in response to any behavior that they deem inappropriate, threatening, offensive,
37
+ or harmful.
38
+
39
+ Community leaders have the right and responsibility to remove, edit, or reject comments, commits, code, wiki edits,
40
+ issues, and other contributions that are not aligned to this Code of Conduct, and will communicate reasons for
41
+ moderation decisions when appropriate.
42
+
43
+ ## Scope
44
+
45
+ This Code of Conduct applies within all community spaces, and also applies when an individual is officially representing
46
+ the community in public spaces. Examples of representing our community include using an official e-mail address, posting
47
+ via an official social media account, or acting as an appointed representative at an online or offline event.
48
+
49
+ ## Enforcement
50
+
51
+ Instances of abusive, harassing, or otherwise unacceptable behavior may be reported to the community leaders responsible
52
+ for enforcement at the [issues page](https://github.com/unurgunite/genius-api/issues). All complaints will be reviewed
53
+ and investigated promptly and fairly.
54
+
55
+ All community leaders are obligated to respect the privacy and security of the reporter of any incident.
56
+
57
+ ## Enforcement Guidelines
58
+
59
+ Community leaders will follow these Community Impact Guidelines in determining the consequences for any action they deem
60
+ in violation of this Code of Conduct:
61
+
62
+ ### 1. Correction
63
+
64
+ **Community Impact**: Use of inappropriate language or other behavior deemed unprofessional or unwelcome in the
65
+ community.
66
+
67
+ **Consequence**: A private, written warning from community leaders, providing clarity around the nature of the violation
68
+ and an explanation of why the behavior was inappropriate. A public apology may be requested.
69
+
70
+ ### 2. Warning
71
+
72
+ **Community Impact**: A violation through a single incident or series of actions.
73
+
74
+ **Consequence**: A warning with consequences for continued behavior. No interaction with the people involved, including
75
+ unsolicited interaction with those enforcing the Code of Conduct, for a specified period of time. This includes avoiding
76
+ interactions in community spaces as well as external channels like social media. Violating these terms may lead to a
77
+ temporary or permanent ban.
78
+
79
+ ### 3. Temporary Ban
80
+
81
+ **Community Impact**: A serious violation of community standards, including sustained inappropriate behavior.
82
+
83
+ **Consequence**: A temporary ban from any sort of interaction or public communication with the community for a specified
84
+ period of time. No public or private interaction with the people involved, including unsolicited interaction with those
85
+ enforcing the Code of Conduct, is allowed during this period. Violating these terms may lead to a permanent ban.
86
+
87
+ ### 4. Permanent Ban
88
+
89
+ **Community Impact**: Demonstrating a pattern of violation of community standards, including sustained inappropriate
90
+ behavior, harassment of an individual, or aggression toward or disparagement of classes of individuals.
91
+
92
+ **Consequence**: A permanent ban from any sort of public interaction within the community.
93
+
94
+ ## Attribution
95
+
96
+ This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 2.0,
97
+ available at https://www.contributor-covenant.org/version/2/0/code_of_conduct.html.
98
+
99
+ Community Impact Guidelines were inspired
100
+ by [Mozilla's code of conduct enforcement ladder](https://github.com/mozilla/diversity).
101
+
102
+ [homepage]: https://www.contributor-covenant.org
103
+
104
+ For answers to common questions about this code of conduct, see the FAQ at
105
+ https://www.contributor-covenant.org/faq. Translations are available
106
+ at https://www.contributor-covenant.org/translations.