Searched refs:path (Results 1 - 25 of 87) sorted by relevance

1234

/ontohub/spec/models/repository/
H A Djobcount_spec.rb16 %w(inroot1.clif).each do |path|
17 tmpfile = Tempfile.new(path)
18 tmpfile.write(files[path])
21 repository.save_file(tmpfile.path, path, message, user)
27 %w(inroot1.clif inroot1.clf).each do |path|
28 tmpfile = Tempfile.new(path)
29 tmpfile.write(files[path])
32 repository.save_file(tmpfile.path, path, messag
[all...]
H A Dbrowsing_spec.rb19 files.each do | path, content |
20 tmpfile = Tempfile.new(File.basename(path))
24 repository.save_file(tmpfile.path, path, message, user)
/ontohub/app/helpers/
H A Dbreadcrumbs_helper.rb3 def repository_breadcrumbs(repository, path, oid)
4 path ||= ''
5 crumbs = path.split('/')
9 path: fancy_repository_path(repository, path: nil, ref: oid)
17 path: fancy_repository_path(repository, path: segment, ref: oid)
H A Dhistory_helper.rb7 @ontology ||= repository.primary_ontology(path)
22 def path method in class:HistoryHelper
23 params[:path]
H A Dmodal_helper.rb10 def modal_body(header_text, body_text, path, button_text, modal_id: 'modal',
15 path: path,
/ontohub/lib/git_repository/
H A Dget_folder_contents.rb6 def folder_contents(commit_oid=nil, path='')
7 path ||= '/'
9 if !rugged_commit && path.empty?
12 folder_contents_rugged(rugged_commit, path)
28 files_recursive(entry.path, rugged_commit, &block)
30 block.call GitRepository::Files::GitFile.new(self, rugged_commit, entry.path)
35 def folder_contents_rugged(rugged_commit, path='')
36 path = '' if path == '/' || path
[all...]
H A Dget_info_list.rb20 def entry_info(path, commit_oid=nil)
22 entry_info_rugged(rugged_commit, path)
26 def entry_info_list(path, commit_oid=nil)
31 entry_info_list_rugged(rugged_commit, path)
42 def entry_info_rugged(rugged_commit, path)
43 changing_rugged_commit = get_commit_of_last_change(path, rugged_commit)
44 build_entry_info(changing_rugged_commit, path)
47 def build_entry_info(changing_rugged_commit, path)
54 filename: path.split('/')[-1]
58 def entry_info_list_rugged(rugged_commit, path)
[all...]
H A Dfiles.rb6 attr_reader :path, :oid, :mime_type, :mime_category
9 def initialize(repository, rugged_commit, path)
10 @path = path
13 @path = '/'
19 if !repository.path_exists?(path, rugged_commit.oid)
20 raise GitRepository::PathNotFoundError, "Path doesn't exist: #{path}"
22 self.rugged_object = repository.get_object(rugged_commit, path)
47 repository.folder_contents(oid, path)
70 @name ||= path
[all...]
H A Dhistory.rb8 attr_reader :rugged_commit, :path, :commits_to_diff
12 def initialize(commit, commits_to_diff: nil, path: nil)
16 @path = path
34 !@path ||
35 [d.old_file[:path], d.new_file[:path]].any?{ |p| p.start_with?(@path) }
40 %w(oid message committer author rugged_commit path commits_to_diff).all? do |method|
53 # :path (fil
[all...]
/ontohub/lib/
H A Dgit_repository.rb19 delegate :path, :empty?, to: :repo
21 def initialize(path)
22 if File.exists?(path)
23 @repo = Rugged::Repository.new(path)
26 @repo = Rugged::Repository.init_at(path, true)
32 FileUtils.chmod_R('g+ws', path)
36 FileUtils.rmtree(self.path)
39 def dir?(path, commit_oid = nil)
40 path ||= '/'
46 object = get_object(rugged_commit, path)
[all...]
H A Diri_url_builder.rb19 path: path,
25 # return path unless the basepath only consists of the filename
26 def path method in class:IRIUrlBuilder.Builder
27 path = File.dirname(ontology_version.basepath)
28 path if path != '.'
/ontohub/lib/extend/
H A Dfile.rb9 def self.relative_path(dir, path)
10 if path.starts_with? dir
11 path.gsub(/^#{dir}\//, '')
/ontohub/spec/lib/repository/
H A Ddirectories_spec.rb7 let(:path) { '/tmp/ontohub/test/unit/git/repository' }
8 let(:repository) { GitRepository.new(path) }
12 let(:subfolder) { 'path' }
31 FileUtils.rmtree(path) if File.exists?(path)
41 { type: git_file.type, path: git_file.path }
44 path: subfolder
54 { type: git_file.type, path: git_file.path }
[all...]
H A Dgit_repository_spec.rb8 let(:path) { Rails.root.join('tmp', 'test', 'unit', 'git_repository').to_s }
11 FileUtils.rmtree(path) if File.exists?(path)
17 expect(File.exists?(path)).to be(false)
21 let(:repository_new) { GitRepository.new(path) }
25 it { expect(File.exists?(path)).to be(true) }
30 it { expect(File.exists?(path)).to be(false) }
40 path = repository.local_path
41 FileUtils.rm_r(path)
42 FileUtils.mv(bare_git.path, pat
[all...]
/ontohub/app/controllers/
H A Dpath_helpers.rb16 repository_tree_path repository, path: args[:path]
18 repository_ref_path repository_id: repository, ref: args[:ref], action: action, path: args[:path]
H A Dfiles_controller.rb5 helper_method :repository, :ref, :oid, :path, :branch_name
11 send_download(path, oid)
19 send_download(path, oid)
24 send_download(path, oid)
28 render json: repository.entries_info(oid, path)
42 redirect_to fancy_repository_path(repository, path: resource.target_path)
52 flash[:success] = "Successfully changed the file #{params[:path]}."
53 redirect_to fancy_repository_path(repository, path: resource.target_path)
60 repository.delete_file(params[:path], current_user)
61 flash[:success] = "Successfully deleted the file #{params[:path]}
105 def path method in class:FilesController
[all...]
/ontohub/app/fake_records/
H A Dhistory_entries_page.rb7 attr_reader :repository, :oid, :path, :current_file, :commits
24 @path = opts[:path]
25 @current_file = repository.get_file(path, oid) if path && !repository.dir?(path)
30 @commits = repository.walk_commits(start_oid: oid, path: path,
/ontohub/config/initializers/
H A Dpaths.rb7 def expand(path)
8 Dir.chdir(Rails.root) { Pathname.new(path).expand_path }
11 def cleanup_release(path)
12 path.sub(%r(/releases/\d+/), "/current/")
15 def prepare(path, fallback = nil)
16 path = File.join(Settings.paths.data, fallback) if fallback && path.nil?
17 cleanup_release(expand(path))
/ontohub/spec/factories/
H A Dgit_repository_factory.rb15 path = generate :git_repository_path
18 FileUtils.mkdir_p(path)
19 Dir.chdir(path) do
37 new(path)
47 path = generate :git_repository_path
50 FileUtils.mkdir_p(path)
51 Dir.chdir(path) do
78 new(path)
86 path = generate :git_repository_path
89 FileUtils.mkdir_p(path)
[all...]
/ontohub/app/models/ontology/
H A Dclass_methods_and_scopes.rb9 scope :basepath, ->(path) do
10 joins(:ontology_version).where('ontology_versions.basepath' => path)
18 scope :with_path, ->(path) do
25 with_basepath(File.basepath(path)).
26 where(condition, extname: File.extname(path)).
30 scope :with_basepath, ->(path) do
37 ("ontology_versions"."basepath" = :path)
39 AND ("ontologies"."basepath" = :path))
42 joins(join).where(condition, path: path)
[all...]
/ontohub/spec/support/
H A Dcommon_helper_methods.rb11 def fixture_file(path)
13 fixture_path.join(path)
28 def ontology_file(path, ext=nil)
31 "#{path}.#{ext}"
32 elsif path.include?('.')
33 path
35 "#{path}.#{path.to_s.split('/').first}"
41 path = ontology_file(relative_file)
42 version_for_file(repository, path)
[all...]
/ontohub/app/models/repository/
H A Dontologies.rb14 def primary_ontology(path)
15 path ||= ''
16 onto = ontologies.where(basepath: File.basepath(path)).first
/ontohub/db/
H A Dseeds.rb26 Dir["#{Rails.root}/db/seeds/*.rb"].sort.each do |path|
27 puts File.basename path
28 require path
/ontohub/lib/dsl/
H A Drepo.rb3 def init(path)
4 FileUtils.mkdir_p(path)
5 RepositoryCreator.instance.root_path = path
50 @path = url || RepositoryCreator.instance.root_path.join(name)
54 Subprocess.run 'git', 'init', @path
59 r = Repository.new name: @name, description: 'Seeded Repository', source_address: @path.to_s, access: 'public_r'
/ontohub/db/seeds/
H A D040-git.rb30 ontologies.each do |path|
31 path = File.join(Rails.root, 'spec', 'fixtures', 'ontologies', path)
32 basename = File.basename(path)
36 version = repository.save_file path, basename, "#{basename} added", @user

Completed in 652 milliseconds

1234