Giter Club home page Giter Club logo

rake-ui's Introduction

RakeUi

Rake UI is a Rails engine that enables the discovery and execution rake tasks in a UI.

Example

Routes

NOTE: Relative to mountpoint in application

  • GET /rake_tasks(.html/.json) - list all available rake tasks
  • GET /rake_tasks/:id(.html/.json) - list info a single tasks
  • POST /rake_tasks/:id/execute - execute a rake task
  • GET /rake_task_logs(.html/.json) - list rake task history
  • GET /rake_task_logs/:id(.html/.json) - list a single rake task history

Installation

Add this line to your application's Gemfile:

gem 'rake-ui'

And then execute:

$ bundle

Or install it yourself as:

$ gem install rake-ui

once it is installed, mount the engine

Rails.application.routes.draw do
  # only mounting when defined will allow us only include in development/test
  if defined? RakeUi::Engine
    mount RakeUi::Engine => "/rake-ui"
  end
end

Securing RakeUi

This tool is built to enable developer productivity in development. It exposes rake tasks through a UI.

This tool will currently not work in production because we add a guard in the root controller to respond not found if the environment is development or test. You may override this guard clause with the following configuration.

RakeUi.configuration do |config|
  config.allow_production = true
end

We recommend adding guards in your route to ensure that the proper authentication is in place to ensure that users are authenticated so that if this were ever to be rendered in production, you would be covered. The best way for that is router constraints

Testing

bundle exec rake test

To iterate on this fast i normally install nodemon, you can also use guard minitest.

# Example with nodemon, you don't have to use this
npm install -g nodemon

# Running a single test whenever models change
nodemon -w ./app/models/*  -e "rb" --exec "rake test TEST=test/rake_ui/rake_task_log_test.rb"

Contributing

See CONTRIBUTING

License

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

rake-ui's People

Contributors

austio avatar brupm avatar doxbot-github-terraform avatar eduardoborba avatar jcwilk avatar kleinjm avatar seanriordan08 avatar stiig avatar themetalcode avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.