Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
Release new features using feature sliders
Search
Dimiter Petrov
November 20, 2013
Programming
0
100
Release new features using feature sliders
A presentation of the arturo gem
Dimiter Petrov
November 20, 2013
Tweet
Share
More Decks by Dimiter Petrov
See All by Dimiter Petrov
thoughtbot defaults with suspenders
crackofdusk
0
130
Multi-tenancy with Rails
crackofdusk
1
140
Developing Ruby gems with native extensions
crackofdusk
0
110
Offloading server work to the client side
crackofdusk
1
160
Other Decks in Programming
See All in Programming
F#で自在につくる静的ブログサイト - 関数型まつり2025
pizzacat83
0
290
AIコーディング道場勉強会#2 君(エンジニア)たちはどう生きるか
misakiotb
1
190
機械学習って何? 5分で解説頑張ってみる
kuroneko2828
0
210
The Evolution of Enterprise Java with Jakarta EE 11 and Beyond
ivargrimstad
1
680
業務自動化をJavaとSeleniumとAWS Lambdaで実現した方法
greenflagproject
1
110
コードに語らせよう――自己ドキュメント化が内包する楽しさについて / Let the Code Speak
nrslib
6
1.4k
無関心の谷
kanayannet
0
160
統一感のある Go コードを生成 AI の力で手にいれる
otakakot
0
3k
Claude Codeの使い方
ttnyt8701
1
110
プロダクト開発でも使おう 関数のオーバーロード
yoiwamoto
0
150
Enterprise Web App. Development (2): Version Control Tool Training Ver. 5.1
knakagawa
1
110
エラーって何種類あるの?
kajitack
5
140
Featured
See All Featured
Building an army of robots
kneath
306
45k
Rails Girls Zürich Keynote
gr2m
94
14k
GraphQLとの向き合い方2022年版
quramy
46
14k
Scaling GitHub
holman
459
140k
Designing for humans not robots
tammielis
253
25k
Building Applications with DynamoDB
mza
95
6.4k
Refactoring Trust on Your Teams (GOTO; Chicago 2020)
rmw
34
3k
The Art of Delivering Value - GDevCon NA Keynote
reverentgeek
15
1.5k
YesSQL, Process and Tooling at Scale
rocio
172
14k
Writing Fast Ruby
sferik
628
61k
[RailsConf 2023] Rails as a piece of cake
palkan
55
5.6k
Visualizing Your Data: Incorporating Mongo into Loggly Infrastructure
mongodb
46
9.6k
Transcript
Release new features using feature sliders Dimiter Petrov @crackofdusk 20
November 2013
Introduction
A feature can be too large for a single development
cycle
A feature may need testing by a small group before
being deployed to all users
You need fine-grained control over feature deployment
Feature sliders
Feature sliders Turn on and off features for some of
the users
Feature sliders with the arturo gem
Integrating arturo in your application 1. Create migration for features
table 2. Add configuration initializer 3. Mount arturo engine in the router 4. Run migration 5. Use arturo helpers to wrap features
Features table Needs a column for feature names and a
column for deployment percentage
Deployment percentage? Feature X can be deployed to m percent
of the users
Deployment percentage? Feature X can be deployed to m percent
of the users Deterministic: a feature is consistently enabled from now on for that m percent of users unless you decrease the deployment percentage.
Feature conditionals
Controller filters class ReservationsController < ApplicationController require_feature :reserve_table end
Conditional evaluation def widgets_for_sidebar widgets = [] widgets << twitter_widget
if feature_enabled?(:tweeting) # ... widgets end
Conditional evaluation <% if_feature_enabled(:reserve_table) %> <%= link_to ’Reserve a table’,
new_restaurant_reservation_path(restaurant) %> <% end %>
Feature conditionals oustide controllers Arturo.feature_enabled_for?(:reserve_table, recipient) Arturo.reserve_table_enabled_for?(recepient)
Fine-grained control
Whitelists & blacklists # config/initializers/arturo_initializer.rb Arturo::Feature.whitelist(:awesome) do |user| user.account.premium? end
Arturo::Feature.blacklist(:goodies) do |user| user.account.free? end
Feature recepients The current “thing” that is in the category
thatisthebasisfordeployingnewfeatures. E.g: a user, an account, a project, a venue,…
Feature recepients # config/initializers/arturo_initializer.rb Arturo.feature_recipient do current_project end
Feature administration
Feature administration Navigate to /features and manage features from the
mounted rails engine
Administration permissions # Default permissions current_user.present? && current_user.admin?
Administration permissions # Default permissions current_user.present? && current_user.admin? # config/initializers/arturo_initializer.rb
Arturo.permit_management do signed_in? && current_user.can?(:manage_features) end
Live demo https://github.com/happydawn/arturo-test
Thank you!