From 82dc3676500f19974136cf925b7c0d14ab8ae89c Mon Sep 17 00:00:00 2001 From: Braulio Bhavamitra Date: Mon, 16 May 2016 11:51:21 -0300 Subject: [PATCH] push_notification: Fix api class name --- plugins/push_notification/lib/push_notification_plugin.rb | 2 +- plugins/push_notification/lib/push_notification_plugin/api.rb | 6 ++++-- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/plugins/push_notification/lib/push_notification_plugin.rb b/plugins/push_notification/lib/push_notification_plugin.rb index a27908c..b14d089 100644 --- a/plugins/push_notification/lib/push_notification_plugin.rb +++ b/plugins/push_notification/lib/push_notification_plugin.rb @@ -39,7 +39,7 @@ class PushNotificationPlugin < Noosfero::Plugin end def self.api_mount_points - [PushNotificationPlugin::Api] + [PushNotificationPlugin::API] end def self.plugin_description diff --git a/plugins/push_notification/lib/push_notification_plugin/api.rb b/plugins/push_notification/lib/push_notification_plugin/api.rb index fda2663..e45e571 100644 --- a/plugins/push_notification/lib/push_notification_plugin/api.rb +++ b/plugins/push_notification/lib/push_notification_plugin/api.rb @@ -1,7 +1,9 @@ -require_dependency 'api/helpers' require_relative 'api_entities' -class PushNotificationPlugin::Api < Grape::API +# Can't be called Api as will result in: +# warning: toplevel constant Api referenced by PushNotificationPlugin::Api +# To fix this PushNotificationPlugin should be a module +class PushNotificationPlugin::API < Grape::API include Api::Helpers -- libgit2 0.21.2