Sha256: f37964fdf8ab854da9d1bae3dadb49238ee7fa2ab9d77a684e6ea415ec993e12

Contents?: true

Size: 1.24 KB

Versions: 7

Compression:

Stored size: 1.24 KB

Contents

# Flagsmith Basic Ruby Example

This directory contains a basic Flask application which utilises Flagsmith. To run the example application, you'll 
need to go through the following steps:

1. Create an account, organisation and project on [Flagsmith](https://flagsmith.com)
2. Create a feature in the project called "secret_button"
3. Give the feature a value using the json editor as follows: 

```json
{"colour": "#ababab"}
```

4. Create a .env.local file from the template located in this directory with the environment key of one of the environments 
in flagsmith (This can be found on the 'settings' page accessed from the menu on the left under the chosen environment.)
5. From a terminal window, export those environment variables (either manually or by using `export $(cat .env)`)
6. Install dependencies:
```bash
bundle install
```
7. Run the application:
```
bundle exec hanami server
```
8. Browse to http://localhost:2300

Now you can play around with the 'secret_button' feature in flagsmith, turn it on to show it and edit the colour in the
json value to edit the colour of the button. You can also identify as a given user and then update the settings for the
secret button feature for that user in the flagsmith interface to see the affect that has too. 

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
flagsmith-4.0.1 example/README.md
flagsmith-4.0.0 example/README.md
flagsmith-3.2.0 example/README.md
flagsmith-3.1.1 example/README.md
flagsmith-3.1.0 example/README.md
flagsmith-3.0.1 example/README.md
flagsmith-3.0.0 example/README.md