Scriptor
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をブラウザから一覧で見たり、詳細ページではコードを閲覧したり、実行できます。
使い方
bundle add scriptor-
bin/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
Contributing
- 色々足りていません。大歓迎です。
License
The gem is available as open source under the terms of the MIT License.