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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 97167cd050ae973cd29f121f842b3642f3bdc7ee51b0d21ddff300d0347d5403
4
- data.tar.gz: 031e9c9bcb1a2f553a7cee5a829ef93304bcdc7ebf2dc32329cf5ea2ff983b42
3
+ metadata.gz: cf716c05b5ba3da13f9895c17b4cb661d34044445f45d3e44e213a68f3f819f2
4
+ data.tar.gz: 6156da34c227f7be583c82e8677f388793de84b52206be1b6c356d45c49e55d7
5
5
  SHA512:
6
- metadata.gz: eeaefc55d1fdeb81c135b4320524c304a657d8ac75037209c20a8428c314e8fd85230f249472a58f66abb5ff55ed8ed34a802032ed97eb4a1f51f04f224d745c
7
- data.tar.gz: 0265b4ae7928d02ebe8db4fc0a6cbf362a25b88c0bf170b756e3aef8bb6972dcb96563235e2df3c388d4e888d09dccde6c489fb13980ac391f2d66898acb6e17
6
+ metadata.gz: e2ae20afffbed94a64e5237d872ff82515333bb53ef8bf514818938a35c5ef19504010cd9883e8b2e5f3c8b61b714794a50e80b5e059a6f458bb168a6ea92863
7
+ data.tar.gz: 977a3c85198617a992f8c601365d0d236829d081b958cea80270beb98e076bea4a119f4a96f7eb785ecc5daaabf93efd5ad54bbad28af1eeab55045b10a487de
data/CHANGELOG.md ADDED
@@ -0,0 +1,10 @@
1
+ ## [Unreleased]
2
+
3
+ ## [0.1.1] - 2026-10-24
4
+
5
+ - Correct the gem name in the README
6
+ - Remove the placeholder test
7
+
8
+ ## [0.1.0] - 2026-10-24
9
+
10
+ - Initial release
@@ -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 'slim2haml'
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
@@ -0,0 +1,12 @@
1
+ # frozen_string_literal: true
2
+
3
+ require "bundler/gem_tasks"
4
+ require "rspec/core/rake_task"
5
+
6
+ RSpec::Core::RakeTask.new(:spec)
7
+
8
+ require "rubocop/rake_task"
9
+
10
+ RuboCop::RakeTask.new
11
+
12
+ task default: %i[spec rubocop]
data/compose.yml ADDED
@@ -0,0 +1,14 @@
1
+ services:
2
+
3
+ #
4
+ # メインコンテナ
5
+ #
6
+ app:
7
+ build: .
8
+ image: ccr:4.0.9
9
+
10
+ volumes:
11
+ - .:/workspace:cached
12
+ - ./vendor/bundle/4.0:/usr/local/bundle:cached
13
+
14
+ command: ash
@@ -0,0 +1,9 @@
1
+ # frozen_string_literal: true
2
+
3
+ module ClaudeCodeRails
4
+ class Railtie < Rails::Railtie
5
+ rake_tasks do
6
+ load File.expand_path("../tasks/claude_code_rails.rake", __dir__)
7
+ end
8
+ end
9
+ end
@@ -0,0 +1,5 @@
1
+ # frozen_string_literal: true
2
+
3
+ module ClaudeCodeRails
4
+ VERSION = "0.1.1"
5
+ end
@@ -0,0 +1,9 @@
1
+ # frozen_string_literal: true
2
+
3
+ require_relative "claude_code_rails/version"
4
+ require_relative "claude_code_rails/railtie" if defined?(Rails::Railtie)
5
+
6
+ module ClaudeCodeRails
7
+ class Error < StandardError; end
8
+ # Your code goes here...
9
+ end
@@ -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
@@ -0,0 +1,4 @@
1
+ module ClaudeCodeRails
2
+ VERSION: String
3
+ # See the writing guide of rbs: https://github.com/ruby/rbs#guides
4
+ end
@@ -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.0
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