Skip to content

Commit ed2fbfc

Browse files
author
root
committed
Merge branch 'devel' into v1.0.x
2 parents d0f6fde + 18e77ec commit ed2fbfc

File tree

7 files changed

+21
-13
lines changed

7 files changed

+21
-13
lines changed

Diff for: README.md

+4-4
Original file line numberDiff line numberDiff line change
@@ -11,15 +11,15 @@
1111

1212
This plugin allows straightforward management of Gitolite within Redmine.
1313

14-
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/).
14+
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/).
1515

16-
**[Latest stable version : 1.0.3](https://jbox-web.github.io/redmine_git_hosting/about/releases-notes/#toc-release-1-0-3)**
16+
**[Latest stable version : 1.0.3](http://redmine-git-hosting.io/releases-notes/release-1.0.3.html)**
1717

1818
## Installation
1919

20-
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/).
20+
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/).
2121

22-
Read the documentation and more on the [project's website](https://jbox-web.github.io/redmine_git_hosting/).
22+
Read the documentation and more on the [project's website](http://redmine-git-hosting.io/).
2323

2424

2525
## Copyrights & License

Diff for: app/views/common/_git_urls.html.haml

+1-1
Original file line numberDiff line numberDiff line change
@@ -19,4 +19,4 @@
1919
#git_url_box= l(:label_repository_access_not_configured)
2020

2121
:javascript
22-
$(document).ready(function() { setGitUrls('.git_url'); });
22+
$(document).ready(function() { setFirstGitUrl('.git_url_list'); setGitUrls('.git_url'); });

Diff for: assets/javascripts/application.js

+7-3
Original file line numberDiff line numberDiff line change
@@ -50,15 +50,19 @@ function updateUrl(element) {
5050

5151
function setGitUrls(elements) {
5252
$(elements).each(function(index, element){
53-
if (index == 0){
54-
updateUrl(element);
55-
};
5653
$(element).on('click', function(){
5754
updateUrl($(this));
5855
});
5956
});
6057
}
6158

59+
function setFirstGitUrl(elements) {
60+
$(elements).each(function(index, element){
61+
var first_url = $(element).children().first();
62+
updateUrl(first_url);
63+
});
64+
}
65+
6266
// GIT INSTRUCTIONS
6367
function updateInstructionUrl(element) {
6468
var url = $(element).data('url');

Diff for: config/locales/en.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
en:
22

3-
module_name: Redmine Git Hosting
3+
redmine_git_hosting: Redmine Git Hosting
44

55
########### MISCELANOUS ###########
66
label_enabled: Enabled

Diff for: config/locales/fr.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
fr:
22

3-
module_name: Redmine Git Hosting
3+
redmine_git_hosting: Redmine Git Hosting
44

55
########### MISCELANOUS ###########
66
label_enabled: Activé

Diff for: init.rb

+1-1
Original file line numberDiff line numberDiff line change
@@ -121,7 +121,7 @@
121121
end
122122

123123
Redmine::MenuManager.map :admin_menu do |menu|
124-
menu.push :redmine_git_hosting, { controller: 'settings', action: 'plugin', id: 'redmine_git_hosting' }, caption: :module_name
124+
menu.push :redmine_git_hosting, { controller: 'settings', action: 'plugin', id: 'redmine_git_hosting' }, caption: :redmine_git_hosting
125125
end
126126

127127
Redmine::MenuManager.map :top_menu do |menu|

Diff for: lib/redmine_git_hosting/cache/redis.rb

+6-2
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,12 @@ def set_cache(repo_id, command, output)
1010
# Create a SHA256 of the Git command as key id
1111
hashed_command = hash_key(repo_id, command)
1212

13+
# If *max_cache_time* is set to -1 (until next commit) then
14+
# set the cache time to 1 day (we don't know when will be the next commit)
15+
cache_time = (max_cache_time < 0) ? 86400 : max_cache_time
16+
1317
begin
14-
client.set(hashed_command, output, ex: max_cache_time)
18+
client.set(hashed_command, output, ex: cache_time)
1519
true
1620
rescue => e
1721
logger.error("Redis Adapter : could not insert in cache, this is the error : '#{e.message}'")
@@ -72,7 +76,7 @@ def key_prefix(repo_id)
7276
end
7377

7478

75-
# Make SHAR256 of the Git command as identifier
79+
# Make SHA256 of the Git command as identifier
7680
#
7781
def hash_key(repo_id, command)
7882
"#{key_prefix(repo_id)}:#{Digest::SHA256.hexdigest(command)[0..16]}"

0 commit comments

Comments
 (0)