Searched refs:repository (Results 1 - 25 of 165) sorted by relevance

1234567

/ontohub/spec/controllers/
H A Drepository_settings_controller_spec.rb7 let(:repository){ create :repository }
8 before { get :index, repository_id: repository.to_param }
11 response.should redirect_to [repository, :url_maps]
H A Drepository_directories_controller_spec.rb5 let(:repository) { create :repository, user: user }
9 post :create, repository_directory: attributes_for(:repository_directory), repository_id: repository.to_param
28 }, repository_id: repository.to_param
38 create :repository_directory, repository: repository, user: user,
46 }, repository_id: repository.to_param
/ontohub/spec/models/repository/
H A Ddestroying_spec.rb4 let(:repository) { create :repository }
7 repository.destroy_asynchronously
14 it 'should mark the repository as destroying' do
15 expect(repository.is_destroying).to be_truthy
H A Dremote_spec.rb5 let(:repository) { create :repository_with_empty_remote, remote_type: 'mirror' }
8 expect(repository.mirror?).to be_truthy
13 repository.convert_to_local!
16 it 'should become a non-mirrored repository' do
17 expect(repository.mirror?).to be_falsy
20 it 'should become a forked repository' do
21 expect(repository.fork?).to be_truthy
27 let!(:repository) { create :repository_with_empty_remote, remote_type: 'fork' }
29 it 'should be a non-mirrored repository' do
30 expect(repository
[all...]
H A Dsymlinks_spec.rb4 context 'public repository' do
5 let(:repository) { create :repository }
8 let(:link_path) { repository.symlink_path(category) }
12 expect(link_target).to eq(repository.local_path.to_s)
15 context 'repository destroy' do
16 before { repository.destroy }
19 expect(repository.symlink_path(category).exist?).to be(false)
29 repository.access = 'private_rw'
30 repository
[all...]
H A Dbrowsing_spec.rb5 let(:repository) { create :repository, user: user }
24 repository.save_file(tmpfile.path, path, message, user)
30 expect(repository.paths_starting_with('inroot2')).to eq(['inroot2.clif'])
34 expect(repository.paths_starting_with('inroot')).to eq(['inroot1.clf', 'inroot1.clif', 'inroot2.clif'])
38 expect(repository.paths_starting_with('folder1/file')).to eq(['folder1/file1.clif', 'folder1/file2.clf'])
44 expect(repository.dir?('non-existent')).to be_falsey
48 expect(repository.dir?('inroot1.clif')).to be_falsey
52 expect(repository.dir?('folder1')).to be_truthy
H A Daccess_spec.rb6 let!(:repository_pub_r) { create :repository, user: user,
8 let!(:repository_pub_rw) { create :repository, user: user,
10 let!(:repository_priv_rw) { create :repository, user: user,
14 it "should fetch the public#{access_modifier} repository" do
19 it "should not fetch the private#{access_modifier} repository" do
26 context 'private repository' do
28 let(:repository) { ontology_version.repository }
30 repository.access = 'private_rw'
31 repository
[all...]
H A Dretry_failed_spec.rb8 let(:repository){ ontology.repository }
14 repository.ontologies.retry_failed
15 repository.reload
H A Dsave_and_delete_file_spec.rb5 let(:repository) { create :repository, user: user }
19 expect(repository.ontologies.count).to eq(0)
24 @version = repository.save_file(file_path, target_path, message, user)
27 it 'create the file in the git repository' do
28 expect(repository.git.path_exists?(target_path)).to be(true)
31 it 'create the file with correct contents in the git repository' do
32 expect(repository.git.get_file(target_path).content).to eq(content)
36 expect(repository.ontologies.count).to eq(1)
40 expect(repository
[all...]
/ontohub/db/seeds/
H A D050-url_maps.rb0 repository = Repository.first!
4 u.repository = repository
/ontohub/db/data/
H A D20160107154144_recreate_repository_symlinks.rb3 Repository.find_each do |repository|
4 repository.send(:symlinks_remove)
5 repository.send(:symlinks_update)
10 Repository.find_each do |repository|
11 repository.send(:symlinks_remove)
12 repository.send(:symlinks_update)
H A D20160426082023_recreate_symlinks.rb3 Repository.find_each do |repository|
4 repository.send(:symlinks_update)
9 Repository.find_each do |repository|
10 repository.send(:symlinks_update)
/ontohub/spec/lib/
H A Dssh_access_spec.rb7 let(:repository) { permission.item }
11 it 'should allow read on public readable repository' do
12 repository.access = 'public_r'
13 access = described_class.determine_permission('read', nil, repository)
17 it 'should disallow write on public readable repository' do
18 repository.access = 'public_r'
19 access = described_class.determine_permission('write', nil, repository)
23 it 'should allow read on public read-writeable repository' do
24 repository.access = 'public_rw'
25 access = described_class.determine_permission('read', nil, repository)
[all...]
H A Dpermissionable_spec.rb5 context 'on repository should find the highest permission' do
9 let!(:repository) { permission.item }
13 expect(repository.highest_permission(user)).to eq(permission)
19 perm = create :permission, subject: user, item: repository,
21 repository.permissions << perm
27 expect(repository.highest_permission(user)).to eq(owner_permission)
/ontohub/app/controllers/
H A Durl_maps_controller.rb3 belongs_to :repository, finder: :find_by_path!
9 create! { repository_url_maps_path(repository) }
13 update! { repository_url_maps_path(repository) }
17 destroy! { repository_url_maps_path(repository) }
30 helper_method :repository
31 def repository method in class:UrlMapsController
35 resource.repository
/ontohub/spec/lib/repository/
H A Dfiles_spec.rb7 let(:path) { '/tmp/ontohub/test/unit/git/repository' }
8 let(:repository) { GitRepository.new(path) }
20 before { repository.commit_file(userinfo, content, filepath, message) }
22 it { expect(repository.path_exists?(filepath)).to be(true) }
23 it { expect(repository.get_file(filepath).name).to eq(filepath.split('/')[-1]) }
24 it { expect(repository.get_file(filepath).content).to eq(content) }
25 it { expect(repository.get_file(filepath).mime_type).to eq(Mime::Type.lookup('text/plain')) }
26 it { expect(repository.commit_message).to eq(message) }
27 it { expect(repository.commit_author[:name]).to eq(userinfo[:name]) }
33 repository
[all...]
H A Ddiff_spec.rb4 let(:path) { '/tmp/ontohub/test/lib/repository' }
5 let(:repository) { GitRepository.new(path) }
26 @commit1 = repository.commit_file(userinfo, content1, filepath.to_s, 'Message1')
27 @commit2 = repository.commit_file(userinfo, content2, filepath.to_s, 'Message2')
28 @commit3 = repository.delete_file(userinfo, filepath.to_s)
32 expect(repository.is_head?(@commit3)).to be(true)
36 expect(repository.changed_files(@commit1).size).to eq(1)
40 expect(repository.changed_files(@commit1).first.name).to eq(Pathname.new 'file.xml')
44 expect(repository.changed_files(@commit1).first.path).to eq(filepath)
48 expect(repository
[all...]
/ontohub/spec/models/
H A Drepository_spec.rb11 let(:repository) { create :repository, user: user }
13 context 'a repository with a reserved name should be invalid' do
15 build :repository, user: user, name: 'repositories'
29 context 'when trying to rename a repository' do
31 repository.name = "#{repository.name}addition"
32 expect { repository.save! }.to raise_error(ActiveRecord::RecordInvalid)
36 context 'when deleting a repository', :process_jobs_synchronously do
37 let (:ontology) { create :ontology, repository
[all...]
H A Dsymbol_mapping_spec.rb6 let(:repository) { create :repository }
7 let(:version) { add_fixture_file(repository, 'dol/simple_mapping') }
H A Dtranslated_sentence_spec.rb6 let(:repository) { create :repository }
7 let(:version) { add_fixture_file(repository, 'dol/double_import_blendoid.dol') }
H A Daccess_token_spec.rb5 let(:repository) { create :repository }
8 repository.access_tokens << access_token
9 repository.save
/ontohub/spec/factories/
H A Drepository_factory.rb2 factory :repository do
6 factory :repository_with_remote do |repository|
7 repository.after(:build) do |repository|
12 path = File.join(Ontohub::Application.config.git_root, 'repository')
26 repository.remote_type ||= 'mirror'
27 repository.source_type = 'git'
28 repository.source_address = path
32 factory :repository_with_empty_remote do |repository|
33 repository
[all...]
/ontohub/app/helpers/
H A Dhistory_helper.rb2 def repository method in class:HistoryHelper
3 @repository ||= Repository.find_by_path!(params[:repository_id])
7 @ontology ||= repository.primary_ontology(path)
15 @commit_id ||= repository.commit_id(params[:ref])
/ontohub/lib/git_repository/
H A Dfiles.rb7 attr_accessor :repository, :rugged_object
9 def initialize(repository, rugged_commit, path)
11 self.repository = repository
12 if repository.empty?
19 if !repository.path_exists?(path, rugged_commit.oid)
22 self.rugged_object = repository.get_object(rugged_commit, path)
27 mime_info = repository.class.mime_info(name)
47 repository.folder_contents(oid, path)
74 @last_change ||= repository
[all...]
/ontohub/spec/models/ontology_version/
H A Dproving_spec.rb6 let(:repository) { ontology.repository }
19 context 'on a private repository' do
21 repository.access = 'private_rw'
22 repository.save!
30 to eq(repository.access_tokens.first.to_s)
35 let!(:url_maps) { [create(:url_map, repository: repository)] }

Completed in 17 milliseconds

1234567