JCurtain

Redis-based Feature Flag Manager

License

License

GroupId

GroupId

br.com.moip
ArtifactId

ArtifactId

jcurtain
Last Version

Last Version

0.1.5
Release Date

Release Date

Type

Type

jar
Description

Description

JCurtain
Redis-based Feature Flag Manager
Project URL

Project URL

https://github.com/moip/jcurtain
Source Code Management

Source Code Management

https://github.com/moip/jcurtain

Download jcurtain

How to add to project

<!-- https://jarcasting.com/artifacts/br.com.moip/jcurtain/ -->
<dependency>
    <groupId>br.com.moip</groupId>
    <artifactId>jcurtain</artifactId>
    <version>0.1.5</version>
</dependency>
// https://jarcasting.com/artifacts/br.com.moip/jcurtain/
implementation 'br.com.moip:jcurtain:0.1.5'
// https://jarcasting.com/artifacts/br.com.moip/jcurtain/
implementation ("br.com.moip:jcurtain:0.1.5")
'br.com.moip:jcurtain:jar:0.1.5'
<dependency org="br.com.moip" name="jcurtain" rev="0.1.5">
  <artifact name="jcurtain" type="jar" />
</dependency>
@Grapes(
@Grab(group='br.com.moip', module='jcurtain', version='0.1.5')
)
libraryDependencies += "br.com.moip" % "jcurtain" % "0.1.5"
[br.com.moip/jcurtain "0.1.5"]

Dependencies

compile (2)

Group / Artifact Type Version
redis.clients : jedis jar 2.8.0
org.slf4j : slf4j-api jar 1.7.21

test (2)

Group / Artifact Type Version
junit : junit jar 4.11
org.mockito : mockito-core jar 1.10.19

Project Modules

There are no modules declared in this project.

JCurtain

Easy way to control your features using redis.

Also available for ruby -> RCurtain!

Installation

Maven dependency:

Add this to your POM file

<dependency>
  <groupId>br.com.moip</groupId>
  <artifactId>jcurtain</artifactId>
  <version>0.1.5</version>
</dependency>

Gradle:

Add this to your build.gradle file

compile('br.com.moip:jcurtain:0.1.5')

Usage

  • JCurtain uses redis to control features, which can be checked by a percentage or a set of users.
feature:[name-of-feature]:percentage
feature:[name-of-feature]:users
  • To use JCurtain, first your need to initialize the configuration by defining your redis URL (password@ip:port/database).
JCurtain jCurtain = new JCurtain(new URI("redis://:[email protected]:6380/15")); 
  • Check if the curtain is opened for a feature using the method "isOpen", passing the name of the feature you want to check.
jCurtain.isOpen("name-of-the-feature");
  • You can also pass users to check if they'll see the new feature.
jCurtain.isOpen("name-of-the-feature", "user1");

If a user is on the Redis set in "feature:[name-of-the-feature]:users" the method will return true even when "feature:[name-of-the-feature]:percentage" is set to 0 or nil.

Contributing

Bug reports and pull requests are welcome on GitHub at https://github.com/moip/jcurtain. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the Contributor Covenant code of conduct.

  1. Fork it (https://github.com/moip/jcurtain/fork)
  2. Create your feature branch (git checkout -b my-new-feature)
  3. Commit your changes (git commit -am 'Add some feature')
  4. Push to the branch (git push origin my-new-feature)
  5. Create a new Pull Request

License

This lib is available as open source under the terms of the MIT License.

Versions

Version
0.1.5
0.1.4
0.1.3
0.1.2
0.1.1
0.1.0