diff options
| author | mo khan <mo.khan@gmail.com> | 2020-11-18 14:12:46 -0700 |
|---|---|---|
| committer | mo khan <mo.khan@gmail.com> | 2020-11-18 14:12:46 -0700 |
| commit | b2f8c2d1408b8c27bb51714674c59257a8679102 (patch) | |
| tree | aeb1754b59895e95bb41c4a431cea00d41d9438c /lib | |
| parent | b393e0c7b899d4bfd1aff6d06e9379dc733b0436 (diff) | |
style: do not print each data file
Diffstat (limited to 'lib')
| -rw-r--r-- | lib/spandx/cli/commands/pull.rb | 3 | ||||
| -rw-r--r-- | lib/spandx/core/cache.rb | 3 | ||||
| -rw-r--r-- | lib/spandx/core/data_file.rb | 4 |
3 files changed, 3 insertions, 7 deletions
diff --git a/lib/spandx/cli/commands/pull.rb b/lib/spandx/cli/commands/pull.rb index 67c1c43..b866d43 100644 --- a/lib/spandx/cli/commands/pull.rb +++ b/lib/spandx/cli/commands/pull.rb @@ -13,10 +13,11 @@ module Spandx output.puts "Updating #{db.url}..." db.update! end + output.puts "Rebuilding index..." Spandx::Core::Dependency::PACKAGE_MANAGERS.values.uniq.each do |type| Spandx::Core::Cache .new(type, root: Spandx.git[:cache].root.join('.index')) - .rebuild_index(output: output) + .rebuild_index end output.puts 'OK' end diff --git a/lib/spandx/core/cache.rb b/lib/spandx/core/cache.rb index 817451b..528e182 100644 --- a/lib/spandx/core/cache.rb +++ b/lib/spandx/core/cache.rb @@ -43,9 +43,8 @@ module Spandx datafiles.fetch(key_for(name)) end - def rebuild_index(output: $stderr) + def rebuild_index datafiles.each do |_hex, datafile| - output.puts "Rebuilding #{datafile}..." datafile.index.update! end end diff --git a/lib/spandx/core/data_file.rb b/lib/spandx/core/data_file.rb index 827f4e0..1ed88ea 100644 --- a/lib/spandx/core/data_file.rb +++ b/lib/spandx/core/data_file.rb @@ -56,10 +56,6 @@ module Spandx @index ||= IndexFile.new(self) end - def to_s - absolute_path.to_s - end - private def to_csv(array) |
