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
110
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
140
Multi-tenancy with Rails
crackofdusk
1
160
Developing Ruby gems with native extensions
crackofdusk
0
120
Offloading server work to the client side
crackofdusk
1
160
Other Decks in Programming
See All in Programming
go test -json そして testing.T.Attr / Kyoto.go #63
utgwkk
3
320
RDoc meets YARD
okuramasafumi
4
170
楽して成果を出すためのセルフリソース管理
clipnote
0
190
Performance for Conversion! 分散トレーシングでボトルネックを 特定せよ
inetand
0
3.4k
@Environment(\.keyPath)那么好我不允许你们不知道! / atEnvironment keyPath is so good and you should know it!
lovee
0
130
アセットのコンパイルについて
ojun9
0
130
基礎から学ぶ大画面対応(Learning Large-Screen Support from the Ground Up)
tomoya0x00
0
4.3k
HTMLの品質ってなんだっけ? “HTMLクライテリア”の設計と実践
unachang113
4
2.9k
私の後悔をAWS DMSで解決した話
hiramax
4
210
複雑なドメインに挑む.pdf
yukisakai1225
5
1.2k
GitHubとGitLabとAWS CodePipelineでCI/CDを組み比べてみた
satoshi256kbyte
4
250
個人開発で徳島大学生60%以上の心を掴んだアプリ、そして手放した話
akidon0000
1
150
Featured
See All Featured
StorybookのUI Testing Handbookを読んだ
zakiyama
31
6.1k
Building Flexible Design Systems
yeseniaperezcruz
329
39k
Making the Leap to Tech Lead
cromwellryan
135
9.5k
The Web Performance Landscape in 2024 [PerfNow 2024]
tammyeverts
9
810
Building Adaptive Systems
keathley
43
2.7k
Creating an realtime collaboration tool: Agile Flush - .NET Oxford
marcduiker
31
2.2k
How to Think Like a Performance Engineer
csswizardry
26
1.9k
実際に使うSQLの書き方 徹底解説 / pgcon21j-tutorial
soudai
PRO
188
55k
Refactoring Trust on Your Teams (GOTO; Chicago 2020)
rmw
35
3.1k
Bash Introduction
62gerente
615
210k
jQuery: Nuts, Bolts and Bling
dougneiner
64
7.9k
Performance Is Good for Brains [We Love Speed 2024]
tammyeverts
12
1.1k
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!