GithubHelp home page GithubHelp logo

jrallison / rollout_ui Goto Github PK

View Code? Open in Web Editor NEW
138.0 3.0 90.0 135 KB

RolloutUI: A slick way to rollout features in your web app.

License: MIT License

Ruby 49.29% JavaScript 1.71% CSS 49.00%

rollout_ui's Introduction

RolloutUI: A slick way to rollout features in your web app.

What does it do?

RolloutUI provides a zero-configuration user interface for James Golick's rollout. RolloutUI auto-detects features defined in rollout in your application. It allows you to release features to groups, users or a percentage of your userbase through a nice interface rather than digging around in the console or modifying redis directly.

It looks something like this:

RolloutUI

Installing RolloutUI

First, get rollout set up and running on your app and define at least one feature.

Then you're ready to use RolloutUI.

Add it to your gemfile:

gem "rollout_ui"

Wrap your rollout instance:

$rollout = Rollout.new($redis)
RolloutUi.wrap($rollout)

Rails 3.1

In your application.rb file, require the rollout engine:

require "rollout_ui/engine"

Mount the Rails engine in your routes.rb file:

mount RolloutUi::Engine => "/rollout"

Other

Run the sinatra app. You can either run it as it's own app, or run it in tandom with other rack apps. Example: using Rack's URLMap in your config.ru:

run Rack::URLMap.new \
  "/" => Your::App.new,
  "/rollout" => RolloutUi::Server.new

Protecting the sinatra app with HTTP basic auth is probably a good idea. Put this somewhere before the URLMap in your config.ru:

RolloutUi::Server.use Rack::Auth::Basic do |username, password|
  username == '<some username>' && password == '<some password>'
end

Resources

Patches/Pull Requests

  • Fork the project.
  • Make your feature addition or bug fix.
  • Add tests for it. This is important so I don't break it in a future version unintentionally.
  • Send me a pull request.

Thanks

  • Thanks to James Golick for the great rollout gem.
  • Thanks to ChallengePost for sponsoring additional development and supporting open sourcing it from the start.
  • Thanks to Holly Tiwari for the design!

rollout_ui's People

Contributors

bira avatar ches avatar jcmuller avatar jrallison avatar rossta avatar sergei-matheson avatar shayfrendt avatar subakva avatar sud0n1m avatar zamith avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

rollout_ui's Issues

Cannot find rollout views path

I mounted rollout_ui within my rails 3.2.8 app but it seems that the engine is not able to find the proper layout or view templates. Instead of rendering the layout application/rollout_ui/application.html.erb, it is actually rendering my layout within my application.

I am using rollout_ui 0.2.1.

thx!

-karl

Adding support for modifying groups

Hi,

I'm interested in adding support for modifying groups - particularly adding/removing users from groups, and maybe also being able to add/delete groups, although this is much less important. Have their been any discussions about how this functionality might be achieved already? I was thinking of adding a second page that would list groups and allow their modification - which would also mean adding some navigation to the layout.

Our specific use case is the Sinatra app, so I'd probably look at adding these features there in the first instance (as I can see the server's views are managed separately from the rails engine). Am I right in thinking test coverage for this area is low at the moment? If so, and I were to add some, is rspec + capybara the preferred method, or would cucumber be better?

Basically, any guidance on how this contribution would 'fit' would be happily received.

Cheers,

Sam

rails-assets 'jquery-ujs' overwrites own older 'jquery-ujs' file

Using this

source 'https://rails-assets.org' do
  gem 'rails-assets-jquery-ujs'
end

in your main app will overwrite the use of the local jquery-ujs.js file located in rollout_ui/lib/rollout_ui/engine/vendor/assets/javascripts/jquery-ujs.js. This can cause problems because the latest jquery-ujs.j file demands a jquery version higher then 1.8.0

Rollout UI Gem out of date

The Rollout UI gem is over a year out of date. It does not work with rollout 1.2. Can we get an update please? :)

Thanks.

why not use @rollout.features in wrapper.rb

If you use redis namespace, redis.smembers(:features) will not work. I changed it to @rollout.features, but it breaks a bunch of tests.

I'm not entirely sure why we need to have #add_feature in wrapper.rb, so I'm really having trouble refactoring it. What's the reason behind using redis.smembers(:features) instead of @rollout.features? Thanks!

Unclear errors when setting up

Incorrect config.ru, rails 3.0.9:

run Rack::URLMap.new \
  "/" => MyApp::Application,
  "/admin/rollout" => RolloutUi::Server.new

Correct, as shown in readme here and on rollout gem:

# fixes: undefined method `smembers' for nil:NilClass 
$redis   = Redis.new
# fixes: uninitialized class variable @@rollout in RolloutUi 
$rollout = Rollout.new($redis)
RolloutUi.wrap($rollout)

run Rack::URLMap.new \
  "/" => MyApp::Application,
  "/admin/rollout" => RolloutUi::Server.new

rollout_ui is incompatible with rollout > 2.1.0

I updated all my gems this week and I had a problem with rollout and rollout UI.

That error showed up in the view:

undefined method `join' for #<Set: {}>
/Users/sdeziel/.rvm/gems/ruby-2.2.4@express/gems/rollout_ui-0.3.0/lib/rollout_ui/engine/app/views/rollout_ui/features/_feature.html.erb:31

The faulty line:

<input class="users" type="text" name="users[]" value="<%= feature.user_ids.join(",") %>" data-placeholder="Enter User ID" />

I looked into rollout changes and since v2.2.1, Set is used instead of Array for users.
fetlife/rollout@5b2615e

Add a feature only once

The code for active? in monkey_patch.rb always adds a feature to the Redis features set.

Is there any reason why this can't be done just once (I'm thinking on keeping a ruby Set or Hash with the features that have already been added).

Redis is fast, but doing nothing is still faster.

I could submit a pull request for this.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.