Skip to content

Commit f5019a9

Browse files
committed
Update README
1 parent 2406429 commit f5019a9

File tree

2 files changed

+15
-27
lines changed

2 files changed

+15
-27
lines changed

.env.example

Lines changed: 5 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
1-
# Your Flipper Cloud token enables the application to
2-
# 1. Go to your project in Flipper Cloud. You can create a new project for this
3-
# if you'd like. "Flipper Rails Demo" is a good project name in this case.
1+
# Connect with Flipper Cloud to see how you can sync feature flags with multiple environments,
2+
# work with your team, get audit logs, rollbacks, and more.
3+
#
4+
# 1. Go to your project in Flipper Cloud (https://www.flippercloud.io). You can create a new project for this
5+
# if you'd like. "Flipper Cloud Playground" is a good project name in this case.
46
# 2. Choose "Your Environment" from the available environments. You could use
57
# production as well, but since this is just a demo, either works.
68
# 3. Go to the "Tokens" tab, and use the pre-populated "Adapter" token, or
@@ -9,10 +11,4 @@
911
# prompted you for this already, and you're all set.
1012
FLIPPER_CLOUD_TOKEN=<YOUR-TOKEN>
1113

12-
# Optional: If you'd like to have Flipper Cloud synchronize the feature states
13-
# with your local datastore, you can set up the sync token as well. However,
14-
# this will require your localhost to be exosed to the internet using ngrok
15-
# or a similar tool so that it can receive webhooks from Flipper Cloud.
16-
FLIPPER_CLOUD_SYNC_TOKEN=<YOUR-SYNC-TOKEN>
17-
1814
FLIPPER_CLOUD_LOGGING_ENABLED=false

README.md

Lines changed: 10 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
1-
# Flipper Rails Demo
1+
# Flipper Rails Playground
22

3-
This is an example Rails application that serves as a working demo to walk you through the basics of using Flipper. You can run the demo and interact with the
4-
feature toggles, or you can browser the source code to see the commands for toggling features.
3+
This is an example Rails application that serves as a playground and working demo to walk you through the basics of using Flipper. You can run the playground and interact with the feature toggles, or you can browse the source code to see the commands for toggling features.
54

65
## Automated Setup (Fast and Easy)
76

@@ -11,7 +10,7 @@ Once you've pulled down the repo, you should be able to run `bin/setup`, and the
1110
$ bin/setup
1211
```
1312

14-
This demo already has the pre-requisites setup and ready to go. You only need to add the `FLIPPER_CLOUD_TOKEN`.
13+
This app already has the pre-requisites setup and ready to go.
1514

1615
## Manual Setup (See how it all works!)
1716

@@ -21,7 +20,7 @@ This demo already has the pre-requisites setup and ready to go. You only need to
2120
$ cp .env.example .env
2221
```
2322

24-
2. Get your `FLIPPER_CLOUD_TOKEN` by going to your project's "Tokens" page. (Create a test project for the demo if you'd_prefer.) You can use the existing token or create a new one and then copy the value into your `.env` file.
23+
1. Get your `FLIPPER_CLOUD_TOKEN` by going to your project's "Tokens" page in [Flipper Cloud](https://www.flippercloud.io/dashboard). (Create a test project if you'd_prefer.) You can use the existing token or create a new one and then copy the value into your `.env` file.
2524

2625
Once your `.env` is set up with the `FLIPPER_CLOUD_TOKEN` from your account, you can start up the application:
2726

@@ -31,26 +30,23 @@ bin/rails db:prepare
3130
bin/rails server
3231
```
3332

34-
Then, once the server is running, you can toggle the feature via command-line with the instructions shown on the home page.
33+
Then, visit http://localhost:3000 in your browser.
3534

3635
* * *
3736

3837
# Adding Flipper to an Existing Rails App
3938

40-
Step by step instructions for using [Flipper](https://flippercloud.io) with Rails.
39+
Step by step instructions for using [Flipper](https://www.flippercloud.io) with Rails.
4140

4241
## Step 1
4342

44-
Add `flipper-cloud` to the `Gemfile`.
43+
Add `flipper` to the `Gemfile`.
4544

46-
```ruby
47-
flipper_version = '~> 0.25.0'
48-
gem 'flipper-cloud', flipper_version
49-
gem 'flipper-active_record', flipper_version
45+
```console
46+
$ bundle add flipper-active_record
5047
```
5148

52-
* Run `bundle` to install.
53-
* Run `bin/rails g flipper:active_record` to generate migration for ActiveRecord adapter.
49+
* Run `bin/rails g flipper:setup` to generate migration for ActiveRecord adapter.
5450
* Run `bin/rails db:migrate` to run migration for ActiveRecord adapter.
5551

5652
## Step 2
@@ -62,11 +58,7 @@ Create an account on [flippercloud.io](https://flippercloud.io) and get the toke
6258
### Configure cloud using ENV vars (preferred):
6359

6460
```
65-
# required
6661
FLIPPER_CLOUD_TOKEN=<your environment token here>
67-
68-
# optional (for production environment so you never poll cloud)
69-
FLIPPER_CLOUD_SYNC_SECRET=<webhook sync secret>
7062
```
7163

7264
## Step 4

0 commit comments

Comments
 (0)