[Groonga-commit] groonga/heroku-sample-rroonga-blog at 2a66ca3 [master] Don't require mechanize until it is needed

Back to archive index

Kouhei Sutou null+****@clear*****
Sun May 25 19:09:57 JST 2014


Kouhei Sutou	2014-05-25 19:09:57 +0900 (Sun, 25 May 2014)

  New Revision: 2a66ca35a407c1118b9d0737231dc181b6a77c9b
  https://github.com/groonga/heroku-sample-rroonga-blog/commit/2a66ca35a407c1118b9d0737231dc181b6a77c9b

  Message:
    Don't require mechanize until it is needed

  Modified files:
    lib/tasks/import.rake

  Modified: lib/tasks/import.rake (+3 -3)
===================================================================
--- lib/tasks/import.rake    2014-05-25 19:04:00 +0900 (03fee2c)
+++ lib/tasks/import.rake    2014-05-25 19:09:57 +0900 (25584bc)
@@ -1,6 +1,3 @@
-require 'rss'
-require 'mechanize'
-
 def import_rss(url)
   uri = URI(ENV['APP_URL'])
   uri.path = '/posts/new'
@@ -18,6 +15,9 @@ end
 
 namespace :import do
   task prepare: :environment do
+    require 'rss'
+    require 'mechanize'
+
     if ENV['APP_URL'].nil?
       message = <<-MESSAGE
 Must set APP_URL environment variable
-------------- next part --------------
HTML����������������������������...
Download 



More information about the Groonga-commit mailing list
Back to archive index