mirror of https://github.com/licensee/licensee.git
github project should return paths for files
This commit is contained in:
parent
e7bf382648
commit
a8371c8fb7
|
@ -35,11 +35,12 @@ module Licensee
|
|||
end
|
||||
|
||||
def load_file(file)
|
||||
Octokit.contents(@repo, path: file[:name],
|
||||
accept: 'application/vnd.github.v3.raw')
|
||||
Octokit.contents(@repo, path: file[:path],
|
||||
accept: 'application/vnd.github.v3.raw').to_s
|
||||
end
|
||||
|
||||
def dir_files(path = nil)
|
||||
path = path.gsub('./', '') if path
|
||||
files = Octokit.contents(@repo, path: path)
|
||||
files = files.select { |data| data[:type] == 'file' }
|
||||
files.each { |data| data[:dir] = File.dirname(data[:path]) }
|
||||
|
|
Loading…
Reference in New Issue