Skip to content

Commit

Permalink
Merge branch 'devel' into v1.0.x
Browse files Browse the repository at this point in the history
  • Loading branch information
root committed Apr 10, 2015
2 parents d0f6fde + 18e77ec commit ed2fbfc
Show file tree
Hide file tree
Showing 7 changed files with 21 additions and 13 deletions.
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,15 +11,15 @@

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/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/).
Read the documentation and more on the [project's website](http://redmine-git-hosting.io/).


## Copyrights & License
Expand Down
2 changes: 1 addition & 1 deletion app/views/common/_git_urls.html.haml
Original file line number Diff line number Diff line change
Expand Up @@ -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'); });
10 changes: 7 additions & 3 deletions assets/javascripts/application.js
Original file line number Diff line number Diff line change
Expand Up @@ -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');
Expand Down
2 changes: 1 addition & 1 deletion config/locales/en.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
en:

module_name: Redmine Git Hosting
redmine_git_hosting: Redmine Git Hosting

########### MISCELANOUS ###########
label_enabled: Enabled
Expand Down
2 changes: 1 addition & 1 deletion config/locales/fr.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
fr:

module_name: Redmine Git Hosting
redmine_git_hosting: Redmine Git Hosting

########### MISCELANOUS ###########
label_enabled: Activé
Expand Down
2 changes: 1 addition & 1 deletion init.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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|
Expand Down
8 changes: 6 additions & 2 deletions lib/redmine_git_hosting/cache/redis.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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}'")
Expand Down Expand Up @@ -72,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]}"
Expand Down

0 comments on commit ed2fbfc

Please sign in to comment.