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
66
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
58
Multi-tenancy with Rails
crackofdusk
1
100
Developing Ruby gems with native extensions
crackofdusk
0
67
Offloading server work to the client side
crackofdusk
1
110
Other Decks in Programming
See All in Programming
Ruby GitHub Packages
bkuhlmann
0
620
脱・初心者!脱・マネコン!AWS CDKを使ってみませんか!?
har1101
0
300
SwiftUI Performance 不要なViewの再描画と更新を抑える
bigamitiongit
1
160
ADRを一年運用してみた/adr_after_a_year
hanhan1978
7
2.2k
Rubyでたのしむクリエイティブコーディング/Enjoy Creative coding with Ruby
chobishiba
1
160
Prepare for Jakarta EE 11 - Performance and Developer Productivity
ivargrimstad
0
470
Front-end application development, Symfony-style(s)
dunglas
2
1.9k
[SF Ruby, March 2024] Rails on Wasm
palkan
0
380
はてなにおける CSS Modules、及び CSS Modules に足りないもの / CSS Modules in Hatena, and CSS Modules missing parts
mizdra
3
520
Git Rebase
bkuhlmann
11
1.6k
デザインシステムで Tailwind CSSとCSS in JSに分散投資をしたら良かった話
fsubal
18
4.8k
コーンフレークから始める モデリング会話入門
ogurotakayuki
0
280
Featured
See All Featured
Product Roadmaps are Hard
iamctodd
43
9.7k
No one is an island. Learnings from fostering a developers community.
thoeni
14
2.1k
The Cost Of JavaScript in 2023
addyosmani
14
3.8k
Code Reviewing Like a Champion
maltzj
513
39k
Visualizing Your Data: Incorporating Mongo into Loggly Infrastructure
mongodb
34
8.9k
Faster Mobile Websites
deanohume
297
30k
CoffeeScript is Beautiful & I Never Want to Write Plain JavaScript Again
sstephenson
154
14k
I Don’t Have Time: Getting Over the Fear to Launch Your Podcast
jcasabona
20
1.6k
[RailsConf 2023] Rails as a piece of cake
palkan
22
3.9k
Gamification - CAS2011
davidbonilla
76
4.6k
Automating Front-end Workflow
addyosmani
1355
200k
Art, The Web, and Tiny UX
lynnandtonic
288
19k
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!