Permalink
Browse files

Rename class for api.

  • Loading branch information...
1 parent fbbff16 commit 591aeda07187103bd6378066d1d8cc1e47910c1e @lucassus committed Dec 23, 2012
Showing with 7 additions and 7 deletions.
  1. +1 −1 config-e2e.ru
  2. +1 −1 config.ru
  3. +1 −1 lib/mongo_browser.rb
  4. +2 −2 lib/mongo_browser/{application → }/api.rb
  5. +2 −2 spec/lib/{application → }/api_spec.rb
View
@@ -16,7 +16,7 @@ fixtures.load_documents!
run Rack::URLMap.new \
"/" => MongoBrowser::Application.new,
- "/api" => MongoBrowser::Application::Api.new
+ "/api" => MongoBrowser::Api.new
at_exit do
test_server.shutdown!
View
@@ -3,4 +3,4 @@ $LOAD_PATH.unshift(File.join(File.dirname(__FILE__), "lib"))
require "mongo_browser"
run Rack::URLMap.new \
"/" => MongoBrowser::Application.new,
- "/api" => MongoBrowser::Application::Api.new
+ "/api" => MongoBrowser::Api.new
View
@@ -28,4 +28,4 @@ def mongodb_port
require "mongo_browser/models/document"
require "mongo_browser/application"
-require "mongo_browser/application/api"
+require "mongo_browser/api"
@@ -1,10 +1,10 @@
require "grape"
-class MongoBrowser::Application
+module MongoBrowser
class Api < Grape::API
format :json
- include MongoBrowser::Models
+ include Models
helpers do
def server
@@ -1,10 +1,10 @@
require "spec_helper"
-describe MongoBrowser::Application::Api do
+describe MongoBrowser::Api do
include Rack::Test::Methods
def app
- MongoBrowser::Application::Api
+ described_class
end
let(:server) { MongoBrowser::Models::Server.current }

0 comments on commit 591aeda

Please sign in to comment.