summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authormo khan <mo.khan@gmail.com>2020-02-06 16:13:16 -0700
committermo khan <mo.khan@gmail.com>2020-02-06 16:13:16 -0700
commit7ee1cd15cfe5581892e69a364d8b5dc39f3ab111 (patch)
tree46c439dad868692ff7b3913d6df9a0a09e94a82b
parent9354191d0c476dc90498375536cab491e76f07cf (diff)
Rename db -> spdx_db
-rw-r--r--lib/spandx.rb4
-rw-r--r--lib/spandx/catalogue.rb2
-rw-r--r--lib/spandx/license.rb2
3 files changed, 4 insertions, 4 deletions
diff --git a/lib/spandx.rb b/lib/spandx.rb
index 662203a..d99c570 100644
--- a/lib/spandx.rb
+++ b/lib/spandx.rb
@@ -38,8 +38,8 @@ module Spandx
@http ||= Spandx::Gateways::Http.new
end
- def db
- @db ||= Spandx::Database.new(url: 'https://github.com/spdx/license-list-data.git').tap(&:update!)
+ def spdx_db
+ @spdx_db ||= Spandx::Database.new(url: 'https://github.com/spdx/license-list-data.git').tap(&:update!)
end
end
end
diff --git a/lib/spandx/catalogue.rb b/lib/spandx/catalogue.rb
index e1dbea0..573b7b4 100644
--- a/lib/spandx/catalogue.rb
+++ b/lib/spandx/catalogue.rb
@@ -36,7 +36,7 @@ module Spandx
end
def from_git
- from_json(Spandx.db.read('json/licenses.json'))
+ from_json(Spandx.spdx_db.read('json/licenses.json'))
end
def empty
diff --git a/lib/spandx/license.rb b/lib/spandx/license.rb
index f77b5be..81bc5b6 100644
--- a/lib/spandx/license.rb
+++ b/lib/spandx/license.rb
@@ -65,7 +65,7 @@ module Spandx
end
def raw_content
- @raw_content ||= (Spandx.db.read("text/#{id}.txt") || '')
+ @raw_content ||= (Spandx.spdx_db.read("text/#{id}.txt") || '')
end
def <=>(other)