diff --git a/app/assets/images/tour-top-eng.png b/app/assets/images/tour-top-eng.png
new file mode 100644
index 000000000..497b2ab62
Binary files /dev/null and b/app/assets/images/tour-top-eng.png differ
diff --git a/app/assets/images/tour-top.png b/app/assets/images/tour-top.png
index 1559fea5b..12aacf07f 100644
Binary files a/app/assets/images/tour-top.png and b/app/assets/images/tour-top.png differ
diff --git a/app/assets/images/tour/2/annotation.png b/app/assets/images/tour/annotation.png
similarity index 100%
rename from app/assets/images/tour/2/annotation.png
rename to app/assets/images/tour/annotation.png
diff --git a/app/assets/images/tour/3/build.png b/app/assets/images/tour/builds.png
similarity index 100%
rename from app/assets/images/tour/3/build.png
rename to app/assets/images/tour/builds.png
diff --git a/app/assets/images/tour/1/control.png b/app/assets/images/tour/control.png
similarity index 100%
rename from app/assets/images/tour/1/control.png
rename to app/assets/images/tour/control.png
diff --git a/app/assets/images/tour/2/edit.png b/app/assets/images/tour/edit.png
similarity index 100%
rename from app/assets/images/tour/2/edit.png
rename to app/assets/images/tour/edit.png
diff --git a/app/assets/images/tour/1/git.png b/app/assets/images/tour/git.png
similarity index 100%
rename from app/assets/images/tour/1/git.png
rename to app/assets/images/tour/git.png
diff --git a/app/assets/images/tour/2/history.png b/app/assets/images/tour/history.png
similarity index 100%
rename from app/assets/images/tour/2/history.png
rename to app/assets/images/tour/history.png
diff --git a/app/assets/images/tour/3/monitoring.png b/app/assets/images/tour/monitoring.png
similarity index 100%
rename from app/assets/images/tour/3/monitoring.png
rename to app/assets/images/tour/monitoring.png
diff --git a/app/assets/images/tour/3/repo.png b/app/assets/images/tour/repo.png
similarity index 100%
rename from app/assets/images/tour/3/repo.png
rename to app/assets/images/tour/repo.png
diff --git a/app/assets/images/tour/2/source.png b/app/assets/images/tour/source.png
similarity index 100%
rename from app/assets/images/tour/2/source.png
rename to app/assets/images/tour/source.png
diff --git a/app/assets/images/tour/1/tracker.png b/app/assets/images/tour/tracker.png
similarity index 100%
rename from app/assets/images/tour/1/tracker.png
rename to app/assets/images/tour/tracker.png
diff --git a/app/controllers/application_controller.rb b/app/controllers/application_controller.rb
index b05ad486c..8abd400d8 100644
--- a/app/controllers/application_controller.rb
+++ b/app/controllers/application_controller.rb
@@ -21,7 +21,8 @@ class ApplicationController < ActionController::Base
protected
def set_locale
- I18n.locale = check_locale( get_user_locale || request.env['HTTP_ACCEPT_LANGUAGE'] )
+ I18n.locale = check_locale( get_user_locale ||
+ request.env['HTTP_ACCEPT_LANGUAGE'] ? request.env['HTTP_ACCEPT_LANGUAGE'][0,2].downcase : nil )
end
def get_user_locale
diff --git a/app/controllers/pages_controller.rb b/app/controllers/pages_controller.rb
index fce2c19fc..bcb399cc5 100644
--- a/app/controllers/pages_controller.rb
+++ b/app/controllers/pages_controller.rb
@@ -8,7 +8,15 @@ class PagesController < ApplicationController
end
def tour_inside
- render "pages/tour/tour-inside-#{params[:id]}", :layout => 'tour'
+ @entries = case params[:id]
+ when 'projects'
+ %w(repo builds monitoring)
+ when 'sources'
+ %w(source history annotation edit)
+ when 'builds'
+ %w(control git tracker)
+ end
+ render "pages/tour/tour-inside", :layout => 'tour'
end
def forbidden
diff --git a/app/models/platform.rb b/app/models/platform.rb
index fb5f3af4d..4a19de176 100644
--- a/app/models/platform.rb
+++ b/app/models/platform.rb
@@ -137,8 +137,7 @@ class Platform < ActiveRecord::Base
def symlink_directory
# umount_directory_for_rsync # TODO ignore errors
- system("sudo mkdir -p -m 0777 #{symlink_path}")
- system("sudo ln -s #{path} #{symlink_path}")
+ system("ln -s #{path} #{symlink_path}")
Arch.all.each do |arch|
str = "country=Russian Federation,city=Moscow,latitude=52.18,longitude=48.88,bw=1GB,version=2011,arch=#{arch.name},type=distrib,url=#{public_downloads_url}\n"
File.open(File.join(symlink_path, "#{name}.#{arch.name}.list"), 'w') {|f| f.write(str) }
@@ -146,7 +145,7 @@ class Platform < ActiveRecord::Base
end
def remove_symlink_directory
- system("sudo rm -Rf #{symlink_path}")
+ system("rm -Rf #{symlink_path}")
end
def update_owner_relation
diff --git a/app/views/layouts/tour.html.haml b/app/views/layouts/tour.html.haml
index 8ce045b34..1f0a486bc 100644
--- a/app/views/layouts/tour.html.haml
+++ b/app/views/layouts/tour.html.haml
@@ -39,7 +39,7 @@
.both
/ Page
.tour
- =image_tag 'tour-top.png', :alt => 'ABF'
+ =image_tag "tour-top#{I18n.locale == :en ? '-eng' : ''}.png", :alt => 'ABF'
.both
%article
= yield
diff --git a/app/views/pages/tour/_entry.html.haml b/app/views/pages/tour/_entry.html.haml
new file mode 100644
index 000000000..c1bb10011
--- /dev/null
+++ b/app/views/pages/tour/_entry.html.haml
@@ -0,0 +1,19 @@
+.feature-wrap
+ .feature
+ -if is_left
+ .left
+ %h1=t "tour.#{entry}"
+ %p
+ =raw t "tour.#{entry}_description"
+ .right
+ %a.pirobox{:href => image_path("tour/big/#{entry}.png"), :rel => "single", :title => t("tour.#{entry}")}
+ =image_tag "tour/#{entry}.png"
+ -else
+ .left
+ %a.pirobox{:href => image_path("tour/big/#{entry}.png"), :rel => "single", :title => t("tour.#{entry}")}
+ =image_tag "tour/#{entry}.png"
+ .right
+ %h1=t "tour.#{entry}"
+ %p
+ =raw t "tour.#{entry}_description"
+ .both
diff --git a/app/views/pages/tour/_submenu.html.haml b/app/views/pages/tour/_submenu.html.haml
new file mode 100644
index 000000000..057944464
--- /dev/null
+++ b/app/views/pages/tour/_submenu.html.haml
@@ -0,0 +1,4 @@
+%ul
+ -%w(projects sources builds).each do |entry|
+ %li
+ =link_to t("tour.#{entry}"), tour_inside_path(entry), :class => params[:id] == entry ? 'active' : ''
diff --git a/app/views/pages/tour/abf-tour-project-description-1.html.haml b/app/views/pages/tour/abf-tour-project-description-1.html.haml
index 12de210be..f74145da7 100644
--- a/app/views/pages/tour/abf-tour-project-description-1.html.haml
+++ b/app/views/pages/tour/abf-tour-project-description-1.html.haml
@@ -1,43 +1,39 @@
.feature-wrap
.feature
.left
- %a.pirobox{:href => image_path('tour/big/control.png'), :rel => "single", :title => "Управление проектами"}
- =image_tag 'tour/1/control.png'
+ %a.pirobox{:href => image_path('tour/big/control.png'), :rel => "single", :title => t('tour.projects')}
+ =image_tag 'tour/control.png'
.right
%a{:href => tour_inside_path('projects')}
- %h1 Управление проектами
+ %h1=t 'tour.projects'
%p
- Каждый git-репозиторий на ABF поставляется с инструментами,
- необходимыми для управления проектами, вне зависимости от
- того, публичный или приватный проект.
- %br/
- =link_to 'Читать далее...', tour_inside_path('projects')
+ =t 'tour.projects_header'
+ %br
+ =link_to t('tour.read_more'), tour_inside_path('projects')
.both
.feature-wrap
.feature
.left
%a{:href => tour_inside_path('sources')}
- %h1 Исходный код
+ %h1=t 'tour.sources'
%p
- ABF — полноценный git-хостинг с удобным веб-интерфейсом.
+ =t 'tour.sources_header'
%br/
- =link_to 'Читать далее...', tour_inside_path('sources')
+ =link_to t('tour.read_more'), tour_inside_path('sources')
.right
- %a.pirobox{:href => image_path('tour/big/source.png'), :rel => "single", :title => "Исходный код"}
- =image_tag 'tour/2/source.png'
+ %a.pirobox{:href => image_path('tour/big/source.png'), :rel => "single", :title => t('tour.sources')}
+ =image_tag 'tour/source.png'
.both
.feature-wrap
.feature
.left
- %a.pirobox{:href => image_path('tour/big/monitoring.png'), :rel => "single", :title => "Сборка пакетов"}
- =image_tag 'tour/3/monitoring.png'
+ %a.pirobox{:href => image_path('tour/big/monitoring.png'), :rel => "single", :title => t('tour.builds')}
+ =image_tag 'tour/monitoring.png'
.right
%a{:href => tour_inside_path('builds')}
- %h1 Сборка пакетов
+ %h1=t 'tour.builds'
%p
- ABF — это не только хостинг исходного кода, но и система сборки
- и хостинга пакетов. Собирайте свои проекты под множество
- дистрибутивов и архитектур в свой персональный репозиторий.
+ =t 'tour.builds_header'
%br/
- =link_to 'Читать далее...', tour_inside_path('builds')
+ =link_to t('tour.read_more'), tour_inside_path('builds')
.both
diff --git a/app/views/pages/tour/tour-inside-builds.html.haml b/app/views/pages/tour/tour-inside-builds.html.haml
deleted file mode 100644
index 22fd74cbb..000000000
--- a/app/views/pages/tour/tour-inside-builds.html.haml
+++ /dev/null
@@ -1,53 +0,0 @@
-.sub-menu.tour
- %nav
- %ul
- %li
- =link_to 'Управление проектами', tour_inside_path('projects')
- %li
- =link_to 'Исходный код', tour_inside_path('sources')
- %li
- =link_to 'Сборка проектов', tour_inside_path('builds'), :class => 'active'
-.both
-/ Page
-%article
- / Single page content
- .feature-wrap
- .feature
- .left
- %a.pirobox{:href => image_path('tour/big/repo.png'), :rel => "single", :title => "Персональный репозиторий"}
- =image_tag 'tour/3/repo.png'
- .right
- %h1 Персональный репозиторий
- %p
- Персональный репозиторий — быстрый и легкий способ
- распространить свое ПО множеству Linux пользователей
- различных дистрибутивов, используя стандартный механизм
- доставки ПО. ABF позаботится о зависимостях ПО из основных
- репозиториев и/или дополнительных персональных репозиториев.
- Опубликовали новую версию? Пользователи автоматически
- получат оповещение о доступности обновления.
- .both
- .feature-wrap
- .feature
- .left
- %h1 Сборка пакета
- %p
- ABF позволяет собрать ваши проекты под множество архитектур
- и дистрибутивов, используя свои вычислительные мощности.
- Никаких затрат с вашей стороны!
- .right
- %a.pirobox{:href => image_path('tour/big/build.png'), :rel => "single", :title => "Сборка пакета"}
- =image_tag 'tour/3/build.png'
- .both
- .feature-wrap
- .feature
- .left
- %a.pirobox{:href => image_path('tour/big/monitoring.png'), :rel => "single", :title => "Мониторинг"}
- =image_tag 'tour/3/monitoring.png'
- .right
- %h1 Мониторинг
- %p
- В большом числе сборочных заданий легко потеряться, поэтому
- мониторинг сборки фокусирует ваше внимание только на том,
- что действительно важно.
- .both
diff --git a/app/views/pages/tour/tour-inside-projects.html.haml b/app/views/pages/tour/tour-inside-projects.html.haml
deleted file mode 100644
index 83d0586b9..000000000
--- a/app/views/pages/tour/tour-inside-projects.html.haml
+++ /dev/null
@@ -1,61 +0,0 @@
-/ Submenu
-.sub-menu.tour
- %nav
- %ul
- %li
- =link_to 'Управление проектами', tour_inside_path('projects'), :class => 'active'
- %li
- =link_to 'Исходный код', tour_inside_path('sources')
- %li
- =link_to 'Сборка проектов', tour_inside_path('builds')
-.both
-/ Page
-%article
- / Single page content
- .feature-wrap
- .feature
- .left
- %a.pirobox{:href => image_path('tour/big/control.png'), :rel => "single", :title => "Управление проектами"}
- =image_tag 'tour/1/control.png'
- .right
- %h1 Управление проектами
- %p
- Существует 3 возможных роли для участника проекта: только
- чтение, чтение/запись и административный уровень. Участником
- проекта может выступать как пользователь, так и группа. Проект,
- как и группа, может иметь неограниченное число участников
- (пользователей, групп или всех вместе).
- .both
- .feature-wrap
- .feature
- .left
- %h1 Git Wiki
- %p
- Вики проекта создана с помощью Gollum — открытого
- вики-движка, созданного GitHub. В основе своей это полноценный
- git-репозиторий, который можно клонировать, использовать в
- режиме офлайн, изменять и загружать изменения обратно на
- сервер, как в случае с обычным кодом. Удобный веб-редактор
- позволит работать с ней в онлайн. Теперь данные о проекте не
- пропадут и доступны для редактирования в любимом редакторе!
- %br/
- %br/
- Примечание: для приватного проекта вики доступна только его
- участникам. Для публичного — всем для чтения.
- .right
- %a.pirobox{:href => image_path('tour/big/git.png'), :rel => "single", :title => "Git Wiki"}
- =image_tag 'tour/1/git.png'
- .both
- .feature-wrap
- .feature
- .left
- %a.pirobox{:href => image_path('tour/big/tracker.png'), :rel => "single", :title => "Легкий трекер задач"}
- =image_tag 'tour/1/tracker.png'
- .right
- %h1 Легкий трекер задач
- %p
- Каждый проект также может использовать легкий и простой
- трекер задач. Метки и назначения позволят не потеряться среди
- задач, а понятный интерфейс позволит сконцентрироваться на
- работе, а не на заполнении огромных формуляров.
- .both
diff --git a/app/views/pages/tour/tour-inside.html.haml b/app/views/pages/tour/tour-inside.html.haml
new file mode 100644
index 000000000..308533de4
--- /dev/null
+++ b/app/views/pages/tour/tour-inside.html.haml
@@ -0,0 +1,9 @@
+.sub-menu.tour
+ %nav
+ =render 'pages/tour/submenu'
+.both
+/ Page
+%article
+ / Single page content
+ -@entries.each_with_index do |el, ind|
+ =render :partial => 'pages/tour/entry', :locals => {:entry => el, :is_left => ind.odd?}
diff --git a/config/locales/tour.en.yml b/config/locales/tour.en.yml
new file mode 100644
index 000000000..2f1f2fd5f
--- /dev/null
+++ b/config/locales/tour.en.yml
@@ -0,0 +1,51 @@
+en:
+ tour:
+ read_more: more...
+ projects: Project Management
+ sources: Source Code
+ builds: Package Building
+
+ repo: Personal repository
+ monitoring: Task monitoring
+ source: Source code online
+ history: File history
+ annotation: File blame
+ edit: Online editor
+ control: Project Management
+ git: Git Wiki
+ tracker: Lightweight task tracker
+
+ projects_header: Every git repository in ABF is accompanied by tools necessary to manage a project, be it a public project or a private one.
+ sources_header: ABF is full-functional git-hosting with convenient Web interface.
+ builds_header: |
+ ABF is not just a hosting for source code, but a system to build and publish packages.
+ Build your projects for large variety of distributions and hardware platforms in your personal repository!
+
+ repo_description: |
+ Personal repository provides you with an easy way to distribute your software among great number of Linux users by means of standard ways of software delivery.
+ ABF will take care of package dependencies from both main repositories or extra and personal ones. Published a new package version?
+ Users will be automatically notified about available update.
+ builds_description: |
+ ABF provides you with power to build projects for large variety of distributions and hardware platforms. No additional efforts from your side!
+ monitoring_description: |
+ It is easy to get lost in large amount of tasks, but smart monitoring will focus your attention on those tasks that really matter for you.
+ source_description: |
+ We have focused on making access to the source code easy and transparent. Every file pushed to git repository will instantly become available for online access,
+ so you can share it with other developers even if they don't use Git. Home page of every project contains list of project files,
+ as well as information about recent changes. You can immediately see the most important part of your project: the code.
+ history_description: |
+ Every file in git repository has history of modifications which can be easily looked through using ABF to see who and when modified the file
+ and which changes were introduced by particular commits.
+ annotation_description: 'Looking for the author of a particular code fragment? Just open the file blame to see who modified that fragment for the last time and in which commit.'
+ edit_description: Need to quickly edit some file? Want to fix syntax error from your mobile phone? No problem. We provide you with a simple editor for every file in git repository.
+ control_description: |
+ There are 3 possible levels of privileges for project members: read-only, read/write, and administration level. A project member can designate a real user
+ or a group of developers. Both projects and groups may have unlimited number of members (every of which can be in turn a user or a group).
+ git_description: |
+ Project wiki is based on Gollum — open wiki engine developed by GitHub. In fact, this is a full-function git repository which can be cloned, used offline,
+ modified and pushed back to server, as if it were a usual source code. Convenient web editor allows to modify wiki online.
+ Now information about your project will be never lost and will be always available for modifications in any editor!
+
Note: for private projects, wiki is accessible by project team only. Wiki of a public project can be read by everyone.
+ tracker_description: |
+ Every project may use a lightweight and simple task tracker. Labels and assignments will allow not to get lost in tasks,
+ while convenient interface will allow to concentrate on a real work, not filling huge forms.
diff --git a/config/locales/tour.ru.yml b/config/locales/tour.ru.yml
new file mode 100644
index 000000000..22408eac3
--- /dev/null
+++ b/config/locales/tour.ru.yml
@@ -0,0 +1,61 @@
+ru:
+ tour:
+ read_more: Читать далее...
+ projects: Управление проектами
+ sources: Исходный код
+ builds: Сборка пакетов
+
+ repo: Персональный репозиторий
+ monitoring: Мониторинг
+ source: Исходный код онлайн
+ history: История файла
+ annotation: Аннотация файла
+ edit: Редактирования онлайн
+ control: Управление проектами
+ git: Git Wiki
+ tracker: Легкий трекер задач
+
+ projects_header: |
+ Каждый git-репозиторий на ABF поставляется с инструментами, необходимыми для управления проектами,
+ вне зависимости от того, публичный или приватный проект.
+ sources_header: ABF — полноценный git-хостинг с удобным веб-интерфейсом.
+ builds_header: |
+ ABF — это не только хостинг исходного кода, но и система сборки и хостинга пакетов.
+ Собирайте свои проекты под множество дистрибутивов и архитектур в свой персональный репозиторий.
+
+ repo_description: |
+ Персональный репозиторий — быстрый и легкий способ распространить свое ПО множеству Linux пользователей
+ различных дистрибутивов, используя стандартный механизм доставки ПО.
+ ABF позаботится о зависимостях ПО из основных репозиториев и/или дополнительных персональных репозиториев.
+ Опубликовали новую версию? Пользователи автоматически получат оповещение о доступности обновления.
+ builds_description: |
+ ABF позволяет собрать ваши проекты под множество архитектур и дистрибутивов, используя свои вычислительные мощности.
+ Никаких затрат с вашей стороны!
+ monitoring_description: |
+ В большом числе сборочных заданий легко потеряться, поэтому мониторинг сборки фокусирует ваше внимание только на том,
+ что действительно важно.
+ source_description: |
+ Мы сфокусировались на том, чтобы сделать исходный код доступным и прозрачным. Все, что вы выложите в git-репозиторий,
+ мгновенно станет доступным для просмотра в режиме онлайн, чтобы вы могли поделиться им с людьми, даже если они не
+ используют Git. На главной странице каждого проекта есть список файлов проекта, а также информация о последнем изменении.
+ Вы можете сразу увидеть самое важное в вашем проекте: код.
+ history_description: 'Каждый файл в git-репозитории имеет историю, которую вы легко можете посмотреть: кто, когда и что в нем поменял.'
+ annotation_description: |
+ Ищете автора фрагмента кода? Откройте аннотацию файла (Blame), чтобы увидеть:
+ кто и в каком коммите последний изменял данный фрагмент.
+ edit_description: |
+ Вам нужно быстро внести изменение в файл? Исправить орфографические ошибки c вашего мобильного телефона?
+ Мы предлагаем простой редактор для каждого файла в git-репозитории.
+ control: |
+ Существует 3 возможных роли для участника проекта: только чтение, чтение/запись и административный уровень.
+ Участником проекта может выступать как пользователь, так и группа. Проект, как и группа, может иметь неограниченное
+ число участников (пользователей, групп или всех вместе).
+ git: |
+ Вики проекта создана с помощью Gollum — открытого вики-движка, созданного GitHub. В основе своей это полноценный
+ git-репозиторий, который можно клонировать, использовать в режиме офлайн, изменять и загружать изменения обратно на
+ сервер, как в случае с обычным кодом. Удобный веб-редактор позволит работать с ней в онлайн. Теперь данные о проекте не
+ пропадут и доступны для редактирования в любимом редакторе!
+
Примечание: для приватного проекта вики доступна только его участникам. Для публичного — всем для чтения.
+ tracker: |
+ Каждый проект также может использовать легкий и простой трекер задач. Метки и назначения позволят не потеряться среди
+ задач, а понятный интерфейс позволит сконцентрироваться на работе, а не на заполнении огромных формуляров.
diff --git a/db/schema.rb b/db/schema.rb
index 35fa115ba..740ac62c6 100644
--- a/db/schema.rb
+++ b/db/schema.rb
@@ -304,6 +304,8 @@ ActiveRecord::Schema.define(:version => 20120515095324) do
t.integer "build_count", :default => 0, :null => false
end
+ add_index "projects", ["owner_id"], :name => "index_projects_on_name_and_owner_id_and_owner_type", :unique => true
+
create_table "register_requests", :force => true do |t|
t.string "name"
t.string "email"
@@ -367,9 +369,11 @@ ActiveRecord::Schema.define(:version => 20120515095324) do
t.string "encrypted_password", :limit => 128, :default => "", :null => false
t.string "password_salt", :default => "", :null => false
t.string "reset_password_token"
+ t.datetime "reset_password_sent_at"
t.datetime "remember_created_at"
t.datetime "created_at"
t.datetime "updated_at"
+ t.text "ssh_key"
t.string "uname"
t.string "role"
t.string "language", :default => "en"
diff --git a/lib/tasks/migrate_from_mount_to_symlink.rake b/lib/tasks/migrate_from_mount_to_symlink.rake
new file mode 100644
index 000000000..f85344a3e
--- /dev/null
+++ b/lib/tasks/migrate_from_mount_to_symlink.rake
@@ -0,0 +1,13 @@
+namespace :downloads do
+
+ desc "Migrate from mount to symlinks"
+ task :migrate => :environment do
+ Platform.opened.each do |pl|
+ system("sudo umount #{pl.symlink_path}")
+ system("sudo rm -Rf #{pl.symlink_path}")
+
+ pl.symlink_directory
+ end
+ end
+
+end
diff --git a/spec/controllers/groups/members_controller_spec.rb b/spec/controllers/groups/members_controller_spec.rb
index a245165e8..5e3046f8b 100644
--- a/spec/controllers/groups/members_controller_spec.rb
+++ b/spec/controllers/groups/members_controller_spec.rb
@@ -3,7 +3,7 @@ require 'spec_helper'
describe Groups::MembersController do
before(:each) do
- stub_rsync_methods
+ stub_symlink_methods
@group = FactoryGirl.create(:group)
@user = @group.owner
set_session_for @user
diff --git a/spec/controllers/groups/profile_controller_spec.rb b/spec/controllers/groups/profile_controller_spec.rb
index 73605fa66..21c62b7df 100644
--- a/spec/controllers/groups/profile_controller_spec.rb
+++ b/spec/controllers/groups/profile_controller_spec.rb
@@ -69,7 +69,7 @@ end
describe Groups::ProfileController do
before(:each) do
- stub_rsync_methods
+ stub_symlink_methods
@group = FactoryGirl.create(:group)
@another_user = FactoryGirl.create(:user)
@create_params = {:group => {:description => 'grp1', :uname => 'un_grp1'}}
diff --git a/spec/controllers/platforms/platforms_controller_spec.rb b/spec/controllers/platforms/platforms_controller_spec.rb
index 5ec928b1c..242315f10 100644
--- a/spec/controllers/platforms/platforms_controller_spec.rb
+++ b/spec/controllers/platforms/platforms_controller_spec.rb
@@ -35,7 +35,7 @@ end
describe Platforms::PlatformsController do
before(:each) do
- stub_rsync_methods
+ stub_symlink_methods
@platform = FactoryGirl.create(:platform)
@personal_platform = FactoryGirl.create(:platform, :platform_type => 'personal')
diff --git a/spec/controllers/platforms/product_build_lists_controller_spec.rb b/spec/controllers/platforms/product_build_lists_controller_spec.rb
index c79828492..a08fc67d6 100644
--- a/spec/controllers/platforms/product_build_lists_controller_spec.rb
+++ b/spec/controllers/platforms/product_build_lists_controller_spec.rb
@@ -26,7 +26,7 @@ end
describe Platforms::ProductBuildListsController do
before(:each) do
- stub_rsync_methods
+ stub_symlink_methods
end
context 'crud' do
diff --git a/spec/controllers/platforms/products_controller_spec.rb b/spec/controllers/platforms/products_controller_spec.rb
index 7490675e9..e90d48cbc 100644
--- a/spec/controllers/platforms/products_controller_spec.rb
+++ b/spec/controllers/platforms/products_controller_spec.rb
@@ -24,7 +24,7 @@ end
describe Platforms::ProductsController do
before(:each) do
- stub_rsync_methods
+ stub_symlink_methods
@another_user = FactoryGirl.create(:user)
@platform = FactoryGirl.create(:platform)
diff --git a/spec/controllers/platforms/repositories_controller_spec.rb b/spec/controllers/platforms/repositories_controller_spec.rb
index 5fec835cc..35120683d 100644
--- a/spec/controllers/platforms/repositories_controller_spec.rb
+++ b/spec/controllers/platforms/repositories_controller_spec.rb
@@ -67,7 +67,7 @@ end
describe Platforms::RepositoriesController do
before(:each) do
- stub_rsync_methods
+ stub_symlink_methods
@platform = FactoryGirl.create(:platform)
@repository = FactoryGirl.create(:repository, :platform => @platform)
diff --git a/spec/controllers/projects/build_lists_controller_spec.rb b/spec/controllers/projects/build_lists_controller_spec.rb
index 1923d0420..d941b5f02 100644
--- a/spec/controllers/projects/build_lists_controller_spec.rb
+++ b/spec/controllers/projects/build_lists_controller_spec.rb
@@ -64,7 +64,7 @@ describe Projects::BuildListsController do
end
end
- before { stub_rsync_methods }
+ before { stub_symlink_methods }
context 'crud' do
before(:each) do
diff --git a/spec/controllers/projects/collaborators_controller_spec.rb b/spec/controllers/projects/collaborators_controller_spec.rb
index f40f0b3c8..5c8d320c2 100644
--- a/spec/controllers/projects/collaborators_controller_spec.rb
+++ b/spec/controllers/projects/collaborators_controller_spec.rb
@@ -64,7 +64,7 @@ end
describe Projects::CollaboratorsController do
before(:each) do
- stub_rsync_methods
+ stub_symlink_methods
@project = FactoryGirl.create(:project)
@another_user = FactoryGirl.create(:user)
@member_user = FactoryGirl.create(:user)
diff --git a/spec/controllers/projects/comments_controller_for_commit_spec.rb b/spec/controllers/projects/comments_controller_for_commit_spec.rb
index 9cc131c3e..3ddce850e 100644
--- a/spec/controllers/projects/comments_controller_for_commit_spec.rb
+++ b/spec/controllers/projects/comments_controller_for_commit_spec.rb
@@ -76,7 +76,7 @@ end
describe Projects::CommentsController do
before(:each) do
- stub_rsync_methods
+ stub_symlink_methods
@project = FactoryGirl.create(:project)
%x(cp -Rf #{Rails.root}/spec/tests.git/* #{@project.git_repository.path}) # maybe FIXME ?
@commit = @project.git_repository.commits.first
diff --git a/spec/controllers/projects/comments_controller_spec.rb b/spec/controllers/projects/comments_controller_spec.rb
index 41d6009b4..c04b09c58 100644
--- a/spec/controllers/projects/comments_controller_spec.rb
+++ b/spec/controllers/projects/comments_controller_spec.rb
@@ -72,7 +72,7 @@ end
describe Projects::CommentsController do
before(:each) do
- stub_rsync_methods
+ stub_symlink_methods
@project = FactoryGirl.create(:project)
@issue = FactoryGirl.create(:issue, :project_id => @project.id, :user => FactoryGirl.create(:user))
diff --git a/spec/controllers/projects/git/git_trees_controller_spec.rb b/spec/controllers/projects/git/git_trees_controller_spec.rb
index 420234301..ce9884232 100644
--- a/spec/controllers/projects/git/git_trees_controller_spec.rb
+++ b/spec/controllers/projects/git/git_trees_controller_spec.rb
@@ -8,7 +8,7 @@ describe Projects::Git::TreesController do
end
before(:each) do
- stub_rsync_methods
+ stub_symlink_methods
@project = FactoryGirl.create(:project)
@another_user = FactoryGirl.create(:user)
diff --git a/spec/controllers/projects/issues_controller_spec.rb b/spec/controllers/projects/issues_controller_spec.rb
index fe1028f67..4bb6f59b1 100644
--- a/spec/controllers/projects/issues_controller_spec.rb
+++ b/spec/controllers/projects/issues_controller_spec.rb
@@ -73,7 +73,7 @@ end
describe Projects::IssuesController do
before(:each) do
- stub_rsync_methods
+ stub_symlink_methods
@project = FactoryGirl.create(:project)
@issue_user = FactoryGirl.create(:user)
diff --git a/spec/controllers/projects/projects_controller_spec.rb b/spec/controllers/projects/projects_controller_spec.rb
index 4893709f2..eace34aa2 100644
--- a/spec/controllers/projects/projects_controller_spec.rb
+++ b/spec/controllers/projects/projects_controller_spec.rb
@@ -4,7 +4,7 @@ require 'spec_helper'
describe Projects::ProjectsController do
before(:each) do
- stub_rsync_methods
+ stub_symlink_methods
@project = FactoryGirl.create(:project)
@another_user = FactoryGirl.create(:user)
diff --git a/spec/controllers/projects/subscribes_controller_spec.rb b/spec/controllers/projects/subscribes_controller_spec.rb
index ea6c9b5af..8d37bb90d 100644
--- a/spec/controllers/projects/subscribes_controller_spec.rb
+++ b/spec/controllers/projects/subscribes_controller_spec.rb
@@ -49,7 +49,7 @@ end
describe Projects::SubscribesController do
before(:each) do
- stub_rsync_methods
+ stub_symlink_methods
@project = FactoryGirl.create(:project)
@issue = FactoryGirl.create(:issue, :project_id => @project.id)
diff --git a/spec/controllers/search_controller_spec.rb b/spec/controllers/search_controller_spec.rb
index 74b266789..f04c5e494 100644
--- a/spec/controllers/search_controller_spec.rb
+++ b/spec/controllers/search_controller_spec.rb
@@ -16,7 +16,7 @@ shared_examples_for 'not able search' do
end
describe SearchController do
- before { stub_rsync_methods }
+ before { stub_symlink_methods }
context 'as guest' do
if APP_CONFIG['anonymous_access']
diff --git a/spec/controllers/users/profile_controller_spec.rb b/spec/controllers/users/profile_controller_spec.rb
index 6c370e44f..0451de6a8 100644
--- a/spec/controllers/users/profile_controller_spec.rb
+++ b/spec/controllers/users/profile_controller_spec.rb
@@ -3,7 +3,7 @@ require 'spec_helper'
describe Users::ProfileController do
before(:each) do
- stub_rsync_methods
+ stub_symlink_methods
@simple_user = FactoryGirl.create(:user)
@other_user = FactoryGirl.create(:user)
diff --git a/spec/factories/arches.rb b/spec/factories/arches.rb
index e72251a9d..eb210cbd0 100644
--- a/spec/factories/arches.rb
+++ b/spec/factories/arches.rb
@@ -1,6 +1,6 @@
# -*- encoding : utf-8 -*-
FactoryGirl.define do
factory :arch do
- name { FactoryGirl.generate(:string) }
+ name { FactoryGirl.generate(:unixname) }
end
end
diff --git a/spec/mailers/user_mailer_spec.rb b/spec/mailers/user_mailer_spec.rb
index b02165f4c..7c350c58e 100644
--- a/spec/mailers/user_mailer_spec.rb
+++ b/spec/mailers/user_mailer_spec.rb
@@ -6,7 +6,7 @@ describe UserMailer do
context 'On Issue create' do
before(:each) do
- stub_rsync_methods
+ stub_symlink_methods
@project = FactoryGirl.create(:project)
@issue_user = FactoryGirl.create(:user)
@@ -44,7 +44,7 @@ describe UserMailer do
context 'On Issue assign' do
before(:each) do
- stub_rsync_methods
+ stub_symlink_methods
@project = FactoryGirl.create(:project)
@issue_user = FactoryGirl.create(:user)
@@ -80,7 +80,7 @@ describe UserMailer do
context 'On Comment create' do
before(:each) do
- stub_rsync_methods
+ stub_symlink_methods
@project = FactoryGirl.create(:project)
@issue_user = FactoryGirl.create(:user)
diff --git a/spec/models/cancan_spec.rb b/spec/models/cancan_spec.rb
index 652d77834..c496fbbf9 100644
--- a/spec/models/cancan_spec.rb
+++ b/spec/models/cancan_spec.rb
@@ -25,7 +25,7 @@ describe CanCan do
let(:register_request) { FactoryGirl.create(:register_request) }
before(:each) do
- stub_rsync_methods
+ stub_symlink_methods
end
context 'Site admin' do
diff --git a/spec/models/comment_for_commit_spec.rb b/spec/models/comment_for_commit_spec.rb
index c8bcc0afd..e4ad33f74 100644
--- a/spec/models/comment_for_commit_spec.rb
+++ b/spec/models/comment_for_commit_spec.rb
@@ -23,7 +23,7 @@ def set_comments_data_for_commit
end
describe Comment do
- before { stub_rsync_methods }
+ before { stub_symlink_methods }
context 'for global admin user' do
before(:each) do
@user = FactoryGirl.create(:admin)
diff --git a/spec/models/comment_spec.rb b/spec/models/comment_spec.rb
index 16caf891b..afc99e0bc 100644
--- a/spec/models/comment_spec.rb
+++ b/spec/models/comment_spec.rb
@@ -15,7 +15,7 @@ def set_commentable_data
end
describe Comment do
- before { stub_rsync_methods }
+ before { stub_symlink_methods }
context 'for global admin user' do
before(:each) do
@user = FactoryGirl.create(:admin)
diff --git a/spec/models/group_spec.rb b/spec/models/group_spec.rb
index e45a47994..36209c472 100644
--- a/spec/models/group_spec.rb
+++ b/spec/models/group_spec.rb
@@ -4,7 +4,7 @@ require "cancan/matchers"
describe Group do
before(:each) do
- stub_rsync_methods
+ stub_symlink_methods
@group = FactoryGirl.create(:group)
@ability = Ability.new(User.new)
end
diff --git a/spec/models/platform_spec.rb b/spec/models/platform_spec.rb
index d8487ee1a..8e4486144 100644
--- a/spec/models/platform_spec.rb
+++ b/spec/models/platform_spec.rb
@@ -3,7 +3,7 @@ require 'spec_helper'
describe Platform do
before(:all) do
- stub_rsync_methods
+ stub_symlink_methods
Platform.delete_all
User.delete_all
FileUtils.rm_rf(APP_CONFIG['root_path'])
diff --git a/spec/models/product_build_list_spec.rb b/spec/models/product_build_list_spec.rb
index 9394cf8af..76587112f 100644
--- a/spec/models/product_build_list_spec.rb
+++ b/spec/models/product_build_list_spec.rb
@@ -3,7 +3,7 @@ require 'spec_helper'
describe ProductBuildList do
before(:all) do
- stub_rsync_methods
+ stub_symlink_methods
end
it { should belong_to(:product) }
diff --git a/spec/models/product_spec.rb b/spec/models/product_spec.rb
index d8638a23d..d8068fae6 100644
--- a/spec/models/product_spec.rb
+++ b/spec/models/product_spec.rb
@@ -3,7 +3,7 @@ require 'spec_helper'
describe Product do
before(:all) do
- stub_rsync_methods
+ stub_symlink_methods
Platform.delete_all
User.delete_all
Product.delete_all
diff --git a/spec/models/project_to_repository_spec.rb b/spec/models/project_to_repository_spec.rb
index d79c0fe02..8bde7bb95 100644
--- a/spec/models/project_to_repository_spec.rb
+++ b/spec/models/project_to_repository_spec.rb
@@ -3,7 +3,7 @@ require 'spec_helper'
describe ProjectToRepository do
before(:each) do
- stub_rsync_methods
+ stub_symlink_methods
@platform = FactoryGirl.create(:platform)
@first_repo = FactoryGirl.create(:repository, :platform_id => @platform.id)
@second_repo = FactoryGirl.create(:repository, :platform_id => @platform.id)
diff --git a/spec/models/repository_spec.rb b/spec/models/repository_spec.rb
index 57322ebdb..559507b2d 100644
--- a/spec/models/repository_spec.rb
+++ b/spec/models/repository_spec.rb
@@ -5,7 +5,7 @@ describe Repository do
context 'when create with same owner that platform' do
before (:each) do
- stub_rsync_methods
+ stub_symlink_methods
@platform = FactoryGirl.create(:platform)
@params = {:name => 'tst_platform', :description => 'test platform'}
end
@@ -17,7 +17,7 @@ describe Repository do
end
before(:all) do
- stub_rsync_methods
+ stub_symlink_methods
Platform.delete_all
User.delete_all
Repository.delete_all
diff --git a/spec/models/subscribe_spec.rb b/spec/models/subscribe_spec.rb
index be111a6a8..a74be8a0d 100644
--- a/spec/models/subscribe_spec.rb
+++ b/spec/models/subscribe_spec.rb
@@ -12,7 +12,7 @@ def set_testable_data
end
describe Subscribe do
- before { stub_rsync_methods }
+ before { stub_symlink_methods }
context 'for global admin user' do
before(:each) do
@user = FactoryGirl.create(:admin)
diff --git a/spec/spec_helper.rb b/spec/spec_helper.rb
index b941cc318..7eab2ddcd 100644
--- a/spec/spec_helper.rb
+++ b/spec/spec_helper.rb
@@ -33,9 +33,9 @@ def set_session_for(user=nil)
sign_in current_user
end
-def stub_rsync_methods
- any_instance_of(Platform, :mount_directory_for_rsync => true)
- any_instance_of(Platform, :umount_directory_for_rsync => true)
+def stub_symlink_methods
+ any_instance_of(Platform, :symlink_directory => true)
+ any_instance_of(Platform, :remove_symlink_directory => true)
end
def test_git_commit(project)