From 3a21e9f2b035552da23217275b75503213083cab Mon Sep 17 00:00:00 2001 From: guange <8863824@gmail.com> Date: Sun, 18 Oct 2015 13:16:58 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E9=87=8D=E6=9E=84=E9=94=99?= =?UTF-8?q?=E8=AF=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- lib/tasks/gitlab.rake | 2 +- lib/trustie/gitlab/sync.rb | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/tasks/gitlab.rake b/lib/tasks/gitlab.rake index e21b5f329..9529ce4c2 100644 --- a/lib/tasks/gitlab.rake +++ b/lib/tasks/gitlab.rake @@ -6,7 +6,7 @@ namespace :gitlab do task :users => :environment do # User.where(username: 'root').find_each do |user| s = Trustie::Gitlab::Sync.new - User.where(login: 'guange1').find_each do |user| + User.find_each do |user| s.sync_user(user) end end diff --git a/lib/trustie/gitlab/sync.rb b/lib/trustie/gitlab/sync.rb index 91c241cea..597e01a36 100644 --- a/lib/trustie/gitlab/sync.rb +++ b/lib/trustie/gitlab/sync.rb @@ -30,7 +30,7 @@ module Trustie user.save! puts "create user #{user.login}" end - Helper.change_password(u.id, user.hashed_password, user.salt) + change_password(u.id, user.hashed_password, user.salt) rescue => e puts e end