Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
39 commits
Select commit Hold shift + click to select a range
c0b8ab9
Added setup binary
unurgunite Oct 14, 2023
8681ab7
Added `rubocop_rspec`
unurgunite Oct 14, 2023
3f74658
Added `extensions` folder
unurgunite Oct 14, 2023
b1773da
Added code generator
unurgunite Oct 14, 2023
496eed4
Updated default specs
unurgunite Oct 14, 2023
9f8fa2d
Added validator
unurgunite Oct 14, 2023
b5841c4
Removed useless `before` hooks
unurgunite Oct 14, 2023
c6452f4
Removed unused `with`
unurgunite Oct 14, 2023
d351e5c
Fixed conflicts between `before` hooks
unurgunite Oct 14, 2023
eceb649
Removed useless `require`
unurgunite Oct 14, 2023
bb7ed64
Updated `README.md`
unurgunite Oct 14, 2023
0878bcf
Updated `README.md`
unurgunite Oct 14, 2023
fd79b61
Updated YARD documentation
unurgunite Oct 14, 2023
edbab5e
Updated `README.md`
unurgunite Oct 14, 2023
0656c10
Updated `README.md`
unurgunite Oct 14, 2023
01e78fc
Added specs for dynamic arguments
unurgunite Oct 15, 2023
990e697
Fixed some typos
unurgunite Oct 15, 2023
9441383
Updated `README.md`
unurgunite Oct 15, 2023
8df7e61
Added specs for arguments
unurgunite Oct 15, 2023
771c889
Added support for public class methods
unurgunite Oct 15, 2023
dc696c8
Added `yard` gem for documentation
unurgunite Oct 15, 2023
82f071d
Edited type signature for generator
unurgunite Oct 26, 2023
b5d17d2
Added skeleton for private methods type signature
unurgunite Oct 26, 2023
f86ed82
Fixed typo in `README.md`
unurgunite May 10, 2024
40f5fe9
Added lock file
unurgunite Nov 6, 2025
5108b05
Updated code
unurgunite Nov 6, 2025
988a82c
Added DSL support
unurgunite Nov 6, 2025
2f4a276
Added params support
unurgunite Nov 6, 2025
8a54c33
Updated version
unurgunite Nov 6, 2025
b92f336
Updated `README.md`
unurgunite Nov 6, 2025
62ec086
Added `LICENSE.txt`
unurgunite Nov 6, 2025
c1fa9b0
Added `bin/release`
unurgunite Nov 6, 2025
5693620
Updated YARD docs
unurgunite Nov 6, 2025
1ce062a
RuboCop
unurgunite Nov 6, 2025
cb43374
Updated `bin/release`
unurgunite Nov 6, 2025
df13ba9
Drop Ruby 2.6 support
unurgunite Nov 6, 2025
4384d39
Updated gems
unurgunite Nov 6, 2025
be2e133
Updated CI/CD
unurgunite Nov 6, 2025
730bc47
Renamed gem from `CodeGenerator` to `AdvancedCodeGenerator`
unurgunite Nov 6, 2025
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
79 changes: 79 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,79 @@
name: CI

on:
push:
branches: [master]
tags:
- "v*"
pull_request:

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

steps:
- uses: actions/checkout@v4

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

- name: RuboCop (self‑check)
run: |
bundle exec rubocop

- name: RSpec
run: bundle exec rspec

release:
needs: test
if: startsWith(github.ref, 'refs/tags/v')
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4
- name: Set up Ruby
uses: ruby/setup-ruby@v1
with:
ruby-version: '3.3'
bundler-cache: true

- name: Get gem name
id: gem_name
run: |
GEM_NAME=$(ruby -e "require 'rubygems'; spec = Gem::Specification.load(Dir.glob('*.gemspec').first); puts spec.name")
echo "gem_name=$GEM_NAME" >> $GITHUB_OUTPUT

- name: Build gem
run: |
gem build *.gemspec
if [ ! -f ${{ steps.gem_name.outputs.gem_name }}-*.gem ]; then
echo "Gem build failed!"
exit 1
fi

- name: Create GitHub Release
uses: softprops/action-gh-release@v2
with:
files: ${{ steps.gem_name.outputs.gem_name }}-*.gem
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

- name: Push gem to RubyGems.org
env:
RUBYGEMS_API_KEY: ${{ secrets.RUBYGEMS_API_KEY }}
run: gem push ${{ steps.gem_name.outputs.gem_name }}-*.gem

- name: Deploy Documentation
if: success()
run: |
git clone git@github.com:unurgunite/${{ steps.gem_name.outputs.gem_name }}_docs.git ../${{ steps.gem_name.outputs.gem_name }}_docs
bundle exec rake docs:deploy
env:
SSH_AUTH_SOCK: /tmp/ssh_agent.sock
27 changes: 0 additions & 27 deletions .github/workflows/main.yml

This file was deleted.

1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -10,3 +10,4 @@
# rspec failure tracking
.rspec_status
.idea
*.gem
1 change: 1 addition & 0 deletions .rspec
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
--require rspec
--format documentation
--color
--require spec_helper
20 changes: 12 additions & 8 deletions .rubocop.yml
Original file line number Diff line number Diff line change
@@ -1,13 +1,17 @@
AllCops:
TargetRubyVersion: 2.6
inherit_from: .rubocop_todo.yml

