Fix dependency check for Tumblr gem (#1615)

Andrew Cantino %!s(int64=7) %!d(string=hace) años
padre
commit
ddb35e8236
Se han modificado 1 ficheros con 2 adiciones y 4 borrados
  1. 2 4
      app/models/agents/tumblr_publish_agent.rb

+ 2 - 4
app/models/agents/tumblr_publish_agent.rb

@@ -1,11 +1,11 @@
1
-require "tumblr_client"
2
-
3 1
 module Agents
4 2
   class TumblrPublishAgent < Agent
5 3
     include TumblrConcern
6 4
 
7 5
     cannot_be_scheduled!
8 6
 
7
+    gem_dependency_check { defined?(Tumblr::Client) }
8
+
9 9
     description <<-MD
10 10
       The Tumblr Publish Agent publishes Tumblr posts from the events it receives.
11 11
 
@@ -58,8 +58,6 @@ module Agents
58 58
       Set `expected_update_period_in_days` to the maximum amount of time that you'd expect to pass between Events being created by this Agent.
59 59
     MD
60 60
 
61
-    gem_dependency_check { defined?(Tumblr) }
62
-
63 61
     def validate_options
64 62
       errors.add(:base, "expected_update_period_in_days is required") unless options['expected_update_period_in_days'].present?
65 63
     end