Añade plugin Redmine Git Hosting 4.0.2
This commit is contained in:
parent
472cb1ea76
commit
bdd66d941f
494 changed files with 36768 additions and 0 deletions
|
@ -0,0 +1,8 @@
|
|||
FactoryBot.define do
|
||||
factory :gitolite_public_key do
|
||||
sequence(:title) { |n| "test-key#{n}" }
|
||||
key { 'ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDpqFJzsx3wTi3t3X/eOizU6rdtNQoqg5uSjL89F+Ojjm2/sah3ouzx+3E461FDYaoJL58Qs9eRhL+ev0BY7khYXph8nIVDzNEjhLqjevX+YhpaW9Ll7V807CwAyvMNm08aup/NrrlI/jO+At348/ivJrfO7ClcPhq4+Id9RZfvbrKaitGOURD7q6Bd7xjUjELUN8wmYxu5zvx/2n/5woVdBUMXamTPxOY5y6DxTNJ+EYzrCr+bNb7459rWUvBHUQGI2fXDGmFpGiv6ShKRhRtwob1JHI8QC9OtxonrIUesa2dW6RFneUaM7tfRfffC704Uo7yuSswb7YK+p1A9QIt5 nicolas@tchoum' }
|
||||
key_type { 0 }
|
||||
association :user
|
||||
end
|
||||
end
|
5
plugins/redmine_git_hosting/spec/factories/group.rb
Normal file
5
plugins/redmine_git_hosting/spec/factories/group.rb
Normal file
|
@ -0,0 +1,5 @@
|
|||
FactoryBot.define do
|
||||
factory :group do
|
||||
sequence(:lastname) { |n| "GroupTest#{n}" }
|
||||
end
|
||||
end
|
4
plugins/redmine_git_hosting/spec/factories/member.rb
Normal file
4
plugins/redmine_git_hosting/spec/factories/member.rb
Normal file
|
@ -0,0 +1,4 @@
|
|||
FactoryBot.define do
|
||||
factory :member do |member|
|
||||
end
|
||||
end
|
6
plugins/redmine_git_hosting/spec/factories/project.rb
Normal file
6
plugins/redmine_git_hosting/spec/factories/project.rb
Normal file
|
@ -0,0 +1,6 @@
|
|||
FactoryBot.define do
|
||||
factory :project do
|
||||
sequence(:identifier) { |n| "project#{n}" }
|
||||
sequence(:name) { |n| "Project#{n}" }
|
||||
end
|
||||
end
|
|
@ -0,0 +1,11 @@
|
|||
FactoryBot.define do
|
||||
factory :protected_branch_user_member, class: 'ProtectedBranchesMember' do
|
||||
association :protected_branch, factory: :repository_protected_branche
|
||||
association :principal, factory: :user
|
||||
end
|
||||
|
||||
factory :protected_branch_group_member, class: 'ProtectedBranchesMember' do
|
||||
association :protected_branch, factory: :repository_protected_branche
|
||||
association :principal, factory: :group
|
||||
end
|
||||
end
|
|
@ -0,0 +1,8 @@
|
|||
FactoryBot.define do
|
||||
factory :repository_deployment_credential do
|
||||
perm { 'RW+' }
|
||||
association :repository, factory: :repository_gitolite
|
||||
association :user
|
||||
association :gitolite_public_key
|
||||
end
|
||||
end
|
|
@ -0,0 +1,21 @@
|
|||
FactoryBot.define do
|
||||
factory :repository_git_config_key_base, class: 'RepositoryGitConfigKey' do
|
||||
sequence(:key) { |n| "hookfoo.foo#{n}" }
|
||||
value { 'bar' }
|
||||
association :repository, factory: :repository_gitolite
|
||||
end
|
||||
|
||||
factory :repository_git_config_key, class: 'RepositoryGitConfigKey::GitConfig' do
|
||||
sequence(:key) { |n| "hookfoo.foo#{n}" }
|
||||
value { 'bar' }
|
||||
type { 'RepositoryGitConfigKey::GitConfig' }
|
||||
association :repository, factory: :repository_gitolite
|
||||
end
|
||||
|
||||
factory :repository_git_option_key, class: 'RepositoryGitConfigKey::Option' do
|
||||
sequence(:key) { |n| "hookfoo.foo#{n}" }
|
||||
value { 'bar' }
|
||||
type { 'RepositoryGitConfigKey::Option' }
|
||||
association :repository, factory: :repository_gitolite
|
||||
end
|
||||
end
|
|
@ -0,0 +1,8 @@
|
|||
FactoryBot.define do
|
||||
factory :repository_git_extra do
|
||||
git_http { 0 }
|
||||
default_branch { 'master' }
|
||||
association :repository, factory: :repository_gitolite
|
||||
key { RedmineGitHosting::Utils::Crypto.generate_secret(64) }
|
||||
end
|
||||
end
|
|
@ -0,0 +1,6 @@
|
|||
FactoryBot.define do
|
||||
factory :repository_gitolite, class: 'Repository::Xitolite' do
|
||||
is_default { false }
|
||||
association :project
|
||||
end
|
||||
end
|
|
@ -0,0 +1,7 @@
|
|||
FactoryBot.define do
|
||||
factory :repository_mirror do
|
||||
sequence(:url) { |n| "ssh://git@example.com:22/john_doe/john_doe/john_doe_#{n}.git" }
|
||||
push_mode { 0 }
|
||||
association :repository, factory: :repository_gitolite
|
||||
end
|
||||
end
|
|
@ -0,0 +1,6 @@
|
|||
FactoryBot.define do
|
||||
factory :repository_post_receive_url do
|
||||
sequence(:url) { |n| "http://example.com/toto#{n}.php" }
|
||||
association :repository, factory: :repository_gitolite
|
||||
end
|
||||
end
|
|
@ -0,0 +1,7 @@
|
|||
FactoryBot.define do
|
||||
factory :repository_protected_branche do
|
||||
path { 'master' }
|
||||
permissions { 'RW+' }
|
||||
association :repository, factory: :repository_gitolite
|
||||
end
|
||||
end
|
|
@ -0,0 +1,5 @@
|
|||
FactoryBot.define do
|
||||
factory :repository_svn, class: 'Repository::Subversion' do
|
||||
is_default { false }
|
||||
end
|
||||
end
|
21
plugins/redmine_git_hosting/spec/factories/role.rb
Normal file
21
plugins/redmine_git_hosting/spec/factories/role.rb
Normal file
|
@ -0,0 +1,21 @@
|
|||
FactoryBot.define do
|
||||
factory :role do
|
||||
name { 'Manager' }
|
||||
builtin { 0 }
|
||||
issues_visibility { 'all' }
|
||||
position { 1 }
|
||||
permissions do
|
||||
%i[add_project edit_project close_project select_project_modules manage_members
|
||||
manage_versions manage_categories view_issues add_issues edit_issues manage_issue_relations
|
||||
manage_subtasks add_issue_notes move_issues delete_issues view_issue_watchers add_issue_watchers
|
||||
set_issues_private set_notes_private view_private_notes delete_issue_watchers
|
||||
manage_public_queries save_queries view_gantt view_calendar log_time view_time_entries
|
||||
edit_time_entries delete_time_entries manage_news comment_news view_documents
|
||||
add_documents edit_documents delete_documents view_wiki_pages export_wiki_pages
|
||||
view_wiki_edits edit_wiki_pages delete_wiki_pages_attachments protect_wiki_pages
|
||||
delete_wiki_pages rename_wiki_pages add_messages edit_messages delete_messages
|
||||
manage_boards view_files manage_files browse_repository manage_repository view_changesets
|
||||
manage_related_issues manage_project_activities create_gitolite_ssh_key commit_access]
|
||||
end
|
||||
end
|
||||
end
|
11
plugins/redmine_git_hosting/spec/factories/user.rb
Normal file
11
plugins/redmine_git_hosting/spec/factories/user.rb
Normal file
|
@ -0,0 +1,11 @@
|
|||
FactoryBot.define do
|
||||
factory :user do
|
||||
sequence(:login) { |n| "user#{n}" }
|
||||
sequence(:firstname) { |n| "User#{n}" }
|
||||
sequence(:lastname) { |n| "Test#{n}" }
|
||||
sequence(:mail) { |n| "user#{n}@awesome.com" }
|
||||
language { 'fr' }
|
||||
hashed_password { '66eb4812e268747f89ec309178e2ea50410653fb' }
|
||||
salt { '5abd4e59ac0d483daf2f68d3b6544ff3' }
|
||||
end
|
||||
end
|
Loading…
Add table
Add a link
Reference in a new issue