Sha256: 041103a1d3f27902740514272e245c07a2ba14e84475c6aede7b1844e393e5ec
Contents?: true
Size: 858 Bytes
Versions: 17
Compression:
Stored size: 858 Bytes
Contents
require 'flipper/api/action' require 'flipper/api/v1/decorators/feature' module Flipper module Api module V1 module Actions class BooleanGate < Api::Action route %r{features/[^/]*/boolean/?\Z} def post feature_name = Rack::Utils.unescape(path_parts[-2]) feature = flipper[feature_name] feature.enable decorated_feature = Decorators::Feature.new(feature) json_response(decorated_feature.as_json, 200) end def delete feature_name = Rack::Utils.unescape(path_parts[-2]) feature = flipper[feature_name.to_sym] feature.disable decorated_feature = Decorators::Feature.new(feature) json_response(decorated_feature.as_json, 200) end end end end end end
Version data entries
17 entries across 17 versions & 1 rubygems