Need help with localtower?
Click the “chat” button below for chat support from the developer who created it, or find similar developers for support.

About the developer

damln
405 Stars 22 Forks 82 Commits 2 Opened issues

Description

Manage your Ruby On Rails models, relations, and migrations from a simple UI.

Services available

!
?

Need anything else?

Contributors list

Localtower

See the schema

Schema

Create a model

Models

Create a many to many relation

Relations

Create a migration

Migrations

Using the Capture plugin

Capture

INSTALL

Only tested with Rails 4.2 and Rails 5.1 (should work with any Rails 4.2+ application). Only tested with PostgreSQL.

Add to your

Gemfile
file:
ruby
group :development do
  gem "localtower"
end

If you want the latest master branch, add to your

Gemfile
file following:
ruby
group :development do
  gem "localtower", github: "damln/localtower"
end

Run command in your terminal:

bash
bundle install

Add to your

config/routes.rb
: ```ruby MyApp::Application.routes.draw do if Rails.env.development? and defined?(Localtower) mount Localtower::Engine, at: "localtower" end

# Your other routes here: # ... end ```

Usage

Open your browser at http://localhost:3000/localtower.

Logger Usage (Capture plugin)

You can put this line anywhere in your code:

Localtower::Plugins::Capture.new(self, binding).save

For example:

def my_method
  user = User.find(1)
  some_data = {foo: "bar"}

Localtower::Plugins::Capture.new(self, binding).save end

Then go to the Localtower intercave here: http://localhost:3000/localtower/logs and you will see the variables

user
and
some_data
in the UI.

Notes for the Capture plugin:

The value for each variable will try to call

.to_json
. If you have a huge collection of models likes
@users
you will see all the collection as an Array.

RSpec and Contribute

If you want to contribute to the gem:

Create a

spec/dummy/.env
file with the credentials to your PostgreSQL Database. It should look like this:
LOCALTOWER_PG_USERNAME="admin"
LOCALTOWER_PG_PASSWORD="root_or_smething"

Run the spec:

bash
bundle install
bundle exec rspec spec/

Notes: Tests are currently very slow because this is testing rails commands so it boots the framework for each test. Zeus or spring should be introduced.

Contribute

Thanks for reporting issues, I'll do my best.

Analytics

Deploy

rm *.gem | gem build localtower.gemspec && gem push localtower-*.gem

We use cookies. If you continue to browse the site, you agree to the use of cookies. For more information on our use of cookies please see our Privacy Policy.