From fb470792c03a804427fc58f56f25c3256913932c Mon Sep 17 00:00:00 2001 From: JBox Admin Date: Thu, 9 Apr 2015 13:16:29 +0200 Subject: [PATCH 1/6] Update README.md --- README.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 444d2aeb5fe..0107f98d01d 100644 --- a/README.md +++ b/README.md @@ -11,13 +11,13 @@ This plugin allows straightforward management of Gitolite within Redmine. -You can follow announcements [here](https://jbox-web.github.io/redmine_git_hosting/news/) or take a look at the [roadmap](https://jbox-web.github.io/redmine_git_hosting/about/roadmap/). +You can follow announcements [here](http://redmine-git-hosting.io/news/) or take a look at the [roadmap](http://redmine-git-hosting.io/about/roadmap/). -**[Latest stable version : 1.0.3](https://jbox-web.github.io/redmine_git_hosting/about/releases-notes/#toc-release-1-0-3)** +**[Latest stable version : 1.0.3](http://redmine-git-hosting.io/about/releases-notes/release-1.0.3.html)** ## Installation -The installation tutorial is [here](https://jbox-web.github.io/redmine_git_hosting/howtos/install/#step-by-step-installation). The migration tutorial is [here](https://jbox-web.github.io/redmine_git_hosting/howtos/migrate/). +The installation tutorial is [here](http://redmine-git-hosting.io/get_started/). The migration tutorial is [here](http://redmine-git-hosting.io/how-to/migrate/). Read the documentation and more on the [project's website](https://jbox-web.github.io/redmine_git_hosting/). From 7c80393cbc53ab4f858dac740328507293df5238 Mon Sep 17 00:00:00 2001 From: JBox Admin Date: Thu, 9 Apr 2015 13:17:36 +0200 Subject: [PATCH 2/6] Update README.md --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 0107f98d01d..b4680d65cfc 100644 --- a/README.md +++ b/README.md @@ -13,13 +13,13 @@ This plugin allows straightforward management of Gitolite within Redmine. You can follow announcements [here](http://redmine-git-hosting.io/news/) or take a look at the [roadmap](http://redmine-git-hosting.io/about/roadmap/). -**[Latest stable version : 1.0.3](http://redmine-git-hosting.io/about/releases-notes/release-1.0.3.html)** +**[Latest stable version : 1.0.3](http://redmine-git-hosting.io/releases-notes/release-1.0.3.html)** ## Installation The installation tutorial is [here](http://redmine-git-hosting.io/get_started/). The migration tutorial is [here](http://redmine-git-hosting.io/how-to/migrate/). -Read the documentation and more on the [project's website](https://jbox-web.github.io/redmine_git_hosting/). +Read the documentation and more on the [project's website](http://redmine-git-hosting.io/). ## Copyrights & License From b18be278b31a9bf7324f512af320042ec54b12b3 Mon Sep 17 00:00:00 2001 From: root Date: Thu, 9 Apr 2015 22:39:13 +0200 Subject: [PATCH 3/6] Fix initialization of Git URL boxes in Project overview --- app/views/common/_git_urls.html.haml | 2 +- assets/javascripts/application.js | 10 +++++++--- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/app/views/common/_git_urls.html.haml b/app/views/common/_git_urls.html.haml index 8fdcd517867..1fe7aa3a227 100644 --- a/app/views/common/_git_urls.html.haml +++ b/app/views/common/_git_urls.html.haml @@ -19,4 +19,4 @@ #git_url_box= l(:label_repository_access_not_configured) :javascript - $(document).ready(function() { setGitUrls('.git_url'); }); + $(document).ready(function() { setFirstGitUrl('.git_url_list'); setGitUrls('.git_url'); }); diff --git a/assets/javascripts/application.js b/assets/javascripts/application.js index 34d99696705..69fe10688a8 100644 --- a/assets/javascripts/application.js +++ b/assets/javascripts/application.js @@ -50,15 +50,19 @@ function updateUrl(element) { function setGitUrls(elements) { $(elements).each(function(index, element){ - if (index == 0){ - updateUrl(element); - }; $(element).on('click', function(){ updateUrl($(this)); }); }); } +function setFirstGitUrl(elements) { + $(elements).each(function(index, element){ + var first_url = $(element).children().first(); + updateUrl(first_url); + }); +} + // GIT INSTRUCTIONS function updateInstructionUrl(element) { var url = $(element).data('url'); From 924ec35f98dbf773c901667a98f9b8d7cb36f90b Mon Sep 17 00:00:00 2001 From: root Date: Thu, 9 Apr 2015 22:40:32 +0200 Subject: [PATCH 4/6] Change plugin translation label to something meaningfull --- config/locales/en.yml | 2 +- config/locales/fr.yml | 2 +- init.rb | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/config/locales/en.yml b/config/locales/en.yml index 8e6ba08ef49..28d286b7c8c 100644 --- a/config/locales/en.yml +++ b/config/locales/en.yml @@ -1,6 +1,6 @@ en: - module_name: Redmine Git Hosting + redmine_git_hosting: Redmine Git Hosting ########### MISCELANOUS ########### label_enabled: Enabled diff --git a/config/locales/fr.yml b/config/locales/fr.yml index 07e73da963f..a3d10199258 100644 --- a/config/locales/fr.yml +++ b/config/locales/fr.yml @@ -1,6 +1,6 @@ fr: - module_name: Redmine Git Hosting + redmine_git_hosting: Redmine Git Hosting ########### MISCELANOUS ########### label_enabled: Activé diff --git a/init.rb b/init.rb index 8dcaee6b85d..044e3c1621a 100644 --- a/init.rb +++ b/init.rb @@ -121,7 +121,7 @@ end Redmine::MenuManager.map :admin_menu do |menu| - menu.push :redmine_git_hosting, { controller: 'settings', action: 'plugin', id: 'redmine_git_hosting' }, caption: :module_name + menu.push :redmine_git_hosting, { controller: 'settings', action: 'plugin', id: 'redmine_git_hosting' }, caption: :redmine_git_hosting end Redmine::MenuManager.map :top_menu do |menu| From 2713bcf41646368652cfa3d37196c17757aabc4c Mon Sep 17 00:00:00 2001 From: root Date: Fri, 10 Apr 2015 22:41:43 +0200 Subject: [PATCH 5/6] Fix https://github.com/jbox-web/redmine_git_hosting/issues/404 --- lib/redmine_git_hosting/cache/redis.rb | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/lib/redmine_git_hosting/cache/redis.rb b/lib/redmine_git_hosting/cache/redis.rb index 103af819cc6..dfc7662cc6b 100644 --- a/lib/redmine_git_hosting/cache/redis.rb +++ b/lib/redmine_git_hosting/cache/redis.rb @@ -10,8 +10,12 @@ def set_cache(repo_id, command, output) # Create a SHA256 of the Git command as key id hashed_command = hash_key(repo_id, command) + # If *max_cache_time* is set to -1 (until next commit) then + # set the cache time to 1 day (we don't know when will be the next commit) + cache_time = (max_cache_time < 0) ? 86400 : max_cache_time + begin - client.set(hashed_command, output, ex: max_cache_time) + client.set(hashed_command, output, ex: cache_time) true rescue => e logger.error("Redis Adapter : could not insert in cache, this is the error : '#{e.message}'") From 18e77ec1d617e92a7f7f60087e71b54e6a131276 Mon Sep 17 00:00:00 2001 From: root Date: Fri, 10 Apr 2015 22:42:22 +0200 Subject: [PATCH 6/6] Typo --- lib/redmine_git_hosting/cache/redis.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/redmine_git_hosting/cache/redis.rb b/lib/redmine_git_hosting/cache/redis.rb index dfc7662cc6b..285e23a7884 100644 --- a/lib/redmine_git_hosting/cache/redis.rb +++ b/lib/redmine_git_hosting/cache/redis.rb @@ -76,7 +76,7 @@ def key_prefix(repo_id) end - # Make SHAR256 of the Git command as identifier + # Make SHA256 of the Git command as identifier # def hash_key(repo_id, command) "#{key_prefix(repo_id)}:#{Digest::SHA256.hexdigest(command)[0..16]}"