Style/StringLiterals:
Enabled: true
EnforcedStyle: double_quotes
plugins:
- rubocop-sorted_methods_by_call

Style/StringLiteralsInInterpolation:
Enabled: true
EnforcedStyle: double_quotes
AllCops:
NewCops: enable
TargetRubyVersion: 2.7

Layout/LineLength:
Max: 120

Gemspec/DevelopmentDependencies:
Enabled: false

SortedMethodsByCall/Waterfall:
Enabled: true
23 changes: 23 additions & 0 deletions .rubocop_todo.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
# This configuration was generated by
# `rubocop --auto-gen-config`
# on 2025-11-06 17:49:32 UTC using RuboCop version 1.81.7.
# The point is for the user to remove these configuration records
# one by one as the offenses are removed from the code base.
# Note that changes in the inspected code, or installation of new
# versions of RuboCop, may require this file to be generated again.

# Offense count: 1
# Configuration parameters: AllowedMethods, AllowedPatterns, CountRepeatedAttributes.
Metrics/AbcSize:
Max: 18

# Offense count: 4
# Configuration parameters: CountComments, CountAsOne, AllowedMethods, AllowedPatterns.
# AllowedMethods: refine
Metrics/BlockLength:
Max: 179

# Offense count: 3
# Configuration parameters: CountComments, CountAsOne, AllowedMethods, AllowedPatterns.
Metrics/MethodLength:
Max: 18
9 changes: 1 addition & 8 deletions Gemfile
Original file line number Diff line number Diff line change
@@ -1,12 +1,5 @@
# frozen_string_literal: true

source "https://rubygems.org"
source 'https://rubygems.org'

# Specify your gem's dependencies in code_generator.gemspec
gemspec

gem "rake", "~> 13.0"

gem "rspec", "~> 3.0"

gem "rubocop", "~> 1.21"
86 changes: 86 additions & 0 deletions Gemfile.lock
Original file line number Diff line number Diff line change
@@ -0,0 +1,86 @@
PATH
remote: .
specs:
advanced_code_generator (1.0.0)

GEM
remote: https://rubygems.org/
specs:
ast (2.4.3)
diff-lcs (1.6.2)
json (2.15.2)
language_server-protocol (3.17.0.5)
lint_roller (1.1.0)
parallel (1.27.0)
parser (3.3.10.0)
ast (~> 2.4.1)
racc
prism (1.6.0)
racc (1.8.1)
rainbow (3.1.1)
rake (13.3.1)
regexp_parser (2.11.3)
rspec (3.13.2)
rspec-core (~> 3.13.0)
rspec-expectations (~> 3.13.0)
rspec-mocks (~> 3.13.0)
rspec-core (3.13.6)
rspec-support (~> 3.13.0)
rspec-expectations (3.13.5)
diff-lcs (>= 1.2.0, < 2.0)
rspec-support (~> 3.13.0)
rspec-mocks (3.13.7)
diff-lcs (>= 1.2.0, < 2.0)
rspec-support (~> 3.13.0)
rspec-support (3.13.6)
rubocop (1.81.7)
json (~> 2.3)
language_server-protocol (~> 3.17.0.2)
lint_roller (~> 1.1.0)
parallel (~> 1.10)
parser (>= 3.3.0.2)
rainbow (>= 2.2.2, < 4.0)
regexp_parser (>= 2.9.3, < 3.0)
rubocop-ast (>= 1.47.1, < 2.0)
ruby-progressbar (~> 1.7)
unicode-display_width (>= 2.4.0, < 4.0)
rubocop-ast (1.47.1)
parser (>= 3.3.7.2)
prism (~> 1.4)
rubocop-capybara (2.22.1)
lint_roller (~> 1.1)
rubocop (~> 1.72, >= 1.72.1)
rubocop-factory_bot (2.27.1)
lint_roller (~> 1.1)
rubocop (~> 1.72, >= 1.72.1)
rubocop-rspec (2.31.0)
rubocop (~> 1.40)
rubocop-capybara (~> 2.17)
rubocop-factory_bot (~> 2.22)
rubocop-rspec_rails (~> 2.28)
rubocop-rspec_rails (2.29.1)
rubocop (~> 1.61)
rubocop-sorted_methods_by_call (1.1.1)
lint_roller
rubocop (>= 1.72.0)
ruby-progressbar (1.13.0)
unicode-display_width (3.2.0)
unicode-emoji (~> 4.1)
unicode-emoji (4.1.0)
yard (0.9.37)

PLATFORMS
arm64-darwin-24
ruby

DEPENDENCIES
advanced_code_generator!
rake (~> 13.0)
rspec (~> 3.0)
rubocop
rubocop-rspec (~> 2.24)
rubocop-sorted_methods_by_call
yard

BUNDLED WITH
2.3.25
21 changes: 21 additions & 0 deletions LICENSE.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
MIT License

Copyright (c) 2025 unurgunite

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
Loading