Module: Flipper::UI
- Defined in:
- lib/flipper/ui.rb,
lib/flipper/ui/util.rb,
lib/flipper/ui/actor.rb,
lib/flipper/ui/error.rb,
lib/flipper/ui/eruby.rb,
lib/flipper/ui/action.rb,
lib/flipper/ui/middleware.rb,
lib/flipper/ui/actions/file.rb,
lib/flipper/ui/actions/gate.rb,
lib/flipper/ui/actions/home.rb,
lib/flipper/ui/actions/feature.rb,
lib/flipper/ui/decorators/gate.rb,
lib/flipper/ui/actions/features.rb,
lib/flipper/ui/action_collection.rb,
lib/flipper/ui/decorators/feature.rb,
lib/flipper/ui/actions/actors_gate.rb,
lib/flipper/ui/actions/add_feature.rb,
lib/flipper/ui/actions/groups_gate.rb,
lib/flipper/ui/actions/boolean_gate.rb,
lib/flipper/ui/actions/percentage_of_time_gate.rb,
lib/flipper/ui/actions/percentage_of_actors_gate.rb
Defined Under Namespace
Modules: Actions, Decorators, Util Classes: Action, ActionCollection, Actor, Eruby, Middleware
Constant Summary collapse
- Error =
All flipper ui errors inherit from this.
Class.new(StandardError)
- RequestMethodNotSupported =
Raised when a request method (get, post, etc.) is called for an action that does not know how to handle it.
Class.new(Error)
Class Attribute Summary collapse
-
.application_breadcrumb_href ⇒ Object
Public: If you set this, the UI will always have a first breadcrumb that says “App” which points to this href.
Class Method Summary collapse
Class Attribute Details
.application_breadcrumb_href ⇒ Object
Public: If you set this, the UI will always have a first breadcrumb that says “App” which points to this href. The href can be a path (ie: “/”) or full url (“app.example.com/”).
18 19 20 |
# File 'lib/flipper/ui.rb', line 18 def @application_breadcrumb_href end |
Class Method Details
.app(flipper, options = {}) {|builder| ... } ⇒ Object
25 26 27 28 29 30 31 32 33 34 35 36 |
# File 'lib/flipper/ui.rb', line 25 def self.app(flipper, = {}) app = lambda { |env| [200, {'Content-Type' => 'text/html'}, ['']] } builder = Rack::Builder.new yield builder if block_given? builder.use Rack::Protection builder.use Rack::Protection::AuthenticityToken builder.use Rack::MethodOverride builder.use Flipper::Middleware::Memoizer, flipper builder.use Middleware, flipper builder.run app builder end |
.root ⇒ Object
21 22 23 |
# File 'lib/flipper/ui.rb', line 21 def self.root @root ||= Pathname(__FILE__).dirname..join('ui') end |