lib/bundler/audit/database.rb in mrjoy-bundler-audit-0.3.1 vs lib/bundler/audit/database.rb in mrjoy-bundler-audit-0.3.2

- old
+ new

@@ -15,15 +15,16 @@ # # You should have received a copy of the GNU General Public License # along with mrjoy-bundler-audit. If not, see <http://www.gnu.org/licenses/>. # -require 'bundler/audit/advisory' - require 'time' require 'yaml' +require 'bundler/audit/advisory' +require 'bundler/audit/vendored_time' + module Bundler module Audit # # Represents the directory of advisories, grouped by gem name # and CVE number. @@ -66,10 +67,10 @@ # The path to the database directory. # def self.path if File.directory?(USER_PATH) t1 = Dir.chdir(USER_PATH) { Time.parse(`git log --pretty="%cd" -1`) } - t2 = File.ctime(VENDORED_PATH) + t2 = VENDORED_REPO_CTIME if t1 >= t2 then USER_PATH else VENDORED_PATH end else