Skip to content

Instantly share code, notes, and snippets.

@s0h4m
Created March 4, 2016 09:46
Show Gist options
  • Save s0h4m/6397fdad07212387bb7c to your computer and use it in GitHub Desktop.
Save s0h4m/6397fdad07212387bb7c to your computer and use it in GitHub Desktop.
A sample toggle (http://s0h4m.github.io/toggle/) config with two features, video and mixpanel, which are disabled/enabled using feature toggles
{"name": "myapp", "features":
[
{"name":"video", "default": "enabled", "rules":[
{"state": "disabled", "value":
{"apilevel_min": 21, "apilevel_max": 23, "device":[{"manufacturer":"xiaomi","model":"mi3"}, {"manufacturer":"samsung", "model":"s4"}]}
},
{"state": "disabled", "value": {"appversion_max": 13}}
]},
{"name":"crash_reporting", "rules":[
{"state": "disabled", "value":
{"appversion": 11, "buildtype": "false"}
}
]
},
{"name":"mixpanel","default": "enabled", "rules":[
{"state": "disabled", "value":
{"device":[{"model":"Google Nexus 5 - 5.1.0 - API 22 - 1080x1920"}, {"manufacturer":"samsung", "model":"s4"}]}
}
]}
]
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment