Scriptorはscriptフォルダにあるrubyファイルを、ブラウザから実行できるようにしたRails Engineです。
Rails 8.0.0 >= 0 の場合 bin/rails generate scriot my_script を実行すると script/myscript.rb が作成されます。
(Rails 8.0.0 以上でなくても、scriptフォルダにファイルを置いておけば利用可能です。)
このscriptをブラウザから一覧で見たり、詳細ページではコードを閲覧したり、実行できます。
2024-12-19.21.39.45.mov
bundle add scriptorbin/rails generate scriptor:installを実行config/routes.rbにmount Scriptor::Engine => "/scriptor"が記載されますdb/migrations/****_create_scriptor_executions.scriptor.rbファイルが作成されます
- scriptフォルダにスクリプトを作ると、/scriptor ページにスクリプト一覧が並びます
で完成です。
-
version.rb と Gemfile.lockのscriptorのバージョンが適切か確認しましょう
-
gemのbuild
gem build scriptor.gemspec
-
gemのpush
gem push scriptor-*.*.*.gem
- 色々足りていません。大歓迎です。
The gem is available as open source under the terms of the MIT License.