https://github.com/trailblazer/trailblazer-pro-rails
Rails support for TRB PRO.
https://github.com/trailblazer/trailblazer-pro-rails
Last synced: 8 months ago
JSON representation
Rails support for TRB PRO.
- Host: GitHub
- URL: https://github.com/trailblazer/trailblazer-pro-rails
- Owner: trailblazer
- Created: 2023-07-08T12:59:01.000Z (over 2 years ago)
- Default Branch: master
- Last Pushed: 2024-03-05T15:39:29.000Z (over 1 year ago)
- Last Synced: 2024-03-05T17:44:53.777Z (over 1 year ago)
- Language: Ruby
- Size: 190 KB
- Stars: 1
- Watchers: 4
- Forks: 2
- Open Issues: 3
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
Awesome Lists containing this project
README
# Trailblazer::Pro::Rails
## Installation
In your Rails' `Gemfile`.
```ruby
gem "trailblazer-pro-rails"
```
## Usage
1. Get your API key from https://pro.trailblazer.to/settings
2. Run our generator and enter your API key.
```
$ rails g trailblazer:pro:install
```
3. Run your operation via `#WTF?`.
```ruby
result = API::V1::Diagram::Operation::Update.WTF?(params: params)
```
4. Click the `[TRB PRO]` link in your terminal and start debugging.

Note: we're currently playing with various invocation styles and at some point you might not even have to use `Operation.wtf?` anymore.
## Testing
Currently, from the top directory, you need to run
```ruby
$ rake test_1
```
This will test the generator on a new Rails app in isolation.
```ruby
$ rake test_2
```
Tests if `wtf?` works without any PRO configuration, but PRO is added.
```ruby
$ rake test_3
```
Tests that the PRO editor import generator works.
### Architecture
* One `Gemfile` for all scenarios on `test/dummies`