Skip to content

Commit

Permalink
Merge branch 'main' into chore/update-workflows
Browse files Browse the repository at this point in the history
  • Loading branch information
rarruda committed Jan 8, 2022
2 parents e21d3eb + 6d39505 commit 6e3610e
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 5 deletions.
1 change: 1 addition & 0 deletions .github/workflows/pull_request.yml
Expand Up @@ -16,6 +16,7 @@ jobs:
- macos
ruby-version:
- jruby
- 3.1
- 3.0
- 2.7
- 2.6
Expand Down
3 changes: 2 additions & 1 deletion README.md
Expand Up @@ -10,6 +10,7 @@ Leverage the [Unleash Server](https://github.com/Unleash/unleash) for powerful f

## Supported Ruby Interpreters

* MRI 3.1
* MRI 3.0
* MRI 2.7
* MRI 2.6
Expand Down Expand Up @@ -69,7 +70,7 @@ Argument | Description | Required? | Type | Default Value|
`environment` | Environment the program is running on. Could be for example `prod` or `dev`. Not yet in use. | N | String | `default` |
`project_name` | Name of the project to retrieve features from. If not set, all feature flags will be retrieved. | N | String | nil |
`refresh_interval` | How often the unleash client should check with the server for configuration changes. | N | Integer | 15 |
`metrics_interval` | How often the unleash client should send metrics to server. | N | Integer | 30 |
`metrics_interval` | How often the unleash client should send metrics to server. | N | Integer | 60 |
`disable_client` | Disables all communication with the Unleash server, effectively taking it *offline*. If set, `is_enabled?` will always answer with the `default_value` and configuration validation is skipped. Defeats the entire purpose of using unleash, but can be useful in when running tests. | N | Boolean | `false` |
`disable_metrics` | Disables sending metrics to Unleash server. | N | Boolean | `false` |
`custom_http_headers` | Custom headers to send to Unleash. As of Unleash v4.0.0, the `Authorization` header is required. For example: `{'Authorization': '<API token>'}` | N | Hash | {} |
Expand Down
4 changes: 2 additions & 2 deletions lib/unleash/configuration.rb
Expand Up @@ -87,9 +87,9 @@ def set_defaults
self.disable_client = false
self.disable_metrics = false
self.refresh_interval = 10
self.metrics_interval = 30
self.metrics_interval = 60
self.timeout = 30
self.retry_limit = 1
self.retry_limit = 5
self.backup_file = nil
self.log_level = Logger::WARN

Expand Down
4 changes: 2 additions & 2 deletions spec/unleash/configuration_spec.rb
Expand Up @@ -18,9 +18,9 @@
expect(config.disable_metrics).to be_falsey

expect(config.refresh_interval).to eq(10)
expect(config.metrics_interval).to eq(30)
expect(config.metrics_interval).to eq(60)
expect(config.timeout).to eq(30)
expect(config.retry_limit).to eq(1)
expect(config.retry_limit).to eq(5)

expect(config.backup_file).to_not be_nil
expect(config.backup_file).to eq(Dir.tmpdir + '/unleash--repo.json')
Expand Down

0 comments on commit 6e3610e

Please sign in to comment.