ldclient-rb 0.0.1 → 0.0.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.gitignore +1 -0
- data/README.md +17 -23
- data/lib/ldclient-rb/ldclient.rb +1 -1
- data/lib/ldclient-rb/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 77e7777d21907668e23c74f890d349a248732910
|
4
|
+
data.tar.gz: 637229a99a1bef5c57cdf1c53788471986533626
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 270b81b971e526e69a8b9d62f2eb3b175c20d494943e9120df3e051264cd821a7359f4ccacdecfe52d48ad8367c92ec3dc49ebbb3744fa90bbe89fe18b6b3b86
|
7
|
+
data.tar.gz: bc0f9e549ad70fdba6153af5bf7585c09fa28df7f48abad893c6eccdde12cc5e8783df80d417ed8969829dba809d4eef3c071091c5283fded7e264a1d2ffed9e
|
data/.gitignore
CHANGED
data/README.md
CHANGED
@@ -1,31 +1,25 @@
|
|
1
|
-
|
1
|
+
LaunchDarkly SDK for Ruby
|
2
|
+
===========================
|
2
3
|
|
3
|
-
|
4
|
+
Quick setup
|
5
|
+
-----------
|
4
6
|
|
5
|
-
|
7
|
+
1. Install the Ruby SDK with `gem`
|
6
8
|
|
7
|
-
|
9
|
+
gem install ldclient-py
|
8
10
|
|
9
|
-
|
10
|
-
gem 'launchdarkly'
|
11
|
-
```
|
11
|
+
2. Create a new LDClient with your API key:
|
12
12
|
|
13
|
-
|
13
|
+
client = LDClient.new("your_api_key")
|
14
14
|
|
15
|
-
|
15
|
+
Your first feature flag
|
16
|
+
-----------------------
|
16
17
|
|
17
|
-
|
18
|
+
1. Create a new feature flag on your [dashboard](https://app.launchdarkly.com)
|
19
|
+
2. In your application code, use the feature's key to check wthether the flag is on for each user:
|
18
20
|
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
## Contributing
|
26
|
-
|
27
|
-
1. Fork it ( https://github.com/[my-github-username]/launchdarkly/fork )
|
28
|
-
2. Create your feature branch (`git checkout -b my-new-feature`)
|
29
|
-
3. Commit your changes (`git commit -am 'Add some feature'`)
|
30
|
-
4. Push to the branch (`git push origin my-new-feature`)
|
31
|
-
5. Create a new Pull Request
|
21
|
+
if client.get_flag?("your.flag.key", {"key": "user@test.com"}, false)
|
22
|
+
# application code to show the feature
|
23
|
+
else
|
24
|
+
# the code to run if the feature is off
|
25
|
+
end
|
data/lib/ldclient-rb/ldclient.rb
CHANGED
data/lib/ldclient-rb/version.rb
CHANGED