Added gem_dependency_check

Dominik Sander преди 10 години
родител
ревизия
4873b0b06e
променени са 1 файла, в които са добавени 4 реда и са изтрити 0 реда
  1. 4 0
      app/models/agents/wunderlist_agent.rb

+ 4 - 0
app/models/agents/wunderlist_agent.rb

@@ -6,7 +6,11 @@ module Agents
6 6
 
7 7
     cannot_be_scheduled!
8 8
 
9
+    gem_dependency_check { Devise.omniauth_providers.include?(:wunderlist) }
10
+
9 11
     description <<-MD
12
+      #{'## Include the `omniauth-wunderlist` gem in your `Gemfile` and set `WUNDERLIST_OAUTH_KEY` and `WUNDERLIST_OAUTH_SECRET` in your environment to use this Agent' if dependencies_missing?}
13
+
10 14
       The WunderlistAgent creates new new tasks based on the incoming event.
11 15
 
12 16
       To be able to use this Agent you need to authenticate with Wunderlist in the [Services](/services) section first.