Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add contributing guide and update readme #13

Merged
merged 2 commits into from
Nov 6, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
26 changes: 26 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
# Contributing Guide

## Local Setup

Clone this repository and run the setup script:

```sh
git clone https://github.com/renuo/hotsheet.git
cd hotsheet
bin/setup
```

### Run

- `spec/dummy/bin/run`: Start the dummy app's Rails server

### Lint

- `bin/fastcheck`: Run all linters
- `bin/fastcheck -A`: Format the code with RuboCop

### Test

- `bin/check`: Run specs for **all** supported Rails versions
- `bin/check rails_8_0`: Run specs for a **specific** Rails version
defined in [Appraisals](Appraisals)
40 changes: 21 additions & 19 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,18 +1,19 @@
# Hotsheet

### Manage your database with a simple and familiar web interface
**Manage your database with a simple and familiar web interface**

This gem allows you to mount a view to manage your database using a table view where you can edit DB records inline.
This gem allows you to mount a view to manage your database using a table view
where you can edit database records inline.

## Installation

Add and install the gem by adding this to the application's Gemfile:
Add this line to your application's Gemfile:

```rb
gem "hotsheet"
```

And executing:
And then execute:

```sh
bundle
Expand All @@ -21,9 +22,9 @@ bin/rails g hotsheet:install

## Usage



You can also configure which models the gem should manage, and even specify columns within them, by configuring the initializer file created by the install command:
You can configure which models this gem should manage, and specify which
attributes (database columns) should be editable in the Hotsheet. This can be
done by configuring the initializer file created by the install command:

```rb
# config/initializers/hotsheet.rb
Expand All @@ -34,26 +35,27 @@ Hotsheet.configure do |config|
# model.excluded_attributes = %i[created_at updated_at] # mutually exclusive with "included_attributes"
end
end

```

Finally, you will need to create a configuration file to specify which models you want to manage with Hotsheet.

## Development: Local Setup
## Contributing

After cloning the repo, run `bin/setup` to install dependencies.
See [Contributing Guide] for information on how to set up hotsheet locally.

- Run tests: `bin/check`
- Run linters: `bin/fastcheck`
- Start dummy app: `spec/dummy/bin/run`

## TODO
## Roadmap / Planned Features

- Fetch all models in the application by default
- Support live updates (show when someone has the intention to edit a resource) via ActionCable
- Conflict resolution strategy (locking / merging / latest change etc.)
- Fine grained access / permissions (cancancan)
- Type specific input fields
- Type-specific input fields
- Undo feature (or confirm / discard changes icons)
- Configure visibility of non-editable (excluded) fields
- Use importmap-rails for js dependencies
- Use importmap-rails for JS dependencies

## License

Hotsheet is available as open source under the terms of the [MIT License].\
Copyright © 2024 [Renuo AG](https://www.renuo.ch).

[Contributing Guide]: https://github.com/renuo/hotsheet/blob/main/CONTRIBUTING.md
[MIT License]: https://github.com/renuo/hotsheet/blob/main/LICENSE