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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 8c93ace5acab7184d359757c097f70d5fe05e37d
4
- data.tar.gz: 01d78616a31682dd0a0a998b4d03a8102dd0b0f3
3
+ metadata.gz: 77e7777d21907668e23c74f890d349a248732910
4
+ data.tar.gz: 637229a99a1bef5c57cdf1c53788471986533626
5
5
  SHA512:
6
- metadata.gz: cf013b74f285bb535f5f71a4a1688fafda2a258cbbb7870c0bb396470ca7ff7ec1c42e2f4e5762fa0cd54f48364243c27b1b5207eaa6aac013ca87c2a3a5ac55
7
- data.tar.gz: 24fb951aa177d18eb9303a691adf52570cbf1b57a61958689b448c00de0abec53f7e763ac2a01bc804a95f2ca9b18db0b938709f1477ee82708d9a5fc2101414
6
+ metadata.gz: 270b81b971e526e69a8b9d62f2eb3b175c20d494943e9120df3e051264cd821a7359f4ccacdecfe52d48ad8367c92ec3dc49ebbb3744fa90bbe89fe18b6b3b86
7
+ data.tar.gz: bc0f9e549ad70fdba6153af5bf7585c09fa28df7f48abad893c6eccdde12cc5e8783df80d417ed8969829dba809d4eef3c071091c5283fded7e264a1d2ffed9e
data/.gitignore CHANGED
@@ -12,3 +12,4 @@
12
12
  *.o
13
13
  *.a
14
14
  mkmf.log
15
+ *.gem
data/README.md CHANGED
@@ -1,31 +1,25 @@
1
- # Launchdarkly
1
+ LaunchDarkly SDK for Ruby
2
+ ===========================
2
3
 
3
- TODO: Write a gem description
4
+ Quick setup
5
+ -----------
4
6
 
5
- ## Installation
7
+ 1. Install the Ruby SDK with `gem`
6
8
 
7
- Add this line to your application's Gemfile:
9
+ gem install ldclient-py
8
10
 
9
- ```ruby
10
- gem 'launchdarkly'
11
- ```
11
+ 2. Create a new LDClient with your API key:
12
12
 
13
- And then execute:
13
+ client = LDClient.new("your_api_key")
14
14
 
15
- $ bundle
15
+ Your first feature flag
16
+ -----------------------
16
17
 
17
- Or install it yourself as:
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
- $ gem install launchdarkly
20
-
21
- ## Usage
22
-
23
- TODO: Write usage instructions here
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
@@ -3,7 +3,7 @@ require 'json'
3
3
  require 'digest/sha1'
4
4
 
5
5
  module LaunchDarkly
6
- class LdClient
6
+ class LDClient
7
7
 
8
8
  LONG_SCALE = Float(0xFFFFFFFFFFFFFFF)
9
9
 
@@ -1,3 +1,3 @@
1
1
  module LaunchDarkly
2
- VERSION = "0.0.1"
2
+ VERSION = "0.0.2"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ldclient-rb
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.1
4
+ version: 0.0.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Catamorphic Co