Skip to content

Conversation

alvinometric
Copy link
Contributor

@alvinometric alvinometric commented Aug 23, 2024

This is to make sure others don't miss the Rails instructions, like I did (and apparently many of customers still do)

@melindafekete I added 1.a, 1.b, etc to show that there are different options, but happy to hear another idea

@coveralls
Copy link

coveralls commented Aug 23, 2024

Pull Request Test Coverage Report for Build 10901166898

Details

  • 0 of 0 changed or added relevant lines in 0 files are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage remained the same at 97.154%

Totals Coverage Status
Change from base Build 10179193838: 0.0%
Covered Lines: 2560
Relevant Lines: 2635

💛 - Coveralls

end
```

If you don't want to check a feature is disabled with `unless`, you can also use `is_disabled?`:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why is this example removed?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm with Gard, I'd like this to stay, it's part of the public API and needs to be surfaced here

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There was no other mention of using unless anywhere in the document, so it felt weird to say "if you don't want to use this thing I never told you about"

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

unless is built in to ruby, the example is for is_disabled? usage

config.url = 'https://unleash.herokuapp.com/api'
# config.instance_id = "#{Socket.gethostname}"
config.logger = Rails.logger
config.custom_http_headers = {'Authorization': '<YOUR_API_TOKEN>'}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice!

Copy link
Contributor

@melindafekete melindafekete left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@alvinometric I think the number/letter list for Initializer works, but perhaps we could add a heading level above the steps, and add a sentence to explain. Something like

### 1. Add Initializer

The initializer setup varies depending on whether you’re using a standard setup, Puma in clustered mode, Phusion Passenger, or Sidekiq.
 
#### 1.a Initializer for standard Rails applications
#### 1.b Initializer for Puma in clustered mode
#### 1.c Initializer for Phusion Passenger
#### 1.d Initializer for Sidekiq

Or if you see better fit, only in the controllers that you will be using unleash.

#### Sample usage
### 3. Sample usage
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think this is section 3, this is general usage for the client

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Right now it's a subsection of the Rails section, that's why it's an h3, but we can make another h2 for general usage

alvinometric and others added 3 commits August 23, 2024 14:21
Co-authored-by: Melinda Fekete <[email protected]>
Co-authored-by: Melinda Fekete <[email protected]>
@alvinometric
Copy link
Contributor Author

@alvinometric I think the number/letter list for Initializer works, but perhaps we could add a heading level above the steps, and add a sentence to explain. Something like

### 1. Add Initializer

The initializer setup varies depending on whether you’re using a standard setup, Puma in clustered mode, Phusion Passenger, or Sidekiq.
 
#### 1.a Initializer for standard Rails applications
#### 1.b Initializer for Puma in clustered mode
#### 1.c Initializer for Phusion Passenger
#### 1.d Initializer for Sidekiq

Good call, added 🙏

Copy link
Contributor

@gardleopard gardleopard left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, good job!

@gardleopard gardleopard merged commit fbb0d2e into main Sep 17, 2024
36 checks passed
@gardleopard gardleopard deleted the alvin/update-readme branch September 17, 2024 10:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants