Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Change from UI.new to UI.app.

  • Loading branch information...
commit ca3a788cfdafd25594db04ac0bf0a7e2cded5170 1 parent 8d5ac89
John Nunemaker authored
2  examples/basic.ru
View
@@ -41,4 +41,4 @@ flipper[:secrets].enable flipper.group(:early_access)
flipper[:logging].enable flipper.random(5)
flipper[:new_cache].enable flipper.actors(15)
-run Flipper::UI.new(flipper)
+run Flipper::UI.app(flipper)
2  lib/flipper/ui.rb
View
@@ -8,7 +8,7 @@ def self.root
@root ||= Pathname(__FILE__).dirname.expand_path.join('ui')
end
- def self.new(flipper)
+ def self.app(flipper)
app = lambda { |env|
[200, {'Content-Type' => 'text/html'}, ['']]
}
8 spec/flipper/ui_spec.rb
View
@@ -13,14 +13,10 @@
Flipper.new(adapter, :instrumenter => ActiveSupport::Notifications)
}
- let(:app) {
- described_class.new(flipper)
- }
+ let(:app) { described_class.app(flipper) }
describe "Initializing middleware lazily with a block" do
- let(:app) {
- described_class.new(lambda { flipper })
- }
+ let(:app) { described_class.app(lambda { flipper }) }
it "works" do
get '/features'
Please sign in to comment.
Something went wrong with that request. Please try again.