diff --git a/VERSION b/VERSION index 87db9036a822108fd68f9be0ad2186f2760e1155..ee74734aa2258df77aa09402d55798a1e2e55212 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -4.1.0rc1 +4.1.0 diff --git a/app/models/repository.rb b/app/models/repository.rb index 6bfdf2255f2b812b7132ec7331660f7ef06d1047..9032905ce9a7b3f39248489476d581374d144629 100644 --- a/app/models/repository.rb +++ b/app/models/repository.rb @@ -151,7 +151,7 @@ class Repository return nil unless commit # Build file path - file_name = self.path_with_namespace + "-" + commit.id.to_s + ".tar.gz" + file_name = self.path_with_namespace.gsub("/","_") + "-" + commit.id.to_s + ".tar.gz" storage_path = Rails.root.join("tmp", "repositories") file_path = File.join(storage_path, file_name) diff --git a/doc/api/projects.md b/doc/api/projects.md index 411286750f856b9dfa19425bf4bc0f6432d7e7af..e8a932da75070af5f126045f1a4d39ed1ed63071 100644 --- a/doc/api/projects.md +++ b/doc/api/projects.md @@ -259,7 +259,7 @@ Will return status `201 Created` on success, or `404 Not found` on fail. Delete hook from project ``` -DELETE /projects/:id/hooks +DELETE /projects/:id/hooks/:hook_id ``` Parameters: diff --git a/doc/install/installation.md b/doc/install/installation.md index 27c87ec825f737466cca9fe935229b6c7ab39dce..e0744e093e2ee0085552e3764befd5f826ca93c8 100644 --- a/doc/install/installation.md +++ b/doc/install/installation.md @@ -190,10 +190,10 @@ See `doc/install/databases.md` cd /home/gitlab/gitlab # Checkout to stable release - sudo -u gitlab -H git checkout 4-0-stable + sudo -u gitlab -H git checkout 4-1-stable **Note:** -You can change `4-0-stable` to `master` if you want the *bleeding edge* version, but +You can change `4-1-stable` to `master` if you want the *bleeding edge* version, but do so with caution! ## Configure it @@ -267,7 +267,7 @@ used for the `email.from` setting in `config/gitlab.yml`) Download the init script (will be /etc/init.d/gitlab): - sudo curl --output /etc/init.d/gitlab https://raw.github.com/gitlabhq/gitlab-recipes/master/init.d/gitlab + sudo curl --output /etc/init.d/gitlab https://raw.github.com/gitlabhq/gitlab-recipes/4-1-stable/init.d/gitlab sudo chmod +x /etc/init.d/gitlab Make GitLab start on boot: @@ -292,7 +292,7 @@ However there are still a few steps left. sudo service gitlab start # or - sudo /etc/init.d/gitlab restart + sudo /etc/init.d/gitlab start # 7. Nginx @@ -302,13 +302,13 @@ If you can't or don't want to use Nginx as your web server, have a look at the "Advanced Setup Tips" section. ## Installation - sudo apt-get install nginx + sudo apt-get -y install nginx ## Site Configuration Download an example site config: - sudo curl --output /etc/nginx/sites-available/gitlab https://raw.github.com/gitlabhq/gitlab-recipes/master/nginx/gitlab + sudo curl --output /etc/nginx/sites-available/gitlab https://raw.github.com/gitlabhq/gitlab-recipes/4-1-stable/nginx/gitlab sudo ln -s /etc/nginx/sites-available/gitlab /etc/nginx/sites-enabled/gitlab Make sure to edit the config file to match your setup: diff --git a/lib/api/projects.rb b/lib/api/projects.rb index cbef1ed3b5071719134279616d0ef14ba3b0b602..52c5f2002a43ba5bb711589ebfaf5e3f8c9938a7 100644 --- a/lib/api/projects.rb +++ b/lib/api/projects.rb @@ -204,8 +204,8 @@ module Gitlab # id (required) - The ID of a project # hook_id (required) - The ID of hook to delete # Example Request: - # DELETE /projects/:id/hooks - delete ":id/hooks" do + # DELETE /projects/:id/hooks/:hook_id + delete ":id/hooks/:hook_id" do authorize! :admin_project, user_project @hook = user_project.hooks.find(params[:hook_id]) @hook.destroy diff --git a/lib/gitlab/backend/gitolite_config.rb b/lib/gitlab/backend/gitolite_config.rb index 7d59ddae0c85bc74697866437d2c0f60b7082ff9..1783b2c37b4e08692cd7a7519f02494e3b8ad809 100644 --- a/lib/gitlab/backend/gitolite_config.rb +++ b/lib/gitlab/backend/gitolite_config.rb @@ -87,7 +87,9 @@ module Gitlab end def destroy_project(project) - FileUtils.rm_rf(project.repository.path_to_repo) + if project.repository + FileUtils.rm_rf(project.repository.path_to_repo) + end conf.rm_repo(project.path_with_namespace) end diff --git a/lib/tasks/gitlab/check.rake b/lib/tasks/gitlab/check.rake index 826b78ec5b1bc8ff175efa78704215aab5f773ba..e20809cc843e6ec3a50b93743da8ef7b90c63042 100644 --- a/lib/tasks/gitlab/check.rake +++ b/lib/tasks/gitlab/check.rake @@ -142,7 +142,7 @@ namespace :gitlab do return end - recipe_content = `curl https://raw.github.com/gitlabhq/gitlab-recipes/master/init.d/gitlab 2>/dev/null` + recipe_content = `curl https://raw.github.com/gitlabhq/gitlab-recipes/4-1-stable/init.d/gitlab 2>/dev/null` script_content = File.read(script_path) if recipe_content == script_content diff --git a/spec/requests/api/projects_spec.rb b/spec/requests/api/projects_spec.rb index c2244210bcf29da26c977e2a06dda8b91516d989..4c8bf870d13530b0edc20a01159c37a50662b3c6 100644 --- a/spec/requests/api/projects_spec.rb +++ b/spec/requests/api/projects_spec.rb @@ -205,11 +205,10 @@ describe Gitlab::API do end end - - describe "DELETE /projects/:id/hooks" do + describe "DELETE /projects/:id/hooks/:hook_id" do it "should delete hook from project" do expect { - delete api("/projects/#{project.id}/hooks", user), + delete api("/projects/#{project.id}/hooks/#{hook.id}", user), hook_id: hook.id }.to change {project.hooks.count}.by(-1) end