Skip to content

hatsu38/scriptor

Repository files navigation

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をブラウザから一覧で見たり、詳細ページではコードを閲覧したり、実行できます。

2024-12-19.21.39.45.mov

使い方

  1. bundle add scriptor
  2. bin/rails generate scriptor:install を実行
    • config/routes.rbmount Scriptor::Engine => "/scriptor" が記載されます
    • db/migrations/****_create_scriptor_executions.scriptor.rb ファイルが作成されます
  3. scriptフォルダにスクリプトを作ると、/scriptor ページにスクリプト一覧が並びます

で完成です。

リリース手順

  1. version.rb と Gemfile.lockのscriptorのバージョンが適切か確認しましょう

  2. gemのbuild

    gem build scriptor.gemspec
  3. gemのpush

    gem push scriptor-*.*.*.gem
    

Contributing

  • 色々足りていません。大歓迎です。

License

The gem is available as open source under the terms of the MIT License.

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Contributors 2

  •  
  •