Skip to content

Commit a30e6c7

Browse files
authored
Merge pull request #4 from stevegeek/rails_8
Rails 8, devcontainer, coverage, refactoring, composition fixes
2 parents 073fbc9 + a12b9a0 commit a30e6c7

File tree

81 files changed

+2774
-836
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

81 files changed

+2774
-836
lines changed

.devcontainer/Dockerfile

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
# Make sure RUBY_VERSION matches the Ruby version in .ruby-version or gemspec
2+
ARG RUBY_VERSION=3.4.2
3+
FROM ghcr.io/rails/devcontainer/images/ruby:$RUBY_VERSION
4+
5+
USER root
6+
7+
# Install pkg-config and SQLite development libraries
8+
RUN apt-get update -qq && \
9+
apt-get install -y pkg-config libsqlite3-dev && \
10+
apt-get clean && \
11+
rm -rf /var/lib/apt/lists/*
12+
13+
USER vscode
14+
15+
# Ensure binding is always 0.0.0.0
16+
# Binds the server to all IP addresses of the container, so it can be accessed from outside the container.
17+
ENV BINDING="0.0.0.0"

.devcontainer/devcontainer.json

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
{
2+
"name": "Quo Rails Gem Development",
3+
"build": {
4+
"dockerfile": "Dockerfile"
5+
},
6+
"containerEnv": {
7+
"RAILS_ENV": "development"
8+
},
9+
"forwardPorts": [3000],
10+
"postCreateCommand": "bundle install && bin/rails db:setup",
11+
"postStartCommand": "bundle exec appraisal && bundle exec appraisal rake test",
12+
"remoteUser": "vscode"
13+
}

CLAUDE.md

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
# Quo Development Guide
2+
3+
## Build & Test Commands
4+
- Run all tests: `bundle exec rake test`
5+
- Run a single test: `bundle exec ruby -Ilib:test test/path/to/test_file.rb -n test_method_name`
6+
- Run tests across Rails versions: `bundle exec appraisal rake test`
7+
- Type checking: `bundle exec steep check`
8+
- Lint code: `bundle exec standardrb`
9+
- Fix lint issues: `bundle exec standardrb --fix`
10+
11+
## Code Style Guidelines
12+
- **Frozen String Literals**: Include `# frozen_string_literal: true` at the top of every file
13+
- **Types**: Use RBS for type annotations with `# rbs_inline: enabled` and `@rbs` annotations
14+
- **Naming**: Use snake_case for methods/variables, CamelCase for classes, and SCREAMING_CASE for constants
15+
- **Error Handling**: Raise specific errors with clear messages
16+
- **Indentation**: 2 spaces (default Standard Ruby style)
17+
- **Testing**: Use Minitest for tests
18+
- **Framework**: Built on Literal gem - use Literal::Struct and Literal::Types
19+
- **Documentation**: Document public methods with comments

Gemfile

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ source "https://rubygems.org"
55
# Specify your gem's dependencies in quo.gemspec
66
gemspec
77

8-
gem "rails", "~> 7.2"
8+
gem "rails", "~> 8"
99

1010
group :development, :test do
1111
gem "sqlite3"
@@ -14,6 +14,8 @@ group :development, :test do
1414

1515
gem "minitest", "~> 5.0"
1616

17+
gem "simplecov", require: false
18+
1719
gem "standard", require: false
1820

1921
gem "steep", require: false

LICENSE.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
The MIT License (MIT)
22

3-
Copyright (c) 2022-2024 Stephen Ierodiaconou
3+
Copyright (c) 2022-2025 Stephen Ierodiaconou
44

55
Permission is hereby granted, free of charge, to any person obtaining a copy
66
of this software and associated documentation files (the "Software"), to deal

0 commit comments

Comments
 (0)