driftrock-service 0.2.1 → 0.2.2
Sign up to get free protection for your applications and to get access to all the features.
@@ -27,7 +27,12 @@ module Driftrock
|
|
27
27
|
def self.init
|
28
28
|
config = new
|
29
29
|
yield(config)
|
30
|
-
config.base_url.gsub(/\/$/, "")
|
30
|
+
config.base_url.gsub(/\/$/, "")
|
31
|
+
if Rails && config.app_id
|
32
|
+
Rails.application.routes.prepend do
|
33
|
+
get 'driftrock_app_status' => 'application#driftrock_app_status'
|
34
|
+
end
|
35
|
+
end
|
31
36
|
@config = config
|
32
37
|
end
|
33
38
|
|
data/lib/driftrock-service.rb
CHANGED
@@ -10,10 +10,11 @@ require "driftrock-service/errors/driftrock_error"
|
|
10
10
|
|
11
11
|
module Driftrock
|
12
12
|
module Service
|
13
|
+
|
13
14
|
module ClassMethods
|
14
15
|
def act_as_driftrock_app
|
15
16
|
if respond_to?(:before_filter)
|
16
|
-
before_filter :authorise
|
17
|
+
before_filter :authorise, except: :driftrock_app_status
|
17
18
|
end
|
18
19
|
include Driftrock::Service::Api::Data
|
19
20
|
end
|