Skip to content

Commit

Permalink
Add contributing guide and update readme
Browse files Browse the repository at this point in the history
  • Loading branch information
hunchr committed Nov 6, 2024
1 parent aedd97e commit 30ab630
Show file tree
Hide file tree
Showing 2 changed files with 54 additions and 19 deletions.
33 changes: 33 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
# Contributing Guide

## Local Setup

### Prerequisites

- Bash ([^5.0](https://www.gnu.org/software/bash/))
- Ruby ([`.ruby-version`](.ruby-version))

### 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 versions
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

0 comments on commit 30ab630

Please sign in to comment.