Permalink
Browse files

Change from UI.new to UI.app.

  • Loading branch information...
1 parent 8d5ac89 commit ca3a788cfdafd25594db04ac0bf0a7e2cded5170 @jnunemaker committed Feb 20, 2013
Showing with 4 additions and 8 deletions.
  1. +1 −1 examples/basic.ru
  2. +1 −1 lib/flipper/ui.rb
  3. +2 −6 spec/flipper/ui_spec.rb
View
2 examples/basic.ru
@@ -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)
View
2 lib/flipper/ui.rb
@@ -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'}, ['']]
}
View
8 spec/flipper/ui_spec.rb
@@ -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'

0 comments on commit ca3a788

Please sign in to comment.