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
Sponsored
·
Your Podcast. Everywhere. Effortlessly.
Share. Educate. Inspire. Entertain. You do you. We'll handle the rest.
→
Dimiter Petrov
November 20, 2013
Programming
0
120
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
160
Multi-tenancy with Rails
crackofdusk
1
180
Developing Ruby gems with native extensions
crackofdusk
0
130
Offloading server work to the client side
crackofdusk
1
170
Other Decks in Programming
See All in Programming
Rust 製のコードエディタ “Zed” を使ってみた
nearme_tech
PRO
0
180
KIKI_MBSD Cybersecurity Challenges 2025
ikema
0
1.3k
コントリビューターによるDenoのすゝめ / Deno Recommendations by a Contributor
petamoriken
0
200
Implementation Patterns
denyspoltorak
0
290
並行開発のためのコードレビュー
miyukiw
0
170
Oxlint JS plugins
kazupon
1
960
例外処理とどう使い分ける?Result型を使ったエラー設計 #burikaigi
kajitack
16
6.1k
副作用をどこに置くか問題:オブジェクト指向で整理する設計判断ツリー
koxya
1
610
React 19でつくる「気持ちいいUI」- 楽観的UIのすすめ
himorishige
11
7.4k
OCaml 5でモダンな並列プログラミングを Enjoyしよう!
haochenx
0
140
コマンドとリード間の連携に対する脅威分析フレームワーク
pandayumi
1
450
組織で育むオブザーバビリティ
ryota_hnk
0
180
Featured
See All Featured
The Straight Up "How To Draw Better" Workshop
denniskardys
239
140k
What’s in a name? Adding method to the madness
productmarketing
PRO
24
3.9k
[RailsConf 2023 Opening Keynote] The Magic of Rails
eileencodes
31
9.9k
Marketing to machines
jonoalderson
1
4.6k
Color Theory Basics | Prateek | Gurzu
gurzu
0
200
Distributed Sagas: A Protocol for Coordinating Microservices
caitiem20
333
22k
Practical Tips for Bootstrapping Information Extraction Pipelines
honnibal
25
1.7k
Ecommerce SEO: The Keys for Success Now & Beyond - #SERPConf2024
aleyda
1
1.8k
Why Our Code Smells
bkeepers
PRO
340
58k
Save Time (by Creating Custom Rails Generators)
garrettdimon
PRO
32
2.1k
How GitHub (no longer) Works
holman
316
140k
Chrome DevTools: State of the Union 2024 - Debugging React & Beyond
addyosmani
10
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!