Skip to content

Latest commit

History

40 Commits

Folders and files

NameName
Last commit message
Last commit date

Repository files navigation

Flagship

Flagship acts as an interface and tooling for working with launchdarkly feature flags.

Installation

The package can be installed by adding flagship to your list of dependencies in mix.exs:

defdepsdo[{:flagship,"~> 0.6.0"}]end

Start up the application (in your application.ex file):

children=[{Flagship.FeatureFlags,name: Flagship.FeatureFlags},...]

And configure the application (in config.exs or similar):

config:flagship,ld_sdk_key: "<ENTER SDK KEY HERE>",# requireddefault_context: %{},# optional - expects a map that represents a launchdarkly context (https://docs.launchdarkly.com/home/contexts)ld_client_options: %{# all values are optionalfile_datasource: true,send_events: false,file_paths: ['launch_darkly_local_config.json'],feature_store: :ldclient_storage_map,file_auto_update: true,file_poll_interval: 1000}

And configure for your test environment (in text.exs):

config:flagship,ld_sdk_key: "test key",ld_client_options: %{datasource: :testdata,send_events: false,feature_store: :ldclient_storage_map}

Running tests on this project

The tests rely on a test double for the LaunchDarkly implementation.

FLAGSHIP_IMPLEMENTATION=Flagship.LaunchDarklyTestmixtest

About

Library for working with and testing feature flags

Resources

Stars

1 star

Watchers

14 watching

Forks

Releases

Packages

Used by

Contributors

Languages