claude_code_rails 0.1.0 → 0.1.1
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.
- checksums.yaml +4 -4
- data/CHANGELOG.md +10 -0
- data/CODE_OF_CONDUCT.md +10 -0
- data/Dockerfile +23 -0
- data/README.md +42 -42
- data/Rakefile +12 -0
- data/compose.yml +14 -0
- data/lib/claude_code_rails/railtie.rb +9 -0
- data/lib/claude_code_rails/version.rb +5 -0
- data/lib/claude_code_rails.rb +9 -0
- data/lib/tasks/claude_code_rails.rake +14 -0
- data/sig/claude_code_rails.rbs +4 -0
- data/template/CLAUDE.md +44 -0
- metadata +12 -1
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: cf716c05b5ba3da13f9895c17b4cb661d34044445f45d3e44e213a68f3f819f2
|
|
4
|
+
data.tar.gz: 6156da34c227f7be583c82e8677f388793de84b52206be1b6c356d45c49e55d7
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: e2ae20afffbed94a64e5237d872ff82515333bb53ef8bf514818938a35c5ef19504010cd9883e8b2e5f3c8b61b714794a50e80b5e059a6f458bb168a6ea92863
|
|
7
|
+
data.tar.gz: 977a3c85198617a992f8c601365d0d236829d081b958cea80270beb98e076bea4a119f4a96f7eb785ecc5daaabf93efd5ad54bbad28af1eeab55045b10a487de
|
data/CHANGELOG.md
ADDED
data/CODE_OF_CONDUCT.md
ADDED
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
# Code of Conduct
|
|
2
|
+
|
|
3
|
+
"claude_code_rails" follows [The Ruby Community Conduct Guideline](https://www.ruby-lang.org/en/conduct) in all "collaborative space", which is defined as community communications channels (such as mailing lists, submitted patches, commit comments, etc.):
|
|
4
|
+
|
|
5
|
+
* Participants will be tolerant of opposing views.
|
|
6
|
+
* Participants must ensure that their language and actions are free of personal attacks and disparaging personal remarks.
|
|
7
|
+
* When interpreting the words and actions of others, participants should always assume good intentions.
|
|
8
|
+
* Behaviour which can be reasonably considered harassment will not be tolerated.
|
|
9
|
+
|
|
10
|
+
If you have any concerns about behaviour within this project, please contact us at ["TODO: Write your email address"](mailto:"TODO: Write your email address").
|
data/Dockerfile
ADDED
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
FROM ruby:4.0.9-alpine
|
|
2
|
+
|
|
3
|
+
ENV APP_ROOT /workspace
|
|
4
|
+
|
|
5
|
+
RUN apk add --update \
|
|
6
|
+
make \
|
|
7
|
+
gcc \
|
|
8
|
+
musl-dev \
|
|
9
|
+
g++ \
|
|
10
|
+
pcre-dev \
|
|
11
|
+
libxml2-dev \
|
|
12
|
+
libxslt-dev \
|
|
13
|
+
yaml-dev \
|
|
14
|
+
tzdata \
|
|
15
|
+
py3-codespell \
|
|
16
|
+
git
|
|
17
|
+
|
|
18
|
+
RUN mkdir $APP_ROOT
|
|
19
|
+
WORKDIR $APP_ROOT
|
|
20
|
+
|
|
21
|
+
RUN echo 'gem: --no-document' >> ~/.gemrc
|
|
22
|
+
|
|
23
|
+
CMD ["ash"]
|
data/README.md
CHANGED
|
@@ -1,42 +1,42 @@
|
|
|
1
|
-
# ClaudeCodeRails
|
|
2
|
-
|
|
3
|
-
This tool provides files for using Claude Code in Ruby on Rails applications.
|
|
4
|
-
|
|
5
|
-
## Installation
|
|
6
|
-
|
|
7
|
-
Add this line to your application's Gemfile:
|
|
8
|
-
|
|
9
|
-
```ruby
|
|
10
|
-
gem '
|
|
11
|
-
```
|
|
12
|
-
|
|
13
|
-
And then execute:
|
|
14
|
-
|
|
15
|
-
```
|
|
16
|
-
bundle install
|
|
17
|
-
```
|
|
18
|
-
|
|
19
|
-
## Usage
|
|
20
|
-
|
|
21
|
-
```
|
|
22
|
-
bundle exec rake claude_code_rails:install
|
|
23
|
-
```
|
|
24
|
-
|
|
25
|
-
## Development
|
|
26
|
-
|
|
27
|
-
Edit template/CLAUDE.md or add files or directories to template directory.
|
|
28
|
-
After checking out the repo, Then, run `rake spec` to run the tests.
|
|
29
|
-
|
|
30
|
-
To install this gem onto your local machine, run `bundle exec rake install`. To release a new version, update the version number in `version.rb`, and then run `bundle exec rake release`, which will create a git tag for the version, push git commits and the created tag, and push the `.gem` file to [rubygems.org](https://rubygems.org).
|
|
31
|
-
|
|
32
|
-
## Contributing
|
|
33
|
-
|
|
34
|
-
Bug reports and pull requests are welcome on GitHub at https://github.com/[USERNAME]/claude_code_rails. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the [code of conduct](https://github.com/[USERNAME]/claude_code_rails/blob/master/CODE_OF_CONDUCT.md).
|
|
35
|
-
|
|
36
|
-
## License
|
|
37
|
-
|
|
38
|
-
The gem is available as open source under the terms of the [MIT License](https://opensource.org/licenses/MIT).
|
|
39
|
-
|
|
40
|
-
## Code of Conduct
|
|
41
|
-
|
|
42
|
-
Everyone interacting in the ClaudeCodeRails project's codebases, issue trackers, chat rooms and mailing lists is expected to follow the [code of conduct](https://github.com/[USERNAME]/claude_code_rails/blob/master/CODE_OF_CONDUCT.md).
|
|
1
|
+
# ClaudeCodeRails
|
|
2
|
+
|
|
3
|
+
This tool provides files for using Claude Code in Ruby on Rails applications.
|
|
4
|
+
|
|
5
|
+
## Installation
|
|
6
|
+
|
|
7
|
+
Add this line to your application's Gemfile:
|
|
8
|
+
|
|
9
|
+
```ruby
|
|
10
|
+
gem 'claude_code_rails'
|
|
11
|
+
```
|
|
12
|
+
|
|
13
|
+
And then execute:
|
|
14
|
+
|
|
15
|
+
```
|
|
16
|
+
bundle install
|
|
17
|
+
```
|
|
18
|
+
|
|
19
|
+
## Usage
|
|
20
|
+
|
|
21
|
+
```
|
|
22
|
+
bundle exec rake claude_code_rails:install
|
|
23
|
+
```
|
|
24
|
+
|
|
25
|
+
## Development
|
|
26
|
+
|
|
27
|
+
Edit template/CLAUDE.md or add files or directories to template directory.
|
|
28
|
+
After checking out the repo, Then, run `rake spec` to run the tests.
|
|
29
|
+
|
|
30
|
+
To install this gem onto your local machine, run `bundle exec rake install`. To release a new version, update the version number in `version.rb`, and then run `bundle exec rake release`, which will create a git tag for the version, push git commits and the created tag, and push the `.gem` file to [rubygems.org](https://rubygems.org).
|
|
31
|
+
|
|
32
|
+
## Contributing
|
|
33
|
+
|
|
34
|
+
Bug reports and pull requests are welcome on GitHub at https://github.com/[USERNAME]/claude_code_rails. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the [code of conduct](https://github.com/[USERNAME]/claude_code_rails/blob/master/CODE_OF_CONDUCT.md).
|
|
35
|
+
|
|
36
|
+
## License
|
|
37
|
+
|
|
38
|
+
The gem is available as open source under the terms of the [MIT License](https://opensource.org/licenses/MIT).
|
|
39
|
+
|
|
40
|
+
## Code of Conduct
|
|
41
|
+
|
|
42
|
+
Everyone interacting in the ClaudeCodeRails project's codebases, issue trackers, chat rooms and mailing lists is expected to follow the [code of conduct](https://github.com/[USERNAME]/claude_code_rails/blob/master/CODE_OF_CONDUCT.md).
|
data/Rakefile
ADDED
data/compose.yml
ADDED
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
require "fileutils"
|
|
2
|
+
|
|
3
|
+
namespace :claude_code_rails do
|
|
4
|
+
desc "Copy Claude Code templates into .claude"
|
|
5
|
+
task :install do
|
|
6
|
+
source_dir = File.expand_path("../../template", __dir__)
|
|
7
|
+
destination_dir = File.expand_path(".claude", Dir.pwd)
|
|
8
|
+
|
|
9
|
+
FileUtils.mkdir_p(destination_dir)
|
|
10
|
+
Dir.children(source_dir).each do |entry|
|
|
11
|
+
FileUtils.cp_r(File.join(source_dir, entry), destination_dir)
|
|
12
|
+
end
|
|
13
|
+
end
|
|
14
|
+
end
|
data/template/CLAUDE.md
ADDED
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
# Project Guidelines
|
|
2
|
+
|
|
3
|
+
This repository contains a Ruby on Rails application. Follow the conventions already established in the project, and adapt your work to its actual Ruby, Rails, and dependency versions.
|
|
4
|
+
|
|
5
|
+
## Before Making Changes
|
|
6
|
+
|
|
7
|
+
- Read the relevant code and nearby tests before editing. Check `Gemfile`, `.ruby-version`, and project configuration when version or tooling details matter.
|
|
8
|
+
- Identify the existing architecture and follow its patterns. Do not introduce a new abstraction, dependency, or broad refactor unless the task requires it.
|
|
9
|
+
- Keep changes focused and preserve existing behavior outside the requested scope.
|
|
10
|
+
|
|
11
|
+
## Ruby and Rails
|
|
12
|
+
|
|
13
|
+
- Prefer clear, idiomatic Ruby and conventional Rails patterns.
|
|
14
|
+
- Keep controllers focused on HTTP concerns: load data, authorize requests, delegate work where appropriate, and render or redirect.
|
|
15
|
+
- Use strong parameters for request input. Put domain behavior in the model or an existing service/domain layer rather than growing controllers.
|
|
16
|
+
- Use Active Record associations and scopes consistently. Watch for N+1 queries and avoid unnecessary database queries or callbacks with hidden side effects.
|
|
17
|
+
- Follow the application's existing routing, view, mailer, job, and API conventions. Do not add a layer or service object for trivial logic.
|
|
18
|
+
- Handle expected failure cases explicitly and provide useful validation errors and user-facing responses.
|
|
19
|
+
|
|
20
|
+
## Database Changes
|
|
21
|
+
|
|
22
|
+
- Make schema changes through migrations; do not edit the schema file as a substitute for a migration.
|
|
23
|
+
- Keep migrations safe and reversible when practical. Consider existing data, indexes, foreign keys, and deployment impact when changing large or populated tables.
|
|
24
|
+
- Never place secrets or environment-specific values in source code or migrations.
|
|
25
|
+
|
|
26
|
+
## Security
|
|
27
|
+
|
|
28
|
+
- Enforce authentication and authorization using the application's existing mechanisms; do not rely on hiding UI controls as access control.
|
|
29
|
+
- Treat parameters, uploaded files, and external service responses as untrusted input. Use parameterized queries and rely on Rails' normal HTML escaping.
|
|
30
|
+
- Do not expose credentials, sensitive user data, or internal exception details in logs or responses.
|
|
31
|
+
- Preserve Rails protections such as CSRF checks unless the application has a deliberate, documented exception.
|
|
32
|
+
|
|
33
|
+
## Tests and Verification
|
|
34
|
+
|
|
35
|
+
- Use the test framework and helpers already present in the repository. Add or update focused tests for behavior changes and regressions.
|
|
36
|
+
- Run the narrowest relevant test first, then any broader checks appropriate to the change. Use the project's documented commands rather than assuming a particular test framework.
|
|
37
|
+
- Do not change or remove a test merely to make a failing suite pass; investigate whether the implementation or the expectation is wrong.
|
|
38
|
+
- If a check cannot be run, state that clearly and explain why.
|
|
39
|
+
|
|
40
|
+
## Working in This Repository
|
|
41
|
+
|
|
42
|
+
- Inspect the available project scripts and documentation before choosing commands. Common Rails commands such as `bin/rails test`, `bundle exec rspec`, or `bin/rubocop` may not apply to every project.
|
|
43
|
+
- Avoid changing generated files, lockfiles, or unrelated formatting unless required by the task.
|
|
44
|
+
- Summarize what changed and which checks were run when finishing a task.
|
metadata
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: claude_code_rails
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.1.
|
|
4
|
+
version: 0.1.1
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Yoshitaro Miura
|
|
@@ -16,8 +16,19 @@ executables: []
|
|
|
16
16
|
extensions: []
|
|
17
17
|
extra_rdoc_files: []
|
|
18
18
|
files:
|
|
19
|
+
- CHANGELOG.md
|
|
20
|
+
- CODE_OF_CONDUCT.md
|
|
21
|
+
- Dockerfile
|
|
19
22
|
- LICENSE
|
|
20
23
|
- README.md
|
|
24
|
+
- Rakefile
|
|
25
|
+
- compose.yml
|
|
26
|
+
- lib/claude_code_rails.rb
|
|
27
|
+
- lib/claude_code_rails/railtie.rb
|
|
28
|
+
- lib/claude_code_rails/version.rb
|
|
29
|
+
- lib/tasks/claude_code_rails.rake
|
|
30
|
+
- sig/claude_code_rails.rbs
|
|
31
|
+
- template/CLAUDE.md
|
|
21
32
|
homepage: https://github.com/steiley/claude_code_rails
|
|
22
33
|
licenses:
|
|
23
34
|
- MIT
|