')
- .addClass( 'arrow left' )
- .addClass( feedback.vertical )
- .addClass( feedback.horizontal )
- .appendTo( this );
- }
- }
- });
-}
diff --git a/assets/javascripts/bootstrap/bootstrap_transitions.js b/assets/javascripts/bootstrap/bootstrap_transitions.js
deleted file mode 100644
index 3a8e498556d..00000000000
--- a/assets/javascripts/bootstrap/bootstrap_transitions.js
+++ /dev/null
@@ -1,60 +0,0 @@
-/* ===================================================
- * bootstrap-transition.js v2.3.2
- * http://getbootstrap.com/2.3.2/javascript.html#transitions
- * ===================================================
- * Copyright 2013 Twitter, Inc.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- * ========================================================== */
-
-
-!function ($) {
-
- "use strict"; // jshint ;_;
-
-
- /* CSS TRANSITION SUPPORT (http://www.modernizr.com/)
- * ======================================================= */
-
- $(function () {
-
- $.support.transition = (function () {
-
- var transitionEnd = (function () {
-
- var el = document.createElement('bootstrap')
- , transEndEventNames = {
- 'WebkitTransition' : 'webkitTransitionEnd'
- , 'MozTransition' : 'transitionend'
- , 'OTransition' : 'oTransitionEnd otransitionend'
- , 'transition' : 'transitionend'
- }
- , name
-
- for (name in transEndEventNames){
- if (el.style[name] !== undefined) {
- return transEndEventNames[name]
- }
- }
-
- }())
-
- return transitionEnd && {
- end: transitionEnd
- }
-
- })()
-
- })
-
-}(window.jQuery);
diff --git a/assets/stylesheets/application.css b/assets/stylesheets/application.css
index 8959a105a7e..697ecd022af 100644
--- a/assets/stylesheets/application.css
+++ b/assets/stylesheets/application.css
@@ -241,3 +241,56 @@ li.url_type {
.draggable {
cursor: move;
}
+
+.label {
+ display: inline-block;
+ padding: 2px 4px;
+ font-size: 11.844px;
+ font-weight: bold;
+ line-height: 14px;
+ color: #ffffff;
+ vertical-align: baseline;
+ white-space: nowrap;
+ text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.25);
+ border-radius: 3px;
+ background-color: #999999;
+}
+
+
+.label:empty
+ display: none;
+}
+
+.label-important {
+ background-color: #b94a48;
+}
+
+.label-error {
+ background-color: #b94a48;
+}
+
+.label-warning {
+ background-color: #f89406;
+}
+
+.label-success {
+ background-color: #468847;
+}
+
+.label-info {
+ background-color: #3a87ad;
+}
+
+table.git-results td {
+ vertical-align: top;
+ text-align: left;
+ padding: 5px;
+}
+
+table.git-results ul, table.git-results li {
+ padding-left: 0;
+}
+
+ul.list-unstyled, ol.list-unstyled {
+ list-style-type: none;
+}
diff --git a/assets/stylesheets/bootstrap/animate.css b/assets/stylesheets/bootstrap/animate.css
deleted file mode 100644
index f784ce8f691..00000000000
--- a/assets/stylesheets/bootstrap/animate.css
+++ /dev/null
@@ -1,3158 +0,0 @@
-@charset "UTF-8";
-/*!
-Animate.css - http://daneden.me/animate
-Licensed under the MIT license - http://opensource.org/licenses/MIT
-
-Copyright (c) 2014 Daniel Eden
-*/
-
-.animated {
- -webkit-animation-duration: 1s;
- animation-duration: 1s;
- -webkit-animation-fill-mode: both;
- animation-fill-mode: both;
-}
-
-.animated.infinite {
- -webkit-animation-iteration-count: infinite;
- animation-iteration-count: infinite;
-}
-
-.animated.hinge {
- -webkit-animation-duration: 2s;
- animation-duration: 2s;
-}
-
-@-webkit-keyframes bounce {
- 0%, 20%, 53%, 80%, 100% {
- -webkit-transition-timing-function: cubic-bezier(0.215, 0.610, 0.355, 1.000);
- transition-timing-function: cubic-bezier(0.215, 0.610, 0.355, 1.000);
- -webkit-transform: translate3d(0,0,0);
- transform: translate3d(0,0,0);
- }
-
- 40%, 43% {
- -webkit-transition-timing-function: cubic-bezier(0.755, 0.050, 0.855, 0.060);
- transition-timing-function: cubic-bezier(0.755, 0.050, 0.855, 0.060);
- -webkit-transform: translate3d(0, -30px, 0);
- transform: translate3d(0, -30px, 0);
- }
-
- 70% {
- -webkit-transition-timing-function: cubic-bezier(0.755, 0.050, 0.855, 0.060);
- transition-timing-function: cubic-bezier(0.755, 0.050, 0.855, 0.060);
- -webkit-transform: translate3d(0, -15px, 0);
- transform: translate3d(0, -15px, 0);
- }
-
- 90% {
- -webkit-transform: translate3d(0,-4px,0);
- transform: translate3d(0,-4px,0);
- }
-}
-
-@keyframes bounce {
- 0%, 20%, 53%, 80%, 100% {
- -webkit-transition-timing-function: cubic-bezier(0.215, 0.610, 0.355, 1.000);
- transition-timing-function: cubic-bezier(0.215, 0.610, 0.355, 1.000);
- -webkit-transform: translate3d(0,0,0);
- transform: translate3d(0,0,0);
- }
-
- 40%, 43% {
- -webkit-transition-timing-function: cubic-bezier(0.755, 0.050, 0.855, 0.060);
- transition-timing-function: cubic-bezier(0.755, 0.050, 0.855, 0.060);
- -webkit-transform: translate3d(0, -30px, 0);
- transform: translate3d(0, -30px, 0);
- }
-
- 70% {
- -webkit-transition-timing-function: cubic-bezier(0.755, 0.050, 0.855, 0.060);
- transition-timing-function: cubic-bezier(0.755, 0.050, 0.855, 0.060);
- -webkit-transform: translate3d(0, -15px, 0);
- transform: translate3d(0, -15px, 0);
- }
-
- 90% {
- -webkit-transform: translate3d(0,-4px,0);
- transform: translate3d(0,-4px,0);
- }
-}
-
-.bounce {
- -webkit-animation-name: bounce;
- animation-name: bounce;
- -webkit-transform-origin: center bottom;
- -ms-transform-origin: center bottom;
- transform-origin: center bottom;
-}
-
-@-webkit-keyframes flash {
- 0%, 50%, 100% {
- opacity: 1;
- }
-
- 25%, 75% {
- opacity: 0;
- }
-}
-
-@keyframes flash {
- 0%, 50%, 100% {
- opacity: 1;
- }
-
- 25%, 75% {
- opacity: 0;
- }
-}
-
-.flash {
- -webkit-animation-name: flash;
- animation-name: flash;
-}
-
-/* originally authored by Nick Pettit - https://github.com/nickpettit/glide */
-
-@-webkit-keyframes pulse {
- 0% {
- -webkit-transform: scale3d(1, 1, 1);
- transform: scale3d(1, 1, 1);
- }
-
- 50% {
- -webkit-transform: scale3d(1.05, 1.05, 1.05);
- transform: scale3d(1.05, 1.05, 1.05);
- }
-
- 100% {
- -webkit-transform: scale3d(1, 1, 1);
- transform: scale3d(1, 1, 1);
- }
-}
-
-@keyframes pulse {
- 0% {
- -webkit-transform: scale3d(1, 1, 1);
- transform: scale3d(1, 1, 1);
- }
-
- 50% {
- -webkit-transform: scale3d(1.05, 1.05, 1.05);
- transform: scale3d(1.05, 1.05, 1.05);
- }
-
- 100% {
- -webkit-transform: scale3d(1, 1, 1);
- transform: scale3d(1, 1, 1);
- }
-}
-
-.pulse {
- -webkit-animation-name: pulse;
- animation-name: pulse;
-}
-
-@-webkit-keyframes rubberBand {
- 0% {
- -webkit-transform: scale3d(1, 1, 1);
- transform: scale3d(1, 1, 1);
- }
-
- 30% {
- -webkit-transform: scale3d(1.25, 0.75, 1);
- transform: scale3d(1.25, 0.75, 1);
- }
-
- 40% {
- -webkit-transform: scale3d(0.75, 1.25, 1);
- transform: scale3d(0.75, 1.25, 1);
- }
-
- 50% {
- -webkit-transform: scale3d(1.15, 0.85, 1);
- transform: scale3d(1.15, 0.85, 1);
- }
-
- 65% {
- -webkit-transform: scale3d(.95, 1.05, 1);
- transform: scale3d(.95, 1.05, 1);
- }
-
- 75% {
- -webkit-transform: scale3d(1.05, .95, 1);
- transform: scale3d(1.05, .95, 1);
- }
-
- 100% {
- -webkit-transform: scale3d(1, 1, 1);
- transform: scale3d(1, 1, 1);
- }
-}
-
-@keyframes rubberBand {
- 0% {
- -webkit-transform: scale3d(1, 1, 1);
- transform: scale3d(1, 1, 1);
- }
-
- 30% {
- -webkit-transform: scale3d(1.25, 0.75, 1);
- transform: scale3d(1.25, 0.75, 1);
- }
-
- 40% {
- -webkit-transform: scale3d(0.75, 1.25, 1);
- transform: scale3d(0.75, 1.25, 1);
- }
-
- 50% {
- -webkit-transform: scale3d(1.15, 0.85, 1);
- transform: scale3d(1.15, 0.85, 1);
- }
-
- 65% {
- -webkit-transform: scale3d(.95, 1.05, 1);
- transform: scale3d(.95, 1.05, 1);
- }
-
- 75% {
- -webkit-transform: scale3d(1.05, .95, 1);
- transform: scale3d(1.05, .95, 1);
- }
-
- 100% {
- -webkit-transform: scale3d(1, 1, 1);
- transform: scale3d(1, 1, 1);
- }
-}
-
-.rubberBand {
- -webkit-animation-name: rubberBand;
- animation-name: rubberBand;
-}
-
-@-webkit-keyframes shake {
- 0%, 100% {
- -webkit-transform: translate3d(0, 0, 0);
- transform: translate3d(0, 0, 0);
- }
-
- 10%, 30%, 50%, 70%, 90% {
- -webkit-transform: translate3d(-10px, 0, 0);
- transform: translate3d(-10px, 0, 0);
- }
-
- 20%, 40%, 60%, 80% {
- -webkit-transform: translate3d(10px, 0, 0);
- transform: translate3d(10px, 0, 0);
- }
-}
-
-@keyframes shake {
- 0%, 100% {
- -webkit-transform: translate3d(0, 0, 0);
- transform: translate3d(0, 0, 0);
- }
-
- 10%, 30%, 50%, 70%, 90% {
- -webkit-transform: translate3d(-10px, 0, 0);
- transform: translate3d(-10px, 0, 0);
- }
-
- 20%, 40%, 60%, 80% {
- -webkit-transform: translate3d(10px, 0, 0);
- transform: translate3d(10px, 0, 0);
- }
-}
-
-.shake {
- -webkit-animation-name: shake;
- animation-name: shake;
-}
-
-@-webkit-keyframes swing {
- 20% {
- -webkit-transform: rotate3d(0, 0, 1, 15deg);
- transform: rotate3d(0, 0, 1, 15deg);
- }
-
- 40% {
- -webkit-transform: rotate3d(0, 0, 1, -10deg);
- transform: rotate3d(0, 0, 1, -10deg);
- }
-
- 60% {
- -webkit-transform: rotate3d(0, 0, 1, 5deg);
- transform: rotate3d(0, 0, 1, 5deg);
- }
-
- 80% {
- -webkit-transform: rotate3d(0, 0, 1, -5deg);
- transform: rotate3d(0, 0, 1, -5deg);
- }
-
- 100% {
- -webkit-transform: rotate3d(0, 0, 1, 0deg);
- transform: rotate3d(0, 0, 1, 0deg);
- }
-}
-
-@keyframes swing {
- 20% {
- -webkit-transform: rotate3d(0, 0, 1, 15deg);
- transform: rotate3d(0, 0, 1, 15deg);
- }
-
- 40% {
- -webkit-transform: rotate3d(0, 0, 1, -10deg);
- transform: rotate3d(0, 0, 1, -10deg);
- }
-
- 60% {
- -webkit-transform: rotate3d(0, 0, 1, 5deg);
- transform: rotate3d(0, 0, 1, 5deg);
- }
-
- 80% {
- -webkit-transform: rotate3d(0, 0, 1, -5deg);
- transform: rotate3d(0, 0, 1, -5deg);
- }
-
- 100% {
- -webkit-transform: rotate3d(0, 0, 1, 0deg);
- transform: rotate3d(0, 0, 1, 0deg);
- }
-}
-
-.swing {
- -webkit-transform-origin: top center;
- -ms-transform-origin: top center;
- transform-origin: top center;
- -webkit-animation-name: swing;
- animation-name: swing;
-}
-
-@-webkit-keyframes tada {
- 0% {
- -webkit-transform: scale3d(1, 1, 1);
- transform: scale3d(1, 1, 1);
- }
-
- 10%, 20% {
- -webkit-transform: scale3d(.9, .9, .9) rotate3d(0, 0, 1, -3deg);
- transform: scale3d(.9, .9, .9) rotate3d(0, 0, 1, -3deg);
- }
-
- 30%, 50%, 70%, 90% {
- -webkit-transform: scale3d(1.1, 1.1, 1.1) rotate3d(0, 0, 1, 3deg);
- transform: scale3d(1.1, 1.1, 1.1) rotate3d(0, 0, 1, 3deg);
- }
-
- 40%, 60%, 80% {
- -webkit-transform: scale3d(1.1, 1.1, 1.1) rotate3d(0, 0, 1, -3deg);
- transform: scale3d(1.1, 1.1, 1.1) rotate3d(0, 0, 1, -3deg);
- }
-
- 100% {
- -webkit-transform: scale3d(1, 1, 1);
- transform: scale3d(1, 1, 1);
- }
-}
-
-@keyframes tada {
- 0% {
- -webkit-transform: scale3d(1, 1, 1);
- transform: scale3d(1, 1, 1);
- }
-
- 10%, 20% {
- -webkit-transform: scale3d(.9, .9, .9) rotate3d(0, 0, 1, -3deg);
- transform: scale3d(.9, .9, .9) rotate3d(0, 0, 1, -3deg);
- }
-
- 30%, 50%, 70%, 90% {
- -webkit-transform: scale3d(1.1, 1.1, 1.1) rotate3d(0, 0, 1, 3deg);
- transform: scale3d(1.1, 1.1, 1.1) rotate3d(0, 0, 1, 3deg);
- }
-
- 40%, 60%, 80% {
- -webkit-transform: scale3d(1.1, 1.1, 1.1) rotate3d(0, 0, 1, -3deg);
- transform: scale3d(1.1, 1.1, 1.1) rotate3d(0, 0, 1, -3deg);
- }
-
- 100% {
- -webkit-transform: scale3d(1, 1, 1);
- transform: scale3d(1, 1, 1);
- }
-}
-
-.tada {
- -webkit-animation-name: tada;
- animation-name: tada;
-}
-
-/* originally authored by Nick Pettit - https://github.com/nickpettit/glide */
-
-@-webkit-keyframes wobble {
- 0% {
- -webkit-transform: none;
- transform: none;
- }
-
- 15% {
- -webkit-transform: translate3d(-25%, 0, 0) rotate3d(0, 0, 1, -5deg);
- transform: translate3d(-25%, 0, 0) rotate3d(0, 0, 1, -5deg);
- }
-
- 30% {
- -webkit-transform: translate3d(20%, 0, 0) rotate3d(0, 0, 1, 3deg);
- transform: translate3d(20%, 0, 0) rotate3d(0, 0, 1, 3deg);
- }
-
- 45% {
- -webkit-transform: translate3d(-15%, 0, 0) rotate3d(0, 0, 1, -3deg);
- transform: translate3d(-15%, 0, 0) rotate3d(0, 0, 1, -3deg);
- }
-
- 60% {
- -webkit-transform: translate3d(10%, 0, 0) rotate3d(0, 0, 1, 2deg);
- transform: translate3d(10%, 0, 0) rotate3d(0, 0, 1, 2deg);
- }
-
- 75% {
- -webkit-transform: translate3d(-5%, 0, 0) rotate3d(0, 0, 1, -1deg);
- transform: translate3d(-5%, 0, 0) rotate3d(0, 0, 1, -1deg);
- }
-
- 100% {
- -webkit-transform: none;
- transform: none;
- }
-}
-
-@keyframes wobble {
- 0% {
- -webkit-transform: none;
- transform: none;
- }
-
- 15% {
- -webkit-transform: translate3d(-25%, 0, 0) rotate3d(0, 0, 1, -5deg);
- transform: translate3d(-25%, 0, 0) rotate3d(0, 0, 1, -5deg);
- }
-
- 30% {
- -webkit-transform: translate3d(20%, 0, 0) rotate3d(0, 0, 1, 3deg);
- transform: translate3d(20%, 0, 0) rotate3d(0, 0, 1, 3deg);
- }
-
- 45% {
- -webkit-transform: translate3d(-15%, 0, 0) rotate3d(0, 0, 1, -3deg);
- transform: translate3d(-15%, 0, 0) rotate3d(0, 0, 1, -3deg);
- }
-
- 60% {
- -webkit-transform: translate3d(10%, 0, 0) rotate3d(0, 0, 1, 2deg);
- transform: translate3d(10%, 0, 0) rotate3d(0, 0, 1, 2deg);
- }
-
- 75% {
- -webkit-transform: translate3d(-5%, 0, 0) rotate3d(0, 0, 1, -1deg);
- transform: translate3d(-5%, 0, 0) rotate3d(0, 0, 1, -1deg);
- }
-
- 100% {
- -webkit-transform: none;
- transform: none;
- }
-}
-
-.wobble {
- -webkit-animation-name: wobble;
- animation-name: wobble;
-}
-
-@-webkit-keyframes bounceIn {
- 0%, 20%, 40%, 60%, 80%, 100% {
- -webkit-transition-timing-function: cubic-bezier(0.215, 0.610, 0.355, 1.000);
- transition-timing-function: cubic-bezier(0.215, 0.610, 0.355, 1.000);
- }
-
- 0% {
- opacity: 0;
- -webkit-transform: scale3d(.3, .3, .3);
- transform: scale3d(.3, .3, .3);
- }
-
- 20% {
- -webkit-transform: scale3d(1.1, 1.1, 1.1);
- transform: scale3d(1.1, 1.1, 1.1);
- }
-
- 40% {
- -webkit-transform: scale3d(.9, .9, .9);
- transform: scale3d(.9, .9, .9);
- }
-
- 60% {
- opacity: 1;
- -webkit-transform: scale3d(1.03, 1.03, 1.03);
- transform: scale3d(1.03, 1.03, 1.03);
- }
-
- 80% {
- -webkit-transform: scale3d(.97, .97, .97);
- transform: scale3d(.97, .97, .97);
- }
-
- 100% {
- opacity: 1;
- -webkit-transform: scale3d(1, 1, 1);
- transform: scale3d(1, 1, 1);
- }
-}
-
-@keyframes bounceIn {
- 0%, 20%, 40%, 60%, 80%, 100% {
- -webkit-transition-timing-function: cubic-bezier(0.215, 0.610, 0.355, 1.000);
- transition-timing-function: cubic-bezier(0.215, 0.610, 0.355, 1.000);
- }
-
- 0% {
- opacity: 0;
- -webkit-transform: scale3d(.3, .3, .3);
- transform: scale3d(.3, .3, .3);
- }
-
- 20% {
- -webkit-transform: scale3d(1.1, 1.1, 1.1);
- transform: scale3d(1.1, 1.1, 1.1);
- }
-
- 40% {
- -webkit-transform: scale3d(.9, .9, .9);
- transform: scale3d(.9, .9, .9);
- }
-
- 60% {
- opacity: 1;
- -webkit-transform: scale3d(1.03, 1.03, 1.03);
- transform: scale3d(1.03, 1.03, 1.03);
- }
-
- 80% {
- -webkit-transform: scale3d(.97, .97, .97);
- transform: scale3d(.97, .97, .97);
- }
-
- 100% {
- opacity: 1;
- -webkit-transform: scale3d(1, 1, 1);
- transform: scale3d(1, 1, 1);
- }
-}
-
-.bounceIn {
- -webkit-animation-name: bounceIn;
- animation-name: bounceIn;
- -webkit-animation-duration: .75s;
- animation-duration: .75s;
-}
-
-@-webkit-keyframes bounceInDown {
- 0%, 60%, 75%, 90%, 100% {
- -webkit-transition-timing-function: cubic-bezier(0.215, 0.610, 0.355, 1.000);
- transition-timing-function: cubic-bezier(0.215, 0.610, 0.355, 1.000);
- }
-
- 0% {
- opacity: 0;
- -webkit-transform: translate3d(0, -3000px, 0);
- transform: translate3d(0, -3000px, 0);
- }
-
- 60% {
- opacity: 1;
- -webkit-transform: translate3d(0, 25px, 0);
- transform: translate3d(0, 25px, 0);
- }
-
- 75% {
- -webkit-transform: translate3d(0, -10px, 0);
- transform: translate3d(0, -10px, 0);
- }
-
- 90% {
- -webkit-transform: translate3d(0, 5px, 0);
- transform: translate3d(0, 5px, 0);
- }
-
- 100% {
- -webkit-transform: none;
- transform: none;
- }
-}
-
-@keyframes bounceInDown {
- 0%, 60%, 75%, 90%, 100% {
- -webkit-transition-timing-function: cubic-bezier(0.215, 0.610, 0.355, 1.000);
- transition-timing-function: cubic-bezier(0.215, 0.610, 0.355, 1.000);
- }
-
- 0% {
- opacity: 0;
- -webkit-transform: translate3d(0, -3000px, 0);
- transform: translate3d(0, -3000px, 0);
- }
-
- 60% {
- opacity: 1;
- -webkit-transform: translate3d(0, 25px, 0);
- transform: translate3d(0, 25px, 0);
- }
-
- 75% {
- -webkit-transform: translate3d(0, -10px, 0);
- transform: translate3d(0, -10px, 0);
- }
-
- 90% {
- -webkit-transform: translate3d(0, 5px, 0);
- transform: translate3d(0, 5px, 0);
- }
-
- 100% {
- -webkit-transform: none;
- transform: none;
- }
-}
-
-.bounceInDown {
- -webkit-animation-name: bounceInDown;
- animation-name: bounceInDown;
-}
-
-@-webkit-keyframes bounceInLeft {
- 0%, 60%, 75%, 90%, 100% {
- -webkit-transition-timing-function: cubic-bezier(0.215, 0.610, 0.355, 1.000);
- transition-timing-function: cubic-bezier(0.215, 0.610, 0.355, 1.000);
- }
-
- 0% {
- opacity: 0;
- -webkit-transform: translate3d(-3000px, 0, 0);
- transform: translate3d(-3000px, 0, 0);
- }
-
- 60% {
- opacity: 1;
- -webkit-transform: translate3d(25px, 0, 0);
- transform: translate3d(25px, 0, 0);
- }
-
- 75% {
- -webkit-transform: translate3d(-10px, 0, 0);
- transform: translate3d(-10px, 0, 0);
- }
-
- 90% {
- -webkit-transform: translate3d(5px, 0, 0);
- transform: translate3d(5px, 0, 0);
- }
-
- 100% {
- -webkit-transform: none;
- transform: none;
- }
-}
-
-@keyframes bounceInLeft {
- 0%, 60%, 75%, 90%, 100% {
- -webkit-transition-timing-function: cubic-bezier(0.215, 0.610, 0.355, 1.000);
- transition-timing-function: cubic-bezier(0.215, 0.610, 0.355, 1.000);
- }
-
- 0% {
- opacity: 0;
- -webkit-transform: translate3d(-3000px, 0, 0);
- transform: translate3d(-3000px, 0, 0);
- }
-
- 60% {
- opacity: 1;
- -webkit-transform: translate3d(25px, 0, 0);
- transform: translate3d(25px, 0, 0);
- }
-
- 75% {
- -webkit-transform: translate3d(-10px, 0, 0);
- transform: translate3d(-10px, 0, 0);
- }
-
- 90% {
- -webkit-transform: translate3d(5px, 0, 0);
- transform: translate3d(5px, 0, 0);
- }
-
- 100% {
- -webkit-transform: none;
- transform: none;
- }
-}
-
-.bounceInLeft {
- -webkit-animation-name: bounceInLeft;
- animation-name: bounceInLeft;
-}
-
-@-webkit-keyframes bounceInRight {
- 0%, 60%, 75%, 90%, 100% {
- -webkit-transition-timing-function: cubic-bezier(0.215, 0.610, 0.355, 1.000);
- transition-timing-function: cubic-bezier(0.215, 0.610, 0.355, 1.000);
- }
-
- 0% {
- opacity: 0;
- -webkit-transform: translate3d(3000px, 0, 0);
- transform: translate3d(3000px, 0, 0);
- }
-
- 60% {
- opacity: 1;
- -webkit-transform: translate3d(-25px, 0, 0);
- transform: translate3d(-25px, 0, 0);
- }
-
- 75% {
- -webkit-transform: translate3d(10px, 0, 0);
- transform: translate3d(10px, 0, 0);
- }
-
- 90% {
- -webkit-transform: translate3d(-5px, 0, 0);
- transform: translate3d(-5px, 0, 0);
- }
-
- 100% {
- -webkit-transform: none;
- transform: none;
- }
-}
-
-@keyframes bounceInRight {
- 0%, 60%, 75%, 90%, 100% {
- -webkit-transition-timing-function: cubic-bezier(0.215, 0.610, 0.355, 1.000);
- transition-timing-function: cubic-bezier(0.215, 0.610, 0.355, 1.000);
- }
-
- 0% {
- opacity: 0;
- -webkit-transform: translate3d(3000px, 0, 0);
- transform: translate3d(3000px, 0, 0);
- }
-
- 60% {
- opacity: 1;
- -webkit-transform: translate3d(-25px, 0, 0);
- transform: translate3d(-25px, 0, 0);
- }
-
- 75% {
- -webkit-transform: translate3d(10px, 0, 0);
- transform: translate3d(10px, 0, 0);
- }
-
- 90% {
- -webkit-transform: translate3d(-5px, 0, 0);
- transform: translate3d(-5px, 0, 0);
- }
-
- 100% {
- -webkit-transform: none;
- transform: none;
- }
-}
-
-.bounceInRight {
- -webkit-animation-name: bounceInRight;
- animation-name: bounceInRight;
-}
-
-@-webkit-keyframes bounceInUp {
- 0%, 60%, 75%, 90%, 100% {
- -webkit-transition-timing-function: cubic-bezier(0.215, 0.610, 0.355, 1.000);
- transition-timing-function: cubic-bezier(0.215, 0.610, 0.355, 1.000);
- }
-
- 0% {
- opacity: 0;
- -webkit-transform: translate3d(0, 3000px, 0);
- transform: translate3d(0, 3000px, 0);
- }
-
- 60% {
- opacity: 1;
- -webkit-transform: translate3d(0, -20px, 0);
- transform: translate3d(0, -20px, 0);
- }
-
- 75% {
- -webkit-transform: translate3d(0, 10px, 0);
- transform: translate3d(0, 10px, 0);
- }
-
- 90% {
- -webkit-transform: translate3d(0, -5px, 0);
- transform: translate3d(0, -5px, 0);
- }
-
- 100% {
- -webkit-transform: translate3d(0, 0, 0);
- transform: translate3d(0, 0, 0);
- }
-}
-
-@keyframes bounceInUp {
- 0%, 60%, 75%, 90%, 100% {
- -webkit-transition-timing-function: cubic-bezier(0.215, 0.610, 0.355, 1.000);
- transition-timing-function: cubic-bezier(0.215, 0.610, 0.355, 1.000);
- }
-
- 0% {
- opacity: 0;
- -webkit-transform: translate3d(0, 3000px, 0);
- transform: translate3d(0, 3000px, 0);
- }
-
- 60% {
- opacity: 1;
- -webkit-transform: translate3d(0, -20px, 0);
- transform: translate3d(0, -20px, 0);
- }
-
- 75% {
- -webkit-transform: translate3d(0, 10px, 0);
- transform: translate3d(0, 10px, 0);
- }
-
- 90% {
- -webkit-transform: translate3d(0, -5px, 0);
- transform: translate3d(0, -5px, 0);
- }
-
- 100% {
- -webkit-transform: translate3d(0, 0, 0);
- transform: translate3d(0, 0, 0);
- }
-}
-
-.bounceInUp {
- -webkit-animation-name: bounceInUp;
- animation-name: bounceInUp;
-}
-
-@-webkit-keyframes bounceOut {
- 20% {
- -webkit-transform: scale3d(.9, .9, .9);
- transform: scale3d(.9, .9, .9);
- }
-
- 50%, 55% {
- opacity: 1;
- -webkit-transform: scale3d(1.1, 1.1, 1.1);
- transform: scale3d(1.1, 1.1, 1.1);
- }
-
- 100% {
- opacity: 0;
- -webkit-transform: scale3d(.3, .3, .3);
- transform: scale3d(.3, .3, .3);
- }
-}
-
-@keyframes bounceOut {
- 20% {
- -webkit-transform: scale3d(.9, .9, .9);
- transform: scale3d(.9, .9, .9);
- }
-
- 50%, 55% {
- opacity: 1;
- -webkit-transform: scale3d(1.1, 1.1, 1.1);
- transform: scale3d(1.1, 1.1, 1.1);
- }
-
- 100% {
- opacity: 0;
- -webkit-transform: scale3d(.3, .3, .3);
- transform: scale3d(.3, .3, .3);
- }
-}
-
-.bounceOut {
- -webkit-animation-name: bounceOut;
- animation-name: bounceOut;
- -webkit-animation-duration: .75s;
- animation-duration: .75s;
-}
-
-@-webkit-keyframes bounceOutDown {
- 20% {
- -webkit-transform: translate3d(0, 10px, 0);
- transform: translate3d(0, 10px, 0);
- }
-
- 40%, 45% {
- opacity: 1;
- -webkit-transform: translate3d(0, -20px, 0);
- transform: translate3d(0, -20px, 0);
- }
-
- 100% {
- opacity: 0;
- -webkit-transform: translate3d(0, 2000px, 0);
- transform: translate3d(0, 2000px, 0);
- }
-}
-
-@keyframes bounceOutDown {
- 20% {
- -webkit-transform: translate3d(0, 10px, 0);
- transform: translate3d(0, 10px, 0);
- }
-
- 40%, 45% {
- opacity: 1;
- -webkit-transform: translate3d(0, -20px, 0);
- transform: translate3d(0, -20px, 0);
- }
-
- 100% {
- opacity: 0;
- -webkit-transform: translate3d(0, 2000px, 0);
- transform: translate3d(0, 2000px, 0);
- }
-}
-
-.bounceOutDown {
- -webkit-animation-name: bounceOutDown;
- animation-name: bounceOutDown;
-}
-
-@-webkit-keyframes bounceOutLeft {
- 20% {
- opacity: 1;
- -webkit-transform: translate3d(20px, 0, 0);
- transform: translate3d(20px, 0, 0);
- }
-
- 100% {
- opacity: 0;
- -webkit-transform: translate3d(-2000px, 0, 0);
- transform: translate3d(-2000px, 0, 0);
- }
-}
-
-@keyframes bounceOutLeft {
- 20% {
- opacity: 1;
- -webkit-transform: translate3d(20px, 0, 0);
- transform: translate3d(20px, 0, 0);
- }
-
- 100% {
- opacity: 0;
- -webkit-transform: translate3d(-2000px, 0, 0);
- transform: translate3d(-2000px, 0, 0);
- }
-}
-
-.bounceOutLeft {
- -webkit-animation-name: bounceOutLeft;
- animation-name: bounceOutLeft;
-}
-
-@-webkit-keyframes bounceOutRight {
- 20% {
- opacity: 1;
- -webkit-transform: translate3d(-20px, 0, 0);
- transform: translate3d(-20px, 0, 0);
- }
-
- 100% {
- opacity: 0;
- -webkit-transform: translate3d(2000px, 0, 0);
- transform: translate3d(2000px, 0, 0);
- }
-}
-
-@keyframes bounceOutRight {
- 20% {
- opacity: 1;
- -webkit-transform: translate3d(-20px, 0, 0);
- transform: translate3d(-20px, 0, 0);
- }
-
- 100% {
- opacity: 0;
- -webkit-transform: translate3d(2000px, 0, 0);
- transform: translate3d(2000px, 0, 0);
- }
-}
-
-.bounceOutRight {
- -webkit-animation-name: bounceOutRight;
- animation-name: bounceOutRight;
-}
-
-@-webkit-keyframes bounceOutUp {
- 20% {
- -webkit-transform: translate3d(0, -10px, 0);
- transform: translate3d(0, -10px, 0);
- }
-
- 40%, 45% {
- opacity: 1;
- -webkit-transform: translate3d(0, 20px, 0);
- transform: translate3d(0, 20px, 0);
- }
-
- 100% {
- opacity: 0;
- -webkit-transform: translate3d(0, -2000px, 0);
- transform: translate3d(0, -2000px, 0);
- }
-}
-
-@keyframes bounceOutUp {
- 20% {
- -webkit-transform: translate3d(0, -10px, 0);
- transform: translate3d(0, -10px, 0);
- }
-
- 40%, 45% {
- opacity: 1;
- -webkit-transform: translate3d(0, 20px, 0);
- transform: translate3d(0, 20px, 0);
- }
-
- 100% {
- opacity: 0;
- -webkit-transform: translate3d(0, -2000px, 0);
- transform: translate3d(0, -2000px, 0);
- }
-}
-
-.bounceOutUp {
- -webkit-animation-name: bounceOutUp;
- animation-name: bounceOutUp;
-}
-
-@-webkit-keyframes fadeIn {
- 0% {opacity: 0;}
- 100% {opacity: 1;}
-}
-
-@keyframes fadeIn {
- 0% {opacity: 0;}
- 100% {opacity: 1;}
-}
-
-.fadeIn {
- -webkit-animation-name: fadeIn;
- animation-name: fadeIn;
-}
-
-@-webkit-keyframes fadeInDown {
- 0% {
- opacity: 0;
- -webkit-transform: translate3d(0, -100%, 0);
- transform: translate3d(0, -100%, 0);
- }
-
- 100% {
- opacity: 1;
- -webkit-transform: none;
- transform: none;
- }
-}
-
-@keyframes fadeInDown {
- 0% {
- opacity: 0;
- -webkit-transform: translate3d(0, -100%, 0);
- transform: translate3d(0, -100%, 0);
- }
-
- 100% {
- opacity: 1;
- -webkit-transform: none;
- transform: none;
- }
-}
-
-.fadeInDown {
- -webkit-animation-name: fadeInDown;
- animation-name: fadeInDown;
-}
-
-@-webkit-keyframes fadeInDownBig {
- 0% {
- opacity: 0;
- -webkit-transform: translate3d(0, -2000px, 0);
- transform: translate3d(0, -2000px, 0);
- }
-
- 100% {
- opacity: 1;
- -webkit-transform: none;
- transform: none;
- }
-}
-
-@keyframes fadeInDownBig {
- 0% {
- opacity: 0;
- -webkit-transform: translate3d(0, -2000px, 0);
- transform: translate3d(0, -2000px, 0);
- }
-
- 100% {
- opacity: 1;
- -webkit-transform: none;
- transform: none;
- }
-}
-
-.fadeInDownBig {
- -webkit-animation-name: fadeInDownBig;
- animation-name: fadeInDownBig;
-}
-
-@-webkit-keyframes fadeInLeft {
- 0% {
- opacity: 0;
- -webkit-transform: translate3d(-100%, 0, 0);
- transform: translate3d(-100%, 0, 0);
- }
-
- 100% {
- opacity: 1;
- -webkit-transform: none;
- transform: none;
- }
-}
-
-@keyframes fadeInLeft {
- 0% {
- opacity: 0;
- -webkit-transform: translate3d(-100%, 0, 0);
- transform: translate3d(-100%, 0, 0);
- }
-
- 100% {
- opacity: 1;
- -webkit-transform: none;
- transform: none;
- }
-}
-
-.fadeInLeft {
- -webkit-animation-name: fadeInLeft;
- animation-name: fadeInLeft;
-}
-
-@-webkit-keyframes fadeInLeftBig {
- 0% {
- opacity: 0;
- -webkit-transform: translate3d(-2000px, 0, 0);
- transform: translate3d(-2000px, 0, 0);
- }
-
- 100% {
- opacity: 1;
- -webkit-transform: none;
- transform: none;
- }
-}
-
-@keyframes fadeInLeftBig {
- 0% {
- opacity: 0;
- -webkit-transform: translate3d(-2000px, 0, 0);
- transform: translate3d(-2000px, 0, 0);
- }
-
- 100% {
- opacity: 1;
- -webkit-transform: none;
- transform: none;
- }
-}
-
-.fadeInLeftBig {
- -webkit-animation-name: fadeInLeftBig;
- animation-name: fadeInLeftBig;
-}
-
-@-webkit-keyframes fadeInRight {
- 0% {
- opacity: 0;
- -webkit-transform: translate3d(100%, 0, 0);
- transform: translate3d(100%, 0, 0);
- }
-
- 100% {
- opacity: 1;
- -webkit-transform: none;
- transform: none;
- }
-}
-
-@keyframes fadeInRight {
- 0% {
- opacity: 0;
- -webkit-transform: translate3d(100%, 0, 0);
- transform: translate3d(100%, 0, 0);
- }
-
- 100% {
- opacity: 1;
- -webkit-transform: none;
- transform: none;
- }
-}
-
-.fadeInRight {
- -webkit-animation-name: fadeInRight;
- animation-name: fadeInRight;
-}
-
-@-webkit-keyframes fadeInRightBig {
- 0% {
- opacity: 0;
- -webkit-transform: translate3d(2000px, 0, 0);
- transform: translate3d(2000px, 0, 0);
- }
-
- 100% {
- opacity: 1;
- -webkit-transform: none;
- transform: none;
- }
-}
-
-@keyframes fadeInRightBig {
- 0% {
- opacity: 0;
- -webkit-transform: translate3d(2000px, 0, 0);
- transform: translate3d(2000px, 0, 0);
- }
-
- 100% {
- opacity: 1;
- -webkit-transform: none;
- transform: none;
- }
-}
-
-.fadeInRightBig {
- -webkit-animation-name: fadeInRightBig;
- animation-name: fadeInRightBig;
-}
-
-@-webkit-keyframes fadeInUp {
- 0% {
- opacity: 0;
- -webkit-transform: translate3d(0, 100%, 0);
- transform: translate3d(0, 100%, 0);
- }
-
- 100% {
- opacity: 1;
- -webkit-transform: none;
- transform: none;
- }
-}
-
-@keyframes fadeInUp {
- 0% {
- opacity: 0;
- -webkit-transform: translate3d(0, 100%, 0);
- transform: translate3d(0, 100%, 0);
- }
-
- 100% {
- opacity: 1;
- -webkit-transform: none;
- transform: none;
- }
-}
-
-.fadeInUp {
- -webkit-animation-name: fadeInUp;
- animation-name: fadeInUp;
-}
-
-@-webkit-keyframes fadeInUpBig {
- 0% {
- opacity: 0;
- -webkit-transform: translate3d(0, 2000px, 0);
- transform: translate3d(0, 2000px, 0);
- }
-
- 100% {
- opacity: 1;
- -webkit-transform: none;
- transform: none;
- }
-}
-
-@keyframes fadeInUpBig {
- 0% {
- opacity: 0;
- -webkit-transform: translate3d(0, 2000px, 0);
- transform: translate3d(0, 2000px, 0);
- }
-
- 100% {
- opacity: 1;
- -webkit-transform: none;
- transform: none;
- }
-}
-
-.fadeInUpBig {
- -webkit-animation-name: fadeInUpBig;
- animation-name: fadeInUpBig;
-}
-
-@-webkit-keyframes fadeOut {
- 0% {opacity: 1;}
- 100% {opacity: 0;}
-}
-
-@keyframes fadeOut {
- 0% {opacity: 1;}
- 100% {opacity: 0;}
-}
-
-.fadeOut {
- -webkit-animation-name: fadeOut;
- animation-name: fadeOut;
-}
-
-@-webkit-keyframes fadeOutDown {
- 0% {
- opacity: 1;
- }
-
- 100% {
- opacity: 0;
- -webkit-transform: translate3d(0, 100%, 0);
- transform: translate3d(0, 100%, 0);
- }
-}
-
-@keyframes fadeOutDown {
- 0% {
- opacity: 1;
- }
-
- 100% {
- opacity: 0;
- -webkit-transform: translate3d(0, 100%, 0);
- transform: translate3d(0, 100%, 0);
- }
-}
-
-.fadeOutDown {
- -webkit-animation-name: fadeOutDown;
- animation-name: fadeOutDown;
-}
-
-@-webkit-keyframes fadeOutDownBig {
- 0% {
- opacity: 1;
- }
-
- 100% {
- opacity: 0;
- -webkit-transform: translate3d(0, 2000px, 0);
- transform: translate3d(0, 2000px, 0);
- }
-}
-
-@keyframes fadeOutDownBig {
- 0% {
- opacity: 1;
- }
-
- 100% {
- opacity: 0;
- -webkit-transform: translate3d(0, 2000px, 0);
- transform: translate3d(0, 2000px, 0);
- }
-}
-
-.fadeOutDownBig {
- -webkit-animation-name: fadeOutDownBig;
- animation-name: fadeOutDownBig;
-}
-
-@-webkit-keyframes fadeOutLeft {
- 0% {
- opacity: 1;
- }
-
- 100% {
- opacity: 0;
- -webkit-transform: translate3d(-100%, 0, 0);
- transform: translate3d(-100%, 0, 0);
- }
-}
-
-@keyframes fadeOutLeft {
- 0% {
- opacity: 1;
- }
-
- 100% {
- opacity: 0;
- -webkit-transform: translate3d(-100%, 0, 0);
- transform: translate3d(-100%, 0, 0);
- }
-}
-
-.fadeOutLeft {
- -webkit-animation-name: fadeOutLeft;
- animation-name: fadeOutLeft;
-}
-
-@-webkit-keyframes fadeOutLeftBig {
- 0% {
- opacity: 1;
- }
-
- 100% {
- opacity: 0;
- -webkit-transform: translate3d(-2000px, 0, 0);
- transform: translate3d(-2000px, 0, 0);
- }
-}
-
-@keyframes fadeOutLeftBig {
- 0% {
- opacity: 1;
- }
-
- 100% {
- opacity: 0;
- -webkit-transform: translate3d(-2000px, 0, 0);
- transform: translate3d(-2000px, 0, 0);
- }
-}
-
-.fadeOutLeftBig {
- -webkit-animation-name: fadeOutLeftBig;
- animation-name: fadeOutLeftBig;
-}
-
-@-webkit-keyframes fadeOutRight {
- 0% {
- opacity: 1;
- }
-
- 100% {
- opacity: 0;
- -webkit-transform: translate3d(100%, 0, 0);
- transform: translate3d(100%, 0, 0);
- }
-}
-
-@keyframes fadeOutRight {
- 0% {
- opacity: 1;
- }
-
- 100% {
- opacity: 0;
- -webkit-transform: translate3d(100%, 0, 0);
- transform: translate3d(100%, 0, 0);
- }
-}
-
-.fadeOutRight {
- -webkit-animation-name: fadeOutRight;
- animation-name: fadeOutRight;
-}
-
-@-webkit-keyframes fadeOutRightBig {
- 0% {
- opacity: 1;
- }
-
- 100% {
- opacity: 0;
- -webkit-transform: translate3d(2000px, 0, 0);
- transform: translate3d(2000px, 0, 0);
- }
-}
-
-@keyframes fadeOutRightBig {
- 0% {
- opacity: 1;
- }
-
- 100% {
- opacity: 0;
- -webkit-transform: translate3d(2000px, 0, 0);
- transform: translate3d(2000px, 0, 0);
- }
-}
-
-.fadeOutRightBig {
- -webkit-animation-name: fadeOutRightBig;
- animation-name: fadeOutRightBig;
-}
-
-@-webkit-keyframes fadeOutUp {
- 0% {
- opacity: 1;
- }
-
- 100% {
- opacity: 0;
- -webkit-transform: translate3d(0, -100%, 0);
- transform: translate3d(0, -100%, 0);
- }
-}
-
-@keyframes fadeOutUp {
- 0% {
- opacity: 1;
- }
-
- 100% {
- opacity: 0;
- -webkit-transform: translate3d(0, -100%, 0);
- transform: translate3d(0, -100%, 0);
- }
-}
-
-.fadeOutUp {
- -webkit-animation-name: fadeOutUp;
- animation-name: fadeOutUp;
-}
-
-@-webkit-keyframes fadeOutUpBig {
- 0% {
- opacity: 1;
- }
-
- 100% {
- opacity: 0;
- -webkit-transform: translate3d(0, -2000px, 0);
- transform: translate3d(0, -2000px, 0);
- }
-}
-
-@keyframes fadeOutUpBig {
- 0% {
- opacity: 1;
- }
-
- 100% {
- opacity: 0;
- -webkit-transform: translate3d(0, -2000px, 0);
- transform: translate3d(0, -2000px, 0);
- }
-}
-
-.fadeOutUpBig {
- -webkit-animation-name: fadeOutUpBig;
- animation-name: fadeOutUpBig;
-}
-
-@-webkit-keyframes flip {
- 0% {
- -webkit-transform: perspective(400px) rotate3d(0, 1, 0, -360deg);
- transform: perspective(400px) rotate3d(0, 1, 0, -360deg);
- -webkit-animation-timing-function: ease-out;
- animation-timing-function: ease-out;
- }
-
- 40% {
- -webkit-transform: perspective(400px) translate3d(0, 0, 150px) rotate3d(0, 1, 0, -190deg);
- transform: perspective(400px) translate3d(0, 0, 150px) rotate3d(0, 1, 0, -190deg);
- -webkit-animation-timing-function: ease-out;
- animation-timing-function: ease-out;
- }
-
- 50% {
- -webkit-transform: perspective(400px) translate3d(0, 0, 150px) rotate3d(0, 1, 0, -170deg);
- transform: perspective(400px) translate3d(0, 0, 150px) rotate3d(0, 1, 0, -170deg);
- -webkit-animation-timing-function: ease-in;
- animation-timing-function: ease-in;
- }
-
- 80% {
- -webkit-transform: perspective(400px) scale3d(.95, .95, .95);
- transform: perspective(400px) scale3d(.95, .95, .95);
- -webkit-animation-timing-function: ease-in;
- animation-timing-function: ease-in;
- }
-
- 100% {
- -webkit-transform: perspective(400px);
- transform: perspective(400px);
- -webkit-animation-timing-function: ease-in;
- animation-timing-function: ease-in;
- }
-}
-
-@keyframes flip {
- 0% {
- -webkit-transform: perspective(400px) rotate3d(0, 1, 0, -360deg);
- transform: perspective(400px) rotate3d(0, 1, 0, -360deg);
- -webkit-animation-timing-function: ease-out;
- animation-timing-function: ease-out;
- }
-
- 40% {
- -webkit-transform: perspective(400px) translate3d(0, 0, 150px) rotate3d(0, 1, 0, -190deg);
- transform: perspective(400px) translate3d(0, 0, 150px) rotate3d(0, 1, 0, -190deg);
- -webkit-animation-timing-function: ease-out;
- animation-timing-function: ease-out;
- }
-
- 50% {
- -webkit-transform: perspective(400px) translate3d(0, 0, 150px) rotate3d(0, 1, 0, -170deg);
- transform: perspective(400px) translate3d(0, 0, 150px) rotate3d(0, 1, 0, -170deg);
- -webkit-animation-timing-function: ease-in;
- animation-timing-function: ease-in;
- }
-
- 80% {
- -webkit-transform: perspective(400px) scale3d(.95, .95, .95);
- transform: perspective(400px) scale3d(.95, .95, .95);
- -webkit-animation-timing-function: ease-in;
- animation-timing-function: ease-in;
- }
-
- 100% {
- -webkit-transform: perspective(400px);
- transform: perspective(400px);
- -webkit-animation-timing-function: ease-in;
- animation-timing-function: ease-in;
- }
-}
-
-.animated.flip {
- -webkit-backface-visibility: visible;
- backface-visibility: visible;
- -webkit-animation-name: flip;
- animation-name: flip;
-}
-
-@-webkit-keyframes flipInX {
- 0% {
- -webkit-transform: perspective(400px) rotate3d(1, 0, 0, 90deg);
- transform: perspective(400px) rotate3d(1, 0, 0, 90deg);
- -webkit-transition-timing-function: ease-in;
- transition-timing-function: ease-in;
- opacity: 0;
- }
-
- 40% {
- -webkit-transform: perspective(400px) rotate3d(1, 0, 0, -20deg);
- transform: perspective(400px) rotate3d(1, 0, 0, -20deg);
- -webkit-transition-timing-function: ease-in;
- transition-timing-function: ease-in;
- }
-
- 60% {
- -webkit-transform: perspective(400px) rotate3d(1, 0, 0, 10deg);
- transform: perspective(400px) rotate3d(1, 0, 0, 10deg);
- opacity: 1;
- }
-
- 80% {
- -webkit-transform: perspective(400px) rotate3d(1, 0, 0, -5deg);
- transform: perspective(400px) rotate3d(1, 0, 0, -5deg);
- }
-
- 100% {
- -webkit-transform: perspective(400px);
- transform: perspective(400px);
- }
-}
-
-@keyframes flipInX {
- 0% {
- -webkit-transform: perspective(400px) rotate3d(1, 0, 0, 90deg);
- transform: perspective(400px) rotate3d(1, 0, 0, 90deg);
- -webkit-transition-timing-function: ease-in;
- transition-timing-function: ease-in;
- opacity: 0;
- }
-
- 40% {
- -webkit-transform: perspective(400px) rotate3d(1, 0, 0, -20deg);
- transform: perspective(400px) rotate3d(1, 0, 0, -20deg);
- -webkit-transition-timing-function: ease-in;
- transition-timing-function: ease-in;
- }
-
- 60% {
- -webkit-transform: perspective(400px) rotate3d(1, 0, 0, 10deg);
- transform: perspective(400px) rotate3d(1, 0, 0, 10deg);
- opacity: 1;
- }
-
- 80% {
- -webkit-transform: perspective(400px) rotate3d(1, 0, 0, -5deg);
- transform: perspective(400px) rotate3d(1, 0, 0, -5deg);
- }
-
- 100% {
- -webkit-transform: perspective(400px);
- transform: perspective(400px);
- }
-}
-
-.flipInX {
- -webkit-backface-visibility: visible !important;
- backface-visibility: visible !important;
- -webkit-animation-name: flipInX;
- animation-name: flipInX;
-}
-
-@-webkit-keyframes flipInY {
- 0% {
- -webkit-transform: perspective(400px) rotate3d(0, 1, 0, 90deg);
- transform: perspective(400px) rotate3d(0, 1, 0, 90deg);
- -webkit-transition-timing-function: ease-in;
- transition-timing-function: ease-in;
- opacity: 0;
- }
-
- 40% {
- -webkit-transform: perspective(400px) rotate3d(0, 1, 0, -20deg);
- transform: perspective(400px) rotate3d(0, 1, 0, -20deg);
- -webkit-transition-timing-function: ease-in;
- transition-timing-function: ease-in;
- }
-
- 60% {
- -webkit-transform: perspective(400px) rotate3d(0, 1, 0, 10deg);
- transform: perspective(400px) rotate3d(0, 1, 0, 10deg);
- opacity: 1;
- }
-
- 80% {
- -webkit-transform: perspective(400px) rotate3d(0, 1, 0, -5deg);
- transform: perspective(400px) rotate3d(0, 1, 0, -5deg);
- }
-
- 100% {
- -webkit-transform: perspective(400px);
- transform: perspective(400px);
- }
-}
-
-@keyframes flipInY {
- 0% {
- -webkit-transform: perspective(400px) rotate3d(0, 1, 0, 90deg);
- transform: perspective(400px) rotate3d(0, 1, 0, 90deg);
- -webkit-transition-timing-function: ease-in;
- transition-timing-function: ease-in;
- opacity: 0;
- }
-
- 40% {
- -webkit-transform: perspective(400px) rotate3d(0, 1, 0, -20deg);
- transform: perspective(400px) rotate3d(0, 1, 0, -20deg);
- -webkit-transition-timing-function: ease-in;
- transition-timing-function: ease-in;
- }
-
- 60% {
- -webkit-transform: perspective(400px) rotate3d(0, 1, 0, 10deg);
- transform: perspective(400px) rotate3d(0, 1, 0, 10deg);
- opacity: 1;
- }
-
- 80% {
- -webkit-transform: perspective(400px) rotate3d(0, 1, 0, -5deg);
- transform: perspective(400px) rotate3d(0, 1, 0, -5deg);
- }
-
- 100% {
- -webkit-transform: perspective(400px);
- transform: perspective(400px);
- }
-}
-
-.flipInY {
- -webkit-backface-visibility: visible !important;
- backface-visibility: visible !important;
- -webkit-animation-name: flipInY;
- animation-name: flipInY;
-}
-
-@-webkit-keyframes flipOutX {
- 0% {
- -webkit-transform: perspective(400px);
- transform: perspective(400px);
- }
-
- 30% {
- -webkit-transform: perspective(400px) rotate3d(1, 0, 0, -20deg);
- transform: perspective(400px) rotate3d(1, 0, 0, -20deg);
- opacity: 1;
- }
-
- 100% {
- -webkit-transform: perspective(400px) rotate3d(1, 0, 0, 90deg);
- transform: perspective(400px) rotate3d(1, 0, 0, 90deg);
- opacity: 0;
- }
-}
-
-@keyframes flipOutX {
- 0% {
- -webkit-transform: perspective(400px);
- transform: perspective(400px);
- }
-
- 30% {
- -webkit-transform: perspective(400px) rotate3d(1, 0, 0, -20deg);
- transform: perspective(400px) rotate3d(1, 0, 0, -20deg);
- opacity: 1;
- }
-
- 100% {
- -webkit-transform: perspective(400px) rotate3d(1, 0, 0, 90deg);
- transform: perspective(400px) rotate3d(1, 0, 0, 90deg);
- opacity: 0;
- }
-}
-
-.flipOutX {
- -webkit-animation-name: flipOutX;
- animation-name: flipOutX;
- -webkit-animation-duration: .75s;
- animation-duration: .75s;
- -webkit-backface-visibility: visible !important;
- backface-visibility: visible !important;
-}
-
-@-webkit-keyframes flipOutY {
- 0% {
- -webkit-transform: perspective(400px);
- transform: perspective(400px);
- }
-
- 30% {
- -webkit-transform: perspective(400px) rotate3d(0, 1, 0, -15deg);
- transform: perspective(400px) rotate3d(0, 1, 0, -15deg);
- opacity: 1;
- }
-
- 100% {
- -webkit-transform: perspective(400px) rotate3d(0, 1, 0, 90deg);
- transform: perspective(400px) rotate3d(0, 1, 0, 90deg);
- opacity: 0;
- }
-}
-
-@keyframes flipOutY {
- 0% {
- -webkit-transform: perspective(400px);
- transform: perspective(400px);
- }
-
- 30% {
- -webkit-transform: perspective(400px) rotate3d(0, 1, 0, -15deg);
- transform: perspective(400px) rotate3d(0, 1, 0, -15deg);
- opacity: 1;
- }
-
- 100% {
- -webkit-transform: perspective(400px) rotate3d(0, 1, 0, 90deg);
- transform: perspective(400px) rotate3d(0, 1, 0, 90deg);
- opacity: 0;
- }
-}
-
-.flipOutY {
- -webkit-backface-visibility: visible !important;
- backface-visibility: visible !important;
- -webkit-animation-name: flipOutY;
- animation-name: flipOutY;
- -webkit-animation-duration: .75s;
- animation-duration: .75s;
-}
-
-@-webkit-keyframes lightSpeedIn {
- 0% {
- -webkit-transform: translate3d(100%, 0, 0) skewX(-30deg);
- transform: translate3d(100%, 0, 0) skewX(-30deg);
- opacity: 0;
- }
-
- 60% {
- -webkit-transform: skewX(20deg);
- transform: skewX(20deg);
- opacity: 1;
- }
-
- 80% {
- -webkit-transform: skewX(-5deg);
- transform: skewX(-5deg);
- opacity: 1;
- }
-
- 100% {
- -webkit-transform: none;
- transform: none;
- opacity: 1;
- }
-}
-
-@keyframes lightSpeedIn {
- 0% {
- -webkit-transform: translate3d(100%, 0, 0) skewX(-30deg);
- transform: translate3d(100%, 0, 0) skewX(-30deg);
- opacity: 0;
- }
-
- 60% {
- -webkit-transform: skewX(20deg);
- transform: skewX(20deg);
- opacity: 1;
- }
-
- 80% {
- -webkit-transform: skewX(-5deg);
- transform: skewX(-5deg);
- opacity: 1;
- }
-
- 100% {
- -webkit-transform: none;
- transform: none;
- opacity: 1;
- }
-}
-
-.lightSpeedIn {
- -webkit-animation-name: lightSpeedIn;
- animation-name: lightSpeedIn;
- -webkit-animation-timing-function: ease-out;
- animation-timing-function: ease-out;
-}
-
-@-webkit-keyframes lightSpeedOut {
- 0% {
- opacity: 1;
- }
-
- 100% {
- -webkit-transform: translate3d(100%, 0, 0) skewX(30deg);
- transform: translate3d(100%, 0, 0) skewX(30deg);
- opacity: 0;
- }
-}
-
-@keyframes lightSpeedOut {
- 0% {
- opacity: 1;
- }
-
- 100% {
- -webkit-transform: translate3d(100%, 0, 0) skewX(30deg);
- transform: translate3d(100%, 0, 0) skewX(30deg);
- opacity: 0;
- }
-}
-
-.lightSpeedOut {
- -webkit-animation-name: lightSpeedOut;
- animation-name: lightSpeedOut;
- -webkit-animation-timing-function: ease-in;
- animation-timing-function: ease-in;
-}
-
-@-webkit-keyframes rotateIn {
- 0% {
- -webkit-transform-origin: center;
- transform-origin: center;
- -webkit-transform: rotate3d(0, 0, 1, -200deg);
- transform: rotate3d(0, 0, 1, -200deg);
- opacity: 0;
- }
-
- 100% {
- -webkit-transform-origin: center;
- transform-origin: center;
- -webkit-transform: none;
- transform: none;
- opacity: 1;
- }
-}
-
-@keyframes rotateIn {
- 0% {
- -webkit-transform-origin: center;
- transform-origin: center;
- -webkit-transform: rotate3d(0, 0, 1, -200deg);
- transform: rotate3d(0, 0, 1, -200deg);
- opacity: 0;
- }
-
- 100% {
- -webkit-transform-origin: center;
- transform-origin: center;
- -webkit-transform: none;
- transform: none;
- opacity: 1;
- }
-}
-
-.rotateIn {
- -webkit-animation-name: rotateIn;
- animation-name: rotateIn;
-}
-
-@-webkit-keyframes rotateInDownLeft {
- 0% {
- -webkit-transform-origin: left bottom;
- transform-origin: left bottom;
- -webkit-transform: rotate3d(0, 0, 1, -45deg);
- transform: rotate3d(0, 0, 1, -45deg);
- opacity: 0;
- }
-
- 100% {
- -webkit-transform-origin: left bottom;
- transform-origin: left bottom;
- -webkit-transform: none;
- transform: none;
- opacity: 1;
- }
-}
-
-@keyframes rotateInDownLeft {
- 0% {
- -webkit-transform-origin: left bottom;
- transform-origin: left bottom;
- -webkit-transform: rotate3d(0, 0, 1, -45deg);
- transform: rotate3d(0, 0, 1, -45deg);
- opacity: 0;
- }
-
- 100% {
- -webkit-transform-origin: left bottom;
- transform-origin: left bottom;
- -webkit-transform: none;
- transform: none;
- opacity: 1;
- }
-}
-
-.rotateInDownLeft {
- -webkit-animation-name: rotateInDownLeft;
- animation-name: rotateInDownLeft;
-}
-
-@-webkit-keyframes rotateInDownRight {
- 0% {
- -webkit-transform-origin: right bottom;
- transform-origin: right bottom;
- -webkit-transform: rotate3d(0, 0, 1, 45deg);
- transform: rotate3d(0, 0, 1, 45deg);
- opacity: 0;
- }
-
- 100% {
- -webkit-transform-origin: right bottom;
- transform-origin: right bottom;
- -webkit-transform: none;
- transform: none;
- opacity: 1;
- }
-}
-
-@keyframes rotateInDownRight {
- 0% {
- -webkit-transform-origin: right bottom;
- transform-origin: right bottom;
- -webkit-transform: rotate3d(0, 0, 1, 45deg);
- transform: rotate3d(0, 0, 1, 45deg);
- opacity: 0;
- }
-
- 100% {
- -webkit-transform-origin: right bottom;
- transform-origin: right bottom;
- -webkit-transform: none;
- transform: none;
- opacity: 1;
- }
-}
-
-.rotateInDownRight {
- -webkit-animation-name: rotateInDownRight;
- animation-name: rotateInDownRight;
-}
-
-@-webkit-keyframes rotateInUpLeft {
- 0% {
- -webkit-transform-origin: left bottom;
- transform-origin: left bottom;
- -webkit-transform: rotate3d(0, 0, 1, 45deg);
- transform: rotate3d(0, 0, 1, 45deg);
- opacity: 0;
- }
-
- 100% {
- -webkit-transform-origin: left bottom;
- transform-origin: left bottom;
- -webkit-transform: none;
- transform: none;
- opacity: 1;
- }
-}
-
-@keyframes rotateInUpLeft {
- 0% {
- -webkit-transform-origin: left bottom;
- transform-origin: left bottom;
- -webkit-transform: rotate3d(0, 0, 1, 45deg);
- transform: rotate3d(0, 0, 1, 45deg);
- opacity: 0;
- }
-
- 100% {
- -webkit-transform-origin: left bottom;
- transform-origin: left bottom;
- -webkit-transform: none;
- transform: none;
- opacity: 1;
- }
-}
-
-.rotateInUpLeft {
- -webkit-animation-name: rotateInUpLeft;
- animation-name: rotateInUpLeft;
-}
-
-@-webkit-keyframes rotateInUpRight {
- 0% {
- -webkit-transform-origin: right bottom;
- transform-origin: right bottom;
- -webkit-transform: rotate3d(0, 0, 1, -90deg);
- transform: rotate3d(0, 0, 1, -90deg);
- opacity: 0;
- }
-
- 100% {
- -webkit-transform-origin: right bottom;
- transform-origin: right bottom;
- -webkit-transform: none;
- transform: none;
- opacity: 1;
- }
-}
-
-@keyframes rotateInUpRight {
- 0% {
- -webkit-transform-origin: right bottom;
- transform-origin: right bottom;
- -webkit-transform: rotate3d(0, 0, 1, -90deg);
- transform: rotate3d(0, 0, 1, -90deg);
- opacity: 0;
- }
-
- 100% {
- -webkit-transform-origin: right bottom;
- transform-origin: right bottom;
- -webkit-transform: none;
- transform: none;
- opacity: 1;
- }
-}
-
-.rotateInUpRight {
- -webkit-animation-name: rotateInUpRight;
- animation-name: rotateInUpRight;
-}
-
-@-webkit-keyframes rotateOut {
- 0% {
- -webkit-transform-origin: center;
- transform-origin: center;
- opacity: 1;
- }
-
- 100% {
- -webkit-transform-origin: center;
- transform-origin: center;
- -webkit-transform: rotate3d(0, 0, 1, 200deg);
- transform: rotate3d(0, 0, 1, 200deg);
- opacity: 0;
- }
-}
-
-@keyframes rotateOut {
- 0% {
- -webkit-transform-origin: center;
- transform-origin: center;
- opacity: 1;
- }
-
- 100% {
- -webkit-transform-origin: center;
- transform-origin: center;
- -webkit-transform: rotate3d(0, 0, 1, 200deg);
- transform: rotate3d(0, 0, 1, 200deg);
- opacity: 0;
- }
-}
-
-.rotateOut {
- -webkit-animation-name: rotateOut;
- animation-name: rotateOut;
-}
-
-@-webkit-keyframes rotateOutDownLeft {
- 0% {
- -webkit-transform-origin: left bottom;
- transform-origin: left bottom;
- opacity: 1;
- }
-
- 100% {
- -webkit-transform-origin: left bottom;
- transform-origin: left bottom;
- -webkit-transform: rotate3d(0, 0, 1, 45deg);
- transform: rotate3d(0, 0, 1, 45deg);
- opacity: 0;
- }
-}
-
-@keyframes rotateOutDownLeft {
- 0% {
- -webkit-transform-origin: left bottom;
- transform-origin: left bottom;
- opacity: 1;
- }
-
- 100% {
- -webkit-transform-origin: left bottom;
- transform-origin: left bottom;
- -webkit-transform: rotate3d(0, 0, 1, 45deg);
- transform: rotate3d(0, 0, 1, 45deg);
- opacity: 0;
- }
-}
-
-.rotateOutDownLeft {
- -webkit-animation-name: rotateOutDownLeft;
- animation-name: rotateOutDownLeft;
-}
-
-@-webkit-keyframes rotateOutDownRight {
- 0% {
- -webkit-transform-origin: right bottom;
- transform-origin: right bottom;
- opacity: 1;
- }
-
- 100% {
- -webkit-transform-origin: right bottom;
- transform-origin: right bottom;
- -webkit-transform: rotate3d(0, 0, 1, -45deg);
- transform: rotate3d(0, 0, 1, -45deg);
- opacity: 0;
- }
-}
-
-@keyframes rotateOutDownRight {
- 0% {
- -webkit-transform-origin: right bottom;
- transform-origin: right bottom;
- opacity: 1;
- }
-
- 100% {
- -webkit-transform-origin: right bottom;
- transform-origin: right bottom;
- -webkit-transform: rotate3d(0, 0, 1, -45deg);
- transform: rotate3d(0, 0, 1, -45deg);
- opacity: 0;
- }
-}
-
-.rotateOutDownRight {
- -webkit-animation-name: rotateOutDownRight;
- animation-name: rotateOutDownRight;
-}
-
-@-webkit-keyframes rotateOutUpLeft {
- 0% {
- -webkit-transform-origin: left bottom;
- transform-origin: left bottom;
- opacity: 1;
- }
-
- 100% {
- -webkit-transform-origin: left bottom;
- transform-origin: left bottom;
- -webkit-transform: rotate3d(0, 0, 1, -45deg);
- transform: rotate3d(0, 0, 1, -45deg);
- opacity: 0;
- }
-}
-
-@keyframes rotateOutUpLeft {
- 0% {
- -webkit-transform-origin: left bottom;
- transform-origin: left bottom;
- opacity: 1;
- }
-
- 100% {
- -webkit-transform-origin: left bottom;
- transform-origin: left bottom;
- -webkit-transform: rotate3d(0, 0, 1, -45deg);
- transform: rotate3d(0, 0, 1, -45deg);
- opacity: 0;
- }
-}
-
-.rotateOutUpLeft {
- -webkit-animation-name: rotateOutUpLeft;
- animation-name: rotateOutUpLeft;
-}
-
-@-webkit-keyframes rotateOutUpRight {
- 0% {
- -webkit-transform-origin: right bottom;
- transform-origin: right bottom;
- opacity: 1;
- }
-
- 100% {
- -webkit-transform-origin: right bottom;
- transform-origin: right bottom;
- -webkit-transform: rotate3d(0, 0, 1, 90deg);
- transform: rotate3d(0, 0, 1, 90deg);
- opacity: 0;
- }
-}
-
-@keyframes rotateOutUpRight {
- 0% {
- -webkit-transform-origin: right bottom;
- transform-origin: right bottom;
- opacity: 1;
- }
-
- 100% {
- -webkit-transform-origin: right bottom;
- transform-origin: right bottom;
- -webkit-transform: rotate3d(0, 0, 1, 90deg);
- transform: rotate3d(0, 0, 1, 90deg);
- opacity: 0;
- }
-}
-
-.rotateOutUpRight {
- -webkit-animation-name: rotateOutUpRight;
- animation-name: rotateOutUpRight;
-}
-
-@-webkit-keyframes hinge {
- 0% {
- -webkit-transform-origin: top left;
- transform-origin: top left;
- -webkit-animation-timing-function: ease-in-out;
- animation-timing-function: ease-in-out;
- }
-
- 20%, 60% {
- -webkit-transform: rotate3d(0, 0, 1, 80deg);
- transform: rotate3d(0, 0, 1, 80deg);
- -webkit-transform-origin: top left;
- transform-origin: top left;
- -webkit-animation-timing-function: ease-in-out;
- animation-timing-function: ease-in-out;
- }
-
- 40%, 80% {
- -webkit-transform: rotate3d(0, 0, 1, 60deg);
- transform: rotate3d(0, 0, 1, 60deg);
- -webkit-transform-origin: top left;
- transform-origin: top left;
- -webkit-animation-timing-function: ease-in-out;
- animation-timing-function: ease-in-out;
- opacity: 1;
- }
-
- 100% {
- -webkit-transform: translate3d(0, 700px, 0);
- transform: translate3d(0, 700px, 0);
- opacity: 0;
- }
-}
-
-@keyframes hinge {
- 0% {
- -webkit-transform-origin: top left;
- transform-origin: top left;
- -webkit-animation-timing-function: ease-in-out;
- animation-timing-function: ease-in-out;
- }
-
- 20%, 60% {
- -webkit-transform: rotate3d(0, 0, 1, 80deg);
- transform: rotate3d(0, 0, 1, 80deg);
- -webkit-transform-origin: top left;
- transform-origin: top left;
- -webkit-animation-timing-function: ease-in-out;
- animation-timing-function: ease-in-out;
- }
-
- 40%, 80% {
- -webkit-transform: rotate3d(0, 0, 1, 60deg);
- transform: rotate3d(0, 0, 1, 60deg);
- -webkit-transform-origin: top left;
- transform-origin: top left;
- -webkit-animation-timing-function: ease-in-out;
- animation-timing-function: ease-in-out;
- opacity: 1;
- }
-
- 100% {
- -webkit-transform: translate3d(0, 700px, 0);
- transform: translate3d(0, 700px, 0);
- opacity: 0;
- }
-}
-
-.hinge {
- -webkit-animation-name: hinge;
- animation-name: hinge;
-}
-
-/* originally authored by Nick Pettit - https://github.com/nickpettit/glide */
-
-@-webkit-keyframes rollIn {
- 0% {
- opacity: 0;
- -webkit-transform: translate3d(-100%, 0, 0) rotate3d(0, 0, 1, -120deg);
- transform: translate3d(-100%, 0, 0) rotate3d(0, 0, 1, -120deg);
- }
-
- 100% {
- opacity: 1;
- -webkit-transform: none;
- transform: none;
- }
-}
-
-@keyframes rollIn {
- 0% {
- opacity: 0;
- -webkit-transform: translate3d(-100%, 0, 0) rotate3d(0, 0, 1, -120deg);
- transform: translate3d(-100%, 0, 0) rotate3d(0, 0, 1, -120deg);
- }
-
- 100% {
- opacity: 1;
- -webkit-transform: none;
- transform: none;
- }
-}
-
-.rollIn {
- -webkit-animation-name: rollIn;
- animation-name: rollIn;
-}
-
-/* originally authored by Nick Pettit - https://github.com/nickpettit/glide */
-
-@-webkit-keyframes rollOut {
- 0% {
- opacity: 1;
- }
-
- 100% {
- opacity: 0;
- -webkit-transform: translate3d(100%, 0, 0) rotate3d(0, 0, 1, 120deg);
- transform: translate3d(100%, 0, 0) rotate3d(0, 0, 1, 120deg);
- }
-}
-
-@keyframes rollOut {
- 0% {
- opacity: 1;
- }
-
- 100% {
- opacity: 0;
- -webkit-transform: translate3d(100%, 0, 0) rotate3d(0, 0, 1, 120deg);
- transform: translate3d(100%, 0, 0) rotate3d(0, 0, 1, 120deg);
- }
-}
-
-.rollOut {
- -webkit-animation-name: rollOut;
- animation-name: rollOut;
-}
-
-@-webkit-keyframes zoomIn {
- 0% {
- opacity: 0;
- -webkit-transform: scale3d(.3, .3, .3);
- transform: scale3d(.3, .3, .3);
- }
-
- 50% {
- opacity: 1;
- }
-}
-
-@keyframes zoomIn {
- 0% {
- opacity: 0;
- -webkit-transform: scale3d(.3, .3, .3);
- transform: scale3d(.3, .3, .3);
- }
-
- 50% {
- opacity: 1;
- }
-}
-
-.zoomIn {
- -webkit-animation-name: zoomIn;
- animation-name: zoomIn;
-}
-
-@-webkit-keyframes zoomInDown {
- 0% {
- opacity: 0;
- -webkit-transform: scale3d(.1, .1, .1) translate3d(0, -1000px, 0);
- transform: scale3d(.1, .1, .1) translate3d(0, -1000px, 0);
- -webkit-animation-timing-function: cubic-bezier(0.550, 0.055, 0.675, 0.190);
- animation-timing-function: cubic-bezier(0.550, 0.055, 0.675, 0.190);
- }
-
- 60% {
- opacity: 1;
- -webkit-transform: scale3d(.475, .475, .475) translate3d(0, 60px, 0);
- transform: scale3d(.475, .475, .475) translate3d(0, 60px, 0);
- -webkit-animation-timing-function: cubic-bezier(0.175, 0.885, 0.320, 1);
- animation-timing-function: cubic-bezier(0.175, 0.885, 0.320, 1);
- }
-}
-
-@keyframes zoomInDown {
- 0% {
- opacity: 0;
- -webkit-transform: scale3d(.1, .1, .1) translate3d(0, -1000px, 0);
- transform: scale3d(.1, .1, .1) translate3d(0, -1000px, 0);
- -webkit-animation-timing-function: cubic-bezier(0.550, 0.055, 0.675, 0.190);
- animation-timing-function: cubic-bezier(0.550, 0.055, 0.675, 0.190);
- }
-
- 60% {
- opacity: 1;
- -webkit-transform: scale3d(.475, .475, .475) translate3d(0, 60px, 0);
- transform: scale3d(.475, .475, .475) translate3d(0, 60px, 0);
- -webkit-animation-timing-function: cubic-bezier(0.175, 0.885, 0.320, 1);
- animation-timing-function: cubic-bezier(0.175, 0.885, 0.320, 1);
- }
-}
-
-.zoomInDown {
- -webkit-animation-name: zoomInDown;
- animation-name: zoomInDown;
-}
-
-@-webkit-keyframes zoomInLeft {
- 0% {
- opacity: 0;
- -webkit-transform: scale3d(.1, .1, .1) translate3d(-1000px, 0, 0);
- transform: scale3d(.1, .1, .1) translate3d(-1000px, 0, 0);
- -webkit-animation-timing-function: cubic-bezier(0.550, 0.055, 0.675, 0.190);
- animation-timing-function: cubic-bezier(0.550, 0.055, 0.675, 0.190);
- }
-
- 60% {
- opacity: 1;
- -webkit-transform: scale3d(.475, .475, .475) translate3d(10px, 0, 0);
- transform: scale3d(.475, .475, .475) translate3d(10px, 0, 0);
- -webkit-animation-timing-function: cubic-bezier(0.175, 0.885, 0.320, 1);
- animation-timing-function: cubic-bezier(0.175, 0.885, 0.320, 1);
- }
-}
-
-@keyframes zoomInLeft {
- 0% {
- opacity: 0;
- -webkit-transform: scale3d(.1, .1, .1) translate3d(-1000px, 0, 0);
- transform: scale3d(.1, .1, .1) translate3d(-1000px, 0, 0);
- -webkit-animation-timing-function: cubic-bezier(0.550, 0.055, 0.675, 0.190);
- animation-timing-function: cubic-bezier(0.550, 0.055, 0.675, 0.190);
- }
-
- 60% {
- opacity: 1;
- -webkit-transform: scale3d(.475, .475, .475) translate3d(10px, 0, 0);
- transform: scale3d(.475, .475, .475) translate3d(10px, 0, 0);
- -webkit-animation-timing-function: cubic-bezier(0.175, 0.885, 0.320, 1);
- animation-timing-function: cubic-bezier(0.175, 0.885, 0.320, 1);
- }
-}
-
-.zoomInLeft {
- -webkit-animation-name: zoomInLeft;
- animation-name: zoomInLeft;
-}
-
-@-webkit-keyframes zoomInRight {
- 0% {
- opacity: 0;
- -webkit-transform: scale3d(.1, .1, .1) translate3d(1000px, 0, 0);
- transform: scale3d(.1, .1, .1) translate3d(1000px, 0, 0);
- -webkit-animation-timing-function: cubic-bezier(0.550, 0.055, 0.675, 0.190);
- animation-timing-function: cubic-bezier(0.550, 0.055, 0.675, 0.190);
- }
-
- 60% {
- opacity: 1;
- -webkit-transform: scale3d(.475, .475, .475) translate3d(-10px, 0, 0);
- transform: scale3d(.475, .475, .475) translate3d(-10px, 0, 0);
- -webkit-animation-timing-function: cubic-bezier(0.175, 0.885, 0.320, 1);
- animation-timing-function: cubic-bezier(0.175, 0.885, 0.320, 1);
- }
-}
-
-@keyframes zoomInRight {
- 0% {
- opacity: 0;
- -webkit-transform: scale3d(.1, .1, .1) translate3d(1000px, 0, 0);
- transform: scale3d(.1, .1, .1) translate3d(1000px, 0, 0);
- -webkit-animation-timing-function: cubic-bezier(0.550, 0.055, 0.675, 0.190);
- animation-timing-function: cubic-bezier(0.550, 0.055, 0.675, 0.190);
- }
-
- 60% {
- opacity: 1;
- -webkit-transform: scale3d(.475, .475, .475) translate3d(-10px, 0, 0);
- transform: scale3d(.475, .475, .475) translate3d(-10px, 0, 0);
- -webkit-animation-timing-function: cubic-bezier(0.175, 0.885, 0.320, 1);
- animation-timing-function: cubic-bezier(0.175, 0.885, 0.320, 1);
- }
-}
-
-.zoomInRight {
- -webkit-animation-name: zoomInRight;
- animation-name: zoomInRight;
-}
-
-@-webkit-keyframes zoomInUp {
- 0% {
- opacity: 0;
- -webkit-transform: scale3d(.1, .1, .1) translate3d(0, 1000px, 0);
- transform: scale3d(.1, .1, .1) translate3d(0, 1000px, 0);
- -webkit-animation-timing-function: cubic-bezier(0.550, 0.055, 0.675, 0.190);
- animation-timing-function: cubic-bezier(0.550, 0.055, 0.675, 0.190);
- }
-
- 60% {
- opacity: 1;
- -webkit-transform: scale3d(.475, .475, .475) translate3d(0, -60px, 0);
- transform: scale3d(.475, .475, .475) translate3d(0, -60px, 0);
- -webkit-animation-timing-function: cubic-bezier(0.175, 0.885, 0.320, 1);
- animation-timing-function: cubic-bezier(0.175, 0.885, 0.320, 1);
- }
-}
-
-@keyframes zoomInUp {
- 0% {
- opacity: 0;
- -webkit-transform: scale3d(.1, .1, .1) translate3d(0, 1000px, 0);
- transform: scale3d(.1, .1, .1) translate3d(0, 1000px, 0);
- -webkit-animation-timing-function: cubic-bezier(0.550, 0.055, 0.675, 0.190);
- animation-timing-function: cubic-bezier(0.550, 0.055, 0.675, 0.190);
- }
-
- 60% {
- opacity: 1;
- -webkit-transform: scale3d(.475, .475, .475) translate3d(0, -60px, 0);
- transform: scale3d(.475, .475, .475) translate3d(0, -60px, 0);
- -webkit-animation-timing-function: cubic-bezier(0.175, 0.885, 0.320, 1);
- animation-timing-function: cubic-bezier(0.175, 0.885, 0.320, 1);
- }
-}
-
-.zoomInUp {
- -webkit-animation-name: zoomInUp;
- animation-name: zoomInUp;
-}
-
-@-webkit-keyframes zoomOut {
- 0% {
- opacity: 1;
- }
-
- 50% {
- opacity: 0;
- -webkit-transform: scale3d(.3, .3, .3);
- transform: scale3d(.3, .3, .3);
- }
-
- 100% {
- opacity: 0;
- }
-}
-
-@keyframes zoomOut {
- 0% {
- opacity: 1;
- }
-
- 50% {
- opacity: 0;
- -webkit-transform: scale3d(.3, .3, .3);
- transform: scale3d(.3, .3, .3);
- }
-
- 100% {
- opacity: 0;
- }
-}
-
-.zoomOut {
- -webkit-animation-name: zoomOut;
- animation-name: zoomOut;
-}
-
-@-webkit-keyframes zoomOutDown {
- 40% {
- opacity: 1;
- -webkit-transform: scale3d(.475, .475, .475) translate3d(0, -60px, 0);
- transform: scale3d(.475, .475, .475) translate3d(0, -60px, 0);
- -webkit-animation-timing-function: cubic-bezier(0.550, 0.055, 0.675, 0.190);
- animation-timing-function: cubic-bezier(0.550, 0.055, 0.675, 0.190);
- }
-
- 100% {
- opacity: 0;
- -webkit-transform: scale3d(.1, .1, .1) translate3d(0, 2000px, 0);
- transform: scale3d(.1, .1, .1) translate3d(0, 2000px, 0);
- -webkit-transform-origin: center bottom;
- transform-origin: center bottom;
- -webkit-animation-timing-function: cubic-bezier(0.175, 0.885, 0.320, 1);
- animation-timing-function: cubic-bezier(0.175, 0.885, 0.320, 1);
- }
-}
-
-@keyframes zoomOutDown {
- 40% {
- opacity: 1;
- -webkit-transform: scale3d(.475, .475, .475) translate3d(0, -60px, 0);
- transform: scale3d(.475, .475, .475) translate3d(0, -60px, 0);
- -webkit-animation-timing-function: cubic-bezier(0.550, 0.055, 0.675, 0.190);
- animation-timing-function: cubic-bezier(0.550, 0.055, 0.675, 0.190);
- }
-
- 100% {
- opacity: 0;
- -webkit-transform: scale3d(.1, .1, .1) translate3d(0, 2000px, 0);
- transform: scale3d(.1, .1, .1) translate3d(0, 2000px, 0);
- -webkit-transform-origin: center bottom;
- transform-origin: center bottom;
- -webkit-animation-timing-function: cubic-bezier(0.175, 0.885, 0.320, 1);
- animation-timing-function: cubic-bezier(0.175, 0.885, 0.320, 1);
- }
-}
-
-.zoomOutDown {
- -webkit-animation-name: zoomOutDown;
- animation-name: zoomOutDown;
-}
-
-@-webkit-keyframes zoomOutLeft {
- 40% {
- opacity: 1;
- -webkit-transform: scale3d(.475, .475, .475) translate3d(42px, 0, 0);
- transform: scale3d(.475, .475, .475) translate3d(42px, 0, 0);
- }
-
- 100% {
- opacity: 0;
- -webkit-transform: scale(.1) translate3d(-2000px, 0, 0);
- transform: scale(.1) translate3d(-2000px, 0, 0);
- -webkit-transform-origin: left center;
- transform-origin: left center;
- }
-}
-
-@keyframes zoomOutLeft {
- 40% {
- opacity: 1;
- -webkit-transform: scale3d(.475, .475, .475) translate3d(42px, 0, 0);
- transform: scale3d(.475, .475, .475) translate3d(42px, 0, 0);
- }
-
- 100% {
- opacity: 0;
- -webkit-transform: scale(.1) translate3d(-2000px, 0, 0);
- transform: scale(.1) translate3d(-2000px, 0, 0);
- -webkit-transform-origin: left center;
- transform-origin: left center;
- }
-}
-
-.zoomOutLeft {
- -webkit-animation-name: zoomOutLeft;
- animation-name: zoomOutLeft;
-}
-
-@-webkit-keyframes zoomOutRight {
- 40% {
- opacity: 1;
- -webkit-transform: scale3d(.475, .475, .475) translate3d(-42px, 0, 0);
- transform: scale3d(.475, .475, .475) translate3d(-42px, 0, 0);
- }
-
- 100% {
- opacity: 0;
- -webkit-transform: scale(.1) translate3d(2000px, 0, 0);
- transform: scale(.1) translate3d(2000px, 0, 0);
- -webkit-transform-origin: right center;
- transform-origin: right center;
- }
-}
-
-@keyframes zoomOutRight {
- 40% {
- opacity: 1;
- -webkit-transform: scale3d(.475, .475, .475) translate3d(-42px, 0, 0);
- transform: scale3d(.475, .475, .475) translate3d(-42px, 0, 0);
- }
-
- 100% {
- opacity: 0;
- -webkit-transform: scale(.1) translate3d(2000px, 0, 0);
- transform: scale(.1) translate3d(2000px, 0, 0);
- -webkit-transform-origin: right center;
- transform-origin: right center;
- }
-}
-
-.zoomOutRight {
- -webkit-animation-name: zoomOutRight;
- animation-name: zoomOutRight;
-}
-
-@-webkit-keyframes zoomOutUp {
- 40% {
- opacity: 1;
- -webkit-transform: scale3d(.475, .475, .475) translate3d(0, 60px, 0);
- transform: scale3d(.475, .475, .475) translate3d(0, 60px, 0);
- -webkit-animation-timing-function: cubic-bezier(0.550, 0.055, 0.675, 0.190);
- animation-timing-function: cubic-bezier(0.550, 0.055, 0.675, 0.190);
- }
-
- 100% {
- opacity: 0;
- -webkit-transform: scale3d(.1, .1, .1) translate3d(0, -2000px, 0);
- transform: scale3d(.1, .1, .1) translate3d(0, -2000px, 0);
- -webkit-transform-origin: center bottom;
- transform-origin: center bottom;
- -webkit-animation-timing-function: cubic-bezier(0.175, 0.885, 0.320, 1);
- animation-timing-function: cubic-bezier(0.175, 0.885, 0.320, 1);
- }
-}
-
-@keyframes zoomOutUp {
- 40% {
- opacity: 1;
- -webkit-transform: scale3d(.475, .475, .475) translate3d(0, 60px, 0);
- transform: scale3d(.475, .475, .475) translate3d(0, 60px, 0);
- -webkit-animation-timing-function: cubic-bezier(0.550, 0.055, 0.675, 0.190);
- animation-timing-function: cubic-bezier(0.550, 0.055, 0.675, 0.190);
- }
-
- 100% {
- opacity: 0;
- -webkit-transform: scale3d(.1, .1, .1) translate3d(0, -2000px, 0);
- transform: scale3d(.1, .1, .1) translate3d(0, -2000px, 0);
- -webkit-transform-origin: center bottom;
- transform-origin: center bottom;
- -webkit-animation-timing-function: cubic-bezier(0.175, 0.885, 0.320, 1);
- animation-timing-function: cubic-bezier(0.175, 0.885, 0.320, 1);
- }
-}
-
-.zoomOutUp {
- -webkit-animation-name: zoomOutUp;
- animation-name: zoomOutUp;
-}
-
-@-webkit-keyframes slideInDown {
- 0% {
- -webkit-transform: translateY(-100%);
- transform: translateY(-100%);
- visibility: visible;
- }
-
- 100% {
- -webkit-transform: translateY(0);
- transform: translateY(0);
- }
-}
-
-@keyframes slideInDown {
- 0% {
- -webkit-transform: translateY(-100%);
- transform: translateY(-100%);
- visibility: visible;
- }
-
- 100% {
- -webkit-transform: translateY(0);
- transform: translateY(0);
- }
-}
-
-.slideInDown {
- -webkit-animation-name: slideInDown;
- animation-name: slideInDown;
-}
-
-@-webkit-keyframes slideInLeft {
- 0% {
- -webkit-transform: translateX(-100%);
- transform: translateX(-100%);
- visibility: visible;
- }
-
- 100% {
- -webkit-transform: translateX(0);
- transform: translateX(0);
- }
-}
-
-@keyframes slideInLeft {
- 0% {
- -webkit-transform: translateX(-100%);
- transform: translateX(-100%);
- visibility: visible;
- }
-
- 100% {
- -webkit-transform: translateX(0);
- transform: translateX(0);
- }
-}
-
-.slideInLeft {
- -webkit-animation-name: slideInLeft;
- animation-name: slideInLeft;
-}
-
-@-webkit-keyframes slideInRight {
- 0% {
- -webkit-transform: translateX(100%);
- transform: translateX(100%);
- visibility: visible;
- }
-
- 100% {
- -webkit-transform: translateX(0);
- transform: translateX(0);
- }
-}
-
-@keyframes slideInRight {
- 0% {
- -webkit-transform: translateX(100%);
- transform: translateX(100%);
- visibility: visible;
- }
-
- 100% {
- -webkit-transform: translateX(0);
- transform: translateX(0);
- }
-}
-
-.slideInRight {
- -webkit-animation-name: slideInRight;
- animation-name: slideInRight;
-}
-
-@-webkit-keyframes slideInUp {
- 0% {
- -webkit-transform: translateY(100%);
- transform: translateY(100%);
- visibility: visible;
- }
-
- 100% {
- -webkit-transform: translateY(0);
- transform: translateY(0);
- }
-}
-
-@keyframes slideInUp {
- 0% {
- -webkit-transform: translateY(100%);
- transform: translateY(100%);
- visibility: visible;
- }
-
- 100% {
- -webkit-transform: translateY(0);
- transform: translateY(0);
- }
-}
-
-.slideInUp {
- -webkit-animation-name: slideInUp;
- animation-name: slideInUp;
-}
-
-@-webkit-keyframes slideOutDown {
- 0% {
- -webkit-transform: translateY(0);
- transform: translateY(0);
- }
-
- 100% {
- visibility: hidden;
- -webkit-transform: translateY(100%);
- transform: translateY(100%);
- }
-}
-
-@keyframes slideOutDown {
- 0% {
- -webkit-transform: translateY(0);
- transform: translateY(0);
- }
-
- 100% {
- visibility: hidden;
- -webkit-transform: translateY(100%);
- transform: translateY(100%);
- }
-}
-
-.slideOutDown {
- -webkit-animation-name: slideOutDown;
- animation-name: slideOutDown;
-}
-
-@-webkit-keyframes slideOutLeft {
- 0% {
- -webkit-transform: translateX(0);
- transform: translateX(0);
- }
-
- 100% {
- visibility: hidden;
- -webkit-transform: translateX(-100%);
- transform: translateX(-100%);
- }
-}
-
-@keyframes slideOutLeft {
- 0% {
- -webkit-transform: translateX(0);
- transform: translateX(0);
- }
-
- 100% {
- visibility: hidden;
- -webkit-transform: translateX(-100%);
- transform: translateX(-100%);
- }
-}
-
-.slideOutLeft {
- -webkit-animation-name: slideOutLeft;
- animation-name: slideOutLeft;
-}
-
-@-webkit-keyframes slideOutRight {
- 0% {
- -webkit-transform: translateX(0);
- transform: translateX(0);
- }
-
- 100% {
- visibility: hidden;
- -webkit-transform: translateX(100%);
- transform: translateX(100%);
- }
-}
-
-@keyframes slideOutRight {
- 0% {
- -webkit-transform: translateX(0);
- transform: translateX(0);
- }
-
- 100% {
- visibility: hidden;
- -webkit-transform: translateX(100%);
- transform: translateX(100%);
- }
-}
-
-.slideOutRight {
- -webkit-animation-name: slideOutRight;
- animation-name: slideOutRight;
-}
-
-@-webkit-keyframes slideOutUp {
- 0% {
- -webkit-transform: translateY(0);
- transform: translateY(0);
- }
-
- 100% {
- visibility: hidden;
- -webkit-transform: translateY(-100%);
- transform: translateY(-100%);
- }
-}
-
-@keyframes slideOutUp {
- 0% {
- -webkit-transform: translateY(0);
- transform: translateY(0);
- }
-
- 100% {
- visibility: hidden;
- -webkit-transform: translateY(-100%);
- transform: translateY(-100%);
- }
-}
-
-.slideOutUp {
- -webkit-animation-name: slideOutUp;
- animation-name: slideOutUp;
-}
diff --git a/assets/stylesheets/bootstrap/bootstrap_alert.css b/assets/stylesheets/bootstrap/bootstrap_alert.css
deleted file mode 100644
index 8739f583de4..00000000000
--- a/assets/stylesheets/bootstrap/bootstrap_alert.css
+++ /dev/null
@@ -1,96 +0,0 @@
-/*!
- * Bootstrap v2.3.2
- *
- * Copyright 2013 Twitter, Inc
- * Licensed under the Apache License v2.0
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Designed and built with all the love in the world @twitter by @mdo and @fat.
- */
-.clearfix {
- *zoom: 1;
-}
-.clearfix:before,
-.clearfix:after {
- display: table;
- content: "";
- line-height: 0;
-}
-.clearfix:after {
- clear: both;
-}
-.hide-text {
- font: 0/0 a;
- color: transparent;
- text-shadow: none;
- background-color: transparent;
- border: 0;
-}
-.input-block-level {
- display: block;
- width: 100%;
- min-height: 30px;
- -webkit-box-sizing: border-box;
- -moz-box-sizing: border-box;
- box-sizing: border-box;
-}
-.alert {
- padding: 8px 35px 8px 14px;
- margin-bottom: 20px;
- text-shadow: 0 1px 0 rgba(255, 255, 255, 0.5);
- background-color: #fcf8e3;
- border: 1px solid #fbeed5;
- -webkit-border-radius: 4px;
- -moz-border-radius: 4px;
- border-radius: 4px;
-}
-.alert,
-.alert h4 {
- color: #c09853;
-}
-.alert h4 {
- margin: 0;
-}
-.alert .close {
- position: relative;
- top: -5px;
- right: -21px;
- line-height: 23px;
-}
-.alert-success {
- background-color: #dff0d8;
- border-color: #d6e9c6;
- color: #468847;
-}
-.alert-success h4 {
- color: #468847;
-}
-.alert-danger,
-.alert-error {
- background-color: #f2dede;
- border-color: #eed3d7;
- color: #b94a48;
-}
-.alert-danger h4,
-.alert-error h4 {
- color: #b94a48;
-}
-.alert-info {
- background-color: #d9edf7;
- border-color: #bce8f1;
- color: #3a87ad;
-}
-.alert-info h4 {
- color: #3a87ad;
-}
-.alert-block {
- padding-top: 14px;
- padding-bottom: 14px;
-}
-.alert-block > p,
-.alert-block > ul {
- margin-bottom: 0;
-}
-.alert-block p + p {
- margin-top: 5px;
-}
diff --git a/assets/stylesheets/bootstrap/bootstrap_animations.css b/assets/stylesheets/bootstrap/bootstrap_animations.css
deleted file mode 100644
index 29d574aae50..00000000000
--- a/assets/stylesheets/bootstrap/bootstrap_animations.css
+++ /dev/null
@@ -1,58 +0,0 @@
-/*!
- * Bootstrap v2.3.2
- *
- * Copyright 2013 Twitter, Inc
- * Licensed under the Apache License v2.0
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Designed and built with all the love in the world @twitter by @mdo and @fat.
- */
-.clearfix {
- *zoom: 1;
-}
-.clearfix:before,
-.clearfix:after {
- display: table;
- content: "";
- line-height: 0;
-}
-.clearfix:after {
- clear: both;
-}
-.hide-text {
- font: 0/0 a;
- color: transparent;
- text-shadow: none;
- background-color: transparent;
- border: 0;
-}
-.input-block-level {
- display: block;
- width: 100%;
- min-height: 30px;
- -webkit-box-sizing: border-box;
- -moz-box-sizing: border-box;
- box-sizing: border-box;
-}
-.fade {
- opacity: 0;
- -webkit-transition: opacity 0.15s linear;
- -moz-transition: opacity 0.15s linear;
- -o-transition: opacity 0.15s linear;
- transition: opacity 0.15s linear;
-}
-.fade.in {
- opacity: 1;
-}
-.collapse {
- position: relative;
- height: 0;
- overflow: hidden;
- -webkit-transition: height 0.35s ease;
- -moz-transition: height 0.35s ease;
- -o-transition: height 0.35s ease;
- transition: height 0.35s ease;
-}
-.collapse.in {
- height: auto;
-}
diff --git a/assets/stylesheets/bootstrap/bootstrap_close.css b/assets/stylesheets/bootstrap/bootstrap_close.css
deleted file mode 100644
index 0d0d85eb8c1..00000000000
--- a/assets/stylesheets/bootstrap/bootstrap_close.css
+++ /dev/null
@@ -1,61 +0,0 @@
-/*!
- * Bootstrap v2.3.2
- *
- * Copyright 2013 Twitter, Inc
- * Licensed under the Apache License v2.0
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Designed and built with all the love in the world @twitter by @mdo and @fat.
- */
-.clearfix {
- *zoom: 1;
-}
-.clearfix:before,
-.clearfix:after {
- display: table;
- content: "";
- line-height: 0;
-}
-.clearfix:after {
- clear: both;
-}
-.hide-text {
- font: 0/0 a;
- color: transparent;
- text-shadow: none;
- background-color: transparent;
- border: 0;
-}
-.input-block-level {
- display: block;
- width: 100%;
- min-height: 30px;
- -webkit-box-sizing: border-box;
- -moz-box-sizing: border-box;
- box-sizing: border-box;
-}
-.close {
- float: right;
- font-size: 14px;
- font-weight: bold;
- line-height: 20px;
- color: #000000;
- text-shadow: 0 1px 0 #ffffff;
- opacity: 0.2;
- filter: alpha(opacity=20);
-}
-.close:hover,
-.close:focus {
- color: #000000;
- text-decoration: none;
- cursor: pointer;
- opacity: 0.4;
- filter: alpha(opacity=40);
-}
-button.close {
- padding: 0;
- cursor: pointer;
- background: transparent;
- border: 0;
- -webkit-appearance: none;
-}
diff --git a/assets/stylesheets/bootstrap/bootstrap_custom.css b/assets/stylesheets/bootstrap/bootstrap_custom.css
deleted file mode 100644
index 292f2fd5fad..00000000000
--- a/assets/stylesheets/bootstrap/bootstrap_custom.css
+++ /dev/null
@@ -1,1484 +0,0 @@
-/*!
- * jQuery UI Bootstrap (0.22)
- * http://addyosmani.github.com/jquery-ui-bootstrap
- *
- * Copyright 2012, Addy Osmani
- * Dual licensed under the MIT or GPL Version 2 licenses.
- *
- * Portions copyright jQuery UI & Twitter Bootstrap
- */
-
-
-/* Layout helpers
-----------------------------------*/
-.ui-helper-hidden {
- display: none;
-}
-.ui-helper-hidden-accessible {
- border: 0;
- clip: rect(0 0 0 0);
- height: 1px;
- margin: -1px;
- overflow: hidden;
- padding: 0;
- position: absolute;
- width: 1px;
-}
-
-.ui-helper-reset { margin: 0; padding: 0; border: 0; outline: 0; line-height: 1.3; text-decoration: none; font-size: 100%; list-style: none; }
-.ui-helper-clearfix:after { content: "."; display: block; height: 0; clear: both; visibility: hidden; }
-.ui-helper-clearfix { display: inline-block; }
-/* required comment for clearfix to work in Opera \*/
-* html .ui-helper-clearfix { height:1%; }
-.ui-helper-clearfix { display:block; }
-/* end clearfix */
-.ui-helper-zfix { width: 100%; height: 100%; top: 0; left: 0; position: absolute; opacity: 0; filter:Alpha(Opacity=0); }
-
-
-
-/* Interaction Cues
-----------------------------------*/
-.ui-state-disabled { cursor: default !important; }
-
-
-/* Icons
-----------------------------------*/
-
-/* states and images */
-.ui-icon { display: block; text-indent: -99999px; overflow: hidden; background-repeat: no-repeat; }
-
-
-/* Misc visuals
-----------------------------------*/
-
-/* Overlays */
-.ui-widget-overlay { position: absolute; top: 0; left: 0; width: 100%; height: 100%; }
-
-
-/*
- * jQuery UI CSS Framework 1.8.16
- *
- * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about)
- * Dual licensed under the MIT or GPL Version 2 licenses.
- * http://jquery.org/license
- *
- * http://docs.jquery.com/UI/Theming/API
- *
- * To view and modify this theme, visit http://jqueryui.com/themeroller/?ctl=themeroller
- */
-
-
-/* Component containers
-----------------------------------*/
-.ui-widget { font-family: "Helvetica Neue", Helvetica, Arial, sans-serif; font-size:13px; }
-.ui-widget .ui-widget { font-size: 1em; }
-.ui-widget input, .ui-widget select, .ui-widget textarea, .ui-widget button { font-family: "Helvetica Neue", Helvetica, Arial, sans-serif; font-size: 1em; }
-.ui-widget-content { border: 1px solid #aaaaaa; background: #ffffff url(images/ui-bg_glass_75_ffffff_1x400.png) 50% 50% repeat-x; color: #404040; }
-.ui-widget-content a { color: #404040; }
-.ui-widget-header {
- font-weight:bold;
- border-color: #0064cd #0064cd #003f81;
- border-color: rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.25);
- border:1px solid #666;
-
- }
-.ui-widget-header a { color: #222222; }
-
-/* Interaction states
-----------------------------------*/
-.ui-state-default, .ui-widget-content .ui-state-default, .ui-widget-header .ui-state-default {
-
- background-color: #e6e6e6;
- background-repeat: no-repeat;
- background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#ffffff), color-stop(25%, #ffffff), to(#e6e6e6));
- background-image: -webkit-linear-gradient(#ffffff, #ffffff 25%, #e6e6e6);
- background-image: -moz-linear-gradient(top, #ffffff, #ffffff 25%, #e6e6e6);
- background-image: -ms-linear-gradient(#ffffff, #ffffff 25%, #e6e6e6);
- background-image: -o-linear-gradient(#ffffff, #ffffff 25%, #e6e6e6);
- background-image: linear-gradient(#ffffff, #ffffff 25%, #e6e6e6);
- filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffffff', endColorstr='#e6e6e6', GradientType=0);
-
- text-shadow: 0 1px 1px rgba(255, 255, 255, 0.75);
-
- color: #333;
- font-size: 13px;
- line-height: normal;
- border: 1px solid #ccc;
- border-bottom-color: #bbb;
- -webkit-box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.2), 0 1px 2px rgba(0, 0, 0, 0.05);
- -moz-box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.2), 0 1px 2px rgba(0, 0, 0, 0.05);
- box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.2), 0 1px 2px rgba(0, 0, 0, 0.05);
- -webkit-transition: 0.1s linear background-image;
- -moz-transition: 0.1s linear background-image;
- -ms-transition: 0.1s linear background-image;
- -o-transition: 0.1s linear background-image;
- transition: 0.1s linear background-image;
- overflow: visible;
-
- }
-
-
-.ui-state-default a, .ui-state-default a:link, .ui-state-default a:visited { color: #555555; text-decoration: none; }
-.ui-state-hover, .ui-widget-content .ui-state-hover, .ui-widget-header .ui-state-hover, .ui-state-focus, .ui-widget-content .ui-state-focus, .ui-widget-header .ui-state-focus {
- background-position: 0 -26px;
- color: #333;
- text-decoration: none;
-
-
- }
-.ui-state-hover a, .ui-state-hover a:hover, .ui-state-hover a:link, .ui-state-hover a:visited { color: #212121/*{fcHover}*/; text-decoration: none; }
-.ui-state-active, .ui-widget-content .ui-state-active, .ui-widget-header .ui-state-active { border: 1px solid #aaaaaa; font-weight: normal; color: #212121; }
-.ui-state-active a, .ui-state-active a:link, .ui-state-active a:visited { color: #212121; text-decoration: none; }
-.ui-widget :active { outline: none; }
-
-/* Interaction Cues
-----------------------------------*/
-
-
-.ui-state-highlight p, .ui-state-error p, .ui-state-default p{
- font-size: 13px;
- font-weight: normal;
- line-height: 18px;
- margin:7px 15px;
-}
-.ui-state-highlight, .ui-widget-content .ui-state-highlight, .ui-widget-header .ui-state-highlight {
-
-
- position: relative;
- margin-bottom: 18px;
- color: #404040;
- background-color: #eedc94;
- background-repeat: repeat-x;
- background-image: -khtml-gradient(linear, left top, left bottom, from(#fceec1), to(#eedc94));
- background-image: -moz-linear-gradient(top, #fceec1, #eedc94);
- background-image: -ms-linear-gradient(top, #fceec1, #eedc94);
- background-image: -webkit-gradient(linear, left top, left bottom, color-stop(0%, #fceec1), color-stop(100%, #eedc94));
- background-image: -webkit-linear-gradient(top, #fceec1, #eedc94);
- background-image: -o-linear-gradient(top, #fceec1, #eedc94);
- background-image: linear-gradient(top, #fceec1, #eedc94);
- filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#fceec1', endColorstr='#eedc94', GradientType=0);
- text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.25);
- border-color: #eedc94 #eedc94 #e4c652;
- border-color: rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.25);
- text-shadow: 0 1px 0 rgba(255, 255, 255, 0.5);
- border-width: 1px;
- border-style: solid;
- -webkit-border-radius: 4px;
- -moz-border-radius: 4px;
- border-radius: 4px;
- -webkit-box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.25);
- -moz-box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.25);
- box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.25);
-
-
-}
-.ui-state-highlight a, .ui-widget-content .ui-state-highlight a,.ui-widget-header .ui-state-highlight a { color: #363636; }
-.ui-state-error, .ui-widget-content .ui-state-error, .ui-widget-header .ui-state-error {
-
-
- position: relative;
- margin-bottom: 18px;
- color: #ffffff;
- border-width: 1px;
- border-style: solid;
- -webkit-border-radius: 4px;
- -moz-border-radius: 4px;
- border-radius: 4px;
- -webkit-box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.25);
- -moz-box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.25);
- box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.25);
- background-color: #c43c35;
- background-repeat: repeat-x;
- background-image: -khtml-gradient(linear, left top, left bottom, from(#ee5f5b), to(#c43c35));
- background-image: -moz-linear-gradient(top, #ee5f5b, #c43c35);
- background-image: -ms-linear-gradient(top, #ee5f5b, #c43c35);
- background-image: -webkit-gradient(linear, left top, left bottom, color-stop(0%, #ee5f5b), color-stop(100%, #c43c35));
- background-image: -webkit-linear-gradient(top, #ee5f5b, #c43c35);
- background-image: -o-linear-gradient(top, #ee5f5b, #c43c35);
- background-image: linear-gradient(top, #ee5f5b, #c43c35);
- filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ee5f5b', endColorstr='#c43c35', GradientType=0);
- text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.25);
- border-color: #c43c35 #c43c35 #882a25;
- border-color: rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.25);
-
-
-}
-.ui-state-error a, .ui-widget-content .ui-state-error a, .ui-widget-header .ui-state-error a { color: #cd0a0a; }
-.ui-state-error-text, .ui-widget-content .ui-state-error-text, .ui-widget-header .ui-state-error-text { color: #cd0a0a; }
-.ui-priority-primary, .ui-widget-content .ui-priority-primary, .ui-widget-header .ui-priority-primary { font-weight: bold; }
-.ui-priority-secondary, .ui-widget-content .ui-priority-secondary, .ui-widget-header .ui-priority-secondary { opacity: .7; filter:Alpha(Opacity=70); font-weight: normal; }
-.ui-state-disabled, .ui-widget-content .ui-state-disabled, .ui-widget-header .ui-state-disabled { opacity: .35; filter:Alpha(Opacity=35); background-image: none; }
-.ui-state-disabled .ui-icon { filter:Alpha(Opacity=35); } /* For IE8 - See #6059 */
-
-
-/* Icons
-----------------------------------*/
-
-/* states and images */
-.ui-icon { width: 16px; height: 16px; background-image: url(images/ui-icons_222222_256x240.png); }
-.ui-widget-content .ui-icon {background-image: url(images/ui-icons_222222_256x240.png); }
-.ui-widget-header .ui-icon {background-image: url(images/ui-icons_222222_256x240.png); }
-.ui-state-default .ui-icon { background-image: url(images/ui-icons_222222_256x240.png); }
-.ui-state-hover .ui-icon, .ui-state-focus .ui-icon {background-image: url(images/ui-icons_454545_256x240.png); }
-.ui-state-active .ui-icon {background-image: url(images/ui-icons_454545_256x240.png); }
-.ui-state-highlight .ui-icon {background-image: url(images/ui-icons_2e83ff_256x240.png); }
-.ui-state-error .ui-icon, .ui-state-error-text .ui-icon {background-image: url(images/ui-icons_f6cf3b_256x240.png); }
-
-/* positioning */
-.ui-icon-carat-1-n { background-position: 0 0; }
-.ui-icon-carat-1-ne { background-position: -16px 0; }
-.ui-icon-carat-1-e { background-position: -32px 0; }
-.ui-icon-carat-1-se { background-position: -48px 0; }
-.ui-icon-carat-1-s { background-position: -64px 0; }
-.ui-icon-carat-1-sw { background-position: -80px 0; }
-.ui-icon-carat-1-w { background-position: -96px 0; }
-.ui-icon-carat-1-nw { background-position: -112px 0; }
-.ui-icon-carat-2-n-s { background-position: -128px 0; }
-.ui-icon-carat-2-e-w { background-position: -144px 0; }
-.ui-icon-triangle-1-n { background-position: 0 -16px; }
-.ui-icon-triangle-1-ne { background-position: -16px -16px; }
-.ui-icon-triangle-1-e { background-position: -32px -16px; }
-.ui-icon-triangle-1-se { background-position: -48px -16px; }
-.ui-icon-triangle-1-s { background-position: -64px -16px; }
-.ui-icon-triangle-1-sw { background-position: -80px -16px; }
-.ui-icon-triangle-1-w { background-position: -96px -16px; }
-.ui-icon-triangle-1-nw { background-position: -112px -16px; }
-.ui-icon-triangle-2-n-s { background-position: -128px -16px; }
-.ui-icon-triangle-2-e-w { background-position: -144px -16px; }
-.ui-icon-arrow-1-n { background-position: 0 -32px; }
-.ui-icon-arrow-1-ne { background-position: -16px -32px; }
-.ui-icon-arrow-1-e { background-position: -32px -32px; }
-.ui-icon-arrow-1-se { background-position: -48px -32px; }
-.ui-icon-arrow-1-s { background-position: -64px -32px; }
-.ui-icon-arrow-1-sw { background-position: -80px -32px; }
-.ui-icon-arrow-1-w { background-position: -96px -32px; }
-.ui-icon-arrow-1-nw { background-position: -112px -32px; }
-.ui-icon-arrow-2-n-s { background-position: -128px -32px; }
-.ui-icon-arrow-2-ne-sw { background-position: -144px -32px; }
-.ui-icon-arrow-2-e-w { background-position: -160px -32px; }
-.ui-icon-arrow-2-se-nw { background-position: -176px -32px; }
-.ui-icon-arrowstop-1-n { background-position: -192px -32px; }
-.ui-icon-arrowstop-1-e { background-position: -208px -32px; }
-.ui-icon-arrowstop-1-s { background-position: -224px -32px; }
-.ui-icon-arrowstop-1-w { background-position: -240px -32px; }
-.ui-icon-arrowthick-1-n { background-position: 0 -48px; }
-.ui-icon-arrowthick-1-ne { background-position: -16px -48px; }
-.ui-icon-arrowthick-1-e { background-position: -32px -48px; }
-.ui-icon-arrowthick-1-se { background-position: -48px -48px; }
-.ui-icon-arrowthick-1-s { background-position: -64px -48px; }
-.ui-icon-arrowthick-1-sw { background-position: -80px -48px; }
-.ui-icon-arrowthick-1-w { background-position: -96px -48px; }
-.ui-icon-arrowthick-1-nw { background-position: -112px -48px; }
-.ui-icon-arrowthick-2-n-s { background-position: -128px -48px; }
-.ui-icon-arrowthick-2-ne-sw { background-position: -144px -48px; }
-.ui-icon-arrowthick-2-e-w { background-position: -160px -48px; }
-.ui-icon-arrowthick-2-se-nw { background-position: -176px -48px; }
-.ui-icon-arrowthickstop-1-n { background-position: -192px -48px; }
-.ui-icon-arrowthickstop-1-e { background-position: -208px -48px; }
-.ui-icon-arrowthickstop-1-s { background-position: -224px -48px; }
-.ui-icon-arrowthickstop-1-w { background-position: -240px -48px; }
-.ui-icon-arrowreturnthick-1-w { background-position: 0 -64px; }
-.ui-icon-arrowreturnthick-1-n { background-position: -16px -64px; }
-.ui-icon-arrowreturnthick-1-e { background-position: -32px -64px; }
-.ui-icon-arrowreturnthick-1-s { background-position: -48px -64px; }
-.ui-icon-arrowreturn-1-w { background-position: -64px -64px; }
-.ui-icon-arrowreturn-1-n { background-position: -80px -64px; }
-.ui-icon-arrowreturn-1-e { background-position: -96px -64px; }
-.ui-icon-arrowreturn-1-s { background-position: -112px -64px; }
-.ui-icon-arrowrefresh-1-w { background-position: -128px -64px; }
-.ui-icon-arrowrefresh-1-n { background-position: -144px -64px; }
-.ui-icon-arrowrefresh-1-e { background-position: -160px -64px; }
-.ui-icon-arrowrefresh-1-s { background-position: -176px -64px; }
-.ui-icon-arrow-4 { background-position: 0 -80px; }
-.ui-icon-arrow-4-diag { background-position: -16px -80px; }
-.ui-icon-extlink { background-position: -32px -80px; }
-.ui-icon-newwin { background-position: -48px -80px; }
-.ui-icon-refresh { background-position: -64px -80px; }
-.ui-icon-shuffle { background-position: -80px -80px; }
-.ui-icon-transfer-e-w { background-position: -96px -80px; }
-.ui-icon-transferthick-e-w { background-position: -112px -80px; }
-.ui-icon-folder-collapsed { background-position: 0 -96px; }
-.ui-icon-folder-open { background-position: -16px -96px; }
-.ui-icon-document { background-position: -32px -96px; }
-.ui-icon-document-b { background-position: -48px -96px; }
-.ui-icon-note { background-position: -64px -96px; }
-.ui-icon-mail-closed { background-position: -80px -96px; }
-.ui-icon-mail-open { background-position: -96px -96px; }
-.ui-icon-suitcase { background-position: -112px -96px; }
-.ui-icon-comment { background-position: -128px -96px; }
-.ui-icon-person { background-position: -144px -96px; }
-.ui-icon-print { background-position: -160px -96px; }
-.ui-icon-trash { background-position: -176px -96px; }
-.ui-icon-locked { background-position: -192px -96px; }
-.ui-icon-unlocked { background-position: -208px -96px; }
-.ui-icon-bookmark { background-position: -224px -96px; }
-.ui-icon-tag { background-position: -240px -96px; }
-.ui-icon-home { background-position: 0 -112px; }
-.ui-icon-flag { background-position: -16px -112px; }
-.ui-icon-calendar { background-position: -32px -112px; }
-.ui-icon-cart { background-position: -48px -112px; }
-.ui-icon-pencil { background-position: -64px -112px; }
-.ui-icon-clock { background-position: -80px -112px; }
-.ui-icon-disk { background-position: -96px -112px; }
-.ui-icon-calculator { background-position: -112px -112px; }
-.ui-icon-zoomin { background-position: -128px -112px; }
-.ui-icon-zoomout { background-position: -144px -112px; }
-.ui-icon-search { background-position: -160px -112px; }
-.ui-icon-wrench { background-position: -176px -112px; }
-.ui-icon-gear { background-position: -192px -112px; }
-.ui-icon-heart { background-position: -208px -112px; }
-.ui-icon-star { background-position: -224px -112px; }
-.ui-icon-link { background-position: -240px -112px; }
-.ui-icon-cancel { background-position: 0 -128px; }
-.ui-icon-plus { background-position: -16px -128px; }
-.ui-icon-plusthick { background-position: -32px -128px; }
-.ui-icon-minus { background-position: -48px -128px; }
-.ui-icon-minusthick { background-position: -64px -128px; }
-.ui-icon-close { background-position: -80px -128px; }
-.ui-icon-closethick { background-position: -96px -128px; }
-.ui-icon-key { background-position: -112px -128px; }
-.ui-icon-lightbulb { background-position: -128px -128px; }
-.ui-icon-scissors { background-position: -144px -128px; }
-.ui-icon-clipboard { background-position: -160px -128px; }
-.ui-icon-copy { background-position: -176px -128px; }
-.ui-icon-contact { background-position: -192px -128px; }
-.ui-icon-image { background-position: -208px -128px; }
-.ui-icon-video { background-position: -224px -128px; }
-.ui-icon-script { background-position: -240px -128px; }
-.ui-icon-alert { background-position: 0 -144px; }
-.ui-icon-info { background-position: -16px -144px; }
-.ui-icon-notice { background-position: -32px -144px; }
-.ui-icon-help { background-position: -48px -144px; }
-.ui-icon-check { background-position: -64px -144px; }
-.ui-icon-bullet { background-position: -80px -144px; }
-.ui-icon-radio-off { background-position: -96px -144px; }
-.ui-icon-radio-on { background-position: -112px -144px; }
-.ui-icon-pin-w { background-position: -128px -144px; }
-.ui-icon-pin-s { background-position: -144px -144px; }
-.ui-icon-play { background-position: 0 -160px; }
-.ui-icon-pause { background-position: -16px -160px; }
-.ui-icon-seek-next { background-position: -32px -160px; }
-.ui-icon-seek-prev { background-position: -48px -160px; }
-.ui-icon-seek-end { background-position: -64px -160px; }
-.ui-icon-seek-start { background-position: -80px -160px; }
-/* ui-icon-seek-first is deprecated, use ui-icon-seek-start instead */
-.ui-icon-seek-first { background-position: -80px -160px; }
-.ui-icon-stop { background-position: -96px -160px; }
-.ui-icon-eject { background-position: -112px -160px; }
-.ui-icon-volume-off { background-position: -128px -160px; }
-.ui-icon-volume-on { background-position: -144px -160px; }
-.ui-icon-power { background-position: 0 -176px; }
-.ui-icon-signal-diag { background-position: -16px -176px; }
-.ui-icon-signal { background-position: -32px -176px; }
-.ui-icon-battery-0 { background-position: -48px -176px; }
-.ui-icon-battery-1 { background-position: -64px -176px; }
-.ui-icon-battery-2 { background-position: -80px -176px; }
-.ui-icon-battery-3 { background-position: -96px -176px; }
-.ui-icon-circle-plus { background-position: 0 -192px; }
-.ui-icon-circle-minus { background-position: -16px -192px; }
-.ui-icon-circle-close { background-position: -32px -192px; }
-.ui-icon-circle-triangle-e { background-position: -48px -192px; }
-.ui-icon-circle-triangle-s { background-position: -64px -192px; }
-.ui-icon-circle-triangle-w { background-position: -80px -192px; }
-.ui-icon-circle-triangle-n { background-position: -96px -192px; }
-.ui-icon-circle-arrow-e { background-position: -112px -192px; }
-.ui-icon-circle-arrow-s { background-position: -128px -192px; }
-.ui-icon-circle-arrow-w { background-position: -144px -192px; }
-.ui-icon-circle-arrow-n { background-position: -160px -192px; }
-.ui-icon-circle-zoomin { background-position: -176px -192px; }
-.ui-icon-circle-zoomout { background-position: -192px -192px; }
-.ui-icon-circle-check { background-position: -208px -192px; }
-.ui-icon-circlesmall-plus { background-position: 0 -208px; }
-.ui-icon-circlesmall-minus { background-position: -16px -208px; }
-.ui-icon-circlesmall-close { background-position: -32px -208px; }
-.ui-icon-squaresmall-plus { background-position: -48px -208px; }
-.ui-icon-squaresmall-minus { background-position: -64px -208px; }
-.ui-icon-squaresmall-close { background-position: -80px -208px; }
-.ui-icon-grip-dotted-vertical { background-position: 0 -224px; }
-.ui-icon-grip-dotted-horizontal { background-position: -16px -224px; }
-.ui-icon-grip-solid-vertical { background-position: -32px -224px; }
-.ui-icon-grip-solid-horizontal { background-position: -48px -224px; }
-.ui-icon-gripsmall-diagonal-se { background-position: -64px -224px; }
-.ui-icon-grip-diagonal-se { background-position: -80px -224px; }
-
-
-/* Misc visuals
-----------------------------------*/
-
-/* Corner radius */
-.ui-corner-all, .ui-corner-top, .ui-corner-left, .ui-corner-tl { -moz-border-radius-topleft: 4px; -webkit-border-top-left-radius: 4px; -khtml-border-top-left-radius: 4px; border-top-left-radius: 4px; }
-.ui-corner-all, .ui-corner-top, .ui-corner-right, .ui-corner-tr { -moz-border-radius-topright: 4px; -webkit-border-top-right-radius: 4px; -khtml-border-top-right-radius: 4px; border-top-right-radius: 4px; }
-.ui-corner-all, .ui-corner-bottom, .ui-corner-left, .ui-corner-bl { -moz-border-radius-bottomleft: 4px; -webkit-border-bottom-left-radius: 4px; -khtml-border-bottom-left-radius: 4px; border-bottom-left-radius: 4px; }
-.ui-corner-all, .ui-corner-bottom, .ui-corner-right, .ui-corner-br { -moz-border-radius-bottomright: 4px; -webkit-border-bottom-right-radius: 4px; -khtml-border-bottom-right-radius: 4px; border-bottom-right-radius: 4px; }
-
-
-/* Overlays */
-.ui-widget-overlay { background: #aaaaaa url(images/ui-bg_flat_0_aaaaaa_40x100.png) 50% 50% repeat-x; opacity: .30;filter:Alpha(Opacity=30); }
-.ui-widget-shadow { margin: -8px 0 0 -8px; padding: 8px; background: #aaaaaa url(images/ui-bg_flat_0_aaaaaa_40x100.png) 50% 50% repeat-x; opacity: .30;filter:Alpha(Opacity=30); -moz-border-radius: 8px; -khtml-border-radius: 8px; -webkit-border-radius: 8px; border-radius: 8px; }/*
- * jQuery UI Resizable 1.8.16
- *
- * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about)
- * Dual licensed under the MIT or GPL Version 2 licenses.
- * http://jquery.org/license
- *
- * http://docs.jquery.com/UI/Resizable#theming
- */
-.ui-resizable { position: relative;}
-.ui-resizable-handle { position: absolute;font-size: 0.1px;z-index: 99999; display: block; }
-.ui-resizable-disabled .ui-resizable-handle, .ui-resizable-autohide .ui-resizable-handle { display: none; }
-.ui-resizable-n { cursor: n-resize; height: 7px; width: 100%; top: -5px; left: 0; }
-.ui-resizable-s { cursor: s-resize; height: 7px; width: 100%; bottom: -5px; left: 0; }
-.ui-resizable-e { cursor: e-resize; width: 7px; right: -5px; top: 0; height: 100%; }
-.ui-resizable-w { cursor: w-resize; width: 7px; left: -5px; top: 0; height: 100%; }
-.ui-resizable-se { cursor: se-resize; width: 12px; height: 12px; right: 1px; bottom: 1px; }
-.ui-resizable-sw { cursor: sw-resize; width: 9px; height: 9px; left: -5px; bottom: -5px; }
-.ui-resizable-nw { cursor: nw-resize; width: 9px; height: 9px; left: -5px; top: -5px; }
-.ui-resizable-ne { cursor: ne-resize; width: 9px; height: 9px; right: -5px; top: -5px;}/*
- * jQuery UI Selectable 1.8.16
- *
- * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about)
- * Dual licensed under the MIT or GPL Version 2 licenses.
- * http://jquery.org/license
- *
- * http://docs.jquery.com/UI/Selectable#theming
- */
-.ui-selectable-helper { position: absolute; z-index: 100; border:1px dotted black; }
-/*
- * jQuery UI Accordion 1.9.0
- *
- * Copyright 2012, AUTHORS.txt (http://jqueryui.com/about)
- * Dual licensed under the MIT or GPL Version 2 licenses.
- * http://jquery.org/license
- *
- * http://docs.jquery.com/UI/Accordion#theming
- */
-/* IE/Win - Fix animation bug - #4615 */
-.ui-accordion { width: 100%; }
-.ui-accordion .ui-accordion-header { cursor: pointer; position: relative; margin-top: 1px; zoom: 1; font-weight:bold; }
-.ui-accordion .ui-accordion-li-fix { display: inline; }
-.ui-accordion .ui-accordion-header-active { border-bottom: 0 !important; }
-.ui-accordion .ui-accordion-header a { display: block; font-size: 1em; padding: .5em .5em .5em 1.7em; }
-.ui-accordion-icons .ui-accordion-header a { padding-left: 2.2em; }
-.ui-accordion .ui-accordion-header .ui-icon { position: absolute; left: .5em; top: 50%; margin-top: -8px; }
-.ui-accordion .ui-accordion-content { padding: 1em 2.2em; border-top: 0; margin-top: -2px; position: relative; top: 1px; margin-bottom: 2px; overflow: auto; display: none; zoom: 1; }
-.ui-accordion .ui-accordion-content-active { display: block; }
-/*
- * jQuery UI Autocomplete 1.8.16
- *
- * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about)
- * Dual licensed under the MIT or GPL Version 2 licenses.
- * http://jquery.org/license
- *
- * http://docs.jquery.com/UI/Autocomplete#theming
- */
-.ui-autocomplete {
- position: absolute;
- top: 0;
- left: 0;
- cursor: default;
-}
-
-/* workarounds */
-* html .ui-autocomplete { width:1px; } /* without this, the menu expands to 100% in IE6 */
-
-/*
- * jQuery UI Menu 1.9.0
- *
- * Copyright 2012-10-11, AUTHORS.txt (http://jqueryui.com/about)
- * Dual licensed under the MIT or GPL Version 2 licenses.
- * http://jquery.org/license
- *
- * http://docs.jquery.com/UI/Menu#theming
- */
-
-.ui-menu { list-style:none; padding: 2px; margin: 0; display:block; float:left; outline: none; z-index: 10; }
-.ui-menu .ui-menu { margin-top: -3px; position: absolute; }
-.ui-menu .ui-menu-item { margin: 0; padding: 0; zoom: 1;float: left;clear: left; width: 100%; }
-.ui-menu .ui-menu-divider { margin: 5px -2px 5px -2px; height: 0; font-size: 0; line-height: 0; border-width: 1px 0 0 0; }
-.ui-menu .ui-menu-item a { text-decoration: none; display: block; padding: 2px .4em; line-height: 1.5; zoom: 1; font-weight: normal; }
-.ui-menu .ui-menu-item a.ui-state-focus,
-.ui-menu .ui-menu-item a.ui-state-active {
- font-weight: normal;
- margin: 0;
- color: #ffffff;
- background: #0064cd;
- background-color: #0064cd;
- background-repeat: repeat-x;
- background-image: -khtml-gradient(linear, left top, left bottom, from(#049cdb), to(#0064cd));
- background-image: -moz-linear-gradient(top, #049cdb, #0064cd);
- background-image: -ms-linear-gradient(top, #049cdb, #0064cd);
- background-image: -webkit-gradient(linear, left top, left bottom, color-stop(0%, #049cdb), color-stop(100%, #0064cd));
- background-image: -webkit-linear-gradient(top, #049cdb, #0064cd);
- background-image: -o-linear-gradient(top, #049cdb, #0064cd);
- background-image: linear-gradient(top, #049cdb, #0064cd);
- filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#049cdb', endColorstr='#0064cd', GradientType=0);
- text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.25);
- border-color: #0064cd #0064cd #003f81;
- border-color: rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.25);
-}
-/* Fix problem with border in ui-state-active */
-.ui-menu .ui-menu-item a.ui-state-active {
- padding: 1px .4em;
-}
-
-.ui-menu .ui-state-disabled { font-weight: normal; margin: .4em 0 .2em; line-height: 1.5; }
-.ui-menu .ui-state-disabled a { cursor: default; }
-
-/* icon support */
-.ui-menu-icons { position: relative; }
-.ui-menu-icons .ui-menu-item a { position: relative; padding-left: 2em; }
-
-/* left-aligned */
-.ui-menu .ui-icon { position: absolute; top: .2em; left: .2em; }
-
-/* right-aligned */
-.ui-menu .ui-menu-icon { position: static; float: right; }
-
-.ui-menu { width: auto; }
-
-/*
- * jQuery UI Button 1.8.16
- *
- * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about)
- * Dual licensed under the MIT or GPL Version 2 licenses.
- * http://jquery.org/license
- *
- * http://docs.jquery.com/UI/Button#theming
- */
-.ui-button {
- cursor: pointer;
- display: inline-block;
- background-color: #e6e6e6;
- background-repeat: no-repeat;
- background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#ffffff), color-stop(25%, #ffffff), to(#e6e6e6));
- background-image: -webkit-linear-gradient(#ffffff, #ffffff 25%, #e6e6e6);
- background-image: -moz-linear-gradient(top, #ffffff, #ffffff 25%, #e6e6e6);
- background-image: -ms-linear-gradient(#ffffff, #ffffff 25%, #e6e6e6);
- background-image: -o-linear-gradient(#ffffff, #ffffff 25%, #e6e6e6);
- background-image: linear-gradient(#ffffff, #ffffff 25%, #e6e6e6);
- filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffffff', endColorstr='#e6e6e6', GradientType=0);
- padding: 0px;
- margin: 0;
- text-shadow: 0 1px 1px rgba(255, 255, 255, 0.75);
- color: #333;
- font-size: 11px;
- line-height: normal;
- border: 1px solid #ccc;
- border-bottom-color: #bbb;
-
- -webkit-box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.2), 0 1px 2px rgba(0, 0, 0, 0.05);
- -moz-box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.2), 0 1px 2px rgba(0, 0, 0, 0.05);
- box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.2), 0 1px 2px rgba(0, 0, 0, 0.05);
- -webkit-transition: 0.1s linear background-image;
- -moz-transition: 0.1s linear background-image;
- -ms-transition: 0.1s linear background-image;
- -o-transition: 0.1s linear background-image;
- transition: 0.1s linear background-image;
- overflow: visible;
-
-} /* the overflow property removes extra width in IE */
-
-.ui-button-primary {
- color: #ffffff;
- background-color: #0064cd;
- background-repeat: repeat-x;
- background-image: -khtml-gradient(linear, left top, left bottom, from(#049cdb), to(#0064cd));
- background-image: -moz-linear-gradient(top, #049cdb, #0064cd);
- background-image: -ms-linear-gradient(top, #049cdb, #0064cd);
- background-image: -webkit-gradient(linear, left top, left bottom, color-stop(0%, #049cdb), color-stop(100%, #0064cd));
- background-image: -webkit-linear-gradient(top, #049cdb, #0064cd);
- background-image: -o-linear-gradient(top, #049cdb, #0064cd);
- background-image: linear-gradient(top, #049cdb, #0064cd);
- filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#049cdb', endColorstr='#0064cd', GradientType=0);
- text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.25);
- border-color: #0064cd #0064cd #003f81;
- border-color: rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.25);
-
-}
-
-.ui-button-success{
- color:#ffffff;
- background-color: #57a957;
- background-repeat: repeat-x;
- background-image: -khtml-gradient(linear, left top, left bottom, from(#62c462), to(#57a957));
- background-image: -moz-linear-gradient(top, #62c462, #57a957);
- background-image: -ms-linear-gradient(top, #62c462, #57a957);
- background-image: -webkit-gradient(linear, left top, left bottom, color-stop(0%, #62c462), color-stop(100%, #57a957));
- background-image: -webkit-linear-gradient(top, #62c462, #57a957);
- background-image: -o-linear-gradient(top, #62c462, #57a957);
- background-image: linear-gradient(top, #62c462, #57a957);
- filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#62c462', endColorstr='#57a957', GradientType=0);
- text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.25);
- border-color: #57a957 #57a957 #3d773d;
- border-color: rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.25);
-}
-
-.ui-button-error{
- color:#ffffff;
- background-color: #c43c35;
- background-repeat: repeat-x;
- background-image: -khtml-gradient(linear, left top, left bottom, from(#ee5f5b), to(#c43c35));
- background-image: -moz-linear-gradient(top, #ee5f5b, #c43c35);
- background-image: -ms-linear-gradient(top, #ee5f5b, #c43c35);
- background-image: -webkit-gradient(linear, left top, left bottom, color-stop(0%, #ee5f5b), color-stop(100%, #c43c35));
- background-image: -webkit-linear-gradient(top, #ee5f5b, #c43c35);
- background-image: -o-linear-gradient(top, #ee5f5b, #c43c35);
- background-image: linear-gradient(top, #ee5f5b, #c43c35);
- filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ee5f5b', endColorstr='#c43c35', GradientType=0);
- text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.25);
- border-color: #c43c35 #c43c35 #882a25;
- border-color: rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.25);
-}
-
-.ui-button-icon-only { width: 2.2em; } /* to make room for the icon, a width needs to be set here */
-button.ui-button-icon-only { } /* button elements seem to need a little more width */
-.ui-button-icons-only { width: 3.4em; }
-button.ui-button-icons-only { width: 3.7em; }
-
-/*button text element */
-
-.ui-button .ui-button-text { display: block; }
-.ui-button-text-only .ui-button-text { }
-.ui-button-icon-only .ui-button-text, .ui-button-icons-only .ui-button-text { padding: .4em; text-indent: -9999999px; /*tempfix*/ display:none;}
-.ui-button-text-icon-primary .ui-button-text, .ui-button-text-icons .ui-button-text { padding: .4em 1em .4em 2.1em; }
-.ui-button-text-icon-secondary .ui-button-text, .ui-button-text-icons .ui-button-text { padding: .4em 2.1em .4em 1em; }
-.ui-button-text-icons .ui-button-text { padding-left: 2.1em; padding-right: 2.1em; }
-/* no icon support for input elements, provide padding by default */
-/* input.ui-button { padding: .4em 1em; } */
-
-/*button icon element(s) */
-.ui-button-icon-only .ui-icon, .ui-button-text-icon-primary .ui-icon, .ui-button-text-icon-secondary .ui-icon, .ui-button-text-icons .ui-icon, .ui-button-icons-only .ui-icon { top: 50%; margin-top:-7px; margin-bottom:3px; }
-.ui-button-icon-only .ui-icon { left: 50%; margin-left: -8px; }
-.ui-button-text-icon-primary .ui-button-icon-primary, .ui-button-text-icons .ui-button-icon-primary, .ui-button-icons-only .ui-button-icon-primary { left: .5em; }
-.ui-button-text-icon-secondary .ui-button-icon-secondary, .ui-button-text-icons .ui-button-icon-secondary, .ui-button-icons-only .ui-button-icon-secondary { right: .5em; }
-.ui-button-text-icons .ui-button-icon-secondary, .ui-button-icons-only .ui-button-icon-secondary { right: .5em; }
-
-/*button sets*/
-
-
-.ui-buttonset { margin-right: 7px; }
-.ui-buttonset .ui-state-active {
- color: #ffffff;
- text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.25);
- border-color: #0064cd #0064cd #003f81;
- border-color: rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.25);
-}
-.ui-buttonset .ui-button { margin-left: 0; margin-right: -.4em; }
-
-/* workarounds */
-button.ui-button::-moz-focus-inner { border: 0; padding: 0; } /* reset extra padding in Firefox */
-
-/*
- * jQuery UI spinner 1.9.0
- *
- * Copyright 2012-10-11, AUTHORS.txt (http://jqueryui.com/about)
- * Dual licensed under the MIT or GPL Version 2 licenses.
- * http://jquery.org/license
- *
- * http://docs.jquery.com/UI/Menu#theming
- */
-
-.ui-spinner { position:relative; display: inline-block; overflow: hidden; padding: 0; vertical-align: middle; }
-.ui-spinner-input { border: none; background: none; padding: 0; margin: .2em 0; vertical-align: middle; margin-left: .4em; margin-right: 22px; }
-.ui-spinner{}
-.ui-spinner-button { width: 16px; height: 50%; font-size: .5em; padding: 0; margin: 0; text-align: center; position: absolute; cursor: default; display: block; overflow: hidden; right: 0; }
-.ui-spinner a.ui-spinner-button { border-top: none; border-bottom: none; border-right: none; } /* more specificity required here to overide default borders */
-.ui-spinner .ui-icon { position: absolute; margin-top: -8px; top: 50%; left: 0; } /* vertical centre icon */
-.ui-spinner-up { top: 0; }
-.ui-spinner-down { bottom: 0; }
-
-/* TR overrides */
-.ui-spinner .ui-icon-triangle-1-s {
- /* need to fix icons sprite */
- background-position:-65px -16px;
-}
-
-/*
- * jQuery UI Dialog 1.8.16
- *
- * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about)
- * Dual licensed under the MIT or GPL Version 2 licenses.
- * http://jquery.org/license
- *
- * http://docs.jquery.com/UI/Dialog#theming
- */
-.ui-dialog { position: absolute; top: 0; left: 0; padding: .2em; width: 300px; overflow: hidden; outline: 0; }
-.ui-dialog .ui-dialog-titlebar { /*padding: .4em 1em;*/
-
- position: relative;
- padding:5px 15px;
-
- border:0px 0px 0px 1px solid;
- border-color: white;
- padding: 5px 15px;
- font-size: 18px;
- text-decoration:none;
- background:none;
- -moz-border-radius-bottomright: 0px;
- -webkit-border-bottom-right-radius: 0px;
- -khtml-border-bottom-right-radius: 0px;
-
- -moz-border-radius-bottomleft: 0px;
- -webkit-border-bottom-left-radius: 0px;
- -khtml-border-bottom-left-radius: 0px;
- border-bottom-left-radius: 0px;
-
- border-bottom:1px solid #ccc;
-
-}
-.ui-dialog .ui-dialog-title {
- float: left;
- color:#404040;
- font-weight:bold;
-}
-
-.ui-dialog .ui-dialog-titlebar-close {
- position: absolute;
- right: .3em;
- top: 50%;
- width: 19px;
- margin: -10px 0 0 0;
- padding: 1px;
- height: 18px;
- font-size: 20px;
- font-weight: bold;
- line-height: 13.5px;
- text-shadow: 0 1px 0 #ffffff;
- filter: alpha(opacity=25);
- -khtml-opacity: 0.25;
- -moz-opacity: 0.25;
- opacity: 0.25;
-}
-
-.ui-dialog .ui-dialog-titlebar-close span {
- display: block;
- margin: -9px;
- text-indent: 9999px;
-}
-
-.ui-dialog .ui-dialog-titlebar-close:hover, .ui-dialog .ui-dialog-titlebar-close:focus { padding: 1px; filter: alpha(opacity=90);
- -khtml-opacity: 0.90;
- -moz-opacity: 0.90;
- opacity: 0.90; }
-
-.ui-dialog .ui-dialog-content { position: relative; border: 0; padding: .5em 1em; background: none; overflow: auto; zoom: 1; }
-
-.ui-dialog .ui-dialog-buttonpane {
- text-align: left;
- border-width: 1px 0 0 0;
- background-image: none;
- margin: .5em 0 0 0;
- background-color: #fcfcfc;
- padding: 5px 15px 5px;
- border-top: 1px solid #ddd;
- -webkit-border-radius: 0 0 6px 6px;
- -moz-border-radius: 0 0 6px 6px;
- border-radius: 0 0 6px 6px;
- -webkit-box-shadow: inset 0 1px 0 #ffffff;
- -moz-box-shadow: inset 0 1px 0 #ffffff;
- box-shadow: inset 0 1px 0 #ffffff;
- zoom: 1;
- margin-bottom: 0;
-
-}
-.ui-dialog .ui-dialog-buttonpane .ui-dialog-buttonset { float: right; }
-.ui-dialog .ui-dialog-buttonpane button { margin: .5em .4em .5em 0; cursor: pointer; }
-.ui-dialog .ui-resizable-se { width: 14px; height: 14px; right: 3px; bottom: 3px; }
-.ui-draggable .ui-dialog-titlebar { cursor: move; }
-
-.ui-dialog-buttonpane .ui-dialog-buttonset .ui-button{
- color: #ffffff;
- background-color: #0064cd;
- background-repeat: repeat-x;
- background-image: -khtml-gradient(linear, left top, left bottom, from(#049cdb), to(#0064cd));
- background-image: -moz-linear-gradient(top, #049cdb, #0064cd);
- background-image: -ms-linear-gradient(top, #049cdb, #0064cd);
- background-image: -webkit-gradient(linear, left top, left bottom, color-stop(0%, #049cdb), color-stop(100%, #0064cd));
- background-image: -webkit-linear-gradient(top, #049cdb, #0064cd);
- background-image: -o-linear-gradient(top, #049cdb, #0064cd);
- background-image: linear-gradient(top, #049cdb, #0064cd);
- filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#049cdb', endColorstr='#0064cd', GradientType=0);
- text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.25);
- border-color: #0064cd #0064cd #003f81;
- border-color: rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.25);
-}
-/*
- * jQuery UI Slider 1.8.16
- *
- * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about)
- * Dual licensed under the MIT or GPL Version 2 licenses.
- * http://jquery.org/license
- *
- * http://docs.jquery.com/UI/Slider#theming
- */
-.ui-slider { position: relative; text-align: left; }
-.ui-slider .ui-slider-handle { position: absolute; z-index: 2; width: 1.2em; height: 1.2em; cursor: default; }
-.ui-slider .ui-slider-range { position: absolute; z-index: 1; font-size: .7em; display: block; border: 0; background-position: 0 0;
-
- color: #ffffff;
- background-color: #0064cd;
- background-repeat: repeat-x;
- background-image: -khtml-gradient(linear, left top, left bottom, from(#049cdb), to(#0064cd));
- background-image: -moz-linear-gradient(top, #049cdb, #0064cd);
- background-image: -ms-linear-gradient(top, #049cdb, #0064cd);
- background-image: -webkit-gradient(linear, left top, left bottom, color-stop(0%, #049cdb), color-stop(100%, #0064cd));
- background-image: -webkit-linear-gradient(top, #049cdb, #0064cd);
- background-image: -o-linear-gradient(top, #049cdb, #0064cd);
- background-image: linear-gradient(top, #049cdb, #0064cd);
- filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#049cdb', endColorstr='#0064cd', GradientType=0);
- text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.25);
- border-color: #0064cd #0064cd #003f81;
- border-color: rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.25);
-
-}
-
-.ui-slider-horizontal { height: .8em; }
-.ui-slider-horizontal .ui-slider-handle { top: -.3em; margin-left: -.6em; }
-.ui-slider-horizontal .ui-slider-range { top: 0; height: 100%; }
-.ui-slider-horizontal .ui-slider-range-min { left: 0; }
-.ui-slider-horizontal .ui-slider-range-max { right: 0; }
-
-.ui-slider-vertical { width: .8em; height: 100px; }
-.ui-slider-vertical .ui-slider-handle { left: -.3em; margin-left: 0; margin-bottom: -.6em; }
-.ui-slider-vertical .ui-slider-range { left: 0; width: 100%; }
-.ui-slider-vertical .ui-slider-range-min { bottom: 0; }
-.ui-slider-vertical .ui-slider-range-max { top: 0; }
-
-/*
- * jQuery UI Tabs 1.9.2
- *
- * Copyright 2012, AUTHORS.txt (http://jqueryui.com/about)
- * Dual licensed under the MIT or GPL Version 2 licenses.
- * http://jquery.org/license
- *
- * http://jqueryui.com/tabs/
- */
- .ui-tabs .ui-tabs-nav{ background:none; border-color: #ddd;border-style: solid;border-width: 0 0 1px;}
-.ui-tabs { position: relative; padding: .2em; zoom: 1; border:0px;} /* position: relative prevents IE scroll bug (element with position: relative inside container with overflow: auto appear as "fixed") */
-
-
-.ui-tabs .ui-tabs-nav li:hover, .ui-tabs .ui-tabs-nav li a:hover{
- background:whiteSmoke;
- border-bottom:1px solid #ddd;
- padding-bottom:0px;
- color:#00438A;
-}
-
-.ui-tabs .ui-tabs-nav { margin: 0; padding: .2em .2em 0; border-bottom:1px solid #DDD; }
-.ui-tabs .ui-tabs-nav li { text-decoration: none; list-style: none; float: left; position: relative; top: 1px; padding: 0px 0px 1px 0px; white-space: nowrap; background:none; border:0px; }
-
-.ui-tabs-nav .ui-state-default{
- -webkit-box-shadow: 0px 0px 0px #ffffff; /* Saf3-4, iOS 4.0.2 - 4.2, Android 2.3+ */
- -moz-box-shadow: 0px 0px 0px #ffffff; /* FF3.5 - 3.6 */
- box-shadow: 0px 0px 0px #ffffff; /* Opera 10.5, IE9, FF4+, Chrome 6+, iOS 5 */
-}
-.ui-tabs .ui-tabs-nav li a {
- float: left;
- text-decoration: none;
- cursor: text;
- padding: 0 15px;
- margin-right: 2px;
- line-height: 34px;
- border: 1px solid transparent;
- -webkit-border-radius: 4px 4px 0 0;
- -moz-border-radius: 4px 4px 0 0;
- border-radius: 4px 4px 0 0;
-
-
- }
-
-.ui-tabs .ui-tabs-nav li.ui-tabs-active { margin-bottom: 0; padding-bottom: 0px; outline:none;}
-.ui-tabs .ui-tabs-nav li.ui-tabs-active , .ui-tabs .ui-tabs-nav li.ui-state-disabled a, .ui-tabs .ui-tabs-nav li.ui-state-processing a {
- background-color: #ffffff;
- border: 1px solid #ddd;
- border-bottom-color: #ffffff;
- cursor: default;
- color:gray;
- outline:none;
-}
-.ui-tabs .ui-tabs-nav li.ui-tabs-active a{background-color: #ffffff;outline:none;border:none;}
-.ui-tabs .ui-tabs-nav li.ui-tabs-active:hover{
- background:#ffffff;
- outline:none;
- margin-bottom:0px;
-}
-.ui-tabs .ui-tabs-nav li.ui-tabs-active a, .ui-tabs .ui-tabs-nav li.ui-state-disabled a, .ui-tabs .ui-tabs-nav li.ui-tabs-loading a { cursor: text; }
-.ui-tabs .ui-tabs-nav li a, .ui-tabs-collapsible .ui-tabs-nav li.ui-tabs-active a { cursor: pointer; color:#0069D6; background:none; font-weight:normal; margin-bottom:-1px;}
-/* first selector in group seems obsolete, but required to overcome bug in Opera applying cursor: text overall if defined elsewhere... */
-.ui-tabs .ui-tabs-panel { display: block; border-width: 0; padding: 1em 1.4em; background: none; }
-.ui-tabs-panel .ui-button{text-decoration:none;}
-.ui-tabs .ui-tabs-hide { display: none !important; }
-
-/* IE fix for background inheritance from ui-widget*/
-.ui-tabs .ui-tabs-nav li{
- filter:none;
-}
-
-.ui-tabs-vertical .ui-widget-header { border: none; }
-.ui-tabs-vertical .ui-tabs-nav { float: left; width: 10%; }
-.ui-tabs-vertical .ui-tabs-nav li { clear: left; width: 100%; border-right: 1px solid #DDDDDD; overflow: hidden; margin: 0; }
-.ui-tabs-vertical .ui-tabs-nav li a { display: block; width: 100%; }
-.ui-tabs-vertical .ui-tabs-nav li a:hover { cursor: pointer; border-color: #DDDDDD rgba(0, 0, 0, 0) #DDDDDD #DDDDDD; border-radius: 4px 0 0 4px; }
-.ui-tabs-vertical .ui-tabs-nav li.ui-tabs-active { border-color: #DDDDDD rgba(0, 0, 0, 0) #DDDDDD #DDDDDD; border-radius: 4px 0 0 4px; }
-.ui-tabs-vertical .ui-tabs-panel { float: left; border-radius: 0; position: relative; left: -1px; width: 80%; overflow: auto; }
-
-
-/*
- * jQuery UI Tooltip 1.9.0
- *
- * Copyright 2012-10-11, AUTHORS.txt (http://jqueryui.com/about)
- * Dual licensed under the MIT or GPL Version 2 licenses.
- * http://jquery.org/license
- *
- * http://jqueryui.com/tooltip/
- */
-
-/*
-.ui-tooltip {
- padding: 8px;
- position: absolute;
- z-index: 9999;
- max-width: 300px;
- -o-box-shadow: 0 0 5px #ddd;
- -moz-box-shadow: 0 0 5px #ddd;
- -webkit-box-shadow: 0 0 5px #ddd;
- box-shadow: inset 0 1px 0 #ffffff;
-}
-*/
-
-.ui-tooltip {
- padding: 8px;
- position: absolute;
- z-index: 9999;
- max-width: 300px;
- -o-box-shadow: 0 0 5px #ddd;
- -moz-box-shadow: 0 0 5px #ddd;
- -webkit-box-shadow: 0 0 5px #ddd;
- box-shadow: inset 0 1px 0 #000000;
-
- background: none repeat scroll 0 0 #000000;
- border: 1px solid #000000;
- border-radius: 4px;
-
- color: #FFFFFF;
- text-align: center;
- text-decoration: none;
- font-size: 11px;
- opacity: 0.8;
- visibility: visible;
-
- display: block;
- margin-left: 0;
-}
-
-.arrow {
- height: 20px;
- margin-left: 0;
- margin-right: 0;
- overflow: hidden;
- position: absolute;
- width: 20px;
-}
-.arrow.bottom {
- left: 38%;
- top: 100%;
-}
-.arrow.top {
- bottom: 22px;
- left: 42%;
- top: -50%;
-}
-.arrow.left {
- bottom: -16px;
- left: -14px;
- right: 0;
- top: 25%;
-}
-.arrow.right {
- bottom: -16px;
- left: 100%;
- margin-left: 1px;
- right: 0;
- top: 26%;
-}
-.arrow:after {
- bottom: 12px;
- box-shadow: 6px 5px 9px -9px #000000;
- content: " ";
- height: 0;
- left: 0;
- margin-left: 0;
- position: absolute;
- top: 0;
- width: 0;
-}
-.arrow.bottom:after {
- border-color: #000000 rgba(0, 0, 0, 0) rgba(0, 0, 0, 0);
- border-style: solid;
- border-width: 8px;
-}
-.arrow.top:after {
- border-color: rgba(0, 0, 0, 0) rgba(0, 0, 0, 0) #000000;
- border-style: solid;
- border-width: 6px;
-}
-.arrow.left:after {
- border-color: rgba(0, 0, 0, 0) #000000 rgba(0, 0, 0, 0) rgba(0, 0, 0, 0);
- border-style: solid;
- border-width: 6px;
- width: 0;
-}
-.arrow.right:after {
- border-color: rgba(0, 0, 0, 0) rgba(0, 0, 0, 0) rgba(0, 0, 0, 0) #000000;
- border-style: solid;
- border-width: 6px;
- width: 0;
-}
-
-
-/*
- * jQuery UI Datepicker 1.9.0
- *
- * Copyright 2012-10-11, AUTHORS.txt (http://jqueryui.com/about)
- * Dual licensed under the MIT or GPL Version 2 licenses.
- * http://jquery.org/license
- *
- * http://jqueryui.com/datepicker/
- */
-.ui-datepicker { width: 17em; padding: .2em .2em 0; display: none; }
-.ui-datepicker .ui-datepicker-header { position:relative; padding:.2em 0; border:0px; font-weight: bold; width: 100%; padding: 4px 0; background-color: #f5f5f5; color: #808080; }
-.ui-datepicker .ui-datepicker-prev, .ui-datepicker .ui-datepicker-next { position:absolute; top: 2px; width: 1.8em; height: 1.8em; }
-
-.ui-datepicker .ui-datepicker-prev-hover, .ui-datepicker .ui-datepicker-next-hover { /*top: 1px;*/ }
-.ui-datepicker .ui-datepicker-prev { left:2px; }
-.ui-datepicker .ui-datepicker-next { right:2px; }
-
-.ui-datepicker .ui-datepicker-prev-hover { /*left:1px;*/ }
-.ui-datepicker .ui-datepicker-next-hover { /*right:1px;*/ }
-
-.ui-datepicker .ui-datepicker-prev span, .ui-datepicker .ui-datepicker-next span { display: block; position: absolute; left: 50%; margin-left: -8px; top: 50%; margin-top: -8px; }
-.ui-datepicker .ui-datepicker-title { margin: 0 2.3em; line-height: 1.8em; text-align: center; }
-.ui-datepicker .ui-datepicker-title select { font-size:1em; margin:1px 0; }
-.ui-datepicker select.ui-datepicker-month-year {width: 100%;}
-.ui-datepicker select.ui-datepicker-month,
-.ui-datepicker select.ui-datepicker-year { width: 49%;}
-.ui-datepicker table {width: 100%; font-size: .9em; border-collapse: collapse; margin:0 0 .4em; }
-.ui-datepicker th { padding: .7em .3em; text-align: center; font-weight: bold; border: 0; }
-.ui-datepicker td { border: 0; padding: 1px; }
-.ui-datepicker td span, .ui-datepicker td a { display: block; padding: .2em; text-align: right; text-decoration: none; }
-.ui-datepicker .ui-datepicker-buttonpane { background-image: none; margin: .7em 0 0 0; padding:0 .2em; border-left: 0; border-right: 0; border-bottom: 0; }
-.ui-datepicker .ui-datepicker-buttonpane button { float: right; margin: .5em .2em .4em; cursor: pointer; padding: .2em .6em .3em .6em; width:auto; overflow:visible; }
-.ui-datepicker .ui-datepicker-buttonpane button.ui-datepicker-current { float:left; }
-
-/* with multiple calendars */
-.ui-datepicker.ui-datepicker-multi { width:auto; }
-.ui-datepicker-multi .ui-datepicker-group { float:left; }
-.ui-datepicker-multi .ui-datepicker-group table { width:95%; margin:0 auto .4em; }
-.ui-datepicker-multi-2 .ui-datepicker-group { width:50%; }
-.ui-datepicker-multi-3 .ui-datepicker-group { width:33.3%; }
-.ui-datepicker-multi-4 .ui-datepicker-group { width:25%; }
-.ui-datepicker-multi .ui-datepicker-group-last .ui-datepicker-header { border-left-width:0; }
-.ui-datepicker-multi .ui-datepicker-group-middle .ui-datepicker-header { border-left-width:0; }
-.ui-datepicker-multi .ui-datepicker-buttonpane { clear:left; }
-.ui-datepicker-row-break { clear:both; width:100%; font-size:0em; }
-
-/* RTL support */
-.ui-datepicker-rtl { direction: rtl; }
-.ui-datepicker-rtl .ui-datepicker-prev { right: 2px; left: auto; }
-.ui-datepicker-rtl .ui-datepicker-next { left: 2px; right: auto; }
-.ui-datepicker-rtl .ui-datepicker-prev:hover { right: 1px; left: auto; }
-.ui-datepicker-rtl .ui-datepicker-next:hover { left: 1px; right: auto; }
-.ui-datepicker-rtl .ui-datepicker-buttonpane { clear:right; }
-.ui-datepicker-rtl .ui-datepicker-buttonpane button { float: left; }
-.ui-datepicker-rtl .ui-datepicker-buttonpane button.ui-datepicker-current { float:right; }
-.ui-datepicker-rtl .ui-datepicker-group { float:right; }
-.ui-datepicker-rtl .ui-datepicker-group-last .ui-datepicker-header { border-right-width:0; border-left-width:1px; }
-.ui-datepicker-rtl .ui-datepicker-group-middle .ui-datepicker-header { border-right-width:0; border-left-width:1px; }
-
-/* IE6 IFRAME FIX (taken from datepicker 1.5.3 */
-.ui-datepicker-cover {
- display: none; /*sorry for IE5*/
- display/**/: block; /*sorry for IE5*/
- position: absolute; /*must have*/
- z-index: -1; /*must have*/
- filter: mask(); /*must have*/
- top: -4px; /*must have*/
- left: -4px; /*must have*/
- width: 200px; /*must have*/
- height: 200px; /*must have*/
-}
-
-.ui-datepicker th{
- font-weight: bold;
- color: gray;
-}
-
-.ui-datepicker-today a:hover{
- background-color: #808080;
- color: #ffffff;
-
-}
-.ui-datepicker-today a{
- background-color: #BFBFBF;
- cursor: pointer;
- padding: 0 4px;
- margin-bottom:0px;
-
-}
-
-
-.ui-datepicker td a{
- margin-bottom:0px;
- border:0px;
-}
-
-.ui-datepicker td:hover{
- color: #ffffff;
-}
-
-.ui-datepicker td .ui-state-default {
- border:0px;
- background:none;
- margin-bottom:0px;
- padding:5px;
- color:gray;
- text-align: center;
- filter:none;
-}
-
-
-.ui-datepicker td .ui-state-active{
- background:#BFBFBF;
- margin-bottom:0px;
- font-size:normal;
- text-shadow: 0px;
- color: #ffffff;
- -webkit-border-radius: 4px;
- -moz-border-radius: 4px;
- border-radius: 4px;
-}
-
-.ui-datepicker td .ui-state-hover {
- color: #ffffff;
- background: #0064cd;
- background-color: #0064cd;
- background-repeat: repeat-x;
- background-image: -khtml-gradient(linear, left top, left bottom, from(#049cdb), to(#0064cd));
- background-image: -moz-linear-gradient(top, #049cdb, #0064cd);
- background-image: -ms-linear-gradient(top, #049cdb, #0064cd);
- background-image: -webkit-gradient(linear, left top, left bottom, color-stop(0%, #049cdb), color-stop(100%, #0064cd));
- background-image: -webkit-linear-gradient(top, #049cdb, #0064cd);
- background-image: -o-linear-gradient(top, #049cdb, #0064cd);
- background-image: linear-gradient(top, #049cdb, #0064cd);
- filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#049cdb', endColorstr='#0064cd', GradientType=0);
- text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.25);
- border-color: #0064cd #0064cd #003f81;
- border-color: rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.25);
- -webkit-border-radius: 4px;
- -moz-border-radius: 4px;
- -khtml-border-radius: 4px;
- border-radius: 4px;
-}
-
-/*
- * jQuery UI Progressbar 1.8.16
- *
- * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about)
- * Dual licensed under the MIT or GPL Version 2 licenses.
- * http://jquery.org/license
- *
- * http://docs.jquery.com/UI/Progressbar#theming
- */
-.ui-progressbar { height:2em; text-align: left; }
-.ui-progressbar .ui-progressbar-value {margin: -1px; height:100%;
-
-/*this can be removed if ui-widget-header is blue*/
- color: #ffffff;
- background-color: #0064cd;
- background-repeat: repeat-x;
- background-image: -khtml-gradient(linear, left top, left bottom, from(#049cdb), to(#0064cd));
- background-image: -moz-linear-gradient(top, #049cdb, #0064cd);
- background-image: -ms-linear-gradient(top, #049cdb, #0064cd);
- background-image: -webkit-gradient(linear, left top, left bottom, color-stop(0%, #049cdb), color-stop(100%, #0064cd));
- background-image: -webkit-linear-gradient(top, #049cdb, #0064cd);
- background-image: -o-linear-gradient(top, #049cdb, #0064cd);
- background-image: linear-gradient(top, #049cdb, #0064cd);
- filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#049cdb', endColorstr='#0064cd', GradientType=0);
- text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.25);
- border-color: #0064cd #0064cd #003f81;
- border-color: rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.25);
- }
-
-
-
-/*** Input field styling from Bootstrap **/
- input, textarea {
- -webkit-transition: border linear 0.2s, box-shadow linear 0.2s;
- -moz-transition: border linear 0.2s, box-shadow linear 0.2s;
- -ms-transition: border linear 0.2s, box-shadow linear 0.2s;
- -o-transition: border linear 0.2s, box-shadow linear 0.2s;
- transition: border linear 0.2s, box-shadow linear 0.2s;
- -webkit-box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.1);
- -moz-box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.1);
- box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.1);
-}
-input:focus, textarea:focus {
- outline: 0;
- border-color: rgba(82, 168, 236, 0.8);
- -webkit-box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.1), 0 0 8px rgba(82, 168, 236, 0.6);
- -moz-box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.1), 0 0 8px rgba(82, 168, 236, 0.6);
- box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.1), 0 0 8px rgba(82, 168, 236, 0.6);
-}
-input[type=file]:focus, input[type=checkbox]:focus, select:focus {
- -webkit-box-shadow: none;
- -moz-box-shadow: none;
- box-shadow: none;
- outline: 1px dotted #666;
-}
-
-input[type="text"],
-input[type="password"],
-.ui-autocomplete-input,
-textarea,
-.uneditable-input {
- display: inline-block;
- padding: 4px;
- font-size: 13px;
- line-height: 18px;
- color: #808080;
- border: 1px solid #ccc;
- -webkit-border-radius: 3px;
- -moz-border-radius: 3px;
- border-radius: 3px;
-}
-
-
-
-/**Toolbar**/
-
-.ui-toolbar{
- padding: 7px 14px;
- margin: 0 0 18px;
- background-color: #f5f5f5;
- background-repeat: repeat-x;
- background-image: -khtml-gradient(linear, left top, left bottom, from(#ffffff), to(#f5f5f5));
- background-image: -moz-linear-gradient(top, #ffffff, #f5f5f5);
- background-image: -ms-linear-gradient(top, #ffffff, #f5f5f5);
- background-image: -webkit-gradient(linear, left top, left bottom, color-stop(0%, #ffffff), color-stop(100%, #f5f5f5));
- background-image: -webkit-linear-gradient(top, #ffffff, #f5f5f5);
- background-image: -o-linear-gradient(top, #ffffff, #f5f5f5);
- background-image: linear-gradient(top, #ffffff, #f5f5f5);
- filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffffff', endColorstr='#f5f5f5', GradientType=0);
- border: 1px solid #ddd;
- -webkit-border-radius: 3px;
- -moz-border-radius: 3px;
- border-radius: 3px;
- -webkit-box-shadow: inset 0 1px 0 #ffffff;
- -moz-box-shadow: inset 0 1px 0 #ffffff;
- box-shadow: inset 0 1px 0 #ffffff;
-}
-
-
-/***Dialog fixes**/
-
-.ui-dialog-buttonset .ui-button:nth-child(2){
- cursor: pointer;
- display: inline-block;
- background-color: #e6e6e6;
- background-repeat: no-repeat;
- background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#ffffff), color-stop(25%, #ffffff), to(#e6e6e6));
- background-image: -webkit-linear-gradient(#ffffff, #ffffff 25%, #e6e6e6);
- background-image: -moz-linear-gradient(top, #ffffff, #ffffff 25%, #e6e6e6);
- background-image: -ms-linear-gradient(#ffffff, #ffffff 25%, #e6e6e6);
- background-image: -o-linear-gradient(#ffffff, #ffffff 25%, #e6e6e6);
- background-image: linear-gradient(#ffffff, #ffffff 25%, #e6e6e6);
- filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffffff', endColorstr='#e6e6e6', GradientType=0);
- padding: 0px;
- text-shadow: 0 1px 1px rgba(255, 255, 255, 0.75);
- color: #333;
- font-size: 13px;
- line-height: normal;
- border: 1px solid #ccc;
- border-bottom-color: #bbb;
- -webkit-border-radius: 4px;
- -moz-border-radius: 4px;
- border-radius: 4px;
- -webkit-box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.2), 0 1px 2px rgba(0, 0, 0, 0.05);
- -moz-box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.2), 0 1px 2px rgba(0, 0, 0, 0.05);
- box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.2), 0 1px 2px rgba(0, 0, 0, 0.05);
- -webkit-transition: 0.1s linear all;
- -moz-transition: 0.1s linear all;
- -ms-transition: 0.1s linear all;
- -o-transition: 0.1s linear all;
- transition: 0.1s linear all;
- overflow: visible;
-}
-
-
-
-/***Wijmo Theming**/
-
-div.wijmo-wijmenu{
- padding:0 20px;
- background-color: #222;
- background-color: #222222;
- background-repeat: repeat-x;
- background-image: -khtml-gradient(linear, left top, left bottom, from(#333333), to(#222222));
- background-image: -moz-linear-gradient(top, #333333, #222222);
- background-image: -ms-linear-gradient(top, #333333, #222222);
- background-image: -webkit-gradient(linear, left top, left bottom, color-stop(0%, #333333), color-stop(100%, #222222));
- background-image: -webkit-linear-gradient(top, #333333, #222222);
- background-image: -o-linear-gradient(top, #333333, #222222);
- background-image: linear-gradient(top, #333333, #222222);
- filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#333333', endColorstr='#222222', GradientType=0);
- -webkit-box-shadow: 0 1px 3px rgba(0, 0, 0, 0.25), inset 0 -1px 0 rgba(0, 0, 0, 0.1);
- -moz-box-shadow: 0 1px 3px rgba(0, 0, 0, 0.25), inset 0 -1px 0 rgba(0, 0, 0, 0.1);
- box-shadow: 0 1px 3px rgba(0, 0, 0, 0.25), inset 0 -1px 0 rgba(0, 0, 0, 0.1);
-}
-
-.wijmo-wijmenu .ui-state-default{
- box-shadow: none;
- color:#BFBFBF;
-}
-
-.wijmo-wijmenu .ui-state-default .wijmo-wijmenu-text{
- color:#BFBFBF;
-}
-
-.wijmo-wijmenu .ui-state-hover{
- background: #444;
- background: rgba(255, 255, 255, 0.05);
-}
-
-.wijmo-wijmenu .ui-state-hover .wijmo-wijmenu-text{
- color:#ffffff;
-}
-
-div.wijmo-wijmenu .ui-widget-header h3{
- position: relative;
- margin-top:1px;
- padding:0;
-}
-
-.wijmo-wijmenu h3 a{
- color: #FFFFFF;
- display: block;
- float: left;
- font-size: 20px;
- font-weight: 200;
- line-height: 1;
- margin-left: -20px;
- margin-top:1px;
- padding: 8px 20px 12px;
-}
-
-.wijmo-wijmenu h3 a:hover{
- background-color: rgba(255, 255, 255, 0.05);
- color: #FFFFFF;
- text-decoration: none;
-}
-
-.wijmo-wijmenu .ui-widget-header{
- border:0px;
-}
-
-.wijmo-wijmenu .wijmo-wijmenu-parent .wijmo-wijmenu-child{
- padding: 0.3em 0;
-}
-
-div.wijmo-wijmenu .wijmo-wijmenu-item .wijmo-wijmenu-child{
- background: #333;
- border:0;
- margin:0;
- padding: 6px 0;
- width:160px;
- -webkit-border-radius: 0 0 6px 6px;
- -moz-border-radius: 0 0 6px 6px;
- border-radius: 0 0 6px 6px;
- -webkit-box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
- -moz-box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
- box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
-}
-
-div.wijmo-wijmenu .wijmo-wijmenu-item{
- margin:0;
- border:0;
-}
-
-.wijmo-wijmenu a.wijmo-wijmenu-link{
- margin:0;
- line-height: 19px;
- padding: 10px 10px 11px;
- border:0;
- -webkit-border-radius: 0;
- -moz-border-radius: 0;
- border-radius:0;
-}
-
-div.wijmo-wijmenu .wijmo-wijmenu-child .wijmo-wijmenu-link{
- display:block;
- float:none;
- padding: 4px 15px;
- width:auto;
-}
-
-div.wijmo-wijmenu .wijmo-wijmenu-child .wijmo-wijmenu-text
-{
- float:none;
-}
-
-.wijmo-wijmenu .wijmo-wijmenu-item .wijmo-wijmenu-child .ui-state-hover {
- background: #191919;
-}
-
-.wijmo-wijmenu .wijmo-wijmenu-item .wijmo-wijmenu-separator{
- padding: 5px 0;
- background-image: none;
- background-color: #222;
- border-top: 1px solid #444;
- border-bottom:0;
- border-left:0;
- border-right:0;
-}
-
-.wijmo-wijmenu .wijmo-wijmenu-item input {
- -moz-transition: none 0s ease 0s;
- background-color: rgba(255, 255, 255, 0.3);
- border: 1px solid #111111;
- border-radius: 4px 4px 4px 4px;
- box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1) inset, 0 1px 0 rgba(255, 255, 255, 0.25);
- color: rgba(255, 255, 255, 0.75);
- font-family: "Helvetica Neue",Helvetica,Arial,sans-serif;
- line-height: 1;
- margin: 5px 10px 0 10px;
- padding: 4px 9px;
- width:100px;
-}
-
-.wijmo-wijmenu .wijmo-wijmenu-item input:hover {
- background-color: rgba(255, 255, 255, 0.5);
- color: #FFFFFF;
-}
-
-.wijmo-wijmenu .wijmo-wijmenu-item input:focus {
- background-color: #FFFFFF;
- border: 0 none;
- box-shadow: 0 0 3px rgba(0, 0, 0, 0.15);
- color: #404040;
- outline: 0 none;
- padding: 5px 10px;
- text-shadow: 0 1px 0 #FFFFFF;
-}
-
-
-.wijmo-wijmenu .ui-state-default, .ui-widget-content .ui-state-default, .ui-widget-header .ui-state-default {
- text-shadow:none;
-}
-
-
-.wijmo-wijmenu .ui-state-default{
- box-shadow: none;
- color:#BFBFBF;
- filter: none;
-}
-
diff --git a/assets/stylesheets/bootstrap/bootstrap_label.css b/assets/stylesheets/bootstrap/bootstrap_label.css
deleted file mode 100644
index 2ecf856a9de..00000000000
--- a/assets/stylesheets/bootstrap/bootstrap_label.css
+++ /dev/null
@@ -1,122 +0,0 @@
-/*!
- * Bootstrap v2.3.2
- *
- * Copyright 2013 Twitter, Inc
- * Licensed under the Apache License v2.0
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Designed and built with all the love in the world @twitter by @mdo and @fat.
- */
-.clearfix {
- *zoom: 1;
-}
-.clearfix:before,
-.clearfix:after {
- display: table;
- content: "";
- line-height: 0;
-}
-.clearfix:after {
- clear: both;
-}
-.hide-text {
- font: 0/0 a;
- color: transparent;
- text-shadow: none;
- background-color: transparent;
- border: 0;
-}
-.input-block-level {
- display: block;
- width: 100%;
- min-height: 30px;
- -webkit-box-sizing: border-box;
- -moz-box-sizing: border-box;
- box-sizing: border-box;
-}
-.label,
-.badge {
- display: inline-block;
- padding: 2px 4px;
- font-size: 11.844px;
- font-weight: bold;
- line-height: 14px;
- color: #ffffff;
- vertical-align: baseline;
- white-space: nowrap;
- text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.25);
- background-color: #999999;
-}
-.label {
- -webkit-border-radius: 3px;
- -moz-border-radius: 3px;
- border-radius: 3px;
-}
-.badge {
- padding-left: 9px;
- padding-right: 9px;
- -webkit-border-radius: 9px;
- -moz-border-radius: 9px;
- border-radius: 9px;
-}
-.label:empty,
-.badge:empty {
- display: none;
-}
-a.label:hover,
-a.label:focus,
-a.badge:hover,
-a.badge:focus {
- color: #ffffff;
- text-decoration: none;
- cursor: pointer;
-}
-.label-important,
-.badge-important {
- background-color: #b94a48;
-}
-.label-important[href],
-.badge-important[href] {
- background-color: #953b39;
-}
-.label-warning,
-.badge-warning {
- background-color: #f89406;
-}
-.label-warning[href],
-.badge-warning[href] {
- background-color: #c67605;
-}
-.label-success,
-.badge-success {
- background-color: #468847;
-}
-.label-success[href],
-.badge-success[href] {
- background-color: #356635;
-}
-.label-info,
-.badge-info {
- background-color: #3a87ad;
-}
-.label-info[href],
-.badge-info[href] {
- background-color: #2d6987;
-}
-.label-inverse,
-.badge-inverse {
- background-color: #333333;
-}
-.label-inverse[href],
-.badge-inverse[href] {
- background-color: #1a1a1a;
-}
-.btn .label,
-.btn .badge {
- position: relative;
- top: -1px;
-}
-.btn-mini .label,
-.btn-mini .badge {
- top: 0;
-}
diff --git a/assets/stylesheets/bootstrap/bootstrap_tables.css b/assets/stylesheets/bootstrap/bootstrap_tables.css
deleted file mode 100644
index 4a2b1b41bd6..00000000000
--- a/assets/stylesheets/bootstrap/bootstrap_tables.css
+++ /dev/null
@@ -1,272 +0,0 @@
-/*!
- * Bootstrap v2.3.2
- *
- * Copyright 2013 Twitter, Inc
- * Licensed under the Apache License v2.0
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Designed and built with all the love in the world @twitter by @mdo and @fat.
- */
-.clearfix {
- *zoom: 1;
-}
-.clearfix:before,
-.clearfix:after {
- display: table;
- content: "";
- line-height: 0;
-}
-.clearfix:after {
- clear: both;
-}
-.hide-text {
- font: 0/0 a;
- color: transparent;
- text-shadow: none;
- background-color: transparent;
- border: 0;
-}
-.input-block-level {
- display: block;
- width: 100%;
- min-height: 30px;
- -webkit-box-sizing: border-box;
- -moz-box-sizing: border-box;
- box-sizing: border-box;
-}
-table {
- max-width: 100%;
- background-color: transparent;
- border-collapse: collapse;
- border-spacing: 0;
-}
-.table {
- width: 100%;
- margin-bottom: 20px;
-}
-.table th,
-.table td {
- padding: 8px;
- line-height: 20px;
- text-align: left;
- vertical-align: top;
- border-top: 1px solid #dddddd;
-}
-.table th {
- font-weight: bold;
-}
-.table thead th {
- vertical-align: bottom;
-}
-.table caption + thead tr:first-child th,
-.table caption + thead tr:first-child td,
-.table colgroup + thead tr:first-child th,
-.table colgroup + thead tr:first-child td,
-.table thead:first-child tr:first-child th,
-.table thead:first-child tr:first-child td {
- border-top: 0;
-}
-.table tbody + tbody {
- border-top: 2px solid #dddddd;
-}
-.table .table {
- background-color: #ffffff;
-}
-.table-condensed th,
-.table-condensed td {
- padding: 4px 5px;
-}
-.table-bordered {
- border: 1px solid #dddddd;
- border-collapse: separate;
- *border-collapse: collapse;
- border-left: 0;
- -webkit-border-radius: 4px;
- -moz-border-radius: 4px;
- border-radius: 4px;
-}
-.table-bordered th,
-.table-bordered td {
- border-left: 1px solid #dddddd;
-}
-.table-bordered caption + thead tr:first-child th,
-.table-bordered caption + tbody tr:first-child th,
-.table-bordered caption + tbody tr:first-child td,
-.table-bordered colgroup + thead tr:first-child th,
-.table-bordered colgroup + tbody tr:first-child th,
-.table-bordered colgroup + tbody tr:first-child td,
-.table-bordered thead:first-child tr:first-child th,
-.table-bordered tbody:first-child tr:first-child th,
-.table-bordered tbody:first-child tr:first-child td {
- border-top: 0;
-}
-.table-bordered thead:first-child tr:first-child > th:first-child,
-.table-bordered tbody:first-child tr:first-child > td:first-child,
-.table-bordered tbody:first-child tr:first-child > th:first-child {
- -webkit-border-top-left-radius: 4px;
- -moz-border-radius-topleft: 4px;
- border-top-left-radius: 4px;
-}
-.table-bordered thead:first-child tr:first-child > th:last-child,
-.table-bordered tbody:first-child tr:first-child > td:last-child,
-.table-bordered tbody:first-child tr:first-child > th:last-child {
- -webkit-border-top-right-radius: 4px;
- -moz-border-radius-topright: 4px;
- border-top-right-radius: 4px;
-}
-.table-bordered thead:last-child tr:last-child > th:first-child,
-.table-bordered tbody:last-child tr:last-child > td:first-child,
-.table-bordered tbody:last-child tr:last-child > th:first-child,
-.table-bordered tfoot:last-child tr:last-child > td:first-child,
-.table-bordered tfoot:last-child tr:last-child > th:first-child {
- -webkit-border-bottom-left-radius: 4px;
- -moz-border-radius-bottomleft: 4px;
- border-bottom-left-radius: 4px;
-}
-.table-bordered thead:last-child tr:last-child > th:last-child,
-.table-bordered tbody:last-child tr:last-child > td:last-child,
-.table-bordered tbody:last-child tr:last-child > th:last-child,
-.table-bordered tfoot:last-child tr:last-child > td:last-child,
-.table-bordered tfoot:last-child tr:last-child > th:last-child {
- -webkit-border-bottom-right-radius: 4px;
- -moz-border-radius-bottomright: 4px;
- border-bottom-right-radius: 4px;
-}
-.table-bordered tfoot + tbody:last-child tr:last-child td:first-child {
- -webkit-border-bottom-left-radius: 0;
- -moz-border-radius-bottomleft: 0;
- border-bottom-left-radius: 0;
-}
-.table-bordered tfoot + tbody:last-child tr:last-child td:last-child {
- -webkit-border-bottom-right-radius: 0;
- -moz-border-radius-bottomright: 0;
- border-bottom-right-radius: 0;
-}
-.table-bordered caption + thead tr:first-child th:first-child,
-.table-bordered caption + tbody tr:first-child td:first-child,
-.table-bordered colgroup + thead tr:first-child th:first-child,
-.table-bordered colgroup + tbody tr:first-child td:first-child {
- -webkit-border-top-left-radius: 4px;
- -moz-border-radius-topleft: 4px;
- border-top-left-radius: 4px;
-}
-.table-bordered caption + thead tr:first-child th:last-child,
-.table-bordered caption + tbody tr:first-child td:last-child,
-.table-bordered colgroup + thead tr:first-child th:last-child,
-.table-bordered colgroup + tbody tr:first-child td:last-child {
- -webkit-border-top-right-radius: 4px;
- -moz-border-radius-topright: 4px;
- border-top-right-radius: 4px;
-}
-.table-striped tbody > tr:nth-child(odd) > td,
-.table-striped tbody > tr:nth-child(odd) > th {
- background-color: #f9f9f9;
-}
-.table-hover tbody tr:hover > td,
-.table-hover tbody tr:hover > th {
- background-color: #f5f5f5;
-}
-table td[class*="span"],
-table th[class*="span"],
-.row-fluid table td[class*="span"],
-.row-fluid table th[class*="span"] {
- display: table-cell;
- float: none;
- margin-left: 0;
-}
-.table td.span1,
-.table th.span1 {
- float: none;
- width: 44px;
- margin-left: 0;
-}
-.table td.span2,
-.table th.span2 {
- float: none;
- width: 124px;
- margin-left: 0;
-}
-.table td.span3,
-.table th.span3 {
- float: none;
- width: 204px;
- margin-left: 0;
-}
-.table td.span4,
-.table th.span4 {
- float: none;
- width: 284px;
- margin-left: 0;
-}
-.table td.span5,
-.table th.span5 {
- float: none;
- width: 364px;
- margin-left: 0;
-}
-.table td.span6,
-.table th.span6 {
- float: none;
- width: 444px;
- margin-left: 0;
-}
-.table td.span7,
-.table th.span7 {
- float: none;
- width: 524px;
- margin-left: 0;
-}
-.table td.span8,
-.table th.span8 {
- float: none;
- width: 604px;
- margin-left: 0;
-}
-.table td.span9,
-.table th.span9 {
- float: none;
- width: 684px;
- margin-left: 0;
-}
-.table td.span10,
-.table th.span10 {
- float: none;
- width: 764px;
- margin-left: 0;
-}
-.table td.span11,
-.table th.span11 {
- float: none;
- width: 844px;
- margin-left: 0;
-}
-.table td.span12,
-.table th.span12 {
- float: none;
- width: 924px;
- margin-left: 0;
-}
-.table tbody tr.success > td {
- background-color: #dff0d8;
-}
-.table tbody tr.error > td {
- background-color: #f2dede;
-}
-.table tbody tr.warning > td {
- background-color: #fcf8e3;
-}
-.table tbody tr.info > td {
- background-color: #d9edf7;
-}
-.table-hover tbody tr.success:hover > td {
- background-color: #d0e9c6;
-}
-.table-hover tbody tr.error:hover > td {
- background-color: #ebcccc;
-}
-.table-hover tbody tr.warning:hover > td {
- background-color: #faf2cc;
-}
-.table-hover tbody tr.info:hover > td {
- background-color: #c4e3f3;
-}
diff --git a/assets/stylesheets/bootstrap/bootstrap_tooltip.css b/assets/stylesheets/bootstrap/bootstrap_tooltip.css
deleted file mode 100644
index 35a6699c0ea..00000000000
--- a/assets/stylesheets/bootstrap/bootstrap_tooltip.css
+++ /dev/null
@@ -1,112 +0,0 @@
-/*!
- * Bootstrap v2.3.2
- *
- * Copyright 2013 Twitter, Inc
- * Licensed under the Apache License v2.0
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Designed and built with all the love in the world @twitter by @mdo and @fat.
- */
-.clearfix {
- *zoom: 1;
-}
-.clearfix:before,
-.clearfix:after {
- display: table;
- content: "";
- line-height: 0;
-}
-.clearfix:after {
- clear: both;
-}
-.hide-text {
- font: 0/0 a;
- color: transparent;
- text-shadow: none;
- background-color: transparent;
- border: 0;
-}
-.input-block-level {
- display: block;
- width: 100%;
- min-height: 30px;
- -webkit-box-sizing: border-box;
- -moz-box-sizing: border-box;
- box-sizing: border-box;
-}
-.tooltip {
- position: absolute;
- z-index: 1030;
- display: block;
- visibility: visible;
- font-size: 11px;
- line-height: 1.4;
- opacity: 0;
- filter: alpha(opacity=0);
-}
-.tooltip.in {
- opacity: 0.8;
- filter: alpha(opacity=80);
-}
-.tooltip.top {
- margin-top: -3px;
- padding: 5px 0;
-}
-.tooltip.right {
- margin-left: 3px;
- padding: 0 5px;
-}
-.tooltip.bottom {
- margin-top: 3px;
- padding: 5px 0;
-}
-.tooltip.left {
- margin-left: -3px;
- padding: 0 5px;
-}
-.tooltip-inner {
- max-width: 200px;
- padding: 8px;
- color: #ffffff;
- text-align: center;
- text-decoration: none;
- background-color: #000000;
- -webkit-border-radius: 4px;
- -moz-border-radius: 4px;
- border-radius: 4px;
-}
-.tooltip-arrow {
- position: absolute;
- width: 0;
- height: 0;
- border-color: transparent;
- border-style: solid;
-}
-.tooltip.top .tooltip-arrow {
- bottom: 0;
- left: 50%;
- margin-left: -5px;
- border-width: 5px 5px 0;
- border-top-color: #000000;
-}
-.tooltip.right .tooltip-arrow {
- top: 50%;
- left: 0;
- margin-top: -5px;
- border-width: 5px 5px 5px 0;
- border-right-color: #000000;
-}
-.tooltip.left .tooltip-arrow {
- top: 50%;
- right: 0;
- margin-top: -5px;
- border-width: 5px 0 5px 5px;
- border-left-color: #000000;
-}
-.tooltip.bottom .tooltip-arrow {
- top: 0;
- left: 50%;
- margin-left: -5px;
- border-width: 0 5px 5px;
- border-bottom-color: #000000;
-}
diff --git a/assets/stylesheets/bootstrap/images/ui-bg_flat_0_aaaaaa_40x100.png b/assets/stylesheets/bootstrap/images/ui-bg_flat_0_aaaaaa_40x100.png
deleted file mode 100644
index 5b5dab2ab7b..00000000000
Binary files a/assets/stylesheets/bootstrap/images/ui-bg_flat_0_aaaaaa_40x100.png and /dev/null differ
diff --git a/assets/stylesheets/bootstrap/images/ui-bg_glass_55_fbf9ee_1x400.png b/assets/stylesheets/bootstrap/images/ui-bg_glass_55_fbf9ee_1x400.png
deleted file mode 100644
index ad3d6346e00..00000000000
Binary files a/assets/stylesheets/bootstrap/images/ui-bg_glass_55_fbf9ee_1x400.png and /dev/null differ
diff --git a/assets/stylesheets/bootstrap/images/ui-bg_glass_65_ffffff_1x400.png b/assets/stylesheets/bootstrap/images/ui-bg_glass_65_ffffff_1x400.png
deleted file mode 100644
index 42ccba269b6..00000000000
Binary files a/assets/stylesheets/bootstrap/images/ui-bg_glass_65_ffffff_1x400.png and /dev/null differ
diff --git a/assets/stylesheets/bootstrap/images/ui-bg_glass_75_dadada_1x400.png b/assets/stylesheets/bootstrap/images/ui-bg_glass_75_dadada_1x400.png
deleted file mode 100644
index 5a46b47cb16..00000000000
Binary files a/assets/stylesheets/bootstrap/images/ui-bg_glass_75_dadada_1x400.png and /dev/null differ
diff --git a/assets/stylesheets/bootstrap/images/ui-bg_glass_75_e6e6e6_1x400.png b/assets/stylesheets/bootstrap/images/ui-bg_glass_75_e6e6e6_1x400.png
deleted file mode 100644
index 86c2baa655e..00000000000
Binary files a/assets/stylesheets/bootstrap/images/ui-bg_glass_75_e6e6e6_1x400.png and /dev/null differ
diff --git a/assets/stylesheets/bootstrap/images/ui-bg_glass_75_ffffff_1x400.png b/assets/stylesheets/bootstrap/images/ui-bg_glass_75_ffffff_1x400.png
deleted file mode 100644
index e65ca1297c7..00000000000
Binary files a/assets/stylesheets/bootstrap/images/ui-bg_glass_75_ffffff_1x400.png and /dev/null differ
diff --git a/assets/stylesheets/bootstrap/images/ui-bg_highlight-soft_75_cccccc_1x100.png b/assets/stylesheets/bootstrap/images/ui-bg_highlight-soft_75_cccccc_1x100.png
deleted file mode 100644
index 7c9fa6c6edc..00000000000
Binary files a/assets/stylesheets/bootstrap/images/ui-bg_highlight-soft_75_cccccc_1x100.png and /dev/null differ
diff --git a/assets/stylesheets/bootstrap/images/ui-bg_inset-soft_95_fef1ec_1x100.png b/assets/stylesheets/bootstrap/images/ui-bg_inset-soft_95_fef1ec_1x100.png
deleted file mode 100644
index 0e05810fffe..00000000000
Binary files a/assets/stylesheets/bootstrap/images/ui-bg_inset-soft_95_fef1ec_1x100.png and /dev/null differ
diff --git a/assets/stylesheets/bootstrap/images/ui-icons_222222_256x240.png b/assets/stylesheets/bootstrap/images/ui-icons_222222_256x240.png
deleted file mode 100644
index b273ff111d2..00000000000
Binary files a/assets/stylesheets/bootstrap/images/ui-icons_222222_256x240.png and /dev/null differ
diff --git a/assets/stylesheets/bootstrap/images/ui-icons_2e83ff_256x240.png b/assets/stylesheets/bootstrap/images/ui-icons_2e83ff_256x240.png
deleted file mode 100644
index 09d1cdc856c..00000000000
Binary files a/assets/stylesheets/bootstrap/images/ui-icons_2e83ff_256x240.png and /dev/null differ
diff --git a/assets/stylesheets/bootstrap/images/ui-icons_454545_256x240.png b/assets/stylesheets/bootstrap/images/ui-icons_454545_256x240.png
deleted file mode 100644
index 59bd45b907c..00000000000
Binary files a/assets/stylesheets/bootstrap/images/ui-icons_454545_256x240.png and /dev/null differ
diff --git a/assets/stylesheets/bootstrap/images/ui-icons_888888_256x240.png b/assets/stylesheets/bootstrap/images/ui-icons_888888_256x240.png
deleted file mode 100644
index 6d02426c114..00000000000
Binary files a/assets/stylesheets/bootstrap/images/ui-icons_888888_256x240.png and /dev/null differ
diff --git a/assets/stylesheets/bootstrap/images/ui-icons_cd0a0a_256x240.png b/assets/stylesheets/bootstrap/images/ui-icons_cd0a0a_256x240.png
deleted file mode 100644
index 2ab019b73ec..00000000000
Binary files a/assets/stylesheets/bootstrap/images/ui-icons_cd0a0a_256x240.png and /dev/null differ
diff --git a/assets/stylesheets/bootstrap/images/ui-icons_f6cf3b_256x240.png b/assets/stylesheets/bootstrap/images/ui-icons_f6cf3b_256x240.png
deleted file mode 100644
index c9869351a73..00000000000
Binary files a/assets/stylesheets/bootstrap/images/ui-icons_f6cf3b_256x240.png and /dev/null differ
diff --git a/assets/stylesheets/bootstrap_custom.css b/assets/stylesheets/bootstrap_custom.css
deleted file mode 100644
index 961cb98d130..00000000000
--- a/assets/stylesheets/bootstrap_custom.css
+++ /dev/null
@@ -1,87 +0,0 @@
-/*
-BOOSTRAP CUSTOM 2
-*/
-ol.list-unstyled,
-ul.list-unstyled {
- list-style-type: none;
- padding: 0;
- margin: 0;
-}
-
-ol.list-inline,
-ul.list-inline {
- display: inline-flex;
-}
-
-dl { margin-bottom: 10px; }
-dt, dd { line-height: 25px; }
-dt { font-weight: bold; }
-dd { margin-left: 10px; }
-
-.dl-horizontal {}
-.dl-horizontal:before, .dl-horizontal:after { content: ""; display: table; line-height: 0; }
-.dl-horizontal:after { clear: both; }
-.dl-horizontal dt { color: #555555; clear: left; float: left; overflow: hidden; text-align: right; text-overflow: ellipsis; white-space: nowrap; width: 160px; }
-.dl-horizontal dd { margin-left: 180px; }
-.dl-xxxlarge dt { width: 500px; }
-.dl-xxxlarge dd { margin-left: 520px; }
-.dl-xxlarge dt { width: 400px; }
-.dl-xxlarge dd { margin-left: 420px; }
-.dl-xlarge dt { width: 300px; }
-.dl-xlarge dd { margin-left: 320px; }
-.dl-large dt { width: 240px; }
-.dl-large dd { margin-left: 260px; }
-.dl-small dt { width: 110px; }
-.dl-small dd { margin-left: 130px; }
-.dl-medium dt { width: 110px; }
-.dl-medium dd { margin-left: 125px; }
-.dl-xsmall dt { width: 50px; }
-.dl-xsmall dd { margin-left: 60px; }
-
-
-/*
-BOOSTRAP CUSTOM 3
-*/
-.table-wrap { table-layout: fixed; word-wrap: break-word; }
-
-div.flash.warning, .conflict {
- background: url("../images/warning.png") no-repeat scroll 8px 18px #FFEBC1;
-}
-
-
-/*BOOTSTRAP LIKE*/
-.container {
- width: 100%;
- display: table;
-}
-
-.row {
- display: table-row;
-}
-
-.col-md-4 {
- display: table-cell;
- width: 33.3333%;
-}
-
-.col-md-6 {
- width: 45%;
- display: table-cell;
-}
-
-.col-md-8 {
- display: table-cell;
- width: 66.6667%;
-}
-
-.col-md-12 {
- width: 90%;
- display: table-cell;
-}
-
-.row > .col-md-4,
-.row > .col-md-6,
-.row > .col-md-8,
-.row > .col-md-12 {
- padding: 0 10px;
-}
diff --git a/assets/stylesheets/git_urls.css b/assets/stylesheets/git_urls.css
index 51481c83fb2..a10d8803c98 100644
--- a/assets/stylesheets/git_urls.css
+++ b/assets/stylesheets/git_urls.css
@@ -31,7 +31,7 @@ GIT_URL_BOX
float: left;
font-family: "DejaVu Sans Mono","Bitstream Vera Sans Mono","Courier New",monospace;
font-size: 10px;
- height: 18px;
+ height: 25px;
margin: 0;
min-width: 55%;
padding: 3px 5px 2px;
@@ -100,3 +100,12 @@ GIT_URL_BOX
padding-right: 4px;
font-size: 18px;
}
+
+.clipboard-button {
+ padding-left: 6px;
+ border-color: #bbb;
+ border-style: solid;
+ border-width: 1px;
+ width: 24px;
+ height: 25px;
+}
diff --git a/config/locales/de.yml b/config/locales/de.yml
index ed17271f153..8887cacbfdd 100644
--- a/config/locales/de.yml
+++ b/config/locales/de.yml
@@ -7,7 +7,7 @@ de:
base:
identifier_empty: Repository ohne Kennung ist nicht verschiebbar
identifier_taken: Repository Kennung ist schon in Verwendung
- wrong_target_project: Zielprojekt stimmt mit Quellprojet überein
+ wrong_target_project: Zielprojekt stimmt mit Quellprojekt überein
activerecord:
errors:
models:
@@ -15,193 +15,188 @@ de:
attributes:
key:
corrupted: scheint beschädigt zu sein.
- taken_by_you: 'is already in use by you as "%{name}".'
- taken_by_other: 'is already in use by user "%{login}" as "%{name}".'
- taken_by_someone: is already in use. It belongs to another user (ask administrator for details).
- taken_by_gitolite_admin: is already in use as the Gitolite administrator key.
+ taken_by_you: 'wird bereits von Dir verwendet als Benutzer "%{name}".'
+ taken_by_other: 'wird bereits verwendet von Benutzer "%{login}" als "%{name}".'
+ taken_by_someone: wird bereits verwendet. Gehört einem anderen Benutzer (kontaktiere den Administrator für weitere Details).
+ taken_by_gitolite_admin: wird bereits verwendet als Gitolite Administrator Key.
project:
attributes:
identifier:
- invalid: ungültige Kennung
+ invalid: "ungültige Kennung"
taken: matches existing repository identifier
repository_deployment_credential:
attributes:
base:
- invalid_key: Öffentlicher Schlüssel muss ein Deployment Schlüssel sein
- invalid_user: Credential owner cannot be different than owner of Key
+ invalid_key: "Öffentlicher Schlüssel muss ein Deployment Schlüssel sein"
+ invalid_user: "Credential Owner darf sich vom Key Owner nicht unterscheiden"
repository_git_config_key:
attributes:
key:
- invalid: "Falsches Schlüsselformat (es muss mindestestens ein '.' vorhanden sein)"
+ invalid: "Falsches Schlüsselformat (es muss mindestens ein '.' vorhanden sein)"
repository_mirror:
attributes:
base:
- nothing_to_push: Must include at least one item to push
+ nothing_to_push: "Muss mindestens ein Element enthalten, das zu pushen ist"
explicit_refspec:
- bad_format: is badly formatted
- have_null_component: cannot have null first component (will delete remote branch(es))
+ bad_format: ist schlecht formatiert
+ have_null_component: "kann nicht null erste Komponente haben (würde remote branch(es) entfernen)"
repository/xitolite:
attributes:
base:
- blank_default_exists: "Can not create the respository as a blank repository already exists."
- invalid_options: "You can not initialize a README file in a repository with GitAnnex"
+ blank_default_exists: "Kann das Respository nicht anlegen, da bereits ein leeres Repository existiert."
+ invalid_options: "Du kannst eine README Datei nicht in einem Repository mit GitAnnex initialisieren"
identifier:
cannot_equal_project: "can not match the ID of an existing project"
- taken: "is already taken."
- invalid: invalid
- cannot_change: cannot change
- all_branches: All Branches
- all_references: All Refs
- all_tags: All Tags
- button_clone: Clone
- button_ok: OK
- display_access_emphasis: "In the above patterns,
emphasized components represent context-dependent elements."
- display_access_flat: "Parent projects are not included in the URLs, since the repository is in
Flat mode."
- display_access_hierarchical: "Parent projects are included in the URLs, since the repository is in
Hierarchical mode."
- display_access_setup1: "Assume that
project1 is a parent of
project2, and
project2 is a parent of
project3."
- display_access_setup2: "Also, assume that project
project3 has 2 repositories : the
default repository and a repository
example."
- display_access_setup3: "Given the current configuration, project
project3 has the following properties :"
- error_download_revision_no_such_commit: "No such commit %{commit}"
- error_project_not_found: "No project with this identifier was found"
- error_public_key_create_failed: Failed to create public key.
- error_public_key_update_failed: Failed to update public key.
- error_repository_not_found: "No repository with this identifier was found"
- error_xitolite_repositories_disabled: "Gitolite repositories are disabled, cannot create repository!"
- field_key: this key
- field_mode: Mode
+ taken: "wird bereits verwendet."
+ invalid: "ungültig"
+ cannot_change: "kann nicht geändert werden"
+ all_branches: Alle Branches
+ all_references: Alle Refs
+ all_tags: Alle TAGs
+ button_clone: Klonen
+ display_access_emphasis_html: "In the above patterns,
emphasized components represent context-dependent elements."
+ display_access_flat: "Eltern Projekte sind nicht in der URL enthalten, da das Repository in einem
Flat Modus ist."
+ display_access_hierarchical: "Eltern Projekte sind in der URL enthalten, da das Repository in einem
Hierarchical Modus ist."
+ display_access_setup1_html: "Geh davon aus, dass
project1 das Elternprojekt von
project2, und
project2 das Elternprojekt von
project3 ist."
+ display_access_setup2_html: "Geh auch davon aus, dass das
project3 2 Repositories hat: ein
default Repository und ein
example Repository."
+ display_access_setup3_html: "Bezogen auf die aktuelle Konfiguration, hat Projekt
project3 folgende Optionen:"
+ error_download_revision_no_such_commit: "Kein Commit %{commit}"
+ error_project_not_found: "Kein Projekt mit dem Identifier gefunden"
+ error_public_key_create_failed: Public key konnte nicht erzeugt werden.
+ error_public_key_update_failed: Public key konnte nicht aktualisiert werden.
+ error_repository_not_found: "Kein Repository mit dem Identifier gefunden"
+ error_xitolite_repositories_disabled: "Gitolite Repositories sind deaktiviert, kann kein Repository erzeugen!"
+ field_key: dieser Key
+ field_mode: Modus
field_perm: Zugriffsberechtigung
- field_split_payloads: Split the global payload in many payloads
- field_use_triggers: Use triggers
+ field_split_payloads: Die globale payload in viele payloads aufteilen
+ field_use_triggers: Verwende Triggers
label_active_for: Aktiv seit
- label_all_projects_use_git: Automatically initialize Git repositories for new projects?
- label_archived_repositories: Archivierte Repositories
+ label_all_projects_use_git: Git repositories für neue Projekte automatisch initialisieren?
label_average_commit_per_day: Durchschnitt Commits pro Tag
label_average_contributor_commits: Durchschnitt Commits pro Mitwirkenden
- label_backup_in_progress: Saving...
- label_branch_path: Branch path
- label_browse_repository: Browse repository
+ label_backup_in_progress: Wird gespeichert...
+ label_branch_path: Branch Path
+ label_browse_repository: Browse Repository
label_commit_plural: Commits
label_commits_number: Anzahl Commits
label_commits_per_day: Commits am Tag
label_commits_per_hour: Commits in der Stunde
label_commits_per_weekday: Commits an Wochentagen
- label_copied_to_clipboard: Copied!
- label_copy_to_clipboard: Copy to clipboard
- label_current_deploy_keys: Current deployment keys
- label_current_public_keys: Current public keys
- label_current_user_keys: Current user keys
- label_cut_and_paste: Cut and paste entire .pub file.
+ label_current_deploy_keys: Aktuelle Deployment Keys
+ label_current_public_keys: Aktuelle Public Keys
+ label_current_user_keys: Aktuelle Benutzer Keys
+ label_cut_and_paste: Ausschneiden und einfügen des kompletten .pub File.
label_debug: Debug
- label_default_domain_name: Default domain name
+ label_default_domain_name: Default Domainname
label_default_gitolite_hooks_url: Default URL
label_default_repository: Standard Repository
- label_delete_from_recyle_bin: Delete from recycle bin
- label_delete_git_repositories: Delete Git repository when project deleted?
(will be place in recycle bin)
+ label_delete_from_recyle_bin: Alles im Papierkorb löschen
+ label_delete_git_repositories: Git Repository löschen, wenn Projekt gelöscht wird?
+ info_delete_git_repositories: (wird in den Papierkorb verschoben)
label_delete_in_progress: Lösche...
label_delete_warning: Warnung! Löschvorgang kann nicht rückgängig gemacht werden!
label_deploy_key: Deployment Schlüssel
- label_deployment_credential_active: Active?
- label_deployment_credential_add: Add Deployment Credential
- label_deployment_credential_create_key_first: Deployment key(s) not detected. You should create one first.
- label_deployment_credential_create: Create New Deployment Credential
+ label_deployment_credential_add: Deployment Credential hinzufügen
+ label_deployment_credential_create_key_first: Deployment Key(s) nicht gefunden. Du solltest erst einen erzeugen.
+ label_deployment_credential_create: Neue Deployment Credential erzeugen
label_deployment_credential_delete_when_unused: Schlüssel entfernen, wenn unbenutzt?
- label_deployment_credential_delete: Delete Deployment Credential
- label_deployment_credential_edit: Edit Deployment Credential
+ label_deployment_credential_delete: Deployment Credential löschen
+ label_deployment_credential_edit: Deployment Credential bearbeiten
label_deployment_credential_honored: Honored?
label_deployment_credential_owner: Owner
- label_deployment_credential_public_key_file: Public key file
- label_deployment_credential_public_key_name: Public key name
- label_deployment_credential_select_deploy_key: Select Deployment Key
+ label_deployment_credential_public_key_file: Public Key Datei
+ label_deployment_credential_public_key_name: Public Key Name
+ label_deployment_credential_select_deploy_key: Deployment Key auswählen
label_deployment_credentials: Deployment Credentials
- label_download_and_install_git: Download and install Git
+ label_download_and_install_git: Download und installiere Git
label_download_format: Herunterladen als
label_download_select_format: Format auswählen
- label_empty_get: Empty GET
+ label_empty_get: Empty GET
label_empty_recycle_bin: Papierkorb leeren
- label_empty_repository: Empty repository?
- label_enable_git_daemon: Enable Git Daemon
- label_enable_git_notify: Enable Mailing list
- label_enable_go_url: Enable GO URL
- label_enable_protected_branches: Enable protected branches
- label_enable_public_repo: Make repository public
+ label_empty_repository: Repository leeren?
+ label_enable_git_daemon: Git Daemon aktivieren
+ label_enable_git_notify: Mailing-Liste aktivieren
+ label_enable_go_url: GO URL aktivieren
+ label_enable_protected_branches: Geschützte Branches aktivieren
+ label_enable_public_repo: Repository öffentlich machen
label_enable_smart_http: Smart HTTP Mode
label_enable_smart_https: Smart HTTPS Mode
- label_enable_ssh_url: Enable SSH URL
- label_enabled: Enabled
- label_error: Error
+ label_enable_ssh_url: SSH URL aktivieren
+ label_error: Fehler
label_etcetera: etc
- label_example_repository: Example repository
+ label_example_repository: Beispiel Repository
label_first_commit_date: Erster Commit
label_flat: Flat
label_flush_cache: Flush Git Cache?
label_git_annex: GitAnnex
- label_git_config_email_desc: Will be used as author email in commits
- label_git_config_email: Git author email
- label_git_config_key_add: Add Git Config Key
- label_git_config_key_create: Create New Git Config Key
- label_git_config_key_delete: Delete Git Config Key
- label_git_config_key_edit: Edit Git Config Key
+ label_git_config_email_desc: Wird als Autoren E-Mail in Commits verwendet
+ label_git_config_email: Git Autor E-mail
+ label_git_config_key_add: Git Config Key hinzufügen
+ label_git_config_key_create: Neuen Git Config Key erzeugen
+ label_git_config_key_delete: Git Config Key löschen
+ label_git_config_key_edit: Git Config Key bearbeiten
label_git_config_keys: Git Config Keys
- label_git_config_username_desc: Will be used as author name in commits
- label_git_config_username: Git author name
+ label_git_config_username_desc: Wird als Autor Name in Commits verwendet
+ label_git_config_username: Git Autor Name
label_git_daemon: Git Daemon
label_git_key_type_config: Git Config Key
label_git_key_type_option: Gitolite Option
- label_git_notification_prefix: Mailing list prefix
- label_git_notification_sender: Mailing list sender address
- label_git_notify: Git Notifications
- label_git_objects_count: Git objects count
- label_git_option_key_add: Add Gitolite option
- label_git_option_keys: Gitolite configuration options
- label_git_version: Git version
- label_github_post: GitHub POST
- label_gitolite_access_config: Gitolite Access Configuration
+ label_git_notification_prefix: Mailing Liste prefix
+ label_git_notification_sender: Mailing Liste Absenderadresse
+ label_git_notify: Git Benachrichtigungen
+ label_git_objects_count: Git Objekte Zähler
+ label_git_option_key_add: Gitolite Option hinzufügen
+ label_git_option_keys: Gitolite Konfigurationsoptionen
+ label_git_version: Git Version
+ label_github_post: GitHub POST
+ label_gitolite_access_config: Gitolite Access Konfiguration
label_gitolite_banner: Gitolite banner
label_gitolite_bin_dir: Gitolite binaries directory
- label_gitolite_cache_adapter_desc: You must restart Redmine to take effects
+ label_gitolite_cache_adapter_desc: Redmine neu starten, damit die Änderungen greifen.
label_gitolite_cache_adapter: Cache Adapter
- label_gitolite_cache_config: Gitolite Cache Configuration
- label_gitolite_cache_max_elements: Max cache elements
- label_gitolite_cache_max_size: Max cache element size
- label_gitolite_cache_max_time: Max cache time
- label_gitolite_config_file: Gitolite configuration file
- label_gitolite_daemon_by_default: Enable Git Daemon mode for new repositories by default?
- label_gitolite_documentation: Gitolite Documentation
- label_gitolite_download_revision_enabled: Enable Git revisions download
- label_gitolite_global_config: Gitolite Global Configuration
- label_gitolite_global_storage_dir_desc: Relative to Gitolite user home
+ label_gitolite_cache_config: Gitolite Cache Konfiguration
+ label_gitolite_cache_max_elements: Max Cache Elemente
+ label_gitolite_cache_max_size: "Max Cache Elemente, Größe"
+ label_gitolite_cache_max_time: Max Cache Zeit
+ label_gitolite_config_file: Gitolite Konfigurationsdatei
+ label_gitolite_daemon_by_default: "Git Daemon Modus für neue Repositories standardmäßig aktivieren?"
+ label_gitolite_documentation: Gitolite Dokumentation
+ label_gitolite_download_revision_enabled: Aktiviere Git Revisions Download
+ label_gitolite_global_config: Gitolite Global Konfiguration
+ label_gitolite_global_storage_dir_desc: Relative zu Gitolite User Home
label_gitolite_global_storage_dir: Gitolite repositories base path
- label_gitolite_hook_dirs_installed: Hook dirs installed?
- label_gitolite_hook_untouched: hook left untouched
- label_gitolite_hooks_are_asynchronous: Run hooks asynchronously
- label_gitolite_hooks_config: Gitolite Hooks Configuration
- label_gitolite_hooks_debug: Run hooks in Debug mode
- label_gitolite_hooks_installed: Hooks installed?
- label_gitolite_hooks_namespace: Hooks Git namespace
- label_gitolite_hooks_params_installed: Hooks parameters installed?
+ label_gitolite_hook_dirs_installed: Hook dirs installiert?
+ label_gitolite_hook_untouched: Hook left unberührt
+ label_gitolite_hooks_are_asynchronous: Run Hooks asynchron
+ label_gitolite_hooks_config: Gitolite Hooks Konfiguration
+ label_gitolite_hooks_debug: Run Hooks in Debug mode
+ label_gitolite_hooks_installed: Hooks installiert?
+ label_gitolite_hooks_namespace: Hooks Git Namespace
+ label_gitolite_hooks_params_installed: Hooks Parameter installiert?
label_gitolite_hooks_url: Hooks URL
- label_gitolite_http_by_default: Enable Smart HTTP mode for new repositories by default?
- label_gitolite_identifier_prefix_desc: Will be used to generate SSH keys identifiers
+ label_gitolite_http_by_default: Smart HTTP Modus für neue Repositories standardmäßig aktivieren?
+ label_gitolite_identifier_prefix_desc: Wird zur Generierung von SSH Keys Identifiers verwendet
label_gitolite_identifier_prefix: Gitolite prefix
- label_gitolite_identifier_strip_user_id_desc: You must restart Redmine to take effects
- label_gitolite_identifier_strip_user_id: Remove user ID from Gitolite identifier
+ label_gitolite_identifier_strip_user_id_desc: Redmine neu starten, damit die Änderungen greifen.
+ label_gitolite_identifier_strip_user_id: User ID von Gitolite identifier entfernen
label_gitolite_lib_dir: Gitolite librairies directory
- label_gitolite_libgit2_version: libgit2 version
- label_gitolite_local_code_dir: Gitolite non-core hooks directory
- label_gitolite_log_level_desc: You must restart Redmine to take effects
- label_gitolite_log_level: Gitolite log level
- label_gitolite_mailer_params_installed: Mailer parameters installed?
+ label_gitolite_libgit2_version: libgit2 Version
+ label_gitolite_local_code_dir: Gitolite non-core Hooks directory
+ label_gitolite_log_level_desc: Redmine neu starten, damit die Änderungen greifen.
+ label_gitolite_log_level: Gitolite Log Level
+ label_gitolite_mailer_params_installed: Mailer Parameter installiert?
label_gitolite_notify_by_default: "Enable 'Git Notifications' hook for new repositories by default?"
- label_gitolite_notify_config: Git Mailing List Configuration
+ label_gitolite_notify_config: Git Mailing Liste Konfiguration
label_gitolite_notify_global_exclude: Git mailing list global exclude list
label_gitolite_notify_global_include: Git mailing list global include list
label_gitolite_notify_global_prefix: Git mailing list global prefix
label_gitolite_notify_global_sender_address: Git mailing list global sender address
- label_gitolite_overwrite_existing_hooks: Overwrite existing hooks
+ label_gitolite_overwrite_existing_hooks: "Existierende Hooks überschreiben"
label_gitolite_recycle_bin_dir_desc: Relative to Gitolite user home
label_gitolite_recycle_bin_dir: Gitolite recycle bin base path
- label_gitolite_recycle_bin_expiration_time_desc: In hours
- label_gitolite_recycle_bin_expiration_time: Expiration time for repositories in recycle bin
+ label_gitolite_recycle_bin_expiration_time_desc: In Stunden
+ label_gitolite_recycle_bin_expiration_time: Ablaufzeit für Repositories im Papierkorb
label_gitolite_redmine_storage_dir_desc: Relative to Gitolite repositories base path
label_gitolite_redmine_storage_dir: Subdirectory for Redmine-managed repositories
label_gitolite_repository_count: Count of physical repositories in Gitolite
@@ -213,64 +208,63 @@ de:
label_gitolite_ssh_private_key: Gitolite SSH private key
label_gitolite_ssh_public_key: Gitolite SSH public key
label_gitolite_storage_config: Gitolite Storage Configuration
- label_gitolite_temp_dir_desc: Must be absolute
+ label_gitolite_temp_dir_desc: Muss absolut sein
label_gitolite_temp_dir: Temporary dir for lock file and data
label_gitolite_use_sidekiq: Use Sidekiq to launch async jobs
- label_gitolite_user: Gitolite username
- label_gitolite_version: Gitolite version
+ label_gitolite_user: Gitolite Username
+ label_gitolite_version: Gitolite Version
label_help_git_setup: Git Setup
- label_help_no_repo_rights: "Sorry, you don't have access to this repository. There's nothing you can do."
- label_help_repository_clone: Clone Repository
- label_help_repository_setup_existing: Setup Existing Repository
- label_help_repository_setup_new: Setup New Repository
- label_hierarchical_organisation: Directory and URL structure for Redmine-managed repositories
+ label_help_no_repo_rights: "Sorry, auf dieses Repository hast Du keinen Zugriff. Hier gibt es nichts für Dich zu tun."
+ label_help_repository_clone: Klone Repository
+ label_help_repository_setup_existing: Setup besthendes Repository
+ label_help_repository_setup_new: Setup neues Repository
+ label_hierarchical_organisation: Verzeichnis und URL Struktur für Redmine-managed Repositories
label_hierarchical: hierarchisch
label_http_access: HTTP Zugriff
label_http_only: Nur HTTP
label_http_server_domain: HTTP server domain
label_http_server_subdir_desc: Relative to Redmine root url
- label_http_server_subdir: Subdirectory for HTTP access
+ label_http_server_subdir: Unterverzeichnis für HTTP access
label_https_access: HTTPS Zugriff
label_https_and_http: HTTPS und HTTP
label_https_only: Nur HTTPS
- label_https_server_domain_desc: Let it blank if you don't use it
- label_https_server_domain: HTTPS server domain
- label_identifier_can_be_arbitrary_desc: (Can be any meaningful string)
+ label_https_server_domain_desc: Leer lassen, wenn es nicht verwendet wird
+ label_https_server_domain: HTTPS Server Domain
+ label_identifier_can_be_arbitrary_desc: (Kann jeder sinnvolle String sein)
label_identifier_can_be_arbitrary: Identifier
- label_identifier_cannot_be_changed: Identifier
(Cannot be changed)
+ label_identifier_cannot_be_changed: Identifier
(Kann nicht geändert werden)
label_info: Info
- label_init_repo_with_git_annex: Initialize this repository with GitAnnex
- label_init_repo_with_readme: Initialize this repository with a README
- label_init_repositories_on_create: Automatically initialize Git repositories with a README file (à la Github)
- label_install_gitolite_hooks: Install hooks !
- label_key_cannot_be_changed_please_create_new_key: 'The key cannot be altered anymore. However, you can delete it and create a new one.'
+ label_init_repo_with_git_annex: Dieses Repository mit GitAnnex initialisieren
+ label_init_repo_with_readme: Dieses Repository mit einer README initialisieren
+ label_init_repositories_on_create: Automatisch Git Repositories mit einer README Datei initialisieren (à la Github)
+ label_install_gitolite_hooks: Installiere Hooks!
+ label_key_cannot_be_changed_please_create_new_key: 'Der Key kann nicht mehr geändert werden. Du kannst ihn jedoch löschen und einen Neuen erzeugen.'
label_key_type: Öffentlicher Schlüsseltyp
- label_key: Schlüssel
+ label_key: "Schlüssel (Key)"
label_latest_commit_date: Neuster Commit
label_main_git_repository: Main Git Repository
- label_mirror_add: Add Repository Mirror
- label_mirror_create: Create Repository Mirror
- label_mirror_delete: Delete Repository Mirror
- label_mirror_edit: Edit Repository Mirror
+ label_mirror_add: Repository Mirror hinzufügen
+ label_mirror_create: Repository Mirror erstellen
+ label_mirror_delete: Repository Mirror löschen
+ label_mirror_edit: Repository Mirror bearbeiten
label_mirror_explicit_refspec: Explicit Reference Spec
label_mirror_fast_forward: Fast Forward (Unforced)
label_mirror_forced_update: Force Update Remote
label_mirror_full_mirror: Complete Mirroring
- label_mirror_help: Mirrors must grant write access to the following public key
- label_mirror_inactive: Inactive
- label_mirror_include_all_branches: Push all Branches
- label_mirror_include_all_tags: Push all Tags
- label_mirror_push_fail: Failed
+ label_mirror_help: Mirrors müssen Schreibzugriff auf den folgenden Public Key gewähren
+ label_mirror_include_all_branches: Push alle Branches
+ label_mirror_include_all_tags: Push alle Tags
+ label_mirror_push_fail: Fehlgeschlagen
label_mirror_push_info_html: "Pushing changes to mirror
%{mirror_url} :
%{status}"
label_mirror_push_mode: Mirror update mode
label_mirror_push_output: Output
- label_mirror_push_sucess: Success
+ label_mirror_push_sucess: Erfolgreich
label_mirror_push_title: Push to mirror
label_mirror_push: Push
label_mirror_refspec: Refspec
- label_mirror_url_accepted_format: Accepted URL format
+ label_mirror_url_accepted_format: Erlaubtes URL format
label_mirror: Mirror
- label_mirroring_keys_installed: Mirrors keys installed?
+ label_mirroring_keys_installed: Mirror keys installiert?
label_mode: Mode
label_move_repository: "Repository verschieben: '%{repo_name}'"
label_my_public_keys: Meine öffentlichen Schlüssel
@@ -278,16 +272,16 @@ de:
label_no_public_keys: Keine öffentlichen Schlüssel definiert
label_open_issue: Ticket öffnen
label_path_directories: PATH directories
- label_permissions_header: Required Permissions
- label_post_receive_url_add: Add Post Receive URL
- label_post_receive_url_create: Create Repository Post-receive URL
- label_post_receive_url_delete: Delete Repository Post-receive URL
- label_post_receive_url_edit: Edit Repository Post-receive URL
+ label_permissions_header: Notwendige Berechtigungen
+ label_post_receive_url_add: Post Receive URL hinzufügen
+ label_post_receive_url_create: Repository Post-receive URL erstellen
+ label_post_receive_url_delete: Repository Post-receive URL löschen
+ label_post_receive_url_edit: Repository Post-receive URL bearbeiten
label_post_receive_urls: Post Receive URLs
- label_protected_branch_add: Add protected branch
- label_protected_branch_create: Create protected branch
- label_protected_branch_delete: Delete protected branch
- label_protected_branch_edit: Edit protected branch
+ label_protected_branch_add: Protected Branch hinzufügen
+ label_protected_branch_create: Protected Branch erstellen
+ label_protected_branch_delete: Protected Branch löschen
+ label_protected_branch_edit: Protected branch bearbeiten
label_protected_branch: Protected Branches
label_protected_branches: Protected branches
label_public_key_edit: Edit existing public key
@@ -307,24 +301,23 @@ de:
label_regenerate_all_ssh_keys_desc2: "This can be long : all SSH keys will be removed and re-added in Gitolite one by one."
label_regenerate_all_ssh_keys: Regenerate all SSH keys ?
label_repos_current_access_patterns: Current Repository Access Patterns
- label_repository_access_not_configured: Repository access not configured, please contact your adminstrator.
+ label_repository_access_not_configured: Repository Zugriff ist nicht konfiguriert, bitte kontaktiere einen Administrator.
label_repository_access_url: Repository access links
label_repository_default_branch: Repository default branch
label_repository_enabled_capabilities: Repository Enabled Capabilities
label_repository_exists_in_gitolite: Repository exists in Gitolite
label_repository_mirrors: Repository Mirrors
- label_repository_options: Repository options
+ label_repository_options: Repository Optionen
label_repository_statistics_commits: Commits
label_repository_statistics_contributors: Mitwirkende
label_repository_statistics_global: Übersicht
- label_resync_all_projects: Resync all projects ?
- label_resync_all_ssh_keys: Resync all SSH keys ?
- label_see_other_repositories: See other repositories
+ label_resync_all_projects: Resync alle Projekte?
+ label_resync_all_ssh_keys: Resync alle SSH keys?
+ label_see_other_repositories: Andere Repositories ansehen
label_select_all: Alle auswählen
- label_show_repositories_url: Show checkout URL's?
label_smart_http: Smart HTTP
label_sort_urls: (Sort urls)
- label_split_payloads: split payloads
+ label_split_payloads: Splitte payloads
label_ssh_access: SSH Zugriff
label_ssh_keys_current_access_patterns: SSH keys Access Patterns
label_ssh_server_domain: SSH server domain
@@ -333,7 +326,7 @@ de:
label_sudo_redmine_to_gitolite_user: Redmine user is able to sudo to Git user?
label_tab_access: Zugriff
label_tab_cache: Cache
- label_tab_config_file: Configuration file
+ label_tab_config_file: Konfigurationsdatei
label_tab_config_test: Config Test
label_tab_gitolite_recycle_bin: Papierkorb
label_tab_gitolite_rescue: Rescue
@@ -345,28 +338,28 @@ de:
label_tab_ssh: SSH
label_tab_storage: Storage
label_temp_dir_writeable: Temp directory writeable?
- label_this_urls_has_permissions: "This URL has
access."
+ label_this_urls_has_permissions: "Diese URL hat
Zugriff."
label_total_commits: Anzahl Commits
label_total_contributors: Anzahl Mitwirkende
label_triggers: Triggers
- label_unique_repo_identifier: Repository identifiers are globally unique?
- label_unknown_gitolite_version: Unknown version
- label_use_triggers: Use triggers
+ label_unique_repo_identifier: Repository identifiers sind global eindeutig?
+ label_unknown_gitolite_version: Unbekannte Version
+ label_use_triggers: Trigger verwenden
label_user_key: User key
label_user_list: Users allowed
label_warn: Warning
- notice_deployment_credential_create_failed: Failed to create deployment credential
- notice_deployment_credential_created: Deployment Credential was successfully created.
+ notice_deployment_credential_create_failed: Erstellung von Deployment Credential fehlgeschlagen
+ notice_deployment_credential_created: Deployment Credential erfolgreich erstellt.
notice_deployment_credential_deleted_with_key: Both Deployment Credential and Key were successfully deleted.
- notice_deployment_credential_deleted: Deployment Credential was successfully deleted.
- notice_deployment_credential_update_failed: Failed to update deployment credential
- notice_deployment_credential_updated: Deployment Credential was successfully updated.
+ notice_deployment_credential_deleted: Deployment Credential erfolgreich gelöscht.
+ notice_deployment_credential_update_failed: Deployment Credential Update fehlgeschlagen.
+ notice_deployment_credential_updated: Deployment Credential erfolgreich aktualisiert.
notice_empty_repository: Leeres Repository. Verwende die nachfolgenden Anweisungen, um Git zu verwenden.
- notice_git_config_key_create_failed: Failed to create Git config key
- notice_git_config_key_created: Git config key was successfully created.
- notice_git_config_key_deleted: Git config key was successfully deleted.
- notice_git_config_key_update_failed: Failed to update Git config key
- notice_git_config_key_updated: Git config key was successfully updated.
+ notice_git_config_key_create_failed: Erstellung eines Git config key fehlgeschlagen
+ notice_git_config_key_created: Git config key erfolgreich erstellt.
+ notice_git_config_key_deleted: Git config key erfolgreich gelöscht.
+ notice_git_config_key_update_failed: Git config key Update fehlgeschlagen.
+ notice_git_config_key_updated: Git config key erfolgreich aktualisiert.
notice_gitolite_extra_update_failed: Errors while updating options
notice_gitolite_extra_updated: Options successfully updated
notice_mirror_create_failed: Failed to create mirror.
@@ -384,23 +377,23 @@ de:
notice_protected_branch_deleted: Protected branch was successfully deleted.
notice_protected_branch_update_failed: Failed to update protected branch
notice_protected_branch_updated: Protected branch was successfully updated.
- notice_public_key_created: Public key
%{title} was successfully created.
- notice_public_key_deleted: Public key
%{title} was successfully deleted.
- notice_public_key_updated: Public key
%{title} was successfully updated.
- permission_add_repository_xitolite_watchers: Add watchers
+ notice_public_key_created: Public key
%{title} erfolgreich erzeugt.
+ notice_public_key_deleted: Public key
%{title} erfolgreich gelöscht.
+ notice_public_key_updated: Public key
%{title} erfolgreich aktualisiert.
+ permission_add_repository_xitolite_watchers: Watcher hinzufügen
permission_create_gitolite_ssh_key: Erstelle SSH Schlüssel
- permission_create_repository_deployment_credentials: Create deployment keys
- permission_create_repository_git_config_keys: Create Git config keys
- permission_create_repository_mirrors: Create repository mirrors
- permission_create_repository_post_receive_urls: Create post-receive URLs
- permission_create_repository_protected_branches: Create protected branches
- permission_delete_repository_xitolite_watchers: Delete watchers
+ permission_create_repository_deployment_credentials: Deployment keys erstellen
+ permission_create_repository_git_config_keys: Git config keys erstellen
+ permission_create_repository_mirrors: Repository mirrors erstellen
+ permission_create_repository_post_receive_urls: Post-receive URLs erstellen
+ permission_create_repository_protected_branches: Protected branches erstellen
+ permission_delete_repository_xitolite_watchers: Watcher löschen
permission_download_git_revision: Download Git Revision Archive
- permission_edit_repository_deployment_credentials: Edit deployment keys
- permission_edit_repository_git_config_keys: Edit Git config keys
- permission_edit_repository_mirrors: Edit repository mirrors
- permission_edit_repository_post_receive_urls: Edit post-receive URLs
- permission_edit_repository_protected_branches: Edit protected branches
+ permission_edit_repository_deployment_credentials: Deployment keys bearbeiten
+ permission_edit_repository_git_config_keys: Git config keys bearbeiten
+ permission_edit_repository_mirrors: Repository mirrors bearbeiten
+ permission_edit_repository_post_receive_urls: Post-receive URLs bearbeiten
+ permission_edit_repository_protected_branches: Protected branches bearbeiten
permission_push_repository_mirrors: Push changes to repository mirrors
permission_view_repository_deployment_credentials: View deployment keys
permission_view_repository_git_config_keys: View Git config keys
@@ -408,8 +401,10 @@ de:
permission_view_repository_post_receive_urls: View post-receive URLs
permission_view_repository_protected_branches: View protected branches
permission_view_repository_xitolite_watchers: View watchers
- protected_branches_reminder: The protected branches above are not enabled. Please enable Protected Branches in the repository settings above.
+ protected_branches_reminder: Die obigen protected branches sind nicht aktiviert. Bitte aktiviere die Protected Branches in den Repository Einstellungen oben.
redmine_git_hosting: Redmine Git Hosting
- select_other_keys: Other keys
- text_gitolite_key_destroy_confirmation: "Are you sure you want to destroy this key : %{title} ?"
- text_scm_command_not_available_git_hosting: SCM command is not available. Please check settings on the administration panel of Redmine Git Hosting plugin.
+ select_other_keys: Andere keys
+ text_gitolite_key_destroy_confirmation: "Sicher, dass Du den folgenden Schlüssel (Key) zerstören willst: %{title} ?"
+ text_scm_command_not_available_git_hosting: SCM command nicht verfügbar. Bitte überprüfe die Einstellungen im Adminbereich des Redmine Git Hosting Plugin.
+ label_install_hook_results: Install hook results
+ label_repository_url_plural: Repository URLs
diff --git a/config/locales/en.yml b/config/locales/en.yml
index c6a38df21b8..2ce12e50f95 100644
--- a/config/locales/en.yml
+++ b/config/locales/en.yml
@@ -50,17 +50,16 @@ en:
taken: "is already taken."
invalid: invalid
cannot_change: cannot change
- all_branches: All Branches
- all_references: All Refs
- all_tags: All Tags
+ all_branches: All Branches
+ all_references: All Refs
+ all_tags: All Tags
button_clone: Clone
- button_ok: OK
- display_access_emphasis: "In the above patterns,
emphasized components represent context-dependent elements."
+ display_access_emphasis_html: "In the above patterns,
emphasized components represent context-dependent elements."
display_access_flat: "Parent projects are not included in the URLs, since the repository is in
Flat mode."
display_access_hierarchical: "Parent projects are included in the URLs, since the repository is in
Hierarchical mode."
- display_access_setup1: "Assume that
project1 is a parent of
project2, and
project2 is a parent of
project3."
- display_access_setup2: "Also, assume that project
project3 has 2 repositories : the
default repository and a repository
example."
- display_access_setup3: "Given the current configuration, project
project3 has the following properties :"
+ display_access_setup1_html: "Assume that
project1 is a parent of
project2, and
project2 is a parent of
project3."
+ display_access_setup2_html: "Also, assume that project
project3 has 2 repositories : the
default repository and a repository
example."
+ display_access_setup3_html: "Given the current configuration, project
project3 has the following properties :"
error_download_revision_no_such_commit: "No such commit %{commit}"
error_project_not_found: "No project with this identifier was found"
error_public_key_create_failed: Failed to create public key.
@@ -74,7 +73,6 @@ en:
field_use_triggers: Use triggers
label_active_for: Active for
label_all_projects_use_git: Automatically initialize Git repositories for new projects?
- label_archived_repositories: Archived repositories
label_average_commit_per_day: Average commits per day
label_average_contributor_commits: Average commits per contributor
label_backup_in_progress: Saving...
@@ -85,8 +83,6 @@ en:
label_commits_per_day: Commits per day
label_commits_per_hour: Commits per hour
label_commits_per_weekday: Commits per weekday
- label_copied_to_clipboard: Copied!
- label_copy_to_clipboard: Copy to clipboard
label_current_deploy_keys: Current deployment keys
label_current_public_keys: Current public keys
label_current_user_keys: Current user keys
@@ -96,11 +92,11 @@ en:
label_default_gitolite_hooks_url: Default URL
label_default_repository: Default repository
label_delete_from_recyle_bin: Delete from recycle bin
- label_delete_git_repositories: Delete Git repository when project deleted?
(will be place in recycle bin)
+ label_delete_git_repositories: Delete Git repository when project deleted?
+ info_delete_git_repositories: (will be place in recycle bin)
label_delete_in_progress: Deleting...
label_delete_warning: Warning! Deletion is forever!
label_deploy_key: Deploy key
- label_deployment_credential_active: Active?
label_deployment_credential_add: Add Deployment Credential
label_deployment_credential_create_key_first: Deployment key(s) not detected. You should create one first.
label_deployment_credential_create: Create New Deployment Credential
@@ -116,7 +112,7 @@ en:
label_download_and_install_git: Download and install Git
label_download_format: Download as
label_download_select_format: Select format
- label_empty_get: Empty GET
+ label_empty_get: Empty GET
label_empty_recycle_bin: Empty recycle bin
label_empty_repository: Empty repository?
label_enable_git_daemon: Enable Git Daemon
@@ -127,7 +123,6 @@ en:
label_enable_smart_http: Smart HTTP Mode
label_enable_smart_https: Smart HTTPS Mode
label_enable_ssh_url: Enable SSH URL
- label_enabled: Enabled
label_error: Error
label_etcetera: etc
label_example_repository: Example repository
@@ -154,7 +149,7 @@ en:
label_git_option_key_add: Add Gitolite option
label_git_option_keys: Gitolite configuration options
label_git_version: Git version
- label_github_post: GitHub POST
+ label_github_post: GitHub POST
label_gitolite_access_config: Gitolite Access Configuration
label_gitolite_banner: Gitolite banner
label_gitolite_bin_dir: Gitolite binaries directory
@@ -257,7 +252,6 @@ en:
label_mirror_forced_update: Force Update Remote
label_mirror_full_mirror: Complete Mirroring
label_mirror_help: Mirrors must grant write access to the following public key
- label_mirror_inactive: Inactive
label_mirror_include_all_branches: Push all Branches
label_mirror_include_all_tags: Push all Tags
label_mirror_push_fail: Failed
@@ -321,7 +315,6 @@ en:
label_resync_all_ssh_keys: Resync all SSH keys ?
label_see_other_repositories: See other repositories
label_select_all: Select all
- label_show_repositories_url: Show checkout URL's?
label_smart_http: Smart HTTP
label_sort_urls: (Sort urls)
label_split_payloads: split payloads
@@ -413,3 +406,5 @@ en:
select_other_keys: Other keys
text_gitolite_key_destroy_confirmation: "Are you sure you want to destroy this key : %{title} ?"
text_scm_command_not_available_git_hosting: SCM command is not available. Please check settings on the administration panel of Redmine Git Hosting plugin.
+ label_install_hook_results: Install hook results
+ label_repository_url_plural: Repository URLs
diff --git a/config/locales/es.yml b/config/locales/es.yml
index cbf9d7dadff..0f7da6265fe 100644
--- a/config/locales/es.yml
+++ b/config/locales/es.yml
@@ -50,17 +50,16 @@ es:
taken: "ya está en uso."
invalid: inválido
cannot_change: no se puede cambiar
- all_branches: Todas las ramas
- all_references: Todas las referencias
- all_tags: Todas las etiquetas
+ all_branches: Todas las ramas
+ all_references: Todas las referencias
+ all_tags: Todas las etiquetas
button_clone: Clonar
- button_ok: Aceptar
- display_access_emphasis: "En los patrones de arriba, los componentes
resaltados representan elementos dependientes del contexto."
+ display_access_emphasis_html: "En los patrones de arriba, los componentes
resaltados representan elementos dependientes del contexto."
display_access_flat: "Los proyectos padre no se incluyen en las URLs, ya que el repositorio está en modo
plano."
display_access_hierarchical: "Los proyectos padre se incluyen en las URLs, ya que el repositorio está en modo
jerárquico."
- display_access_setup1: "Asumiendo que
proyecto1 es padre de
proyecto2, y que
proyecto2 es padre de
proyecto3."
- display_access_setup2: "Además, asumiendo que el proyecto
proyecto3 tiene 2 repositorios: el repositorio
pordefecto y el repositorio
ejemplo."
- display_access_setup3: "Con dicha configuración, el proyecto
proyecto3 tiene las siguientes propiedades:"
+ display_access_setup1_html: "Asumiendo que
proyecto1 es padre de
proyecto2, y que
proyecto2 es padre de
proyecto3."
+ display_access_setup2_html: "Además, asumiendo que el proyecto
proyecto3 tiene 2 repositorios: el repositorio
pordefecto y el repositorio
ejemplo."
+ display_access_setup3_html: "Con dicha configuración, el proyecto
proyecto3 tiene las siguientes propiedades:"
error_download_revision_no_such_commit: "No existe el commit %{commit}"
error_project_not_found: "No se ha encontrado ningún proyecto con este identificador"
error_public_key_create_failed: Ha fallado la creación de la clave pública.
@@ -74,7 +73,6 @@ es:
field_use_triggers: Usar triggers
label_active_for: Activo durante
label_all_projects_use_git: ¿Inicializar automáticamente un repositorio Git en los proyectos nuevos?
- label_archived_repositories: Repositorios archivados
label_average_commit_per_day: Media de commits por día
label_average_contributor_commits: Media de commits por contribuidor
label_backup_in_progress: Guardando...
@@ -85,8 +83,6 @@ es:
label_commits_per_day: Commits por día
label_commits_per_hour: Commits por hora
label_commits_per_weekday: Commits por día de la semana
- label_copied_to_clipboard: ¡Copiado!
- label_copy_to_clipboard: Copiar al portapapeles
label_current_deploy_keys: Claves de despliegue actuales
label_current_public_keys: Claves públicas actuales
label_current_user_keys: Claves de usuario actuales
@@ -96,11 +92,11 @@ es:
label_default_gitolite_hooks_url: URL por defecto
label_default_repository: Repository por defecto
label_delete_from_recyle_bin: Borrar de la papelera de reciclaje
- label_delete_git_repositories: ¿Borrar el repositorio de Git cuando se borre el proyecto?
(se moverá a la papelera de reciclaje)
+ label_delete_git_repositories: ¿Borrar el repositorio de Git cuando se borre el proyecto?
+ info_delete_git_repositories: (se moverá a la papelera de reciclaje)
label_delete_in_progress: Borrando...
label_delete_warning: ¡Atención! ¡El borrado es permanente!
label_deploy_key: Clave de despliegue
- label_deployment_credential_active: ¿Activo?
label_deployment_credential_add: Añadir credencial de despliegue
label_deployment_credential_create_key_first: No se ha detectado ninguna clave de despliegue. Debe crear una antes.
label_deployment_credential_create: Crear nueva credencial de despliegue
@@ -116,7 +112,7 @@ es:
label_download_and_install_git: Descargar e instalar Git
label_download_format: Descargar como
label_download_select_format: Seleccionar formato
- label_empty_get: GET vacío
+ label_empty_get: GET vacío
label_empty_recycle_bin: Vaciar la papelera de reciclaje
label_empty_repository: ¿Repositorio vacío?
label_enable_git_daemon: Activar el daemon de Git
@@ -124,7 +120,6 @@ es:
label_enable_protected_branches: Activar las ramas protegidas
label_enable_public_repo: Hacer público el repositorio
label_enable_smart_http: Modo HTTP inteligente
- label_enabled: Activado
label_error: Error
label_etcetera: etc.
label_example_repository: Repository de ejemplo
@@ -151,7 +146,7 @@ es:
label_git_option_key_add: Añadir una opción de Gitolite
label_git_option_keys: Optiones de configuración de Gitolite
label_git_version: Versión de Git
- label_github_post: POST GitHub
+ label_github_post: POST GitHub
label_gitolite_access_config: Configuración de acceso de Gitolite
label_gitolite_banner: Banner de Gitolite
label_gitolite_bin_dir: Carpeta de binarios de Gitolite
@@ -253,7 +248,6 @@ es:
label_mirror_forced_update: Forzar la actualización de la réplica
label_mirror_full_mirror: Réplica completa
label_mirror_help: Las réplicas deben autorizar el acceso de escritura a la siguiente clave pública
- label_mirror_inactive: Inactivo
label_mirror_include_all_branches: Enviar todas las ramas
label_mirror_include_all_tags: Enviar todas las etiquetas
label_mirror_push_fail: Erróneo
@@ -317,7 +311,6 @@ es:
label_resync_all_ssh_keys: ¿Resincronizar todas las claves SSH?
label_see_other_repositories: Ver otros repositorios
label_select_all: Seleccionar todo
- label_show_repositories_url: ¿Mostrar URLs de checkout?
label_smart_http: HTTP inteligente
label_sort_urls: (Ordenar URLs)
label_split_payloads: dividir payloads
@@ -409,3 +402,5 @@ es:
select_other_keys: Otras claves
text_gitolite_key_destroy_confirmation: "¿Seguro que quiere destruir esta clave: %{title}?"
text_scm_command_not_available_git_hosting: el comando SCM no está disponible. Por favor, compruebe la configuración en el panel de administración del conector Redmine Git Hosting.
+ label_install_hook_results: Install hook results
+ label_repository_url_plural: Repository URLs
diff --git a/config/locales/fr.yml b/config/locales/fr.yml
index 2b9a93e9657..48b096bb0a7 100644
--- a/config/locales/fr.yml
+++ b/config/locales/fr.yml
@@ -50,17 +50,16 @@ fr:
taken: "correspond à un identifiant de dépôt existant"
invalid: invalide
cannot_change: ne peut pas changer
- all_branches: "Toutes les branches"
- all_references: "Toutes les références"
- all_tags: "Toutes les étiquettes"
+ all_branches: "Toutes les branches"
+ all_references: "Toutes les références"
+ all_tags: "Toutes les étiquettes"
button_clone: Cloner
- button_ok: OK
- display_access_emphasis: "Dans l'exemple ci-dessus, les termes en
emphase représentent des éléments qui dépendent du contexte."
+ display_access_emphasis_html: "Dans l'exemple ci-dessus, les termes en
emphase représentent des éléments qui dépendent du contexte."
display_access_flat: "Les projets parents ne sont pas inclus dans l'URL, car le dépôt est en mode
Plat."
display_access_hierarchical: "Les projets parents sont inclus dans l'URL, car le dépôt est en mode
Hiérarchique."
- display_access_setup1: "Assumez que
project1 est le parent de
project2 et que
project2 est le parent de
project3."
- display_access_setup2: "Assumez aussi que le projet
project3 a 2 dépôts : le dépôt par
défaut et un dépôt
example."
- display_access_setup3: "Avec la configuration courante, le projet
project3 a les propriétés suivantes :"
+ display_access_setup1_html: "Assumez que
project1 est le parent de
project2 et que
project2 est le parent de
project3."
+ display_access_setup2_html: "Assumez aussi que le projet
project3 a 2 dépôts : le dépôt par
défaut et un dépôt
example."
+ display_access_setup3_html: "Avec la configuration courante, le projet
project3 a les propriétés suivantes :"
error_download_revision_no_such_commit: "Le commit %{commit} n'a pas été trouvé"
error_project_not_found: "Aucun projet avec cet identifiant n'a été trouvé"
error_public_key_create_failed: Échec de création de clé publique.
@@ -74,7 +73,6 @@ fr:
field_use_triggers: Utiliser les déclencheurs
label_active_for: Actif depuis
label_all_projects_use_git: Créer automatiquement un dépôt Git pour les nouveaux projets
- label_archived_repositories: Dépôts archivés
label_average_commit_per_day: Moyenne des commits par jour
label_average_contributor_commits: Moyenne des commits par contributeur
label_backup_in_progress: Enregistrement...
@@ -85,8 +83,6 @@ fr:
label_commits_per_day: Commits par jour
label_commits_per_hour: Commits par heure
label_commits_per_weekday: Commits par jour de la semaine
- label_copied_to_clipboard: Copié!
- label_copy_to_clipboard: Copier dans le presse papier
label_current_deploy_keys: Clés de déploiement courantes
label_current_public_keys: Clés publiques courantes
label_current_user_keys: Clés de l'utilisateur courant
@@ -96,11 +92,11 @@ fr:
label_default_gitolite_hooks_url: URL par défaut
label_default_repository: Dépôt par défaut
label_delete_from_recyle_bin: Supprimer de la corbeille
- label_delete_git_repositories: Effacer les dépôts Git d'un projet quand celui-ci est effacé?
(seront mis dans la corbeille)
+ label_delete_git_repositories: Effacer les dépôts Git d'un projet quand celui-ci est effacé?
+ info_delete_git_repositories: (seront mis dans la corbeille)
label_delete_in_progress: Effacement...
label_delete_warning: Attention! La suppression est définitive!
label_deploy_key: Clé de déploiement
- label_deployment_credential_active: Activée?
label_deployment_credential_add: Ajouter une pièce d'identité de déploiement
label_deployment_credential_create_key_first: Aucune clé de déploiement n'a été détectée. Vous devriez commencer par en créer une.
label_deployment_credential_create: Créer une nouvelle pièce d'identité de déploiement
@@ -116,7 +112,7 @@ fr:
label_download_and_install_git: Téléchargez et installez Git
label_download_format: Télécharger au format
label_download_select_format: Sélectionnez un format
- label_empty_get: "GET vide"
+ label_empty_get: "GET vide"
label_empty_recycle_bin: Vider la corbeille
label_empty_repository: Dépot vide?
label_enable_git_daemon: Activer le daemon Git
@@ -127,7 +123,6 @@ fr:
label_enable_smart_http: Activer SmartHTTP
label_enable_smart_https: Activer SmartHTTPS
label_enable_ssh_url: Afficher l'url SSH
- label_enabled: Activé
label_error: Erreur
label_etcetera: etc
label_example_repository: Dépôt example
@@ -154,7 +149,7 @@ fr:
label_git_option_key_add: Ajouter une option de configuration Gitolite
label_git_option_keys: Options de configuration Gitolite
label_git_version: Version de Git
- label_github_post: "POST GitHub"
+ label_github_post: "POST GitHub"
label_gitolite_access_config: Configuration des accès Gitolite
label_gitolite_banner: Gitolite banner
label_gitolite_bin_dir: Répertoire des binaires Gitolite
@@ -257,7 +252,6 @@ fr:
label_mirror_forced_update: Forcer la mise à jour du miroir
label_mirror_full_mirror: Miroir complet
label_mirror_help: Le miroir doit donner les droits d'écriture à la clé publique suivante
- label_mirror_inactive: Inactif
label_mirror_include_all_branches: Envoyer toutes les branches
label_mirror_include_all_tags: Envoyer toutes les étiquettes
label_mirror_push_fail: Échec
@@ -321,7 +315,6 @@ fr:
label_resync_all_ssh_keys: Resynchroniser toutes les clés SSH
label_see_other_repositories: Voir les autres dépôts
label_select_all: Tout sélectionner
- label_show_repositories_url: Afficher les URL des dépôts
label_smart_http: Smart HTTP
label_sort_urls: (Trier les urls)
label_split_payloads: split payloads
@@ -413,3 +406,5 @@ fr:
select_other_keys: Autres clés
text_gitolite_key_destroy_confirmation: "Êtes-vous sûr de vouloir détruire cette clé : %{title} ?"
text_scm_command_not_available_git_hosting: Ce SCM n'est pas disponible. Vérifier les paramètres dans la section administration du plugin Redmine Git Hosting.
+ label_install_hook_results: Install hook results
+ label_repository_url_plural: Repository URLs
diff --git a/config/locales/ja.yml b/config/locales/ja.yml
index 89d4c17fca6..f4d1484b500 100644
--- a/config/locales/ja.yml
+++ b/config/locales/ja.yml
@@ -54,13 +54,12 @@ ja:
all_references: 全参照
all_tags: 全タグ
button_clone: クローン
- button_ok: OK
- display_access_emphasis: "上記の記載では,
斜体部分は要素依存部分を表しています。"
+ display_access_emphasis_html: "上記の記載では,
斜体部分は要素依存部分を表しています。"
display_access_flat: "
フラットモードのため、親ディレクトリはURLに含まれていません。"
display_access_hierarchical: "
階層モードのため、親ディレクトリもURLに含まれています。"
- display_access_setup1: "
project1は
project2の親、なお
project2は
project3の親とします。"
- display_access_setup2: "それに
project3は次の2つのリポジトリを持っているとします:
defaultと
example。"
- display_access_setup3: "現在の設定により、プロジェクト
project3のパス構造は次のようになります。"
+ display_access_setup1_html: "
project1は
project2の親、なお
project2は
project3の親とします。"
+ display_access_setup2_html: "それに
project3は次の2つのリポジトリを持っているとします:
defaultと
example。"
+ display_access_setup3_html: "現在の設定により、プロジェクト
project3のパス構造は次のようになります。"
error_download_revision_no_such_commit: "コミット%{commit}が存在しません"
error_project_not_found: "このタイトルのプロジェクトが見つかりません。"
error_public_key_create_failed: パプリックキー作成エラー
@@ -75,7 +74,6 @@ ja:
git_notifications_reminder: 上記のメールリストは有効化されていません。上記のリポジトリの設定で有効化を行ってください。
label_active_for: 活動経過日数
label_all_projects_use_git: 新プロジェクト作成時にGitリポジトリを自動作成する?
- label_archived_repositories: アーカイブリポジトリ
label_average_commit_per_day: 1日あたりの平均コミット数
label_average_contributor_commits: 開発者あたりの平均コミット数
label_backup_in_progress: 保存中...
@@ -86,8 +84,6 @@ ja:
label_commits_per_day: 日別のコミット
label_commits_per_hour: 時間別のコミット
label_commits_per_weekday: 曜日別のコミット
- label_copied_to_clipboard: コピー済み!
- label_copy_to_clipboard: クリップボードにコピー
label_current_deploy_keys: 現在のデプロイキー
label_current_public_keys: 現在のパプリックキー
label_current_user_keys: 現在のユーザーキー
@@ -97,11 +93,11 @@ ja:
label_default_gitolite_hooks_url: 既定URL
label_default_repository: defaultリポジトリ
label_delete_from_recyle_bin: ゴミ箱から削除
- label_delete_git_repositories: プロジェクト削除時にGitリポジトリを削除する?
(ゴミ箱に移動します)
+ label_delete_git_repositories: プロジェクト削除時にGitリポジトリを削除する?
+ info_delete_git_repositories: (ゴミ箱に移動します)
label_delete_in_progress: 削除中...
label_delete_warning: 注意!完全に削除してもいいですか?
label_deploy_key: デプロイキー
- label_deployment_credential_active: Active?
label_deployment_credential_add: デプロイクレデンシャル情報の追加
label_deployment_credential_create_key_first: デプロイキーが見つかりません。新しいデプロイキーを作成してください。
label_deployment_credential_create: デプロイクレデンシャル情報の作成
@@ -117,7 +113,7 @@ ja:
label_download_and_install_git: Gitのダウンロードとインストール
label_download_format: ダウンロード
label_download_select_format: タイプ選択
- label_empty_get: Empty GET
+ label_empty_get: Empty GET
label_empty_recycle_bin: ゴミ箱を空にする
label_empty_repository: 空リポジトリ?
label_enable_git_daemon: Git Daemon有効化
@@ -125,7 +121,6 @@ ja:
label_enable_protected_branches: ブランチ保護有効化
label_enable_public_repo: リポジトリを公開する
label_enable_smart_http: Smart HTTPモード
- label_enabled: 有効
label_error: Error
label_etcetera: etc
label_example_repository: exampleリポジトリ
@@ -159,7 +154,7 @@ ja:
label_git_option_key_add: Gitoliteオプション追加
label_git_option_keys: Gitolite設定オプション
label_git_version: Gitバージョン
- label_github_post: GitHub POST
+ label_github_post: GitHub POST
label_gitolite_access_config: Gitoliteアクセス設定
label_gitolite_banner: Gitoliteバーナー
label_gitolite_bin_dir: Gitolite実行ディレクトリ
@@ -264,7 +259,6 @@ ja:
label_mirror_forced_update: リモート更新強制
label_mirror_full_mirror: 複製完了
label_mirror_help: ミラーリポジトリに以下のパプリックキーの書き込み権限の付与が必要です
- label_mirror_inactive: 非活性
label_mirror_include_all_branches: 全ブランチプッシュ
label_mirror_include_all_tags: 全タグプッシュ
label_mirror_push_fail: エラー
@@ -328,7 +322,6 @@ ja:
label_resync_all_ssh_keys: 全SSHキーを再同期する?
label_see_other_repositories: 他のリポジトリの閲覧
label_select_all: 全選択
- label_show_repositories_url: クローン用のリポジトリURLを表示する?
label_smart_http: Smart HTTP
label_sort_urls: (Urls並び替え)
label_split_payloads: ペイロード分割
@@ -426,3 +419,5 @@ ja:
select_other_keys: 他のキー
text_gitolite_key_destroy_confirmation: "このキーを削除してもよろしいですか: %{title}?"
text_scm_command_not_available_git_hosting: SMCコマンドが使用できません。Redmine Git Hostingの管理設定を確認してください。
+ label_install_hook_results: Install hook results
+ label_repository_url_plural: Repository URLs
diff --git a/config/locales/ru.yml b/config/locales/ru.yml
index 4c780485d4a..be1d80485b5 100644
--- a/config/locales/ru.yml
+++ b/config/locales/ru.yml
@@ -50,17 +50,16 @@ ru:
taken: "уже получен."
invalid: ошибочный
cannot_change: невозможно изменить
- all_branches: Все ветки
- all_references: Все ссылки
- all_tags: Все теги
+ all_branches: Все ветки
+ all_references: Все ссылки
+ all_tags: Все теги
button_clone: Клонировать
- button_ok: OK
- display_access_emphasis: "В приведенных шаблонах,
курсивом выделены контекстно зависимые элементы."
+ display_access_emphasis_html: "В приведенных шаблонах,
курсивом выделены контекстно зависимые элементы."
display_access_flat: "Родителские проекты не включены в URL для
Плоского режима."
display_access_hierarchical: "Родителские проекты включены в URL для
Иерархического режима."
- display_access_setup1: "Предположим что
project1 является родительским для
project2, а
project2 является родительским для
project3."
- display_access_setup2: "Также, предположим что проект
project3 имеет 2 репозитория:
default и
example."
- display_access_setup3: "С учетом текущей конфигурации проекта
project3, он имеет следующие параметры:"
+ display_access_setup1_html: "Предположим что
project1 является родительским для
project2, а
project2 является родительским для
project3."
+ display_access_setup2_html: "Также, предположим что проект
project3 имеет 2 репозитория:
default и
example."
+ display_access_setup3_html: "С учетом текущей конфигурации проекта
project3, он имеет следующие параметры:"
error_download_revision_no_such_commit: "Не найден комит %{commit}"
error_project_not_found: "Проект с данными идентификатором не найден"
error_public_key_create_failed: Ошибка при создании публичного ключа.
@@ -74,7 +73,6 @@ ru:
field_use_triggers: Использовать тригеры
label_active_for: Активность за
label_all_projects_use_git: Автоматически инициализировать Git репозитории для новых проектов?
- label_archived_repositories: Архив репозиториев
label_average_commit_per_day: В среднем комитов в день
label_average_contributor_commits: В среднем комитов на участника
label_backup_in_progress: Сохранение...
@@ -85,8 +83,6 @@ ru:
label_commits_per_day: Комитов в день
label_commits_per_hour: Комитов в час
label_commits_per_weekday: Комитов в неделю
- label_copied_to_clipboard: Сокпировано!
- label_copy_to_clipboard: Сокопировать в буфер
label_current_deploy_keys: Текущие полномочные ключи (Deployment Keys)
label_current_public_keys: Текущие публичные ключи
label_current_user_keys: Текущие ключи пользователя
@@ -96,11 +92,11 @@ ru:
label_default_gitolite_hooks_url: URL по умолчанию
label_default_repository: "Репозиторий 'default'"
label_delete_from_recyle_bin: Удалить из корзины
- label_delete_git_repositories: Удалять Git репозиторий при удалении проекта?
(будет перемещен в корзину)
+ label_delete_git_repositories: Удалять Git репозиторий при удалении проекта?
+ info_delete_git_repositories: (будет перемещен в корзину)
label_delete_in_progress: Удаление...
label_delete_warning: Внимание! Удаление безвозвратно!
label_deploy_key: Полномочный deploy-ключ
- label_deployment_credential_active: Активный?
label_deployment_credential_add: Добавить полномочия
label_deployment_credential_create_key_first: Ключ(и) не определены. Вы должны создать один для начала.
label_deployment_credential_create: Создать новые полномочия
@@ -116,7 +112,7 @@ ru:
label_download_and_install_git: Скачать и установить Git
label_download_format: Загрузить как
label_download_select_format: Выбрать формат
- label_empty_get: Пустой GET
+ label_empty_get: Пустой GET
label_empty_recycle_bin: Очистка корзины
label_empty_repository: Пустой?
label_enable_git_daemon: Включить режим Git Daemon
@@ -124,7 +120,6 @@ ru:
label_enable_protected_branches: Включить защищенные ветки
label_enable_public_repo: Сделать публичным
label_enable_smart_http: Включить Smart HTTP
- label_enabled: Включено
label_error: Ошибка
label_etcetera: и.т.д.
label_example_repository: "Репозиторий 'example'"
@@ -149,7 +144,7 @@ ru:
label_git_option_key_add: Добавить параметр Gitolite
label_git_option_keys: Конфиг. опции Gitolite
label_git_version: Версия Git
- label_github_post: GitHub POST
+ label_github_post: GitHub POST
label_gitolite_access_config: Настройки доступа
label_gitolite_banner: Баннер Gitolite
label_gitolite_bin_dir: Каталог с двоичный Gitolite
@@ -251,7 +246,6 @@ ru:
label_mirror_forced_update: Force Update Remote
label_mirror_full_mirror: Complete Mirroring
label_mirror_help: Зеркала должны предоставлять доступ на запись следующему публичному ключу
- label_mirror_inactive: Неактивно
label_mirror_include_all_branches: Зеркалировать все ветки
label_mirror_include_all_tags: Зеркалировать все теги
label_mirror_push_fail: Ошибка
@@ -315,7 +309,6 @@ ru:
label_resync_all_ssh_keys: Синхронизировать SSH ключи?
label_see_other_repositories: Другие репозитории
label_select_all: Выбрать всё
- label_show_repositories_url: Показывать checkout URL's?
label_smart_http: Smart HTTP
label_sort_urls: (Изменить порядок)
label_split_payloads: Разбить payload
@@ -408,3 +401,5 @@ ru:
select_other_keys: Другие ключи
text_gitolite_key_destroy_confirmation: "Вы уверены, что хотите удалить данный ключ: %{title}?"
text_scm_command_not_available_git_hosting: SCM команда недоступна. Проверьте настройки плагина Redmine Git Hosting.
+ label_install_hook_results: Install hook results
+ label_repository_url_plural: Repository URLs
diff --git a/config/routes.rb b/config/routes.rb
index 0d6ebdb1deb..baabb852791 100644
--- a/config/routes.rb
+++ b/config/routes.rb
@@ -1,83 +1,49 @@
-# Handle the public keys plugin to my/account.
-scope 'my' do
- resources :public_keys, controller: 'gitolite_public_keys'
-end
-
-# Don't create routes for repositories resources with only: []
-# to not override Redmine's routes.
-resources :repositories, only: [] do
- member do
- get 'download_revision', to: 'download_git_revision#index', as: 'download_git_revision'
+Rails.application.routes.draw do
+ # Handle the public keys plugin to my/account.
+ scope 'my' do
+ resources :public_keys, controller: 'gitolite_public_keys'
end
- resource :git_extras, controller: 'repository_git_extras', only: [:update] do
- match 'sort_urls', via: %i[get post]
+ # Don't create routes for repositories resources with only: []
+ # to not override Redmine's routes.
+ resources :repositories, only: [] do
member do
- match 'move', via: %i[get post]
+ get 'download_revision', to: 'download_git_revision#index', as: 'download_git_revision'
end
- end
-
- resources :post_receive_urls, controller: 'repository_post_receive_urls'
- resources :deployment_credentials, controller: 'repository_deployment_credentials'
- resources :git_config_keys, controller: 'repository_git_config_keys'
-
- resources :mirrors, controller: 'repository_mirrors' do
- member { get :push }
- end
-
- resources :protected_branches, controller: 'repository_protected_branches' do
- member { get :clone }
- collection { post :sort }
- end
-end
-# Enable Redirector for Go Lang repositories
-get 'go/:repo_path', repo_path: %r{([^/]+/)*?[^/]+}, to: 'go_redirector#index'
+ resource :git_extras, controller: 'repository_git_extras', only: [:update] do
+ match 'sort_urls', via: %i[get post]
+ member do
+ match 'move', via: %i[get post]
+ end
+ end
-get 'admin/settings/plugin/:id/authors', to: 'settings#authors', as: 'plugin_authors'
-get 'admin/settings/plugin/:id/install_gitolite_hooks', to: 'settings#install_gitolite_hooks', as: 'install_gitolite_hooks'
+ resources :post_receive_urls, controller: 'repository_post_receive_urls'
+ resources :deployment_credentials, controller: 'repository_deployment_credentials'
+ resources :git_config_keys, controller: 'repository_git_config_keys'
-# Enable SmartHTTP Grack support
-mount Grack::Bundle.new({}),
- at: RedmineGitHosting::Config.http_server_subdir,
- constraints: ->(request) { %r{[-/\w\.]+\.git/}.match(request.path_info) },
- via: %i[get post]
+ resources :mirrors, controller: 'repository_mirrors' do
+ member { get :push }
+ end
-# Post Receive Hooks
-mount Hrack::Bundle.new({}), at: 'githooks/post-receive/:type/:projectid', via: [:post]
+ resources :protected_branches, controller: 'repository_protected_branches' do
+ member { get :clone }
+ collection { post :sort }
+ end
+ end
-# Archived Repositories
-get 'archived_projects/index', to: 'archived_repositories#index'
-get 'archived_projects/:id/repository/:repository_id/statistics', to: 'archived_repositories#stats'
-get 'archived_projects/:id/repository/:repository_id/graph', to: 'archived_repositories#graph'
-get 'archived_projects/:id/repository/:repository_id/changes(/*path(.:ext))', to: 'archived_repositories#changes'
-get 'archived_projects/:id/repository/:repository_id/revisions/:rev', to: 'archived_repositories#revision'
-get 'archived_projects/:id/repository/:repository_id/revision', to: 'archived_repositories#revision'
-get 'archived_projects/:id/repository/:repository_id/revisions', to: 'archived_repositories#revisions'
-get 'archived_projects/:id/repository/:repository_id/revisions/:rev/:action(/*path(.:ext))',
- controller: 'archived_repositories',
- format: false,
- constraints: { action: /(browse|show|entry|raw|annotate|diff)/,
- rev: /[a-z0-9\.\-_]+/ }
+ # Enable Redirector for Go Lang repositories
+ get 'go/:repo_path', repo_path: %r{([^/]+/)*?[^/]+}, to: 'go_redirector#index'
-get 'archived_projects/:id/repository/statistics', to: 'archived_repositories#stats'
-get 'archived_projects/:id/repository/graph', to: 'archived_repositories#graph'
-get 'archived_projects/:id/repository/changes(/*path(.:ext))', to: 'archived_repositories#changes'
-get 'archived_projects/:id/repository/revisions', to: 'archived_repositories#revisions'
-get 'archived_projects/:id/repository/revisions/:rev', to: 'archived_repositories#revision'
-get 'archived_projects/:id/repository/revision', to: 'archived_repositories#revision'
-get 'archived_projects/:id/repository/revisions/:rev/:action(/*path(.:ext))',
- controller: 'archived_repositories',
- format: false,
- constraints: { action: /(browse|show|entry|raw|annotate|diff)/,
- rev: /[a-z0-9\.\-_]+/ }
-get 'archived_projects/:id/repository/:repository_id/:action(/*path(.:ext))',
- controller: 'archived_repositories',
- action: /(browse|show|entry|raw|changes|annotate|diff)/
+ get 'admin/settings/plugin/:id/authors', to: 'settings#authors', as: 'plugin_authors'
+ get 'admin/settings/plugin/:id/install_gitolite_hooks', to: 'settings#install_gitolite_hooks', as: 'install_gitolite_hooks'
-get 'archived_projects/:id/repository/:action(/*path(.:ext))',
- controller: 'archived_repositories',
- action: /(browse|show|entry|raw|changes|annotate|diff)/
+ # Enable SmartHTTP Grack support
+ mount Grack::Bundle.new({}),
+ at: RedmineGitHosting::Config.http_server_subdir,
+ constraints: ->(request) { %r{[-/\w.]+\.git/}.match(request.path_info) },
+ via: %i[get post]
-get 'archived_projects/:id/repository/:repository_id', to: 'archived_repositories#show', path: nil
-get 'archived_projects/:id/repository', to: 'archived_repositories#show', path: nil
+ # Post Receive Hooks
+ mount Hrack::Bundle.new({}), at: 'githooks/post-receive/:type/:projectid', via: [:post]
+end
diff --git a/contrib/github/database-mysql.yml b/contrib/github/database-mysql.yml
new file mode 100644
index 00000000000..160f66ca9db
--- /dev/null
+++ b/contrib/github/database-mysql.yml
@@ -0,0 +1,26 @@
+production:
+ adapter: mysql2
+ database: redmine
+ host: 127.0.0.1
+ port: 3306
+ username: root
+ password:
+ encoding: utf8mb4
+
+development:
+ adapter: mysql2
+ database: redmine
+ port: 3306
+ host: 127.0.0.1
+ username: root
+ password:
+ encoding: utf8mb4
+
+test:
+ adapter: mysql2
+ database: redmine
+ port: 3306
+ host: 127.0.0.1
+ username: root
+ password:
+ encoding: utf8mb4
diff --git a/contrib/github/database-postgres.yml b/contrib/github/database-postgres.yml
new file mode 100644
index 00000000000..97802def8bf
--- /dev/null
+++ b/contrib/github/database-postgres.yml
@@ -0,0 +1,23 @@
+production:
+ adapter: postgresql
+ host: localhost
+ database: redmine
+ username: postgres
+ password: postgres
+ encoding: utf8
+
+development:
+ adapter: postgresql
+ host: localhost
+ database: redmine
+ username: postgres
+ password: postgres
+ encoding: utf8
+
+test:
+ adapter: postgresql
+ host: localhost
+ database: redmine
+ username: postgres
+ password: postgres
+ encoding: utf8
diff --git a/contrib/hooks/post-receive/lib/git_hosting_custom_hook.rb b/contrib/hooks/post-receive/lib/git_hosting_custom_hook.rb
index 82f35dd271b..3c0608d23c2 100644
--- a/contrib/hooks/post-receive/lib/git_hosting_custom_hook.rb
+++ b/contrib/hooks/post-receive/lib/git_hosting_custom_hook.rb
@@ -1,10 +1,6 @@
module GitHosting
class CustomHook
-
- attr_reader :repo_path
- attr_reader :refs
- attr_reader :git_config
-
+ attr_reader :repo_path, :refs, :git_config
def initialize(repo_path, refs)
@repo_path = repo_path
@@ -12,88 +8,82 @@ def initialize(repo_path, refs)
@git_config = Config.new
end
-
def exec
## Execute extra hooks
extra_hooks = get_extra_hooks
- if !extra_hooks.empty?
- logger.info('Calling additional post-receive hooks...')
- call_extra_hooks(extra_hooks)
- logger.info('')
- end
- end
+ return if extra_hooks.nil? || extra_hooks.none?
+ logger.info 'Calling additional post-receive hooks...'
+ call_extra_hooks extra_hooks
+ logger.info ''
+ end
private
-
- def get_extra_hooks
- # Get global extra hooks
- logger.debug('Looking for additional global post-receive hooks...')
- global_extra_hooks = get_executables('hooks/post-receive.d')
- if global_extra_hooks.empty?
- logger.debug(' - No global hooks found')
- else
- logger.debug(" - Global hooks found : #{global_extra_hooks}")
- end
-
- logger.debug('')
-
- # Get local extra hooks
- logger.debug('Looking for additional local post-receive hooks...')
- local_extra_hooks = get_executables('hooks/post-receive.local.d')
- if local_extra_hooks.empty?
- logger.debug(' - No local hooks found')
- else
- logger.debug(" - Local hooks found : #{local_extra_hooks}")
- end
-
- logger.debug('')
-
- global_extra_hooks + local_extra_hooks
+ def get_extra_hooks
+ # Get global extra hooks
+ logger.debug('Looking for additional global post-receive hooks...')
+ global_extra_hooks = get_executables('hooks/post-receive.d')
+ if global_extra_hooks.empty?
+ logger.debug(' - No global hooks found')
+ else
+ logger.debug(" - Global hooks found : #{global_extra_hooks}")
end
+ logger.debug('')
- def get_executables(directory)
- executables = []
- if File.directory?(directory)
- Dir.foreach(directory) do |item|
- next if item == '.' or item == '..'
- # Use full relative path
- path = "#{directory}/#{item}"
- # Test if the file is executable
- if File.executable?(path)
- # Remember it, if so
- executables.push(path)
- end
- end
- end
- executables
+ # Get local extra hooks
+ logger.debug('Looking for additional local post-receive hooks...')
+ local_extra_hooks = get_executables('hooks/post-receive.local.d')
+ if local_extra_hooks.empty?
+ logger.debug(' - No local hooks found')
+ else
+ logger.debug(" - Local hooks found : #{local_extra_hooks}")
end
+ logger.debug('')
- def call_extra_hooks(extra_hooks)
- # Call each exectuble found with the parameters we got
- extra_hooks.each do |extra_hook|
- logger.info(" - Executing extra hook '#{extra_hook}'")
+ global_extra_hooks + local_extra_hooks
+ end
- IO.popen("#{extra_hook}", "w+") do |pipe|
- begin
- pipe.puts refs
- pipe.close_write
- logger.info("#{pipe.read}")
- rescue => e
- logger.error("Error while executing hook #{extra_hook}")
- logger.error("#{e.message}")
- end
+ def get_executables(directory)
+ executables = []
+ if File.directory?(directory)
+ Dir.foreach(directory) do |item|
+ next if item == '.' || item == '..'
+
+ # Use full relative path
+ path = "#{directory}/#{item}"
+ # Test if the file is executable
+ if File.executable?(path)
+ # Remember it, if so
+ executables.push(path)
end
end
end
+ executables
+ end
-
- def logger
- @logger ||= GitHosting::HookLogger.new(loglevel: git_config.loglevel)
+ def call_extra_hooks(extra_hooks)
+ # Call each exectuble found with the parameters we got
+ extra_hooks.each do |extra_hook|
+ logger.info(" - Executing extra hook '#{extra_hook}'")
+
+ IO.popen(extra_hook.to_s, 'w+') do |pipe|
+ begin
+ pipe.puts refs
+ pipe.close_write
+ logger.info pipe.read.to_s
+ rescue => e
+ logger.error "Error while executing hook #{extra_hook}"
+ logger.error e.message.to_s
+ end
+ end
end
+ end
+ def logger
+ @logger ||= GitHosting::HookLogger.new(loglevel: git_config.loglevel)
+ end
end
end
diff --git a/contrib/hooks/post-receive/lib/git_hosting_hook_logger.rb b/contrib/hooks/post-receive/lib/git_hosting_hook_logger.rb
index 6a1dc073d47..6bbece8c533 100644
--- a/contrib/hooks/post-receive/lib/git_hosting_hook_logger.rb
+++ b/contrib/hooks/post-receive/lib/git_hosting_hook_logger.rb
@@ -1,37 +1,29 @@
module GitHosting
class HookLogger
-
attr_reader :loglevel
-
def initialize(opts = {})
@loglevel = opts.delete(:loglevel) { 'info' }
end
-
def debug(message)
write(message) if loglevel == 'debug'
end
-
def info(message)
write(message)
end
-
def error(message)
write(message)
end
-
private
-
- def write(message)
- $stdout.sync = true
- $stdout.puts "\e[1G#{message}"
- $stdout.flush
- end
-
+ def write(message)
+ $stdout.sync = true
+ $stdout.puts "\e[1G#{message}"
+ $stdout.flush
+ end
end
end
diff --git a/contrib/hooks/post-receive/lib/git_hosting_http_helper.rb b/contrib/hooks/post-receive/lib/git_hosting_http_helper.rb
index 7caaa16d2c4..88ebe9c0006 100644
--- a/contrib/hooks/post-receive/lib/git_hosting_http_helper.rb
+++ b/contrib/hooks/post-receive/lib/git_hosting_http_helper.rb
@@ -5,27 +5,23 @@
module GitHosting
module HttpHelper
-
def http_post(url, opts = {}, &block)
- http, request = build_post_request(url, opts)
- send_http_request(http, request, &block)
+ http, request = build_post_request url, opts
+ send_http_request http, request, &block
end
-
def http_get(url, opts = {}, &block)
- http, request = build_get_request(url, opts)
- send_http_request(http, request, &block)
+ http, request = build_get_request url, opts
+ send_http_request http, request, &block
end
-
def valid_url?(url)
- uri = URI.parse(url)
- uri.kind_of?(URI::HTTP)
+ uri = URI.parse url
+ uri.is_a?(URI::HTTP)
rescue URI::InvalidURIError
false
end
-
def serialize_params(params)
params.map do |key, value|
if value.instance_of?(Array)
@@ -36,91 +32,83 @@ def serialize_params(params)
end.join('&')
end
-
private
+ def urlencode(string)
+ URI.encode(string, /[^a-zA-Z0-9_.\-]/)
+ end
- def urlencode(string)
- URI.encode(string, /[^a-zA-Z0-9_\.\-]/)
- end
-
+ def build_post_request(url, opts = {})
+ # Get params
+ params = opts.delete(:params) { {} }
- def build_post_request(url, opts = {})
- # Get params
- params = opts.delete(:params) { {} }
+ # Build request
+ uri, http = build_http_request url, opts
+ request = Net::HTTP::Post.new uri.request_uri
- # Build request
- uri, http = build_http_request(url, opts)
- request = Net::HTTP::Post.new(uri.request_uri)
+ # Set request
+ request.body = serialize_params params
+ request.content_type = 'application/x-www-form-urlencoded'
- # Set request
- request.body = serialize_params(params)
- request.content_type = 'application/x-www-form-urlencoded'
+ [http, request]
+ end
- return http, request
- end
+ def build_get_request(url, opts = {})
+ # Get params
+ params = opts.delete(:params) { {} }
+ params = serialize_params params
+ # Build request
+ uri, http = build_http_request url, opts
+ request = Net::HTTP::Get.new uri.request_uri
- def build_get_request(url, opts = {})
- # Get params
- params = opts.delete(:params) { {} }
- params = serialize_params(params)
+ [http, request]
+ end
- # Build request
- uri, http = build_http_request(url, opts)
- request = Net::HTTP::Get.new(uri.request_uri)
+ def build_http_request(url, opts = {})
+ # Get HTTP options
+ open_timeout = opts.delete(:open_timeout) { 5 }
+ read_timeout = opts.delete(:read_timeout) { 10 }
- return http, request
+ uri = URI(url)
+ http = Net::HTTP.new(uri.host, uri.port)
+ if uri.scheme == 'https'
+ http.use_ssl = true
+ http.verify_mode = OpenSSL::SSL::VERIFY_NONE
end
+ # Set HTTP options
+ http.open_timeout = open_timeout
+ http.read_timeout = read_timeout
- def build_http_request(url, opts = {})
- # Get HTTP options
- open_timeout = opts.delete(:open_timeout) { 5 }
- read_timeout = opts.delete(:read_timeout) { 10 }
-
- uri = URI(url)
- http = Net::HTTP.new(uri.host, uri.port)
- if uri.scheme == 'https'
- http.use_ssl = true
- http.verify_mode = OpenSSL::SSL::VERIFY_NONE
- end
-
- # Set HTTP options
- http.open_timeout = open_timeout
- http.read_timeout = read_timeout
-
- return uri, http
- end
-
+ [uri, http]
+ end
- def send_http_request(http, request, &block)
- if block_given?
- yield(http, request)
- else
- one_shot_request(http, request)
- end
+ def send_http_request(http, request)
+ if block_given?
+ yield(http, request)
+ else
+ one_shot_request(http, request)
end
+ end
-
- def one_shot_request(http, request)
- message = ''
- begin
- res = http.start { |openhttp| openhttp.request request }
- if !res.is_a?(Net::HTTPSuccess)
- message = "Return code : #{res.code} (#{res.message})."
- failed = true
- else
- message = res.body
- failed = false
- end
- rescue => e
- message = "Exception : #{e.message}"
+ def one_shot_request(http, request)
+ message = ''
+ begin
+ res = http.start { |openhttp| openhttp.request request }
+ if !res.is_a?(Net::HTTPSuccess)
+ message = "Return code : #{res.code} (#{res.message})."
failed = true
+ else
+ message = res.body
+ failed = false
end
-
- return failed, message
+ rescue StandardError => e
+ message = "Exception : #{e.message}"
+ failed = true
end
+ [failed, message]
+ end
end
end
diff --git a/contrib/hooks/post-receive/lib/git_hosting_post_receive.rb b/contrib/hooks/post-receive/lib/git_hosting_post_receive.rb
index da437a357d5..3fab980e0cb 100644
--- a/contrib/hooks/post-receive/lib/git_hosting_post_receive.rb
+++ b/contrib/hooks/post-receive/lib/git_hosting_post_receive.rb
@@ -1,12 +1,8 @@
module GitHosting
class PostReceive
-
include HttpHelper
- attr_reader :repo_path
- attr_reader :refs
- attr_reader :git_config
-
+ attr_reader :repo_path, :refs, :git_config
def initialize(repo_path, refs)
@repo_path = repo_path
@@ -14,60 +10,52 @@ def initialize(repo_path, refs)
@git_config = Config.new
end
-
def exec
notify_redmine if git_config.valid?
end
-
private
+ def notify_redmine
+ logger.info('')
+ logger.info("Notifying Redmine about changes to this repository : '#{git_config.repository_name}' ...")
- def notify_redmine
- logger.info('')
- logger.info("Notifying Redmine about changes to this repository : '#{git_config.repository_name}' ...")
-
- http_post(git_config.project_url, { params: http_post_data }) do |http, request|
- begin
- http.request(request) { |response| check_response(response) }
- rescue => e
- logger.error("HTTP_ERROR : #{e.message}")
- end
+ http_post(git_config.project_url, { params: http_post_data }) do |http, request|
+ begin
+ http.request(request) { |response| check_response(response) }
+ rescue => e
+ logger.error("HTTP_ERROR : #{e.message}")
end
-
- logger.info('')
end
+ logger.info('')
+ end
- def http_post_data
- git_config.post_data.merge('refs[]' => parsed_refs)
- end
-
+ def http_post_data
+ git_config.post_data.merge('refs[]' => parsed_refs)
+ end
- def parsed_refs
- parsed = []
- refs.split("\n").each do |line|
- r = line.chomp.strip.split
- parsed << [r[0].to_s, r[1].to_s, r[2].to_s].join(',')
- end
- parsed
+ def parsed_refs
+ parsed = []
+ refs.split("\n").each do |line|
+ r = line.chomp.strip.split
+ parsed << [r[0].to_s, r[1].to_s, r[2].to_s].join(',')
end
+ parsed
+ end
-
- def check_response(response)
- if response.code.to_i == 200
- response.read_body do |body_frag|
- body_frag.split("\n").each { |line| logger.info(line) }
- end
- else
- logger.error(" - Error while notifying Redmine ! (status code: #{response.code})")
+ def check_response(response)
+ if response.code.to_i == 200
+ response.read_body do |body_frag|
+ body_frag.split("\n").each { |line| logger.info(line) }
end
+ else
+ logger.error(" - Error while notifying Redmine ! (status code: #{response.code})")
end
+ end
-
- def logger
- @logger ||= GitHosting::HookLogger.new(loglevel: git_config.loglevel)
- end
-
+ def logger
+ @logger ||= GitHosting::HookLogger.new(loglevel: git_config.loglevel)
+ end
end
end
diff --git a/contrib/travis/common.sh b/contrib/travis/common.sh
deleted file mode 100644
index 310569749d8..00000000000
--- a/contrib/travis/common.sh
+++ /dev/null
@@ -1,39 +0,0 @@
-#!/bin/bash
-
-function log_header() {
- echo "######################"
- echo $1
- echo ""
-}
-
-
-function log_title() {
- echo "#### $1"
-}
-
-
-function log_ok() {
- echo "Done !"
- echo ""
-}
-
-
-function git_clone() {
- plugin_name=$1
- plugin_url=$2
-
- IFS='#' read url treeish <<< "$plugin_url"
-
- log_title "INSTALL ${plugin_name} PLUGIN"
-
- if [[ "$treeish" == "" ]] ; then
- git clone "${url}" "redmine/plugins/${plugin_name}"
- else
- git clone "${url}" "redmine/plugins/${plugin_name}"
- pushd "redmine/plugins/${plugin_name}" > /dev/null
- git checkout -q "$treeish"
- popd > /dev/null
- fi
-
- log_ok
-}
diff --git a/contrib/travis/data/db_files/database_mysql.yml b/contrib/travis/data/db_files/database_mysql.yml
deleted file mode 100644
index ccd2035797e..00000000000
--- a/contrib/travis/data/db_files/database_mysql.yml
+++ /dev/null
@@ -1,29 +0,0 @@
-## MySQL configuration example
-## Data come from environment variables so the test suite can be run
-## on Travis or Jenkins (see https://github.com/codevise/jenkins-mysql-job-databases-plugin)
-production:
- adapter: mysql2
- database: <%= ENV['MYSQL_DATABASE'] %>
- host: <%= ENV['MYSQL_HOST'] %>
- port: <%= ENV['MYSQL_PORT'] %>
- username: <%= ENV['MYSQL_USER'] %>
- password: <%= ENV['MYSQL_PASSWORD'] %>
- encoding: utf8
-
-development:
- adapter: mysql2
- database: <%= ENV['MYSQL_DATABASE'] %>
- host: <%= ENV['MYSQL_HOST'] %>
- port: <%= ENV['MYSQL_PORT'] %>
- username: <%= ENV['MYSQL_USER'] %>
- password: <%= ENV['MYSQL_PASSWORD'] %>
- encoding: utf8
-
-test:
- adapter: mysql2
- database: <%= ENV['MYSQL_DATABASE'] %>
- host: <%= ENV['MYSQL_HOST'] %>
- port: <%= ENV['MYSQL_PORT'] %>
- username: <%= ENV['MYSQL_USER'] %>
- password: <%= ENV['MYSQL_PASSWORD'] %>
- encoding: utf8
diff --git a/contrib/travis/data/db_files/database_postgres.yml b/contrib/travis/data/db_files/database_postgres.yml
deleted file mode 100644
index 96c02d2d332..00000000000
--- a/contrib/travis/data/db_files/database_postgres.yml
+++ /dev/null
@@ -1,20 +0,0 @@
-## PostgreSQL configuration example
-## Data come from environment variables so the test suite can be run
-## on Travis or Jenkins (see https://github.com/lmlima/jenkins-postgresql-job-databases-plugin)
-production:
- adapter: postgresql
- database: <%= ENV['POSTGRES_DATABASE'] %>
- username: <%= ENV['POSTGRES_USER'] %>
- encoding: utf8
-
-development:
- adapter: postgresql
- database: <%= ENV['POSTGRES_DATABASE'] %>
- username: <%= ENV['POSTGRES_USER'] %>
- encoding: utf8
-
-test:
- adapter: postgresql
- database: <%= ENV['POSTGRES_DATABASE'] %>
- username: <%= ENV['POSTGRES_USER'] %>
- encoding: utf8
diff --git a/contrib/travis/install_redmine.sh b/contrib/travis/install_redmine.sh
deleted file mode 100755
index a7a6c341990..00000000000
--- a/contrib/travis/install_redmine.sh
+++ /dev/null
@@ -1,23 +0,0 @@
-#!/bin/bash
-
-REDMINE_INSTALLER_DIR=$(dirname "$(readlink -f "$0")")
-source "$REDMINE_INSTALLER_DIR/common.sh"
-source "$REDMINE_INSTALLER_DIR/plugin.sh"
-source "$REDMINE_INSTALLER_DIR/redmine.sh"
-
-CURRENT_DIR=$(pwd)
-
-echo ""
-echo "######################"
-echo "REDMINE INSTALLATION SCRIPT"
-echo ""
-echo "REDMINE_VERSION : ${REDMINE_VERSION}"
-echo "REDMINE_URL : ${REDMINE_URL}"
-echo "CURRENT_DIR : ${CURRENT_DIR}"
-echo "GITHUB_SOURCE : ${GITHUB_SOURCE}"
-echo "PLUGIN_PATH : ${PLUGIN_PATH}"
-echo ""
-
-install_redmine
-install_plugin
-finish_install
diff --git a/contrib/travis/plugin.sh b/contrib/travis/plugin.sh
deleted file mode 100644
index f1603d3c27f..00000000000
--- a/contrib/travis/plugin.sh
+++ /dev/null
@@ -1,87 +0,0 @@
-#!/bin/bash
-
-GITHUB_USER=${GITHUB_USER:-jbox-web}
-GITHUB_PROJECT=${GITHUB_PROJECT:-redmine_git_hosting}
-
-GITHUB_SOURCE="${GITHUB_USER}/${GITHUB_PROJECT}"
-PLUGIN_PATH=${PLUGIN_PATH:-$GITHUB_SOURCE}
-PLUGIN_NAME=${PLUGIN_NAME:-$GITHUB_PROJECT}
-PLUGIN_DIR="redmine/plugins/${PLUGIN_NAME}"
-CONTRIB_DATA_DIR="${PLUGIN_DIR}/contrib/travis/data"
-
-function install_plugin() {
- install_plugin_libs
- move_plugin
- install_database
- install_rspec
- install_plugin_dependencies
-}
-
-
-## PRIVATE
-
-function install_plugin_libs() {
- log_title "INSTALL ADDITIONAL PACKAGES"
- sudo apt-get install -qq libicu-dev libssh2-1 libssh2-1-dev cmake
- log_ok
-}
-
-function move_plugin() {
- log_title "MOVE PLUGIN"
- # Move GITHUB_USER/GITHUB_PROJECT to redmine/plugins dir
- mv "${PLUGIN_PATH}" "${REDMINE_NAME}/plugins"
- # Remove parent dir (GITHUB_USER)
- rmdir $(dirname ${PLUGIN_PATH})
- log_ok
-
- log_title "CREATE SYMLINK"
- ln -s "${REDMINE_NAME}" "redmine"
- log_ok
-}
-
-function install_database() {
- log_title "INSTALL DATABASE FILE"
- if [ "$DATABASE_ADAPTER" == "mysql" ] ; then
- echo "Type : mysql"
- cp "${CONTRIB_DATA_DIR}/db_files/database_mysql.yml" "redmine/config/database.yml"
- else
- echo "Type : postgres"
- cp "${CONTRIB_DATA_DIR}/db_files/database_postgres.yml" "redmine/config/database.yml"
- fi
-
- log_ok
-}
-
-function install_rspec() {
- log_title "INSTALL RSPEC FILE"
- mkdir "redmine/spec"
- cp "${PLUGIN_DIR}/spec/root_spec_helper.rb" "redmine/spec/spec_helper.rb"
- log_ok
-}
-
-function install_plugin_dependencies() {
- git_clone 'additionals' 'https://github.com/AlphaNodes/additionals.git'
- git_clone 'redmine_sidekiq' 'https://github.com/ogom/redmine_sidekiq.git'
- install_ssh_key
- install_gitolite
-}
-
-function install_ssh_key() {
- log_title "INSTALL ADMIN SSH KEY"
- ssh-keygen -N '' -f "${PLUGIN_DIR}/ssh_keys/redmine_gitolite_admin_id_rsa"
- log_ok
-}
-
-function install_gitolite() {
- log_title "INSTALL GITOLITE V3"
-
- sudo useradd --create-home git
- sudo -n -u git -i git clone https://github.com/sitaramc/gitolite.git
- sudo -n -u git -i mkdir bin
- sudo -n -u git -i gitolite/install -to /home/git/bin
- sudo cp "${PLUGIN_DIR}/ssh_keys/redmine_gitolite_admin_id_rsa.pub" /home/git/
- sudo chown git.git /home/git/redmine_gitolite_admin_id_rsa.pub
- sudo -n -u git -i gitolite setup -pk redmine_gitolite_admin_id_rsa.pub
-
- log_ok
-}
diff --git a/contrib/travis/redmine.sh b/contrib/travis/redmine.sh
deleted file mode 100644
index e1ab8da8951..00000000000
--- a/contrib/travis/redmine.sh
+++ /dev/null
@@ -1,75 +0,0 @@
-#!/bin/bash
-
-REDMINE_PACKAGE_URL="http://www.redmine.org/releases"
-REDMINE_SVN_URL="https://svn.redmine.org/redmine/branches"
-REDMINE_GIT_URL="https://github.com/redmine/redmine.git"
-
-REDMINE_NAME="redmine-${REDMINE_VERSION}"
-REDMINE_PACKAGE="${REDMINE_NAME}.tar.gz"
-REDMINE_URL="${REDMINE_PACKAGE_URL}/${REDMINE_PACKAGE}"
-
-USE_SVN=${USE_SVN:-false}
-
-version=(${REDMINE_VERSION//./ })
-major=${version[0]}
-minor=${version[1]}
-patch=${version[2]}
-
-
-function install_redmine() {
- install_redmine_libs
-
- if [ $USE_SVN == 'true' ] ; then
- # install_redmine_from_svn
- install_redmine_from_git
- else
- install_redmine_from_package
- fi
-}
-
-function finish_install() {
- log_header "CURRENT DIRECTORY LISTING"
- ls -l "${CURRENT_DIR}"
- echo ""
-
- log_header "REDMINE PLUGIN DIRECTORY LISTING"
- ls -l "${REDMINE_NAME}/plugins"
- echo ""
-}
-
-## PRIVATE
-
-
-function install_redmine_libs() {
- log_title "INSTALL REDMINE LIBS"
- sudo apt-get install -qq subversion
- log_ok
-}
-
-
-function install_redmine_from_package() {
- log_title "GET TARBALL"
- wget "${REDMINE_URL}"
- log_ok
-
- log_title "EXTRACT IT"
- tar xf "${REDMINE_PACKAGE}"
- log_ok
-}
-
-
-function install_redmine_from_svn() {
- log_title "GET SOURCES FROM SVN"
- svn co --non-interactive --trust-server-cert "${REDMINE_SVN_URL}/${REDMINE_VERSION}" "${REDMINE_NAME}"
- log_ok
-}
-
-
-function install_redmine_from_git() {
- log_title "GET SOURCES FROM GIT"
- git clone "${REDMINE_GIT_URL}" "${REDMINE_NAME}"
- pushd "${REDMINE_NAME}"
- git checkout "${REDMINE_VERSION}"
- popd
- log_ok
-}
diff --git a/db/migrate/20120904060609_update_multi_repo_per_project.rb b/db/migrate/20120904060609_update_multi_repo_per_project.rb
index 218e3a3e124..b4b0fb6c94e 100644
--- a/db/migrate/20120904060609_update_multi_repo_per_project.rb
+++ b/db/migrate/20120904060609_update_multi_repo_per_project.rb
@@ -36,7 +36,7 @@ def up
end
end
- add_index :projects, [:identifier]
+ add_index :projects, [:identifier] unless index_exists?(:projects, :identifier)
if columns('repositories').index { |x| x.name == 'identifier' }
add_index :repositories, [:identifier]
add_index :repositories, %i[identifier project_id]
diff --git a/db/migrate/20130807223227_migrate_parameters.rb b/db/migrate/20130807223227_migrate_parameters.rb
index 3790b05609c..ddc7801eb7c 100644
--- a/db/migrate/20130807223227_migrate_parameters.rb
+++ b/db/migrate/20130807223227_migrate_parameters.rb
@@ -5,14 +5,14 @@ def up
# Legacy settings
gitolite_user: 'git',
gitolite_server_port: '22',
- gitolite_ssh_private_key: Rails.root.join('plugins', 'redmine_git_hosting', 'ssh_keys', 'redmine_gitolite_admin_id_rsa').to_s,
- gitolite_ssh_public_key: Rails.root.join('plugins', 'redmine_git_hosting', 'ssh_keys', 'redmine_gitolite_admin_id_rsa.pub').to_s,
+ gitolite_ssh_private_key: Rails.root.join('plugins/redmine_git_hosting/ssh_keys/redmine_gitolite_admin_id_rsa').to_s,
+ gitolite_ssh_public_key: Rails.root.join('plugins/redmine_git_hosting/ssh_keys/redmine_gitolite_admin_id_rsa.pub').to_s,
gitolite_global_storage_dir: 'repositories/',
gitolite_redmine_storage_dir: '',
gitolite_recycle_bin_dir: 'recycle_bin/',
- gitolite_temp_dir: Rails.root.join('tmp', 'redmine_git_hosting').to_s,
+ gitolite_temp_dir: Rails.root.join('tmp/redmine_git_hosting').to_s,
gitolite_scripts_dir: './',
gitolite_timeout: '10',
gitolite_config_file: 'gitolite.conf',
diff --git a/init.rb b/init.rb
index 4b37f8bbe04..efb04aaa09f 100644
--- a/init.rb
+++ b/init.rb
@@ -5,15 +5,22 @@
name 'Redmine Git Hosting Plugin'
author 'A lot of people! A big thank to them for their contribution!'
description 'Enables Redmine to control hosting of Git repositories through Gitolite'
- version '4.0.2'
+ version RedmineGitHosting::VERSION
url 'http://redmine-git-hosting.io/'
author_url 'settings/plugin/redmine_git_hosting/authors'
settings(partial: 'settings/redmine_git_hosting', default: RedmineGitHosting.settings)
- requires_redmine version_or_higher: '4.0.3'
+ requires_redmine version_or_higher: '4.1.0'
+
+ menu :project_menu,
+ :new_repository,
+ { controller: 'repositories', action: 'new' },
+ param: :project_id,
+ caption: :label_repository_new,
+ parent: :new_object
begin
- requires_redmine_plugin :additionals, version_or_higher: '2.0.21'
+ requires_redmine_plugin :additionals, version_or_higher: '3.0.1'
rescue Redmine::PluginNotFound
raise 'Please install additionals plugin (https://github.com/alphanodes/additionals)'
end
diff --git a/lib/default_settings.yml b/lib/default_settings.yml
index c1866b6d71f..1b4a16e8867 100644
--- a/lib/default_settings.yml
+++ b/lib/default_settings.yml
@@ -40,7 +40,6 @@ ssh_server_domain: 'localhost'
http_server_domain: 'localhost'
https_server_domain: 'localhost'
http_server_subdir: ''
-show_repositories_url: 'true'
gitolite_daemon_by_default: 'false'
gitolite_http_by_default: '1'
diff --git a/lib/hrack/lib/hrack/server.rb b/lib/hrack/lib/hrack/server.rb
index 5a81cfc83c6..de18b97ecb6 100644
--- a/lib/hrack/lib/hrack/server.rb
+++ b/lib/hrack/lib/hrack/server.rb
@@ -2,21 +2,17 @@
module Hrack
class Server
-
attr_reader :params
PLAIN_TYPE = { 'Content-Type' => 'text/plain' }
-
def initialize(config = {})
end
-
def call(env)
dup._call(env)
end
-
def _call(env)
@env = env
@req = Rack::Request.new(env)
@@ -24,17 +20,18 @@ def _call(env)
command, @project = match_routing
- return render_404('Command Not Found') if !command
- return render_404('Project Not Found') if !@project
+ return render_404('Command Not Found') unless command
+ return render_404('Project Not Found') unless @project
self.method(command).call()
end
-
def post_receive_redmine
@repository = find_repository
return render_404('Repository Not Found') if @repository.nil?
- return render_403('The hook key provided is not valid. Please let your server admin know about it') if !valid_encoded_time?(params[:clear_time], params[:encoded_time], @repository.gitolite_hook_key)
+ if !valid_encoded_time?(params[:clear_time], params[:encoded_time], @repository.gitolite_hook_key)
+ return render_403('The hook key provided is not valid. Please let your server admin know about it')
+ end
@res = Rack::Response.new
@res.status = 200
@@ -46,97 +43,77 @@ def post_receive_redmine
end
end
-
def post_receive_github
Projects::ExecuteHooks.call(@project, :github, params)
render_200('OK!')
end
-
private
+ def payloads
+ @payloads ||= Repositories::BuildPayload.call(@repository, params[:refs])
+ end
- def payloads
- @payloads ||= Repositories::BuildPayload.call(@repository, params[:refs])
- end
-
-
- def match_routing
- command = find_command
- project = find_project
- return command, project
- end
-
-
- def find_command
- return nil if !path_parameters.has_key?(:type)
- case path_parameters[:type]
- when 'redmine'
- :post_receive_redmine
- when 'github'
- :post_receive_github
- else
- nil
- end
- end
-
-
- def find_project
- if path_parameters.has_key?(:projectid)
- Project.find_by_identifier(path_parameters[:projectid])
- else
- nil
- end
- end
-
-
- # Locate that actual repository that is in use here.
- # Notice that an empty "repositoryid" is assumed to refer to the default repo for a project
- def find_repository
- if params[:repositoryid] && !params[:repositoryid].blank?
- @project.repositories.find_by_identifier(params[:repositoryid])
- else
- # return default or first repo with blank identifier
- @project.repository || @project.repo_blank_ident
- end
- end
-
-
- def render_200(message)
- [200, PLAIN_TYPE, [message]]
- end
-
-
- def render_404(message)
- [404, PLAIN_TYPE, [message]]
- end
+ def match_routing
+ command = find_command
+ project = find_project
+ return command, project
+ end
+ def find_command
+ return nil unless path_parameters.key?(:type)
- def render_403(message)
- [403, PLAIN_TYPE, [message]]
+ case path_parameters[:type]
+ when 'redmine'
+ :post_receive_redmine
+ when 'github'
+ :post_receive_github
end
+ end
+ def find_project
+ Project.find_by_identifier(path_parameters[:projectid]) if path_parameters.key?(:projectid)
+ end
- def path_parameters
- @env['action_dispatch.request.path_parameters']
+ # Locate that actual repository that is in use here.
+ # Notice that an empty "repositoryid" is assumed to refer to the default repo for a project
+ def find_repository
+ if params[:repositoryid].present?
+ @project.repositories.find_by_identifier(params[:repositoryid])
+ else
+ # return default or first repo with blank identifier
+ @project.repository || @project.repo_blank_ident
end
+ end
+ def render_200(message)
+ [200, PLAIN_TYPE, [message]]
+ end
- def valid_encoded_time?(clear_time, encoded_time, key)
- cur_time = Time.new.utc.to_i
- test_time = clear_time.to_i
- not_to_late?(cur_time, test_time) && encode_key(clear_time, key) == encoded_time.to_s
- end
+ def render_404(message)
+ [404, PLAIN_TYPE, [message]]
+ end
+ def render_403(message)
+ [403, PLAIN_TYPE, [message]]
+ end
- def not_to_late?(cur_time, test_time)
- cur_time - test_time < 5 * 60
- end
+ def path_parameters
+ @env['action_dispatch.request.path_parameters']
+ end
+ def valid_encoded_time?(clear_time, encoded_time, key)
+ cur_time = Time.new.utc.to_i
+ test_time = clear_time.to_i
+ not_to_late?(cur_time, test_time) && encode_key(clear_time, key) == encoded_time.to_s
+ end
- def encode_key(time, key)
- Digest::SHA1.hexdigest(time.to_s + key.to_s).to_s
- end
+ def not_to_late?(cur_time, test_time)
+ cur_time - test_time < 5 * 60
+ end
+ def encode_key(time, key)
+ Digest::SHA1.hexdigest(time.to_s + key.to_s).to_s
+ end
end
end
diff --git a/lib/hrack/lib/hrack/version.rb b/lib/hrack/lib/hrack/version.rb
index 834b5cdec66..78e54f551da 100644
--- a/lib/hrack/lib/hrack/version.rb
+++ b/lib/hrack/lib/hrack/version.rb
@@ -1,3 +1,3 @@
module Hrack
- VERSION = '1.0.0'
+ VERSION = '1.0.0'.freeze
end
diff --git a/lib/load_gitolite_hooks.rb b/lib/load_gitolite_hooks.rb
index d1987f36830..991233fbadf 100644
--- a/lib/load_gitolite_hooks.rb
+++ b/lib/load_gitolite_hooks.rb
@@ -1,6 +1,6 @@
RedmineGitHosting::GitoliteHooks.register_hooks do
# Set source dir
- source_dir Rails.root.join('plugins', 'redmine_git_hosting', 'contrib', 'hooks').to_s
+ source_dir Rails.root.join('plugins/redmine_git_hosting/contrib/hooks').to_s
# Declare GitoliteHooks to install
@@ -9,65 +9,64 @@
name 'redmine_gitolite.rb'
source 'post-receive/redmine_gitolite.rb'
destination 'post-receive'
- executable true
+ executable true
end
gitolite_hook do
name 'mail_notifications.py'
source 'post-receive/mail_notifications.py'
destination 'post-receive.d/mail_notifications'
- executable true
+ executable true
end
-
# Install libs
gitolite_hook do
name 'git_hosting_config.rb'
source 'post-receive/lib/git_hosting_config.rb'
destination 'lib/git_hosting/config.rb'
- executable false
+ executable false
end
gitolite_hook do
name 'git_hosting_custom_hook.rb'
source 'post-receive/lib/git_hosting_custom_hook.rb'
destination 'lib/git_hosting/custom_hook.rb'
- executable false
+ executable false
end
gitolite_hook do
name 'git_hosting_http_helper.rb'
source 'post-receive/lib/git_hosting_http_helper.rb'
destination 'lib/git_hosting/http_helper.rb'
- executable false
+ executable false
end
gitolite_hook do
name 'git_hosting_hook_logger.rb'
source 'post-receive/lib/git_hosting_hook_logger.rb'
destination 'lib/git_hosting/hook_logger.rb'
- executable false
+ executable false
end
gitolite_hook do
name 'git_hosting_post_receive.rb'
source 'post-receive/lib/git_hosting_post_receive.rb'
destination 'lib/git_hosting/post_receive.rb'
- executable false
+ executable false
end
gitolite_hook do
name 'git_multimail.py'
source 'post-receive/lib/git_multimail.py'
destination 'post-receive.d/git_multimail.py'
- executable false
+ executable false
end
end
# Gitolite hooks can be found in Redmine root dir or in plugin root dir
[
Rails.root.join('redmine_git_hosting_hooks.rb').to_s,
- Rails.root.join('plugins', 'redmine_git_hosting', 'custom_hooks.rb').to_s
+ Rails.root.join('plugins/redmine_git_hosting/custom_hooks.rb').to_s
].each do |file|
- require_dependency file if File.exist?(file)
+ require_dependency file if File.exist? file
end
diff --git a/lib/redmine/scm/adapters/xitolite_adapter.rb b/lib/redmine/scm/adapters/xitolite_adapter.rb
index bdb0b99a636..36905d32265 100644
--- a/lib/redmine/scm/adapters/xitolite_adapter.rb
+++ b/lib/redmine/scm/adapters/xitolite_adapter.rb
@@ -9,36 +9,30 @@ module Redmine
module Scm
module Adapters
class XitoliteAdapter < AbstractAdapter
-
# Git executable name
- XITOLITE_BIN = Redmine::Configuration['scm_git_command'] || "git"
+ XITOLITE_BIN = Redmine::Configuration['scm_git_command'] || 'git'
class GitBranch < Branch
attr_accessor :is_default
end
class << self
-
def client_command
@@bin ||= XITOLITE_BIN
end
-
def sq_bin
@@sq_bin ||= shell_quote_command
end
-
def client_version
@@client_version ||= (scm_command_version || [])
end
-
def client_available
!client_version.empty?
end
-
def scm_command_version
scm_version = scm_version_from_command_line.dup
if scm_version.respond_to?(:force_encoding)
@@ -49,26 +43,21 @@ def scm_command_version
end
end
-
# Change from the original method
def scm_version_from_command_line
RedmineGitHosting::Commands.git_version
end
-
end
-
def initialize(url, root_url = nil, login = nil, password = nil, path_encoding = nil)
super
@path_encoding = path_encoding.blank? ? 'UTF-8' : path_encoding
end
-
def path_encoding
@path_encoding
end
-
def info
begin
Info.new(root_url: url, lastrev: lastrev('', nil))
@@ -77,9 +66,9 @@ def info
end
end
-
def branches
return @branches if !@branches.nil?
+
@branches = []
cmd_args = %w|branch --no-color --verbose --no-abbrev|
git_cmd(cmd_args) do |io|
@@ -98,9 +87,9 @@ def branches
[]
end
-
def tags
return @tags if !@tags.nil?
+
@tags = []
cmd_args = %w|tag|
git_cmd(cmd_args) do |io|
@@ -112,17 +101,17 @@ def tags
[]
end
-
def default_branch
- bras = self.branches
+ bras = branches
return nil if bras.nil?
+
default_bras = bras.select { |x| x.is_default == true }
- return default_bras.first.to_s if !default_bras.empty?
+ return default_bras.first.to_s unless default_bras.empty?
+
master_bras = bras.select { |x| x.to_s == 'master' }
master_bras.empty? ? bras.first.to_s : 'master'
end
-
def entry(path = nil, identifier = nil)
parts = path.to_s.split(%r{[\/\\]}).select { |n| !n.blank? }
search_path = parts[0..-2].join('/')
@@ -137,7 +126,6 @@ def entry(path = nil, identifier = nil)
end
end
-
def entries(path = nil, identifier = nil, options = {})
path ||= ''
p = scm_iconv(@path_encoding, 'UTF-8', path)
@@ -153,19 +141,17 @@ def entries(path = nil, identifier = nil, options = {})
sha = $2
size = $3
name = $4
- if name.respond_to?(:force_encoding)
- name.force_encoding(@path_encoding)
- end
+ name.force_encoding(@path_encoding) if name.respond_to?(:force_encoding)
full_path = p.empty? ? name : "#{p}/#{name}"
n = scm_iconv('UTF-8', @path_encoding, name)
full_p = scm_iconv('UTF-8', @path_encoding, full_path)
- entries << Entry.new({:name => n,
- :path => full_p,
- :kind => (type == "tree") ? 'dir' : 'file',
- :size => (type == "tree") ? nil : size,
- :lastrev => options[:report_last_commit] ?
- lastrev(full_path, identifier) : Revision.new
- }) unless entries.detect { |entry| entry.name == name }
+ unless entries.detect { |entry| entry.name == name }
+ entries << Entry.new({ name: n,
+ path: full_p,
+ kind: (type == 'tree') ? 'dir' : 'file',
+ size: (type == 'tree') ? nil : size,
+ lastrev: options[:report_last_commit] ? lastrev(full_path, identifier) : Revision.new })
+ end
end
end
end
@@ -175,43 +161,40 @@ def entries(path = nil, identifier = nil, options = {})
[]
end
-
def lastrev(path, rev)
return nil if path.nil?
+
cmd_args = %w|log --no-color --encoding=UTF-8 --date=iso --pretty=fuller --no-merges -n 1|
cmd_args << rev if rev
- cmd_args << "--" << path unless path.empty?
+ cmd_args << '--' << path unless path.empty?
lines = []
git_cmd(cmd_args) { |io| lines = io.readlines }
begin
- id = lines[0].split[1]
- author = lines[1].match('Author:\s+(.*)$')[1]
- time = Time.parse(lines[4].match('CommitDate:\s+(.*)$')[1])
-
- Revision.new({
- :identifier => id,
- :scmid => id,
- :author => author,
- :time => time,
- :message => nil,
- :paths => nil
- })
+ id = lines[0].split[1]
+ author = lines[1].match('Author:\s+(.*)$')[1]
+ time = Time.parse(lines[4].match('CommitDate:\s+(.*)$')[1])
+
+ Revision.new({ identifier: id,
+ scmid: id,
+ author: author,
+ time: time,
+ message: nil,
+ paths: nil })
rescue NoMethodError => e
logger.error("The revision '#{path}' has a wrong format")
- return nil
+ nil
end
rescue ScmCommandAborted => e
logger.error(e.message)
nil
end
-
def revisions(path, identifier_from, identifier_to, options = {})
revs = Revisions.new
cmd_args = %w|log --no-color --encoding=UTF-8 --raw --date=iso --pretty=fuller --parents --stdin|
- cmd_args << "--reverse" if options[:reverse]
- cmd_args << "-n" << "#{options[:limit].to_i}" if options[:limit]
- cmd_args << "--" << scm_iconv(@path_encoding, 'UTF-8', path) if path && !path.empty?
+ cmd_args << '--reverse' if options[:reverse]
+ cmd_args << '-n' << "#{options[:limit].to_i}" if options[:limit]
+ cmd_args << '--' << scm_iconv(@path_encoding, 'UTF-8', path) if path && !path.empty?
revisions = []
if identifier_from || identifier_to
revisions << ''
@@ -242,15 +225,13 @@ def revisions(path, identifier_from, identifier_to, options = {})
parents_str = $2
if parsing_descr == 1 || parsing_descr == 2
parsing_descr = 0
- revision = Revision.new({
- :identifier => changeset[:commit],
- :scmid => changeset[:commit],
- :author => changeset[:author],
- :time => Time.parse(changeset[:date]),
- :message => changeset[:description],
- :paths => files,
- :parents => changeset[:parents]
- })
+ revision = Revision.new({ identifier: changeset[:commit],
+ scmid: changeset[:commit],
+ author: changeset[:author],
+ time: Time.parse(changeset[:date]),
+ message: changeset[:description],
+ paths: files,
+ parents: changeset[:parents] })
if block_given?
yield revision
else
@@ -260,7 +241,7 @@ def revisions(path, identifier_from, identifier_to, options = {})
files = []
end
changeset[:commit] = $1
- unless parents_str.nil? or parents_str == ''
+ unless parents_str.nil? || parents_str == ''
changeset[:parents] = parents_str.strip.split(' ')
end
elsif (parsing_descr == 0) && line =~ /^(\w+):\s*(.*)$/
@@ -296,15 +277,13 @@ def revisions(path, identifier_from, identifier_to, options = {})
end
if changeset[:commit]
- revision = Revision.new({
- :identifier => changeset[:commit],
- :scmid => changeset[:commit],
- :author => changeset[:author],
- :time => Time.parse(changeset[:date]),
- :message => changeset[:description],
- :paths => files,
- :parents => changeset[:parents]
- })
+ revision = Revision.new({ identifier: changeset[:commit],
+ scmid: changeset[:commit],
+ author: changeset[:author],
+ time: Time.parse(changeset[:date]),
+ message: changeset[:description],
+ paths: files,
+ parents: changeset[:parents] })
if block_given?
yield revision
else
@@ -323,7 +302,6 @@ def revisions(path, identifier_from, identifier_to, options = {})
end
end
-
# Override the original method to accept options hash
# which may contain *bypass_cache* flag and pass the options hash to *git_cmd*.
#
@@ -348,16 +326,16 @@ def diff(path, identifier_from, identifier_to = nil, opts = {})
nil
end
-
def annotate(path, identifier = nil)
identifier = 'HEAD' if identifier.blank?
cmd_args = %w|blame --encoding=UTF-8|
- cmd_args << '-p' << identifier << '--' << scm_iconv(@path_encoding, 'UTF-8', path)
+ cmd_args << '-p' << identifier << '--' << scm_iconv(@path_encoding, 'UTF-8', path)
blame = Annotate.new
content = nil
git_cmd(cmd_args) { |io| io.binmode; content = io.read }
# git annotates binary files
return nil if binary_data?(content)
+
identifier = ''
# git shows commit author on the first occurrence only
authors_by_commit = {}
@@ -367,12 +345,10 @@ def annotate(path, identifier = nil)
elsif line =~ /^author (.+)/
authors_by_commit[identifier] = $1.strip
elsif line =~ /^\t(.*)/
- blame.add_line($1, Revision.new(
- :identifier => identifier,
- :revision => identifier,
- :scmid => identifier,
- :author => authors_by_commit[identifier]
- ))
+ blame.add_line($1, Revision.new(identifier: identifier,
+ revision: identifier,
+ scmid: identifier,
+ author: authors_by_commit[identifier]))
identifier = ''
author = ''
end
@@ -383,7 +359,6 @@ def annotate(path, identifier = nil)
nil
end
-
def cat(path, identifier = nil)
identifier = 'HEAD' if identifier.nil?
cmd_args = %w|show --no-color|
@@ -399,7 +374,6 @@ def cat(path, identifier = nil)
nil
end
-
# Added to be compatible with EmailDiff plugin
#
def changed_files(path = nil, rev = 'HEAD')
@@ -416,13 +390,12 @@ def changed_files(path = nil, rev = 'HEAD')
changed_files
end
-
# Added for GitDownloadRevision
#
def rev_list(revision, args)
cmd_args = ['rev-list', *args, revision]
git_cmd(cmd_args) do |io|
- @revisions_list = io.readlines.map { |t| t.strip }
+ @revisions_list = io.readlines.map(&:strip)
end
@revisions_list
rescue ScmCommandAborted => e
@@ -430,13 +403,12 @@ def rev_list(revision, args)
[]
end
-
# Added for GitDownloadRevision / GithubPayload
#
def rev_parse(revision)
cmd_args = ['rev-parse', '--quiet', '--verify', revision]
git_cmd(cmd_args) do |io|
- @parsed_revision = io.readlines.map { |t| t.strip }.first
+ @parsed_revision = io.readlines.map(&:strip).first
end
@parsed_revision
rescue ScmCommandAborted => e
@@ -444,14 +416,11 @@ def rev_parse(revision)
nil
end
-
# Added for GitDownloadRevision
#
def archive(revision, format)
cmd_args = ['archive']
case format
- when 'tar' then
- cmd_args << '--format=tar'
when 'tar.gz' then
cmd_args << '--format=tar.gz'
cmd_args << '-7'
@@ -472,7 +441,6 @@ def archive(revision, format)
nil
end
-
# Added for MirrorPush
#
def mirror_push(mirror_url, branch = nil, args = [])
@@ -481,7 +449,6 @@ def mirror_push(mirror_url, branch = nil, args = [])
RedmineGitHosting::Utils::Exec.capture(cmd, cmd_args, { merge_output: true })
end
-
class Revision < Redmine::Scm::Adapters::Revision
# Returns the readable identifier
def format_identifier
@@ -489,91 +456,75 @@ def format_identifier
end
end
-
private
+ def logger
+ RedmineGitHosting.logger
+ end
- def logger
- RedmineGitHosting.logger
- end
-
-
- def git_cmd(args, options = {}, &block)
- # Get options
- bypass_cache = options.delete(:bypass_cache) { false }
-
- # Build git command line
- cmd_str = prepare_command(args)
-
- # Insert cache between shell execution and caller
- if !git_cache_id.nil? && git_cache_enabled? && !bypass_cache
- RedmineGitHosting::ShellRedirector.execute(cmd_str, git_cache_id, options, &block)
- else
- Redmine::Scm::Adapters::AbstractAdapter.shellout(cmd_str, options, &block)
- end
- end
-
-
- def prepare_command(args)
- # Get our basics args
- full_args = base_args
- # Concat with Redmine args
- full_args += args
- # Quote args
- full_args.map { |e| shell_quote(e.to_s) }.join(' ')
- end
-
-
- # Compute string from repo_path that should be same as: repo.git_cache_id
- # If only we had access to the repo (we don't).
- # We perform caching here to speed this up, since this function gets called
- # many times during the course of a repository lookup.
- def git_cache_id
- logger.debug("Lookup for git_cache_id with repository path '#{repo_path}' ... ")
- @git_cache_id ||= Repository::Xitolite.repo_path_to_git_cache_id(repo_path)
- logger.warn("Unable to find git_cache_id for '#{repo_path}', bypass cache... ") if @git_cache_id.nil?
- logger.debug("git_cache_id found : #{@git_cache_id}") if !@git_cache_id.nil?
- @git_cache_id
- end
-
-
- def base_args
- RedmineGitHosting::Commands.sudo_git_args_for_repo(repo_path).concat(git_args)
- end
+ def git_cmd(args, options = {}, &block)
+ # Get options
+ bypass_cache = options.delete(:bypass_cache) { false }
+ # Build git command line
+ cmd_str = prepare_command(args)
- def git_mirror_cmd
- RedmineGitHosting::Commands.sudo_git_args_for_repo(repo_path, git_push_args)
+ # Insert cache between shell execution and caller
+ if !git_cache_id.nil? && git_cache_enabled? && !bypass_cache
+ RedmineGitHosting::ShellRedirector.execute(cmd_str, git_cache_id, options, &block)
+ else
+ Redmine::Scm::Adapters::AbstractAdapter.shellout(cmd_str, options, &block)
end
+ end
+ def prepare_command(args)
+ # Get our basics args
+ full_args = base_args
+ # Concat with Redmine args
+ full_args += args
+ # Quote args
+ full_args.map { |e| shell_quote(e.to_s) }.join(' ')
+ end
- def git_push_args
- ['env', "GIT_SSH=#{RedmineGitHosting::Config.gitolite_mirroring_script}"]
- end
-
+ # Compute string from repo_path that should be same as: repo.git_cache_id
+ # If only we had access to the repo (we don't).
+ # We perform caching here to speed this up, since this function gets called
+ # many times during the course of a repository lookup.
+ def git_cache_id
+ logger.debug("Lookup for git_cache_id with repository path '#{repo_path}' ... ")
+ @git_cache_id ||= Repository::Xitolite.repo_path_to_git_cache_id(repo_path)
+ logger.warn("Unable to find git_cache_id for '#{repo_path}', bypass cache... ") if @git_cache_id.nil?
+ logger.debug("git_cache_id found : #{@git_cache_id}") unless @git_cache_id.nil?
+ @git_cache_id
+ end
- def repo_path
- root_url || url
- end
+ def base_args
+ RedmineGitHosting::Commands.sudo_git_args_for_repo(repo_path).concat(git_args)
+ end
+ def git_mirror_cmd
+ RedmineGitHosting::Commands.sudo_git_args_for_repo(repo_path, git_push_args)
+ end
- def git_args
- self.class.client_version_above?([1, 7, 2]) ? ['-c', 'core.quotepath=false', '-c', 'log.decorate=no'] : []
- end
+ def git_push_args
+ ['env', "GIT_SSH=#{RedmineGitHosting::Config.gitolite_mirroring_script}"]
+ end
+ def repo_path
+ root_url || url
+ end
- def git_cache_enabled?
- RedmineGitHosting::Config.gitolite_cache_max_time != 0
- end
+ def git_args
+ self.class.client_version_above?([1, 7, 2]) ? ['-c', 'core.quotepath=false', '-c', 'log.decorate=no'] : []
+ end
- def binary_data?(content)
- if Gem::Version.new(Redmine::VERSION.to_s) >= Gem::Version.new('3.4')
- ScmData.binary?(content)
- else
- content.is_binary_data?
- end
- end
+ def git_cache_enabled?
+ RedmineGitHosting::Config.gitolite_cache_max_time != 0
+ end
+ def binary_data?(content)
+ ScmData.binary? content
+ end
end
end
end
diff --git a/lib/redmine_git_hosting.rb b/lib/redmine_git_hosting.rb
index 5b91d1eed44..e507799c0ca 100644
--- a/lib/redmine_git_hosting.rb
+++ b/lib/redmine_git_hosting.rb
@@ -24,26 +24,32 @@ module RedmineGitHosting
'reports',
'services',
'use_cases',
- ['controllers', 'concerns'],
- ['models', 'concerns']
+ %w[controllers concerns],
+ %w[models concerns]
def logger
- @logger ||= RedmineGitHosting::Logger.init_logs!('RedmineGitHosting', logfile, loglevel)
+ @logger ||= if ['Journald::Logger', 'Journald::TraceLogger'].include? Rails.logger.class.to_s
+ RedmineGitHosting::JournalLogger.init_logs! logprogname, loglevel
+ else
+ RedmineGitHosting::FileLogger.init_logs! logprogname, logfile, loglevel
+ end
+ end
+
+ def logprogname
+ 'redmine_git_hosting'
end
def logfile
- Rails.root.join('log', 'git_hosting.log')
+ Rails.root.join('log/git_hosting.log')
end
def loglevel
case RedmineGitHosting::Config.gitolite_log_level
- when 'debug' then
+ when 'debug'
Logger::DEBUG
- when 'info' then
- Logger::INFO
- when 'warn' then
+ when 'warn'
Logger::WARN
- when 'error' then
+ when 'error'
Logger::ERROR
else
Logger::INFO
diff --git a/lib/redmine_git_hosting/cache.rb b/lib/redmine_git_hosting/cache.rb
index de89589c0af..34b1a219f14 100644
--- a/lib/redmine_git_hosting/cache.rb
+++ b/lib/redmine_git_hosting/cache.rb
@@ -38,8 +38,6 @@ def clear_cache_for_repository(repo_id)
def adapter
case RedmineGitHosting::Config.gitolite_cache_adapter
- when 'database'
- Database
when 'memcached'
Memcached
when 'redis'
diff --git a/lib/redmine_git_hosting/cache/abstract_cache.rb b/lib/redmine_git_hosting/cache/abstract_cache.rb
index 452b3e334e3..3d4ec75420c 100644
--- a/lib/redmine_git_hosting/cache/abstract_cache.rb
+++ b/lib/redmine_git_hosting/cache/abstract_cache.rb
@@ -2,75 +2,62 @@ module RedmineGitHosting
module Cache
class AbstractCache
class << self
-
def max_cache_size
@max_cache_size ||= RedmineGitHosting::Config.gitolite_cache_max_size
end
-
def max_cache_time
@max_cache_time ||= RedmineGitHosting::Config.gitolite_cache_max_time
end
-
def max_cache_elements
@max_cache_elements ||= RedmineGitHosting::Config.gitolite_cache_max_elements
end
-
def set_cache(repo_id, command, output)
raise NotImplementedError
end
-
def get_cache(repo_id, command)
raise NotImplementedError
end
-
def flush_cache!
raise NotImplementedError
end
-
def clear_obsolete_cache_entries
raise NotImplementedError
end
-
def clear_cache_for_repository(repo_id)
raise NotImplementedError
end
-
def apply_cache_limit
raise NotImplementedError
end
-
private
+ def logger
+ RedmineGitHosting.logger
+ end
- def logger
- RedmineGitHosting.logger
- end
-
-
- def time_limit
- return if max_cache_time < 0 # No expiration needed
- current_time = ActiveRecord::Base.default_timezone == :utc ? Time.now.utc : Time.now
- limit = current_time - max_cache_time
- limit
- end
+ def time_limit
+ return if max_cache_time.to_i.negative? # No expiration needed
+ current_time = ActiveRecord::Base.default_timezone == :utc ? Time.now.utc : Time.now
+ current_time - max_cache_time
+ end
- def valid_cache_entry?(cached_entry_date)
- return true if max_cache_time < 0 # No expiration needed
- current_time = ActiveRecord::Base.default_timezone == :utc ? Time.now.utc : Time.now
- expired = current_time.to_i - cached_entry_date.to_i > max_cache_time
- !expired
- end
+ def valid_cache_entry?(cached_entry_date)
+ return true if max_cache_time.to_i.negative? # No expiration needed
+ current_time = ActiveRecord::Base.default_timezone == :utc ? Time.now.utc : Time.now
+ expired = current_time.to_i - cached_entry_date.to_i > max_cache_time
+ !expired
+ end
end
end
end
diff --git a/lib/redmine_git_hosting/cache/database.rb b/lib/redmine_git_hosting/cache/database.rb
index db74308477c..771b5adc1a3 100644
--- a/lib/redmine_git_hosting/cache/database.rb
+++ b/lib/redmine_git_hosting/cache/database.rb
@@ -14,7 +14,7 @@ def set_cache(repo_id, command, output)
end
def get_cache(repo_id, command)
- cached = GitCache.find_by_repo_identifier_and_command(repo_id, command)
+ cached = GitCache.find_by(repo_identifier: repo_id, command: command)
if cached
if valid_cache_entry?(cached.created_at)
# Update updated_at flag
diff --git a/lib/redmine_git_hosting/cache/memcached.rb b/lib/redmine_git_hosting/cache/memcached.rb
index eecfa69aa12..f7e6ad5b0c5 100644
--- a/lib/redmine_git_hosting/cache/memcached.rb
+++ b/lib/redmine_git_hosting/cache/memcached.rb
@@ -5,7 +5,6 @@ module RedmineGitHosting
module Cache
class Memcached < AbstractCache
class << self
-
def set_cache(repo_id, command, output)
logger.debug("Memcached Adapter : inserting cache entry for repository '#{repo_id}'")
@@ -22,17 +21,14 @@ def set_cache(repo_id, command, output)
end
end
-
def get_cache(repo_id, command)
client.get(hash_key(command))
end
-
def flush_cache!
client.flush
end
-
# Return true, this is done automatically by Memcached with the
# *max_cache_time* params (see below)
#
@@ -40,13 +36,13 @@ def clear_obsolete_cache_entries
true
end
-
def clear_cache_for_repository(repo_id)
# Create a SHA256 of the repo_id as key id
hashed_repo_id = hash_key(repo_id)
# Find repository references in Memcached
repo_references = client.get(hashed_repo_id)
return true if repo_references.nil?
+
# Delete reference keys
repo_references = repo_references.split(',').select { |r| !r.empty? }
repo_references.map { |key| client.delete(key) }
@@ -55,44 +51,37 @@ def clear_cache_for_repository(repo_id)
client.set(hashed_repo_id, '', max_cache_time, raw: true)
end
-
# Return true. If cache is full, Memcached drop the oldest objects to add new ones.
#
def apply_cache_limit
true
end
-
private
-
- def create_or_update_repo_references(repo_id, reference)
- # Create a SHA256 of the repo_id as key id
- hashed_repo_id = hash_key(repo_id)
- # Find it in Memcached
- repo_references = client.get(hashed_repo_id)
- if repo_references.nil?
- client.set(hashed_repo_id, reference, max_cache_time, raw: true)
- else
- client.append(hashed_repo_id, ',' + reference)
- end
- end
-
-
- def hash_key(key)
- Digest::SHA256.hexdigest(key)
- end
-
-
- def client
- @client ||= Dalli::Client.new('localhost:11211', memcached_options)
+ def create_or_update_repo_references(repo_id, reference)
+ # Create a SHA256 of the repo_id as key id
+ hashed_repo_id = hash_key(repo_id)
+ # Find it in Memcached
+ repo_references = client.get(hashed_repo_id)
+ if repo_references.nil?
+ client.set(hashed_repo_id, reference, max_cache_time, raw: true)
+ else
+ client.append(hashed_repo_id, ',' + reference)
end
+ end
+ def hash_key(key)
+ Digest::SHA256.hexdigest(key)
+ end
- def memcached_options
- { namespace: 'redmine_git_hosting', compress: true, expires_in: max_cache_time, value_max_bytes: max_cache_size }
- end
+ def client
+ @client ||= Dalli::Client.new('localhost:11211', memcached_options)
+ end
+ def memcached_options
+ { namespace: 'redmine_git_hosting', compress: true, expires_in: max_cache_time, value_max_bytes: max_cache_size }
+ end
end
end
end
diff --git a/lib/redmine_git_hosting/cache/redis.rb b/lib/redmine_git_hosting/cache/redis.rb
index 0691a28dd5f..11f9b823371 100644
--- a/lib/redmine_git_hosting/cache/redis.rb
+++ b/lib/redmine_git_hosting/cache/redis.rb
@@ -5,7 +5,6 @@ module RedmineGitHosting
module Cache
class Redis < AbstractCache
class << self
-
def set_cache(repo_id, command, output)
logger.debug("Redis Adapter : inserting cache entry for repository '#{repo_id}'")
@@ -14,7 +13,7 @@ def set_cache(repo_id, command, output)
# 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) ? 86_400 : max_cache_time
+ cache_time = max_cache_time.to_i.negative? ? 86_400 : max_cache_time
begin
client.set(hashed_command, output, ex: cache_time)
@@ -25,13 +24,11 @@ def set_cache(repo_id, command, output)
end
end
-
def get_cache(repo_id, command)
logger.debug("Redis Adapter : getting cache entry for repository '#{repo_id}'")
client.get(hash_key(repo_id, command))
end
-
def flush_cache!
deleted = 0
client.scan_each(match: all_entries) do |key|
@@ -41,7 +38,6 @@ def flush_cache!
logger.info("Redis Adapter : removed '#{deleted}' expired cache entries among all repositories")
end
-
# Return true, this is done automatically by Redis with the
# *max_cache_time* params (see above)
#
@@ -49,7 +45,6 @@ def clear_obsolete_cache_entries
true
end
-
def clear_cache_for_repository(repo_id)
deleted = 0
client.scan_each(match: all_entries_for_repo(repo_id)) do |key|
@@ -59,58 +54,48 @@ def clear_cache_for_repository(repo_id)
logger.info("Redis Adapter : removed '#{deleted}' expired cache entries for repository '#{repo_id}'")
end
-
# Return true.
#
def apply_cache_limit
true
end
-
private
+ def redis_namespace
+ 'git_hosting_cache'
+ end
- def redis_namespace
- 'git_hosting_cache'
- end
-
-
- def all_entries
- "#{redis_namespace}:*"
- end
-
-
- def all_entries_for_repo(repo_id)
- "#{redis_namespace}:#{digest(repo_id)}:*"
- end
-
-
- # Prefix each key with *git_hosting_cache:* to store them in a subdirectory.
- # When flushing cache, get all keys with this prefix and delete them.
- # Make SHA256 of the Git command as identifier
- #
- def hash_key(repo_id, command)
- "#{redis_namespace}:#{digest(repo_id)}:#{digest(command)}"
- end
-
-
- def digest(string)
- Digest::SHA256.hexdigest(string)[0..16]
- end
+ def all_entries
+ "#{redis_namespace}:*"
+ end
+ def all_entries_for_repo(repo_id)
+ "#{redis_namespace}:#{digest(repo_id)}:*"
+ end
- def client
- @client ||= ::Redis.new(redis_options)
- end
+ # Prefix each key with *git_hosting_cache:* to store them in a subdirectory.
+ # When flushing cache, get all keys with this prefix and delete them.
+ # Make SHA256 of the Git command as identifier
+ #
+ def hash_key(repo_id, command)
+ "#{redis_namespace}:#{digest(repo_id)}:#{digest(command)}"
+ end
+ def digest(string)
+ Digest::SHA256.hexdigest(string)[0..16]
+ end
- # Specify the Redis DB.
- # However, I don't know exactly how it's used by Redis...
- #
- def redis_options
- { db: redis_namespace, driver: :hiredis }
- end
+ def client
+ @client ||= ::Redis.new(redis_options)
+ end
+ # Specify the Redis DB.
+ # However, I don't know exactly how it's used by Redis...
+ #
+ def redis_options
+ { db: redis_namespace, driver: :hiredis }
+ end
end
end
end
diff --git a/lib/redmine_git_hosting/commands/base.rb b/lib/redmine_git_hosting/commands/base.rb
index 42d305714c7..eba9808d547 100644
--- a/lib/redmine_git_hosting/commands/base.rb
+++ b/lib/redmine_git_hosting/commands/base.rb
@@ -10,7 +10,6 @@ def capture(args = [], opts = {})
RedmineGitHosting::Utils::Exec.capture(cmd, args, opts)
end
-
# Wrapper to Open3.capture.
#
def execute(args = [], opts = {})
@@ -18,14 +17,11 @@ def execute(args = [], opts = {})
RedmineGitHosting::Utils::Exec.execute(cmd, args, opts)
end
-
private
-
- def logger
- RedmineGitHosting.logger
- end
-
+ def logger
+ RedmineGitHosting.logger
+ end
end
end
end
diff --git a/lib/redmine_git_hosting/commands/git.rb b/lib/redmine_git_hosting/commands/git.rb
index 8ebd2451f6e..7ed5a3c9474 100644
--- a/lib/redmine_git_hosting/commands/git.rb
+++ b/lib/redmine_git_hosting/commands/git.rb
@@ -9,47 +9,43 @@ module Git
# #
############################
-
# Send Git command with Sudo
#
def sudo_git(*params)
- if RedmineGitHosting::Config.gitolite_use_sudo?
- cmd = sudo_git_cmd.concat(params)
- else
- cmd = ['git'].concat(params)
- end
- capture(cmd)
- end
+ cmd = if RedmineGitHosting::Config.gitolite_use_sudo?
+ sudo_git_cmd.concat(params)
+ else
+ ['git'].concat(params)
+ end
+ capture cmd
+ end
def sudo_git_cmd(args = [])
- sudo.concat(git(args))
+ sudo.concat git(args)
end
-
def sudo_git_args_for_repo(repo_path, args = [])
sudo.concat(git(args)).concat(git_args_for_repo(repo_path))
end
-
def sudo_unset_git_global_param(key)
logger.info("Unset Git global parameter : #{key}")
begin
_, _, code = sudo_shell('git', 'config', '--global', '--unset', key)
- return true
+ true
rescue RedmineGitHosting::Error::GitoliteCommandException => e
if code == 5
- return true
+ true
else
logger.error("Error while removing Git global parameter : #{key}")
logger.error(e.output)
- return false
+ false
end
end
end
-
def sudo_set_git_global_param(namespace, key, value)
key = prefix_key(namespace, key)
@@ -59,15 +55,14 @@ def sudo_set_git_global_param(namespace, key, value)
begin
sudo_git('config', '--global', key, value)
- return true
+ true
rescue RedmineGitHosting::Error::GitoliteCommandException => e
logger.error("Error while setting Git global parameter : #{key} (#{value})")
logger.error(e.output)
- return false
+ false
end
end
-
# Return a hash with global config parameters.
def sudo_get_git_global_params(namespace)
begin
@@ -80,56 +75,48 @@ def sudo_get_git_global_params(namespace)
git_config_as_hash(namespace, params)
end
-
def git_version
- begin
- sudo_git('--version')
- rescue RedmineGitHosting::Error::GitoliteCommandException => e
- logger.error("Can't retrieve Git version: #{e.output}")
- 'unknown'
- end
+ sudo_git('--version')
+ rescue RedmineGitHosting::Error::GitoliteCommandException => e
+ logger.error("Can't retrieve Git version: #{e.output}")
+ 'unknown'
end
-
private
+ # Return the Git command with prepend args (mainly env vars like FOO=BAR git push).
+ #
+ def git(args = [])
+ [*args, Repository::Xitolite.scm_command]
+ end
- # Return the Git command with prepend args (mainly env vars like FOO=BAR git push).
- #
- def git(args = [])
- [*args, Repository::Xitolite.scm_command]
- end
-
-
- def git_args_for_repo(repo_path)
- ['--git-dir', repo_path]
- end
-
-
- # Returns the global gitconfig prefix for
- # a config with that given key under the
- # hooks namespace.
- #
- def prefix_key(namespace, key)
- [namespace, '.', key].join
- end
+ def git_args_for_repo(repo_path)
+ ['--git-dir', repo_path]
+ end
+ # Returns the global gitconfig prefix for
+ # a config with that given key under the
+ # hooks namespace.
+ #
+ def prefix_key(namespace, key)
+ [namespace, '.', key].join
+ end
- def git_config_as_hash(namespace, params)
- value_hash = {}
+ def git_config_as_hash(namespace, params)
+ value_hash = {}
- params.each do |value_pair|
- next if value_pair.empty?
- next if !value_pair.start_with?(namespace)
- global_key = value_pair.split(' ')[0]
- value = value_pair.split(' ')[1]
- key = global_key.split('.')[1]
- value_hash[key] = value
- end
+ params.each do |value_pair|
+ next if value_pair.empty?
+ next unless value_pair.start_with? namespace
- value_hash
+ global_key = value_pair.split(' ')[0]
+ value = value_pair.split(' ')[1]
+ key = global_key.split('.')[1]
+ value_hash[key] = value
end
+ value_hash
+ end
end
end
end
diff --git a/lib/redmine_git_hosting/commands/gitolite.rb b/lib/redmine_git_hosting/commands/gitolite.rb
index 65da8acf1b5..4ec0f8c0b07 100644
--- a/lib/redmine_git_hosting/commands/gitolite.rb
+++ b/lib/redmine_git_hosting/commands/gitolite.rb
@@ -10,7 +10,7 @@ module Gitolite
#################################
def gitolite_infos
- ssh_capture('info')
+ ssh_capture 'info'
end
def sudo_gitolite_query_rc(param)
@@ -28,10 +28,10 @@ def sudo_update_gitolite!
logger.info("Running '#{gitolite_command.join(' ')}' on the Gitolite install ...")
begin
sudo_shell(*gitolite_command)
- return true
+ true
rescue RedmineGitHosting::Error::GitoliteCommandException => e
logger.error(e.output)
- return false
+ false
end
end
diff --git a/lib/redmine_git_hosting/commands/ssh.rb b/lib/redmine_git_hosting/commands/ssh.rb
index a281805fbe8..95c9ef23b4f 100644
--- a/lib/redmine_git_hosting/commands/ssh.rb
+++ b/lib/redmine_git_hosting/commands/ssh.rb
@@ -7,9 +7,9 @@ module Ssh
#
def ssh_capture(*params)
cmd = ssh.concat(params)
- capture(cmd)
- end
+ capture cmd
+ end
# Execute a command in the gitolite forced environment through this user
# i.e., executes 'ssh git@localhost
'
@@ -18,41 +18,38 @@ def ssh_capture(*params)
#
def ssh_shell(*params)
cmd = ssh.concat(params)
- execute(cmd)
- end
+ execute cmd
+ end
private
+ # Return the SSH command with basic args
+ #
+ def ssh
+ ['ssh', *ssh_shell_params]
+ end
- # Return the SSH command with basic args
- #
- def ssh
- ['ssh', *ssh_shell_params]
- end
-
-
- # Returns the ssh prefix arguments for all ssh_* commands.
- #
- # These are as follows:
- # * (-T) Never request tty
- # * (-i ) Use the SSH keys given in Settings
- # * (-p ) Use port from settings
- # * (-o BatchMode=yes) Never ask for a password
- # * @ (see +gitolite_url+)
- #
- def ssh_shell_params
- [
- '-T',
- '-o', 'BatchMode=yes',
- '-o', 'UserKnownHostsFile=/dev/null',
- '-o', 'StrictHostKeyChecking=no',
- '-p', RedmineGitHosting::Config.gitolite_server_port,
- '-i', RedmineGitHosting::Config.gitolite_ssh_private_key,
- RedmineGitHosting::Config.gitolite_url
- ]
- end
-
+ # Returns the ssh prefix arguments for all ssh_* commands.
+ #
+ # These are as follows:
+ # * (-T) Never request tty
+ # * (-i ) Use the SSH keys given in Settings
+ # * (-p ) Use port from settings
+ # * (-o BatchMode=yes) Never ask for a password
+ # * @ (see +gitolite_url+)
+ #
+ def ssh_shell_params
+ [
+ '-T',
+ '-o', 'BatchMode=yes',
+ '-o', 'UserKnownHostsFile=/dev/null',
+ '-o', 'StrictHostKeyChecking=no',
+ '-p', RedmineGitHosting::Config.gitolite_server_port,
+ '-i', RedmineGitHosting::Config.gitolite_ssh_private_key,
+ RedmineGitHosting::Config.gitolite_url
+ ]
+ end
end
end
end
diff --git a/lib/redmine_git_hosting/commands/sudo.rb b/lib/redmine_git_hosting/commands/sudo.rb
index 65448567dac..36690eb5d38 100644
--- a/lib/redmine_git_hosting/commands/sudo.rb
+++ b/lib/redmine_git_hosting/commands/sudo.rb
@@ -11,57 +11,52 @@ module Sudo
# #
##########################
-
# Pipe file content via sudo to dest_file.
# Expect file content to end with EOL (\n)
#
def sudo_install_file(content, dest_file, filemode)
- stdin = [ 'cat', '<<\EOF', '>' + dest_file, "\n" + content.to_s + "EOF" ].join(' ')
+ stdin = ['cat', '<<\EOF', '>' + dest_file, "\n" + content.to_s + "EOF"].join(' ')
begin
sudo_pipe_data(stdin)
rescue RedmineGitHosting::Error::GitoliteCommandException => e
logger.error(e.output)
- return false
+ false
else
begin
sudo_chmod(filemode, dest_file)
- return true
+ true
rescue RedmineGitHosting::Error::GitoliteCommandException => e
logger.error(e.output)
- return false
+ false
end
end
end
-
# Test if a file exists with size > 0
#
def sudo_file_exists?(filename)
- sudo_test(filename, '-s')
+ sudo_test filename, '-s'
end
-
# Test if a directory exists
#
def sudo_dir_exists?(dirname)
- sudo_test(dirname, '-r')
+ sudo_test dirname, '-r'
end
-
# Test properties of a path from the git user.
#
# e.g., Test if a directory exists: sudo_test('~/somedir', '-d')
#
def sudo_test(path, testarg)
- _, _ , code = sudo_shell('test', testarg, path)
- return code == 0
+ _, _, code = sudo_shell('test', testarg, path)
+ code.to_i.zero?
rescue RedmineGitHosting::Error::GitoliteCommandException => e
logger.debug("File check for #{path} failed : #{e.message}")
false
end
-
# Calls mkdir with the given arguments on the git user's side.
#
# e.g., sudo_mkdir('-p', '/some/path')
@@ -70,14 +65,12 @@ def sudo_mkdir(*args)
sudo_shell('mkdir', *args)
end
-
# Syntaxic sugar for 'mkdir -p'
#
def sudo_mkdir_p(path)
- sudo_mkdir('-p', path)
+ sudo_mkdir '-p', path
end
-
# Calls chmod with the given arguments on the git user's side.
#
# e.g., sudo_chmod('755', '/some/path')
@@ -86,7 +79,6 @@ def sudo_chmod(mode, file)
sudo_shell('chmod', mode, file)
end
-
# Removes a directory and all subdirectories below gitolite_user's $HOME.
#
# Assumes a relative path.
@@ -102,49 +94,42 @@ def sudo_rmdir(path, force = false)
end
end
-
# Syntaxic sugar for 'rm -rf' command
#
def sudo_rm_rf(path)
sudo_rmdir(path, true)
end
-
# Moves a file/directory to a new target.
#
def sudo_move(old_path, new_path)
sudo_shell('mv', old_path, new_path)
end
-
def sudo_get_dir_size(directory)
sudo_capture('du', '-sh', directory).split(' ')[0] rescue ''
end
-
def sudo_cat(file)
sudo_capture('cat', file) rescue ''
end
-
# Test if file content has changed
#
def sudo_file_changed?(source_file, dest_file)
hash_content(content_from_redmine_side(source_file)) != hash_content(content_from_gitolite_side(dest_file))
end
-
# Test if file permissions has changed
#
def sudo_file_perms_changed?(filemode, dest_file)
- current_mode = sudo_capture('stat', '-c', "%a", dest_file)
+ current_mode = sudo_capture('stat', '-c', '%a', dest_file)
current_mode.chomp != filemode
rescue RedmineGitHosting::Error::GitoliteCommandException => e
logger.error(e.output)
false
end
-
# Return only the output of the shell command.
# Throws an exception if the shell command does not exit with code 0.
#
@@ -153,7 +138,6 @@ def sudo_capture(*params)
capture(cmd)
end
-
# Execute a command as the gitolite user defined in +GitoliteWrapper.gitolite_user+.
#
# Will shell out to +sudo -n -u params+
@@ -163,7 +147,6 @@ def sudo_shell(*params)
execute(cmd)
end
-
# Write data on stdin and return the output of the shell command.
# Throws an exception if the shell command does not exit with code 0.
#
@@ -172,56 +155,49 @@ def sudo_pipe_data(stdin)
capture(cmd, { stdin_data: stdin, binmode: true })
end
-
private
-
- # Return the Sudo command with basic args.
- #
- def sudo
- if RedmineGitHosting::Config.gitolite_use_sudo?
- ['sudo', *sudo_shell_params]
- else
- []
- end
- end
-
-
- # Returns the sudo prefix to all sudo_* commands.
- #
- # These are as follows:
- # * (-i) login as `gitolite_user` (setting ENV['HOME')
- # * (-n) non-interactive
- # * (-u `gitolite_user`) target user
- #
- def sudo_shell_params
- ['-n', '-u', RedmineGitHosting::Config.gitolite_user, '-i']
- end
-
-
- # Return a md5 hash of the string passed.
- #
- def hash_content(content)
- Digest::MD5.hexdigest(content)
+ # Return the Sudo command with basic args.
+ #
+ def sudo
+ if RedmineGitHosting::Config.gitolite_use_sudo?
+ ['sudo', *sudo_shell_params]
+ else
+ []
end
+ end
+ # Returns the sudo prefix to all sudo_* commands.
+ #
+ # These are as follows:
+ # * (-i) login as `gitolite_user` (setting ENV['HOME')
+ # * (-n) non-interactive
+ # * (-u `gitolite_user`) target user
+ #
+ def sudo_shell_params
+ ['-n', '-u', RedmineGitHosting::Config.gitolite_user, '-i']
+ end
- # Return the content of a local (Redmine side) file.
- #
- def content_from_redmine_side(file)
- File.read(file)
- rescue Errno::ENOENT => e
- logger.error(e.message)
- ''
- end
-
+ # Return a md5 hash of the string passed.
+ #
+ def hash_content(content)
+ Digest::MD5.hexdigest(content)
+ end
- # Return the content of a file on Gitolite side.
- #
- def content_from_gitolite_side(destination_path)
- sudo_cat(destination_path)
- end
+ # Return the content of a local (Redmine side) file.
+ #
+ def content_from_redmine_side(file)
+ File.read(file)
+ rescue Errno::ENOENT => e
+ logger.error(e.message)
+ ''
+ end
+ # Return the content of a file on Gitolite side.
+ #
+ def content_from_gitolite_side(destination_path)
+ sudo_cat(destination_path)
+ end
end
end
end
diff --git a/lib/redmine_git_hosting/config/gitolite_access.rb b/lib/redmine_git_hosting/config/gitolite_access.rb
index 4ad3c7fbc93..ba5b0688a45 100644
--- a/lib/redmine_git_hosting/config/gitolite_access.rb
+++ b/lib/redmine_git_hosting/config/gitolite_access.rb
@@ -7,52 +7,42 @@ def gitolite_http_by_default?
get_setting(:gitolite_http_by_default)
end
-
def gitolite_daemon_by_default?
get_setting(:gitolite_daemon_by_default, true)
end
-
def gitolite_notify_by_default?
get_setting(:gitolite_notify_by_default, true)
end
-
def ssh_server_domain
get_setting(:ssh_server_domain)
end
-
def http_server_domain
get_setting(:http_server_domain)
end
-
def https_server_domain
get_setting(:https_server_domain)
end
-
def http_server_subdir
get_setting(:http_server_subdir)
end
-
def http_root_url
my_root_url(false)
end
-
def https_root_url
my_root_url(true)
end
-
def redmine_root_url
Redmine::Utils::relative_url_root
end
-
def my_root_url(ssl = false)
if ssl && https_server_domain != ''
server_domain = https_server_domain
@@ -64,7 +54,6 @@ def my_root_url(ssl = false)
# No trailing /.
File.join(server_domain[/^[^\/]*/], redmine_root_url, '/')[0..-2]
end
-
end
end
end
diff --git a/lib/redmine_git_hosting/config/gitolite_base.rb b/lib/redmine_git_hosting/config/gitolite_base.rb
index 771cd945ccb..ef888f9d902 100644
--- a/lib/redmine_git_hosting/config/gitolite_base.rb
+++ b/lib/redmine_git_hosting/config/gitolite_base.rb
@@ -12,67 +12,54 @@ def check_cache
@gitolite_ssh_fingerprint = nil
end
-
def redmine_user
@redmine_user ||= (%x[whoami]).chomp.strip
end
-
def gitolite_use_sudo?
redmine_user != gitolite_user
end
-
def gitolite_home_dir
@gitolite_home_dir ||= Etc.getpwnam(gitolite_user).dir rescue nil
end
-
def gitolite_bin_dir
@gitolite_bin_dir ||= RedmineGitHosting::Commands.sudo_gitolite_query_rc('GL_BINDIR')
end
-
def gitolite_lib_dir
@gitolite_lib_dir ||= RedmineGitHosting::Commands.sudo_gitolite_query_rc('GL_LIBDIR')
end
-
def gitolite_user
get_setting(:gitolite_user)
end
-
def gitolite_server_host
get_setting(:gitolite_server_host)
end
-
def gitolite_server_port
get_setting(:gitolite_server_port)
end
-
def gitolite_ssh_private_key
get_setting(:gitolite_ssh_private_key)
end
-
def gitolite_ssh_public_key
get_setting(:gitolite_ssh_public_key)
end
-
def gitolite_ssh_public_key_fingerprint
@gitolite_ssh_fingerprint ||= RedmineGitHosting::Utils::Ssh.ssh_fingerprint(File.read(gitolite_ssh_public_key))
end
-
def gitolite_config_file
File.basename(get_setting(:gitolite_config_file))
end
-
def gitolite_config_dir
dirs = File.dirname(gitolite_config_file).split('/')
if dirs[0] != '.'
@@ -82,51 +69,41 @@ def gitolite_config_dir
end
end
-
def gitolite_identifier_prefix
get_setting(:gitolite_identifier_prefix)
end
-
def gitolite_identifier_strip_user_id?
get_setting(:gitolite_identifier_strip_user_id, true)
end
-
def gitolite_key_subdir
'redmine_git_hosting'
end
-
def git_config_username
get_setting(:git_config_username)
end
-
def git_config_email
get_setting(:git_config_email)
end
-
def gitolite_temp_dir
get_setting(:gitolite_temp_dir)
end
-
def gitolite_url
[gitolite_user, '@', gitolite_server_host].join
end
-
def gitolite_admin_dir
File.join(gitolite_temp_dir, gitolite_user, 'gitolite-admin.git')
end
-
def gitolite_log_level
get_setting(:gitolite_log_level)
end
-
end
end
end
diff --git a/lib/redmine_git_hosting/config/gitolite_cache.rb b/lib/redmine_git_hosting/config/gitolite_cache.rb
index 03577b82513..e539ec1cf03 100644
--- a/lib/redmine_git_hosting/config/gitolite_cache.rb
+++ b/lib/redmine_git_hosting/config/gitolite_cache.rb
@@ -7,21 +7,17 @@ def gitolite_cache_max_time
get_setting(:gitolite_cache_max_time).to_i
end
-
def gitolite_cache_max_elements
get_setting(:gitolite_cache_max_elements).to_i
end
-
def gitolite_cache_max_size
get_setting(:gitolite_cache_max_size).to_i * 1024 * 1024
end
-
def gitolite_cache_adapter
get_setting(:gitolite_cache_adapter)
end
-
end
end
end
diff --git a/lib/redmine_git_hosting/config/gitolite_config_tests.rb b/lib/redmine_git_hosting/config/gitolite_config_tests.rb
index c0b94052684..edea394ccd7 100644
--- a/lib/redmine_git_hosting/config/gitolite_config_tests.rb
+++ b/lib/redmine_git_hosting/config/gitolite_config_tests.rb
@@ -18,7 +18,7 @@ def create_temp_dir
@temp_dir_path = gitolite_admin_dir
end
- if !File.directory?(@temp_dir_path)
+ unless File.directory? @temp_dir_path
file_logger.info("Create Gitolite Admin directory : '#{@temp_dir_path}'")
begin
FileUtils.mkdir_p @temp_dir_path
@@ -31,13 +31,12 @@ def create_temp_dir
@temp_dir_path
end
-
@temp_dir_writeable = false
def temp_dir_writeable?(opts = {})
- @temp_dir_writeable = false if opts.has_key?(:reset) && opts[:reset] == true
+ @temp_dir_writeable = false if opts.key?(:reset) && opts[:reset] == true
- if !@temp_dir_writeable
+ unless @temp_dir_writeable
file_logger.debug("Testing if Gitolite Admin directory '#{create_temp_dir}' is writeable ...")
mytestfile = File.join(create_temp_dir, 'writecheck')
if !File.directory?(create_temp_dir)
@@ -57,7 +56,6 @@ def temp_dir_writeable?(opts = {})
@temp_dir_writeable
end
-
###############################
## ##
## SUDO TESTS ##
@@ -67,6 +65,7 @@ def temp_dir_writeable?(opts = {})
## SUDO TEST1
def can_redmine_sudo_to_gitolite_user?
return true unless gitolite_use_sudo?
+
file_logger.info("Testing if Redmine user '#{redmine_user}' can sudo to Gitolite user '#{gitolite_user}'...")
result = execute_sudo_test(gitolite_user) do
RedmineGitHosting::Commands.sudo_capture('whoami')
@@ -75,21 +74,19 @@ def can_redmine_sudo_to_gitolite_user?
result
end
-
def execute_sudo_test(user, &block)
begin
test = yield if block_given?
rescue RedmineGitHosting::Error::GitoliteCommandException => e
- return false
+ false
else
if test.match(/#{user}/)
- return true
+ true
else
- return false
+ false
end
end
end
-
end
end
end
diff --git a/lib/redmine_git_hosting/config/gitolite_hooks.rb b/lib/redmine_git_hosting/config/gitolite_hooks.rb
index 37c2edf873c..0221d0d59a6 100644
--- a/lib/redmine_git_hosting/config/gitolite_hooks.rb
+++ b/lib/redmine_git_hosting/config/gitolite_hooks.rb
@@ -7,32 +7,26 @@ def gitolite_hooks_namespace
'redminegitolite'
end
-
def gitolite_hooks_url
[get_setting(:gitolite_hooks_url), '/githooks/post-receive/redmine'].join
end
-
def gitolite_hooks_debug
get_setting(:gitolite_hooks_debug, true)
end
-
def gitolite_hooks_are_asynchronous
get_setting(:gitolite_hooks_are_asynchronous, true)
end
-
def gitolite_overwrite_existing_hooks?
get_setting(:gitolite_overwrite_existing_hooks, true)
end
-
def gitolite_local_code_dir
@gitolite_local_code_dir ||= RedmineGitHosting::Commands.sudo_gitolite_query_rc('LOCAL_CODE')
end
-
def gitolite_hooks_dir
if gitolite_version == 3
File.join(gitolite_local_code_dir, 'hooks', 'common')
@@ -41,29 +35,25 @@ def gitolite_hooks_dir
end
end
-
def check_hooks_install!
{
- hook_files: RedmineGitHosting::GitoliteHooks.hooks_installed?,
+ hook_files: RedmineGitHosting::GitoliteHooks.hooks_installed?,
global_params: RedmineGitHosting::GitoliteParams::GlobalParams.new.installed?,
mailer_params: RedmineGitHosting::GitoliteParams::MailerParams.new.installed?
}
end
-
def install_hooks!
{
- hook_files: RedmineGitHosting::GitoliteHooks.install_hooks!,
+ hook_files: RedmineGitHosting::GitoliteHooks.install_hooks!,
global_params: RedmineGitHosting::GitoliteParams::GlobalParams.new.install!,
mailer_params: RedmineGitHosting::GitoliteParams::MailerParams.new.install!
}
end
-
def update_hook_params!
RedmineGitHosting::GitoliteParams::GlobalParams.new.install!
end
-
end
end
end
diff --git a/lib/redmine_git_hosting/config/gitolite_infos.rb b/lib/redmine_git_hosting/config/gitolite_infos.rb
index 444882d8f90..6e646b06a82 100644
--- a/lib/redmine_git_hosting/config/gitolite_infos.rb
+++ b/lib/redmine_git_hosting/config/gitolite_infos.rb
@@ -9,22 +9,18 @@ module GitoliteInfos
# #
##########################
-
def rugged_features
Rugged.features
end
-
def rugged_mandatory_features
[:threads, :ssh]
end
-
def libgit2_version
Rugged.libgit2_version.join('.')
end
-
def gitolite_infos
begin
RedmineGitHosting::Commands.gitolite_infos
@@ -34,21 +30,19 @@ def gitolite_infos
end
end
-
def gitolite_version
file_logger.debug('Getting Gitolite version...')
@gitolite_version ||= find_version(gitolite_infos)
end
-
def gitolite_banner
file_logger.debug('Getting Gitolite banner...')
gitolite_infos
end
-
def find_version(output)
return nil if output.blank?
+
line = output.split("\n")[0]
if line =~ /gitolite[ -]v?2./
2
@@ -59,7 +53,6 @@ def find_version(output)
end
end
-
def gitolite_command
if gitolite_version == 2
['gl-setup']
@@ -70,9 +63,9 @@ def gitolite_command
end
end
-
def gitolite_repository_count
return 'This is Gitolite v2, not implemented...' if gitolite_version != 3
+
file_logger.debug('Getting Gitolite physical repositories list...')
begin
RedmineGitHosting::Commands.gitolite_repository_count
@@ -81,7 +74,6 @@ def gitolite_repository_count
0
end
end
-
end
end
end
diff --git a/lib/redmine_git_hosting/config/gitolite_notifications.rb b/lib/redmine_git_hosting/config/gitolite_notifications.rb
index 627b928c6fb..b34133fd045 100644
--- a/lib/redmine_git_hosting/config/gitolite_notifications.rb
+++ b/lib/redmine_git_hosting/config/gitolite_notifications.rb
@@ -7,21 +7,17 @@ def gitolite_notify_global_prefix
get_setting(:gitolite_notify_global_prefix)
end
-
def gitolite_notify_global_sender_address
get_setting(:gitolite_notify_global_sender_address)
end
-
def gitolite_notify_global_include
get_setting(:gitolite_notify_global_include)
end
-
def gitolite_notify_global_exclude
get_setting(:gitolite_notify_global_exclude)
end
-
end
end
end
diff --git a/lib/redmine_git_hosting/config/gitolite_storage.rb b/lib/redmine_git_hosting/config/gitolite_storage.rb
index f941d646e92..07f84d47878 100644
--- a/lib/redmine_git_hosting/config/gitolite_storage.rb
+++ b/lib/redmine_git_hosting/config/gitolite_storage.rb
@@ -7,21 +7,17 @@ def gitolite_global_storage_dir
get_setting(:gitolite_global_storage_dir)
end
-
def gitolite_redmine_storage_dir
get_setting(:gitolite_redmine_storage_dir)
end
-
def gitolite_recycle_bin_dir
get_setting(:gitolite_recycle_bin_dir)
end
-
def recycle_bin_dir
File.join(gitolite_home_dir, gitolite_recycle_bin_dir) rescue nil
end
-
end
end
end
diff --git a/lib/redmine_git_hosting/config/mirroring.rb b/lib/redmine_git_hosting/config/mirroring.rb
index 593b17a440f..303c1aeee1b 100644
--- a/lib/redmine_git_hosting/config/mirroring.rb
+++ b/lib/redmine_git_hosting/config/mirroring.rb
@@ -7,16 +7,15 @@ def mirroring_public_key
@mirroring_public_key ||= MirrorKeysInstaller.mirroring_public_key(gitolite_ssh_public_key)
end
-
def mirroring_keys_installed?
- @mirroring_keys_installed ||= MirrorKeysInstaller.new(gitolite_home_dir, gitolite_ssh_public_key, gitolite_ssh_private_key).installed?
+ @mirroring_keys_installed ||= MirrorKeysInstaller.new(gitolite_home_dir,
+ gitolite_ssh_public_key,
+ gitolite_ssh_private_key).installed?
end
-
def gitolite_mirroring_script
- File.join(gitolite_home_dir, '.ssh', 'run_gitolite_admin_ssh')
+ File.join gitolite_home_dir, '.ssh', 'run_gitolite_admin_ssh'
end
-
end
end
end
diff --git a/lib/redmine_git_hosting/config/redmine_config.rb b/lib/redmine_git_hosting/config/redmine_config.rb
index d180564cef2..ffa2c88f356 100644
--- a/lib/redmine_git_hosting/config/redmine_config.rb
+++ b/lib/redmine_git_hosting/config/redmine_config.rb
@@ -35,10 +35,6 @@ def init_repositories_on_create?
get_setting(:init_repositories_on_create, true)
end
- def show_repositories_url?
- get_setting(:show_repositories_url, true)
- end
-
def download_revision_enabled?
get_setting(:download_revision_enabled, true)
end
diff --git a/lib/redmine_git_hosting/console_logger.rb b/lib/redmine_git_hosting/console_logger.rb
index 06bf4015586..f73f06fa8b8 100644
--- a/lib/redmine_git_hosting/console_logger.rb
+++ b/lib/redmine_git_hosting/console_logger.rb
@@ -9,27 +9,31 @@ def title(message, &block)
end
def debug(message)
- puts message
- logger.debug(message.strip)
+ to_console message
+ logger.debug message.strip
end
def info(message)
- puts message
- logger.info(message.strip)
+ to_console message
+ logger.info message.strip
end
def warn
- puts message
- logger.warn(message.strip)
+ to_console message
+ logger.warn message.strip
end
def error(message)
- puts message
- logger.error(message.strip)
+ to_console message
+ logger.error message.strip
end
private
+ def to_console(message)
+ puts message # rubocop: disable Rails/Output
+ end
+
def logger
RedmineGitHosting.logger
end
diff --git a/lib/redmine_git_hosting/error.rb b/lib/redmine_git_hosting/error.rb
index 2eb41ed0e27..35c5a9ba808 100644
--- a/lib/redmine_git_hosting/error.rb
+++ b/lib/redmine_git_hosting/error.rb
@@ -2,11 +2,14 @@ module RedmineGitHosting
module Error
# Used to register errors when pulling and pushing the conf file
class GitoliteException < StandardError; end
+
class GitoliteWrapperException < GitoliteException; end
+
class InvalidSshKey < GitoliteException; end
class InvalidRefspec < GitoliteException
class BadFormat < InvalidRefspec; end
+
class NullComponent < InvalidRefspec; end
end
diff --git a/lib/redmine_git_hosting/logger.rb b/lib/redmine_git_hosting/file_logger.rb
similarity index 53%
rename from lib/redmine_git_hosting/logger.rb
rename to lib/redmine_git_hosting/file_logger.rb
index b69abab7024..9ffb63f754d 100644
--- a/lib/redmine_git_hosting/logger.rb
+++ b/lib/redmine_git_hosting/file_logger.rb
@@ -1,24 +1,17 @@
require 'logger'
module RedmineGitHosting
- class Logger < ::Logger
-
- LOG_LEVELS = [
- 'debug',
- 'info',
- 'warn',
- 'error'
- ]
+ class FileLogger < ::Logger
+ LOG_LEVELS = %w[debug info warn error].freeze
def self.init_logs!(appname, logfile, loglevel)
- logger = new(logfile)
+ logger = new logfile
logger.progname = appname
logger.level = loglevel
- logger.formatter = proc do |severity, time, progname, msg|
+ logger.formatter = proc do |severity, time, _progname, msg|
"#{time} [#{severity}] #{msg}\n"
end
logger
end
-
end
end
diff --git a/lib/redmine_git_hosting/gitolite_accessor.rb b/lib/redmine_git_hosting/gitolite_accessor.rb
index 31588b79d9e..823de9e8aaf 100644
--- a/lib/redmine_git_hosting/gitolite_accessor.rb
+++ b/lib/redmine_git_hosting/gitolite_accessor.rb
@@ -110,17 +110,17 @@ def logger
end
def resync_gitolite(command, object, options = {})
- if options.has_key?(:bypass_sidekiq) && options[:bypass_sidekiq] == true
- bypass = true
- else
- bypass = false
- end
+ bypass = if options.key?(:bypass_sidekiq) && options[:bypass_sidekiq] == true
+ true
+ else
+ false
+ end
if RedmineGitHosting::Config.gitolite_use_sidekiq? &&
RedmineGitHosting::Config.sidekiq_available? && !bypass
- GithostingShellWorker.maybe_do(command, object, options)
+ GithostingShellWorker.maybe_do command, object, options
else
- GitoliteWrapper.resync_gitolite(command, object, options)
+ GitoliteWrapper.resync_gitolite command, object, options
end
end
end
diff --git a/lib/redmine_git_hosting/gitolite_handlers/repositories/add_repository.rb b/lib/redmine_git_hosting/gitolite_handlers/repositories/add_repository.rb
index e1e07428707..1f4bc58983a 100644
--- a/lib/redmine_git_hosting/gitolite_handlers/repositories/add_repository.rb
+++ b/lib/redmine_git_hosting/gitolite_handlers/repositories/add_repository.rb
@@ -2,7 +2,6 @@ module RedmineGitHosting
module GitoliteHandlers
module Repositories
class AddRepository < Base
-
def call
if !configuration_exists?
# Create repository in Gitolite
@@ -19,17 +18,14 @@ def call
end
end
-
def gitolite_repo_name
repository.gitolite_repository_name
end
-
def gitolite_repo_path
repository.gitolite_repository_path
end
-
attr_reader :force
def initialize(*args)
@@ -37,7 +33,6 @@ def initialize(*args)
@force = options.delete(:force) { false }
@old_perms = options.delete(:old_perms) { {} }
end
-
end
end
end
diff --git a/lib/redmine_git_hosting/gitolite_handlers/repositories/base.rb b/lib/redmine_git_hosting/gitolite_handlers/repositories/base.rb
index e4444bb96d8..1ab1a2557c4 100644
--- a/lib/redmine_git_hosting/gitolite_handlers/repositories/base.rb
+++ b/lib/redmine_git_hosting/gitolite_handlers/repositories/base.rb
@@ -2,13 +2,11 @@ module RedmineGitHosting
module GitoliteHandlers
module Repositories
class Base
-
attr_reader :gitolite_config
attr_reader :repository
attr_reader :context
attr_reader :options
-
def initialize(gitolite_config, repository, context, options = {})
@gitolite_config = gitolite_config
@repository = repository
@@ -18,111 +16,94 @@ def initialize(gitolite_config, repository, context, options = {})
end
class << self
-
def call(gitolite_config, repository, context, options = {})
new(gitolite_config, repository, context, options).call
end
-
end
-
def call
raise NotImplementedError
end
-
private
+ def logger
+ RedmineGitHosting.logger
+ end
- def logger
- RedmineGitHosting.logger
- end
-
-
- def backup_old_perms
- @old_perms = repository.backup_gitolite_permissions(gitolite_repo_conf.permissions[0])
- end
-
-
- def configuration_exists?
- !gitolite_repo_conf.nil?
- end
-
-
- def gitolite_repo_conf
- gitolite_config.repos[gitolite_repo_name]
- end
-
-
- def create_repository_config
- # Create Gitolite config
- repo_conf = build_repository_config
-
- # Update permissions
- repo_conf.permissions = repository.build_gitolite_permissions(@old_perms)
-
- # Add it to Gitolite
- gitolite_config.add_repo(repo_conf)
-
- # Return repository conf
- repo_conf
- end
+ def backup_old_perms
+ @old_perms = repository.backup_gitolite_permissions(gitolite_repo_conf.permissions[0])
+ end
+ def configuration_exists?
+ !gitolite_repo_conf.nil?
+ end
- def update_repository_config
- recreate_repository_config
- end
+ def gitolite_repo_conf
+ gitolite_config.repos[gitolite_repo_name]
+ end
+ def create_repository_config
+ # Create Gitolite config
+ repo_conf = build_repository_config
- def delete_repository_config
- gitolite_config.rm_repo(gitolite_repo_name)
- end
+ # Update permissions
+ repo_conf.permissions = repository.build_gitolite_permissions(@old_perms)
+ # Add it to Gitolite
+ gitolite_config.add_repo(repo_conf)
- def recreate_repository_config
- # Backup old perms
- backup_old_perms
+ # Return repository conf
+ repo_conf
+ end
- # Remove repo from Gitolite conf, we're gonna recreate it
- delete_repository_config
+ def update_repository_config
+ recreate_repository_config
+ end
- # Recreate repository in Gitolite
- create_repository_config
- end
+ def delete_repository_config
+ gitolite_config.rm_repo(gitolite_repo_name)
+ end
+ def recreate_repository_config
+ # Backup old perms
+ backup_old_perms
- def build_repository_config
- repo_conf = ::Gitolite::Config::Repo.new(repository.gitolite_repository_name)
+ # Remove repo from Gitolite conf, we're gonna recreate it
+ delete_repository_config
- repository.git_config.each do |key, value|
- repo_conf.set_git_config(key, value)
- end
+ # Recreate repository in Gitolite
+ create_repository_config
+ end
- repository.gitolite_options.each do |key, value|
- repo_conf.set_gitolite_option(key, value)
- end
+ def build_repository_config
+ repo_conf = ::Gitolite::Config::Repo.new(repository.gitolite_repository_name)
- repo_conf
+ repository.git_config.each do |key, value|
+ repo_conf.set_git_config(key, value)
end
-
- def log_ok_and_continue(message)
- logger.info("#{context} : repository '#{gitolite_repo_name}' exists in Gitolite, #{message}")
- logger.debug("#{context} : repository path '#{gitolite_repo_path}'")
+ repository.gitolite_options.each do |key, value|
+ repo_conf.set_gitolite_option(key, value)
end
+ repo_conf
+ end
- def log_repo_not_exist(message)
- logger.warn("#{context} : repository '#{gitolite_repo_name}' does not exist in Gitolite, #{message}")
- logger.debug("#{context} : repository path '#{gitolite_repo_path}'")
- end
-
+ def log_ok_and_continue(message)
+ logger.info("#{context} : repository '#{gitolite_repo_name}' exists in Gitolite, #{message}")
+ logger.debug("#{context} : repository path '#{gitolite_repo_path}'")
+ end
- def log_repo_already_exist(message)
- logger.warn("#{context} : repository '#{gitolite_repo_name}' already exists in Gitolite, #{message}")
- logger.debug("#{context} : repository path '#{gitolite_repo_path}'")
- end
+ def log_repo_not_exist(message)
+ logger.warn("#{context} : repository '#{gitolite_repo_name}' does not exist in Gitolite, #{message}")
+ logger.debug("#{context} : repository path '#{gitolite_repo_path}'")
+ end
+ def log_repo_already_exist(message)
+ logger.warn("#{context} : repository '#{gitolite_repo_name}' already exists in Gitolite, #{message}")
+ logger.debug("#{context} : repository path '#{gitolite_repo_path}'")
+ end
end
end
end
diff --git a/lib/redmine_git_hosting/gitolite_handlers/repositories/delete_repository.rb b/lib/redmine_git_hosting/gitolite_handlers/repositories/delete_repository.rb
index 60318b0865d..796cfd95a7a 100644
--- a/lib/redmine_git_hosting/gitolite_handlers/repositories/delete_repository.rb
+++ b/lib/redmine_git_hosting/gitolite_handlers/repositories/delete_repository.rb
@@ -2,7 +2,6 @@ module RedmineGitHosting
module GitoliteHandlers
module Repositories
class DeleteRepository < Base
-
def call
if configuration_exists?
log_ok_and_continue('delete it ...')
@@ -14,16 +13,13 @@ def call
end
end
-
def gitolite_repo_name
repository[:repo_name]
end
-
def gitolite_repo_path
repository[:repo_path]
end
-
end
end
end
diff --git a/lib/redmine_git_hosting/gitolite_handlers/repositories/move_repository.rb b/lib/redmine_git_hosting/gitolite_handlers/repositories/move_repository.rb
index b6e13961d78..1d4726e6381 100644
--- a/lib/redmine_git_hosting/gitolite_handlers/repositories/move_repository.rb
+++ b/lib/redmine_git_hosting/gitolite_handlers/repositories/move_repository.rb
@@ -2,7 +2,6 @@ module RedmineGitHosting
module GitoliteHandlers
module Repositories
class MoveRepository < Base
-
def call
if configuration_exists?
perform_repository_move
@@ -12,7 +11,6 @@ def call
end
end
-
def perform_repository_move
logger.info("#{context} : Moving '#{old_repo_name}' to '#{new_repo_name}' ...")
@@ -32,175 +30,156 @@ def perform_repository_move
end
end
-
private
+ def update_repository_fields
+ repository.update_column(:url, new_relative_path)
+ repository.update_column(:root_url, new_relative_path)
+ end
- def update_repository_fields
- repository.update_column(:url, new_relative_path)
- repository.update_column(:root_url, new_relative_path)
- end
-
-
- def update_gitolite
- # Get old repository permissions
- old_perms = repository.backup_gitolite_permissions(gitolite_repo_conf.permissions[0])
-
- # Remove repository from Gitolite configuration
- gitolite_config.rm_repo(old_repo_name)
-
- # Recreate it
- AddRepository.call(gitolite_config, repository, context, old_perms: old_perms)
- end
-
-
- def gitolite_repo_conf
- @repo_conf ||= gitolite_config.repos[old_repo_name]
- end
-
-
- def repo_id
- @repo_id ||= repository.redmine_name
- end
-
-
- def old_repo_name
- @old_repo_name ||= repository.old_repository_name
- end
+ def update_gitolite
+ # Get old repository permissions
+ old_perms = repository.backup_gitolite_permissions(gitolite_repo_conf.permissions[0])
+ # Remove repository from Gitolite configuration
+ gitolite_config.rm_repo(old_repo_name)
- def new_repo_name
- @new_repo_name ||= repository.new_repository_name
- end
+ # Recreate it
+ AddRepository.call(gitolite_config, repository, context, old_perms: old_perms)
+ end
+ def gitolite_repo_conf
+ @repo_conf ||= gitolite_config.repos[old_repo_name]
+ end
- def old_relative_path
- @old_relative_path ||= repository.url
- end
+ def repo_id
+ @repo_id ||= repository.redmine_name
+ end
+ def old_repo_name
+ @old_repo_name ||= repository.old_repository_name
+ end
- def new_relative_path
- @new_relative_path ||= repository.gitolite_repository_path
- end
+ def new_repo_name
+ @new_repo_name ||= repository.new_repository_name
+ end
+ def old_relative_path
+ @old_relative_path ||= repository.url
+ end
- def old_relative_parent_path
- @old_relative_parent_path ||= old_relative_path.gsub(repo_id + '.git', '')
- end
+ def new_relative_path
+ @new_relative_path ||= repository.gitolite_repository_path
+ end
+ def old_relative_parent_path
+ @old_relative_parent_path ||= old_relative_path.gsub(repo_id + '.git', '')
+ end
- def new_relative_parent_path
- @new_relative_parent_path ||= new_relative_path.gsub(repo_id + '.git', '')
- end
+ def new_relative_parent_path
+ @new_relative_parent_path ||= new_relative_path.gsub(repo_id + '.git', '')
+ end
+ def debug_output
+ logger.debug("#{context} : Old repository name (for Gitolite) : #{old_repo_name}")
+ logger.debug("#{context} : New repository name (for Gitolite) : #{new_repo_name}")
+ logger.debug("#{context} : Old relative path (for Redmine code browser) : #{old_relative_path}")
+ logger.debug("#{context} : New relative path (for Redmine code browser) : #{new_relative_path}")
+ logger.debug("#{context} : Old relative parent path (for Gitolite) : #{old_relative_parent_path}")
+ logger.debug("#{context} : New relative parent path (for Gitolite) : #{new_relative_parent_path}")
+ end
- def debug_output
- logger.debug("#{context} : Old repository name (for Gitolite) : #{old_repo_name}")
- logger.debug("#{context} : New repository name (for Gitolite) : #{new_repo_name}")
- logger.debug("#{context} : Old relative path (for Redmine code browser) : #{old_relative_path}")
- logger.debug("#{context} : New relative path (for Redmine code browser) : #{new_relative_path}")
- logger.debug("#{context} : Old relative parent path (for Gitolite) : #{old_relative_parent_path}")
- logger.debug("#{context} : New relative parent path (for Gitolite) : #{new_relative_parent_path}")
+ def move_physical_repo(old_path, new_path, new_parent_path)
+ ## CASE 0
+ if old_path == new_path
+ logger.info("#{context} : old repository and new repository are identical '#{old_path}', nothing to do, exit !")
+ return true
end
+ # Now we have multiple options, due to the way gitolite sets up repositories
+ new_path_exists = directory_exists?(new_path)
+ old_path_exists = directory_exists?(old_path)
- def move_physical_repo(old_path, new_path, new_parent_path)
- ## CASE 0
- if old_path == new_path
- logger.info("#{context} : old repository and new repository are identical '#{old_path}', nothing to do, exit !")
- return true
- end
-
- # Now we have multiple options, due to the way gitolite sets up repositories
- new_path_exists = directory_exists?(new_path)
- old_path_exists = directory_exists?(old_path)
-
- ## CASE 1
- if new_path_exists && old_path_exists
- return move_physical_repo_case_1(old_path, new_path)
-
- ## CASE 2
- elsif !new_path_exists && old_path_exists
- return move_physical_repo_case_2(old_path, new_path, new_parent_path)
+ ## CASE 1
+ if new_path_exists && old_path_exists
+ return move_physical_repo_case_1(old_path, new_path)
- ## CASE 3
- elsif !new_path_exists && !old_path_exists
- logger.error("#{context} : both old repository '#{old_path}' and new repository '#{new_path}' does not exist, cannot move it, exit but let Gitolite create the new repo !")
- return true
+ ## CASE 2
+ elsif !new_path_exists && old_path_exists
+ return move_physical_repo_case_2(old_path, new_path, new_parent_path)
- ## CASE 4
- elsif new_path_exists && !old_path_exists
- logger.error("#{context} : old repository '#{old_path}' does not exist, but the new one does, use it !")
- return true
+ ## CASE 3
+ elsif !new_path_exists && !old_path_exists
+ logger.error "#{context} : both old repository '#{old_path}' and new repository '#{new_path}' does not exist, cannot move it," \
+ ' exit but let Gitolite create the new repo !'
+ return true
- end
+ ## CASE 4
+ elsif new_path_exists && !old_path_exists
+ logger.error("#{context} : old repository '#{old_path}' does not exist, but the new one does, use it !")
+ return true
end
+ end
-
- def move_physical_repo_case_1(old_path, new_path)
- if empty_repository?(new_path)
- logger.warn("#{context} : target repository '#{new_path}' already exists and is empty, remove it ...")
- delete_directory!(new_path, :target)
+ def move_physical_repo_case_1(old_path, new_path)
+ if empty_repository?(new_path)
+ logger.warn("#{context} : target repository '#{new_path}' already exists and is empty, remove it ...")
+ delete_directory!(new_path, :target)
+ else
+ logger.warn "#{context} : target repository '#{new_path}' exists and is not empty, considered as already moved, try to remove" \
+ ' the old_path if empty'
+ if empty_repository?(old_path)
+ delete_directory!(old_path, :source)
else
- logger.warn("#{context} : target repository '#{new_path}' exists and is not empty, considered as already moved, try to remove the old_path if empty")
- if empty_repository?(old_path)
- delete_directory!(old_path, :source)
- else
- logger.error("#{context} : the source repository directory is not empty, cannot remove it, exit ! (This repo will be orphan)")
- false
- end
+ logger.error("#{context} : the source repository directory is not empty, cannot remove it, exit ! (This repo will be orphan)")
+ false
end
end
+ end
+ def move_physical_repo_case_2(old_path, new_path, new_parent_path)
+ logger.debug("#{context} : really moving Gitolite repository from '#{old_path}' to '#{new_path}'")
- def move_physical_repo_case_2(old_path, new_path, new_parent_path)
- logger.debug("#{context} : really moving Gitolite repository from '#{old_path}' to '#{new_path}'")
-
- create_parent_directory(new_parent_path) if !directory_exists?(new_parent_path)
+ create_parent_directory(new_parent_path) if !directory_exists?(new_parent_path)
- begin
- RedmineGitHosting::Commands.sudo_move(old_path, new_path)
- rescue RedmineGitHosting::Error::GitoliteCommandException => e
- logger.error("move_physical_repo(#{old_path}, #{new_path}) failed")
- return false
- else
- logger.info("#{context} : done !")
- return true
- end
- end
-
-
- def delete_directory!(dir, type)
- begin
- RedmineGitHosting::Commands.sudo_rm_rf(dir)
- return true
- rescue RedmineGitHosting::Error::GitoliteCommandException => e
- logger.error("#{context} : removing existing #{type} repository failed, exit !")
- return false
- end
+ begin
+ RedmineGitHosting::Commands.sudo_move(old_path, new_path)
+ rescue RedmineGitHosting::Error::GitoliteCommandException => e
+ logger.error("move_physical_repo(#{old_path}, #{new_path}) failed")
+ return false
+ else
+ logger.info("#{context} : done !")
+ return true
end
+ end
-
- def empty_repository?(dir)
- RedmineGitHosting::Commands.sudo_repository_empty?(dir)
+ def delete_directory!(dir, type)
+ begin
+ RedmineGitHosting::Commands.sudo_rm_rf(dir)
+ return true
+ rescue RedmineGitHosting::Error::GitoliteCommandException => e
+ logger.error("#{context} : removing existing #{type} repository failed, exit !")
+ return false
end
+ end
+ def empty_repository?(dir)
+ RedmineGitHosting::Commands.sudo_repository_empty?(dir)
+ end
- def directory_exists?(dir)
- RedmineGitHosting::Commands.sudo_dir_exists?(dir)
- end
-
+ def directory_exists?(dir)
+ RedmineGitHosting::Commands.sudo_dir_exists?(dir)
+ end
- def create_parent_directory(new_parent_path)
- begin
- RedmineGitHosting::Commands.sudo_mkdir_p(new_parent_path)
- return true
- rescue RedmineGitHosting::Error::GitoliteCommandException => e
- logger.error("#{context} : creation of parent path '#{new_parent_path}' failed, exit !")
- return false
- end
+ def create_parent_directory(new_parent_path)
+ begin
+ RedmineGitHosting::Commands.sudo_mkdir_p(new_parent_path)
+ return true
+ rescue RedmineGitHosting::Error::GitoliteCommandException => e
+ logger.error("#{context} : creation of parent path '#{new_parent_path}' failed, exit !")
+ return false
end
-
+ end
end
end
end
diff --git a/lib/redmine_git_hosting/gitolite_handlers/repositories/update_repository.rb b/lib/redmine_git_hosting/gitolite_handlers/repositories/update_repository.rb
index 3c465f32bb1..2cb044049ef 100644
--- a/lib/redmine_git_hosting/gitolite_handlers/repositories/update_repository.rb
+++ b/lib/redmine_git_hosting/gitolite_handlers/repositories/update_repository.rb
@@ -2,7 +2,6 @@ module RedmineGitHosting
module GitoliteHandlers
module Repositories
class UpdateRepository < Base
-
def call
if configuration_exists?
log_ok_and_continue('update it ...')
@@ -14,16 +13,13 @@ def call
end
end
-
def gitolite_repo_name
repository.gitolite_repository_name
end
-
def gitolite_repo_path
repository.gitolite_repository_path
end
-
end
end
end
diff --git a/lib/redmine_git_hosting/gitolite_handlers/ssh_keys/add_ssh_key.rb b/lib/redmine_git_hosting/gitolite_handlers/ssh_keys/add_ssh_key.rb
index 8c1e914a183..468ba43970c 100644
--- a/lib/redmine_git_hosting/gitolite_handlers/ssh_keys/add_ssh_key.rb
+++ b/lib/redmine_git_hosting/gitolite_handlers/ssh_keys/add_ssh_key.rb
@@ -2,7 +2,6 @@ module RedmineGitHosting
module GitoliteHandlers
module SshKeys
class AddSshKey < Base
-
def call
repo_key = find_gitolite_key(key.owner, key.location)
@@ -18,7 +17,6 @@ def call
repo_key.location = key.location
end
end
-
end
end
end
diff --git a/lib/redmine_git_hosting/gitolite_handlers/ssh_keys/base.rb b/lib/redmine_git_hosting/gitolite_handlers/ssh_keys/base.rb
index c11fd851670..fdd917013c6 100644
--- a/lib/redmine_git_hosting/gitolite_handlers/ssh_keys/base.rb
+++ b/lib/redmine_git_hosting/gitolite_handlers/ssh_keys/base.rb
@@ -2,50 +2,39 @@ module RedmineGitHosting
module GitoliteHandlers
module SshKeys
class Base
-
attr_reader :admin
attr_reader :key
attr_reader :context
-
def initialize(admin, key, context)
@admin = admin
@key = key
@context = context
end
-
class << self
-
def call(admin, key, context)
new(admin, key, context).call
end
-
end
-
def call
raise NotImplementedError
end
-
private
+ def logger
+ RedmineGitHosting.logger
+ end
- def logger
- RedmineGitHosting.logger
- end
-
-
- def find_gitolite_key(owner, location)
- admin.ssh_keys[owner].find_all { |k| k.location == location && k.owner == owner }.first
- end
-
-
- def build_gitolite_key(key)
- ::Gitolite::SSHKey.new(key.type, key.blob, key.email, key.owner, key.location)
- end
+ def find_gitolite_key(owner, location)
+ admin.ssh_keys[owner].find_all { |k| k.location == location && k.owner == owner }.first
+ end
+ def build_gitolite_key(key)
+ ::Gitolite::SSHKey.new(key.type, key.blob, key.email, key.owner, key.location)
+ end
end
end
end
diff --git a/lib/redmine_git_hosting/gitolite_handlers/ssh_keys/delete_ssh_key.rb b/lib/redmine_git_hosting/gitolite_handlers/ssh_keys/delete_ssh_key.rb
index 3167a4524ef..f9ff83d7e73 100644
--- a/lib/redmine_git_hosting/gitolite_handlers/ssh_keys/delete_ssh_key.rb
+++ b/lib/redmine_git_hosting/gitolite_handlers/ssh_keys/delete_ssh_key.rb
@@ -2,7 +2,6 @@ module RedmineGitHosting
module GitoliteHandlers
module SshKeys
class DeleteSshKey < Base
-
def call
repo_key = find_gitolite_key(key[:owner], key[:location])
@@ -13,7 +12,6 @@ def call
logger.info("#{context} : SSH key '#{key[:owner]}@#{key[:location]}' does not exits in Gitolite, exit !")
end
end
-
end
end
end
diff --git a/lib/redmine_git_hosting/gitolite_hook.rb b/lib/redmine_git_hosting/gitolite_hook.rb
index 424f02016a1..814fd344192 100644
--- a/lib/redmine_git_hosting/gitolite_hook.rb
+++ b/lib/redmine_git_hosting/gitolite_hook.rb
@@ -1,8 +1,6 @@
module RedmineGitHosting
class GitoliteHook
-
class << self
-
def def_field(*names)
class_eval do
names.each do |name|
@@ -12,42 +10,35 @@ def def_field(*names)
end
end
end
-
end
def_field :name, :source, :destination, :executable
attr_reader :source_dir
-
def initialize(source_dir, &block)
@source_dir = source_dir
instance_eval(&block)
end
-
def source_path
File.join(source_dir, source)
end
-
def destination_path
File.join(gitolite_hooks_dir, destination)
end
-
def parent_path
dirname = File.dirname(destination)
dirname = '' if dirname == '.'
File.join(gitolite_hooks_dir, dirname)
end
-
def filemode
executable ? '755' : '644'
end
-
def installed?
if !file_exists?
1
@@ -58,7 +49,6 @@ def installed?
end
end
-
def install!
if !file_exists?
logger.info("Hook '#{name}' does not exist, installing it ...")
@@ -77,80 +67,68 @@ def install!
installed?
end
-
private
+ def install_hook
+ create_parent_dir unless directory_exists?
+ return unless install_hook_file
- def install_hook
- create_parent_dir if !directory_exists?
- if install_hook_file
- logger.info("Hook '#{name}' installed")
- update_gitolite
- end
- end
-
-
- def force_update?
- RedmineGitHosting::Config.gitolite_overwrite_existing_hooks?
- end
-
-
- def logger
- RedmineGitHosting.logger
- end
-
-
- def hook_file_has_changed?
- RedmineGitHosting::Commands.sudo_file_changed?(source_path, destination_path) ||
- RedmineGitHosting::Commands.sudo_file_perms_changed?(filemode, destination_path)
- end
-
-
- def file_exists?
- RedmineGitHosting::Commands.sudo_file_exists?(destination_path)
- end
-
+ logger.info("Hook '#{name}' installed")
+ update_gitolite
+ end
- def install_hook_file
- logger.info("Installing hook '#{source_path}' in '#{destination_path}'")
- begin
- content = File.read(source_path)
- rescue Errno::ENOENT => e
- logger.error("Errors while installing hook '#{e.message}'")
- return false
- else
- RedmineGitHosting::Commands.sudo_install_file(content, destination_path, filemode)
- end
- end
+ def force_update?
+ RedmineGitHosting::Config.gitolite_overwrite_existing_hooks?
+ end
+ def logger
+ RedmineGitHosting.logger
+ end
- def update_gitolite
- RedmineGitHosting::Commands.sudo_update_gitolite!
- end
+ def hook_file_has_changed?
+ RedmineGitHosting::Commands.sudo_file_changed?(source_path, destination_path) ||
+ RedmineGitHosting::Commands.sudo_file_perms_changed?(filemode, destination_path)
+ end
+ def file_exists?
+ RedmineGitHosting::Commands.sudo_file_exists?(destination_path)
+ end
- def gitolite_hooks_dir
- RedmineGitHosting::Config.gitolite_hooks_dir
+ def install_hook_file
+ logger.info("Installing hook '#{source_path}' in '#{destination_path}'")
+ begin
+ content = File.read(source_path)
+ rescue Errno::ENOENT => e
+ logger.error("Errors while installing hook '#{e.message}'")
+ false
+ else
+ RedmineGitHosting::Commands.sudo_install_file(content, destination_path, filemode)
end
+ end
+ def update_gitolite
+ RedmineGitHosting::Commands.sudo_update_gitolite!
+ end
- def directory_exists?
- RedmineGitHosting::Commands.sudo_dir_exists?(parent_path)
- end
+ def gitolite_hooks_dir
+ RedmineGitHosting::Config.gitolite_hooks_dir
+ end
+ def directory_exists?
+ RedmineGitHosting::Commands.sudo_dir_exists?(parent_path)
+ end
- def create_parent_dir
- logger.info("Installing hook directory '#{parent_path}'")
+ def create_parent_dir
+ logger.info("Installing hook directory '#{parent_path}'")
- begin
- RedmineGitHosting::Commands.sudo_mkdir_p(parent_path)
- return true
- rescue RedmineGitHosting::Error::GitoliteCommandException => e
- logger.error("Problems installing hook directory '#{parent_path}'")
- logger.error(e.output)
- return false
- end
+ begin
+ RedmineGitHosting::Commands.sudo_mkdir_p(parent_path)
+ true
+ rescue RedmineGitHosting::Error::GitoliteCommandException => e
+ logger.error("Problems installing hook directory '#{parent_path}'")
+ logger.error(e.output)
+ false
end
-
+ end
end
end
diff --git a/lib/redmine_git_hosting/gitolite_hooks.rb b/lib/redmine_git_hosting/gitolite_hooks.rb
index bcbaf09c0de..5d27814221c 100644
--- a/lib/redmine_git_hosting/gitolite_hooks.rb
+++ b/lib/redmine_git_hosting/gitolite_hooks.rb
@@ -1,24 +1,19 @@
module RedmineGitHosting
module GitoliteHooks
-
class << self
-
def register_hooks(&block)
@gitolite_hooks ||= []
class_eval(&block)
end
-
def registered_hooks
@gitolite_hooks
end
-
def source_dir(source_dir)
@source_dir = source_dir
end
-
def hooks_installed?
installed = {}
registered_hooks.each do |hook|
@@ -31,7 +26,6 @@ def hooks_installed?
installed
end
-
def install_hooks!
installed = {}
registered_hooks.each do |hook|
@@ -40,12 +34,9 @@ def install_hooks!
installed
end
-
def gitolite_hook(&block)
@gitolite_hooks << RedmineGitHosting::GitoliteHook.new(@source_dir, &block)
end
-
end
-
end
end
diff --git a/lib/redmine_git_hosting/gitolite_params/base_param.rb b/lib/redmine_git_hosting/gitolite_params/base_param.rb
index 1dcd1b7f766..a0c7452171d 100644
--- a/lib/redmine_git_hosting/gitolite_params/base_param.rb
+++ b/lib/redmine_git_hosting/gitolite_params/base_param.rb
@@ -1,25 +1,21 @@
module RedmineGitHosting
module GitoliteParams
module BaseParam
-
private
- # Return a hash with global config parameters.
- #
- def get_git_config_params(namespace)
- RedmineGitHosting::Commands.sudo_get_git_global_params(namespace)
- end
-
-
- def set_git_config_param(namespace, key, value)
- RedmineGitHosting::Commands.sudo_set_git_global_param(namespace, key, value)
- end
-
+ # Return a hash with global config parameters.
+ #
+ def get_git_config_params(namespace)
+ RedmineGitHosting::Commands.sudo_get_git_global_params(namespace)
+ end
- def unset_git_config_param(key)
- RedmineGitHosting::Commands.sudo_unset_git_global_param(key)
- end
+ def set_git_config_param(namespace, key, value)
+ RedmineGitHosting::Commands.sudo_set_git_global_param(namespace, key, value)
+ end
+ def unset_git_config_param(key)
+ RedmineGitHosting::Commands.sudo_unset_git_global_param(key)
+ end
end
end
end
diff --git a/lib/redmine_git_hosting/gitolite_params/global_params.rb b/lib/redmine_git_hosting/gitolite_params/global_params.rb
index 7c78be4f367..6676494f924 100644
--- a/lib/redmine_git_hosting/gitolite_params/global_params.rb
+++ b/lib/redmine_git_hosting/gitolite_params/global_params.rb
@@ -1,7 +1,6 @@
module RedmineGitHosting
module GitoliteParams
class GlobalParams
-
include BaseParam
attr_reader :gitolite_hooks_url
@@ -11,7 +10,6 @@ class GlobalParams
attr_reader :namespace
attr_reader :current_params
-
def initialize
# Params to set
@gitolite_hooks_url = RedmineGitHosting::Config.gitolite_hooks_url
@@ -28,7 +26,6 @@ def initialize
@installed = {}
end
-
def installed?
@installed['redmineurl'] = (current_params['redmineurl'] == gitolite_hooks_url)
@installed['debugmode'] = (current_params['debugmode'] == debug_mode)
@@ -36,14 +33,12 @@ def installed?
@installed
end
-
def install!
@installed['redmineurl'] = set_git_config_param(namespace, 'redmineurl', gitolite_hooks_url)
@installed['debugmode'] = set_git_config_param(namespace, 'debugmode', debug_mode)
@installed['asyncmode'] = set_git_config_param(namespace, 'asyncmode', async_mode)
@installed
end
-
end
end
end
diff --git a/lib/redmine_git_hosting/gitolite_params/mailer_params.rb b/lib/redmine_git_hosting/gitolite_params/mailer_params.rb
index 030e2556fbd..e7c35bffd89 100644
--- a/lib/redmine_git_hosting/gitolite_params/mailer_params.rb
+++ b/lib/redmine_git_hosting/gitolite_params/mailer_params.rb
@@ -1,14 +1,12 @@
module RedmineGitHosting
module GitoliteParams
class MailerParams
-
include BaseParam
attr_reader :namespace
attr_reader :current_params
attr_reader :current_mailer_params
-
def initialize
## Namespace where to set params
@namespace = 'multimailhook'
@@ -21,56 +19,50 @@ def initialize
@installed = {}
end
-
def installed?
mailer_params.each do |param|
next if current_mailer_params[param].empty?
+
@installed[param] = (current_params[param] == current_mailer_params[param])
end
@installed
end
-
def install!
mailer_params.each do |param|
next if current_mailer_params[param].empty?
+
@installed[param] = set_git_config_param(namespace, param, current_mailer_params[param])
end
@installed
end
-
private
+ def mailer_params
+ %w[mailer environment smtpauth smtpserver smtpport smtpuser smtppass]
+ end
- def mailer_params
- %w(mailer environment smtpauth smtpserver smtpport smtpuser smtppass)
- end
-
-
- def get_mailer_params
- params = {}
- params['environment'] = 'gitolite'
- params['mailer'] = mailer
- params['smtpauth'] = smtpauth_enabled?.to_s
- params['smtpserver'] = ActionMailer::Base.smtp_settings[:address].to_s
- params['smtpport'] = ActionMailer::Base.smtp_settings[:port].to_s
- params['smtpuser'] = ActionMailer::Base.smtp_settings[:user_name] || ''
- params['smtppass'] = ActionMailer::Base.smtp_settings[:password] || ''
- params
- end
-
-
- def mailer
- ActionMailer::Base.delivery_method == :smtp ? 'smtp' : 'sendmail'
- end
-
+ def get_mailer_params
+ params = {}
+ params['environment'] = 'gitolite'
+ params['mailer'] = mailer
+ params['smtpauth'] = smtpauth_enabled?.to_s
+ params['smtpserver'] = ActionMailer::Base.smtp_settings[:address].to_s
+ params['smtpport'] = ActionMailer::Base.smtp_settings[:port].to_s
+ params['smtpuser'] = ActionMailer::Base.smtp_settings[:user_name] || ''
+ params['smtppass'] = ActionMailer::Base.smtp_settings[:password] || ''
+ params
+ end
- def smtpauth_enabled?
- auth = ActionMailer::Base.smtp_settings[:authentication]
- auth != nil && auth != '' && auth != :none
- end
+ def mailer
+ ActionMailer::Base.delivery_method == :smtp ? 'smtp' : 'sendmail'
+ end
+ def smtpauth_enabled?
+ auth = ActionMailer::Base.smtp_settings[:authentication]
+ auth != nil && auth != '' && auth != :none
+ end
end
end
end
diff --git a/lib/redmine_git_hosting/gitolite_wrapper.rb b/lib/redmine_git_hosting/gitolite_wrapper.rb
index 90161659298..78fba918f07 100644
--- a/lib/redmine_git_hosting/gitolite_wrapper.rb
+++ b/lib/redmine_git_hosting/gitolite_wrapper.rb
@@ -19,91 +19,81 @@ def resync_gitolite(action, object, options = {})
# Return if the action is only to flush cache on Sidekiq side
if action == :flush_settings_cache
logger.info('Settings cache flushed!')
- return
else
execute_action(action, object, options)
end
end
-
private
-
- def flush_cache(options = {})
- if options.has_key?(:flush_cache) && options[:flush_cache] == true
- logger.info('Flush Settings Cache !')
- Setting.check_cache if Setting.respond_to?(:check_cache)
- end
- end
-
-
- # Be sure to have a Gitolite::GitoliteAdmin object.
- # Return if issues.
- #
- def execute_action(action, object, options = {})
- begin
- admin = gitolite_admin
- rescue Rugged::SshError => e
- logger.error 'Invalid Gitolite Admin SSH Keys'
- logger.error(e.message)
- rescue Rugged::NetworkError => e
- logger.error 'Access denied for Gitolite Admin SSH Keys'
- logger.error(e.message)
- rescue Rugged::OSError => e
- logger.error 'Invalid connection params'
- logger.error(e.message)
- rescue Rugged::RepositoryError => e
- logger.error "Gitolite couldn't write to its admin repo copy"
- logger.error "Try recreating '#{gitolite_admin_dir}'"
- logger.error(e.message)
- else
- call_gitolite_wrapper(action, admin, object, options)
- end
- end
-
-
- def gitolite_admin
- RedmineGitHosting::Config.create_temp_dir
- logger.debug("Accessing gitolite-admin.git at '#{gitolite_admin_dir}'")
- ::Gitolite::GitoliteAdmin.new(gitolite_admin_dir, gitolite_admin_settings)
+ def flush_cache(options = {})
+ if options.key?(:flush_cache) && options[:flush_cache] == true
+ logger.info('Flush Settings Cache !')
+ Setting.check_cache if Setting.respond_to?(:check_cache)
end
+ end
-
- def gitolite_admin_dir
- RedmineGitHosting::Config.gitolite_admin_dir
+ # Be sure to have a Gitolite::GitoliteAdmin object.
+ # Return if issues.
+ #
+ def execute_action(action, object, options = {})
+ begin
+ admin = gitolite_admin
+ rescue Rugged::SshError => e
+ logger.error 'Invalid Gitolite Admin SSH Keys'
+ logger.error(e.message)
+ rescue Rugged::NetworkError => e
+ logger.error 'Access denied for Gitolite Admin SSH Keys'
+ logger.error(e.message)
+ rescue Rugged::OSError => e
+ logger.error 'Invalid connection params'
+ logger.error(e.message)
+ rescue Rugged::RepositoryError => e
+ logger.error "Gitolite couldn't write to its admin repo copy"
+ logger.error "Try recreating '#{gitolite_admin_dir}'"
+ logger.error(e.message)
+ else
+ call_gitolite_wrapper(action, admin, object, options)
end
+ end
+ def gitolite_admin
+ RedmineGitHosting::Config.create_temp_dir
+ logger.debug("Accessing gitolite-admin.git at '#{gitolite_admin_dir}'")
+ ::Gitolite::GitoliteAdmin.new(gitolite_admin_dir, gitolite_admin_settings)
+ end
- def call_gitolite_wrapper(action, admin, object, options = {})
- begin
- klass = GitoliteWrappers::Base.find_by_action_name(action)
- rescue RedmineGitHosting::Error::GitoliteWrapperException => e
- logger.error(e.message)
- else
- klass.call(admin, object, options)
- end
- end
-
+ def gitolite_admin_dir
+ RedmineGitHosting::Config.gitolite_admin_dir
+ end
- def gitolite_admin_settings
- {
- git_user: RedmineGitHosting::Config.gitolite_user,
- hostname: "#{RedmineGitHosting::Config.gitolite_server_host}:#{RedmineGitHosting::Config.gitolite_server_port}",
- host: "#{RedmineGitHosting::Config.gitolite_server_host}:#{RedmineGitHosting::Config.gitolite_server_port}",
- author_name: RedmineGitHosting::Config.git_config_username,
- author_email: RedmineGitHosting::Config.git_config_email,
- public_key: RedmineGitHosting::Config.gitolite_ssh_public_key,
- private_key: RedmineGitHosting::Config.gitolite_ssh_private_key,
- key_subdir: RedmineGitHosting::Config.gitolite_key_subdir,
- config_file: RedmineGitHosting::Config.gitolite_config_file,
- config_dir: RedmineGitHosting::Config.gitolite_config_dir
- }
+ def call_gitolite_wrapper(action, admin, object, options = {})
+ begin
+ klass = GitoliteWrappers::Base.find_by_action_name(action)
+ rescue RedmineGitHosting::Error::GitoliteWrapperException => e
+ logger.error(e.message)
+ else
+ klass.call(admin, object, options)
end
+ end
+ def gitolite_admin_settings
+ {
+ git_user: RedmineGitHosting::Config.gitolite_user,
+ hostname: "#{RedmineGitHosting::Config.gitolite_server_host}:#{RedmineGitHosting::Config.gitolite_server_port}",
+ host: "#{RedmineGitHosting::Config.gitolite_server_host}:#{RedmineGitHosting::Config.gitolite_server_port}",
+ author_name: RedmineGitHosting::Config.git_config_username,
+ author_email: RedmineGitHosting::Config.git_config_email,
+ public_key: RedmineGitHosting::Config.gitolite_ssh_public_key,
+ private_key: RedmineGitHosting::Config.gitolite_ssh_private_key,
+ key_subdir: RedmineGitHosting::Config.gitolite_key_subdir,
+ config_file: RedmineGitHosting::Config.gitolite_config_file,
+ config_dir: RedmineGitHosting::Config.gitolite_config_dir
+ }
+ end
- def logger
- RedmineGitHosting.logger
- end
-
+ def logger
+ RedmineGitHosting.logger
+ end
end
end
diff --git a/lib/redmine_git_hosting/gitolite_wrappers/base.rb b/lib/redmine_git_hosting/gitolite_wrappers/base.rb
index 3ba56ab182f..7d371285854 100644
--- a/lib/redmine_git_hosting/gitolite_wrappers/base.rb
+++ b/lib/redmine_git_hosting/gitolite_wrappers/base.rb
@@ -1,7 +1,6 @@
module RedmineGitHosting
module GitoliteWrappers
class Base
-
include RedmineGitHosting::GitoliteAccessor::Methods
attr_reader :admin
@@ -9,7 +8,6 @@ class Base
attr_reader :options
attr_reader :gitolite_config
-
def initialize(admin, object_id, options = {})
@admin = admin
@object_id = object_id
@@ -17,41 +15,33 @@ def initialize(admin, object_id, options = {})
@gitolite_config = admin.config
end
-
class << self
-
def call(admin, object_id, options = {})
new(admin, object_id, options).call
end
-
def inherited(klass)
@wrappers ||= {}
@wrappers[klass.name.demodulize.underscore.to_sym] = klass
end
-
def wrappers
@wrappers ||= {}
end
-
def find_by_action_name(action)
- if wrappers.has_key?(action)
+ if wrappers.key?(action)
wrappers[action]
else
- raise RedmineGitHosting::Error::GitoliteWrapperException.new("No available Wrapper for action '#{action}' found.")
+ raise RedmineGitHosting::Error::GitoliteWrapperException, "No available Wrapper for action '#{action}' found."
end
end
-
end
-
def call
raise NotImplementedError
end
-
def gitolite_admin_repo_commit(message = '')
logger.info("#{context} : commiting to Gitolite...")
admin.save("#{context} : #{message}")
@@ -59,54 +49,43 @@ def gitolite_admin_repo_commit(message = '')
logger.error(e.message)
end
-
def create_gitolite_repository(repository)
GitoliteHandlers::Repositories::AddRepository.call(gitolite_config, repository, context, options)
end
-
def update_gitolite_repository(repository)
GitoliteHandlers::Repositories::UpdateRepository.call(gitolite_config, repository, context, options)
end
-
def delete_gitolite_repository(repository)
GitoliteHandlers::Repositories::DeleteRepository.call(gitolite_config, repository, context, options)
end
-
def move_gitolite_repository(repository)
GitoliteHandlers::Repositories::MoveRepository.call(gitolite_config, repository, context, options)
end
-
def create_gitolite_key(key)
GitoliteHandlers::SshKeys::AddSshKey.call(admin, key, context)
end
-
def delete_gitolite_key(key)
GitoliteHandlers::SshKeys::DeleteSshKey.call(admin, key, context)
end
-
private
+ def context
+ self.class.name.demodulize.underscore
+ end
- def context
- self.class.name.demodulize.underscore
- end
-
-
- def logger
- RedmineGitHosting.logger
- end
-
-
- def log_object_dont_exist
- logger.error("#{context} : repository does not exist anymore, object is nil, exit !")
- end
+ def logger
+ RedmineGitHosting.logger
+ end
+ def log_object_dont_exist
+ logger.error("#{context} : repository does not exist anymore, object is nil, exit !")
+ end
end
end
end
diff --git a/lib/redmine_git_hosting/gitolite_wrappers/global/common.rb b/lib/redmine_git_hosting/gitolite_wrappers/global/common.rb
index e4537736d23..107d33d910a 100644
--- a/lib/redmine_git_hosting/gitolite_wrappers/global/common.rb
+++ b/lib/redmine_git_hosting/gitolite_wrappers/global/common.rb
@@ -2,29 +2,24 @@ module RedmineGitHosting
module GitoliteWrappers
module Global
module Common
-
def redmine_gitolite_key
'redmine_gitolite_admin_id_rsa'
end
-
def all_repository
'@all'
end
-
def all_repository_config
gitolite_config.repos[all_repository]
end
-
def rw_access_config
repo_conf = ::Gitolite::Config::Repo.new(all_repository)
repo_conf.permissions = rw_access_perms
repo_conf
end
-
def rw_access_perms
permissions = {}
permissions['RW+'] = {}
@@ -32,23 +27,19 @@ def rw_access_perms
[permissions]
end
-
def repo_conf
all_repository_config
end
-
def perms
- repo_conf.permissions.select { |p| p.has_key? 'RW+' }
+ repo_conf.permissions.select { |p| p.key? 'RW+' }
end
-
# RedmineGitHosting key can act on any refspec ('') so it should be in that 'subgroup'
#
def users
perms[0]['RW+']['']
end
-
end
end
end
diff --git a/lib/redmine_git_hosting/gitolite_wrappers/global/delete_from_recycle_bin.rb b/lib/redmine_git_hosting/gitolite_wrappers/global/delete_from_recycle_bin.rb
index 63bec0960e7..0253373fa2f 100644
--- a/lib/redmine_git_hosting/gitolite_wrappers/global/delete_from_recycle_bin.rb
+++ b/lib/redmine_git_hosting/gitolite_wrappers/global/delete_from_recycle_bin.rb
@@ -2,12 +2,10 @@ module RedmineGitHosting
module GitoliteWrappers
module Global
class DeleteFromRecycleBin < GitoliteWrappers::Base
-
def call
RedmineGitHosting::RecycleBin.delete_content(object_id)
RedmineGitHosting.logger.info('delete_from_recycle_bin : done !')
end
-
end
end
end
diff --git a/lib/redmine_git_hosting/gitolite_wrappers/global/disable_rw_access.rb b/lib/redmine_git_hosting/gitolite_wrappers/global/disable_rw_access.rb
index 80cc0306087..83fbe621943 100644
--- a/lib/redmine_git_hosting/gitolite_wrappers/global/disable_rw_access.rb
+++ b/lib/redmine_git_hosting/gitolite_wrappers/global/disable_rw_access.rb
@@ -2,7 +2,6 @@ module RedmineGitHosting
module GitoliteWrappers
module Global
class DisableRwAccess < GitoliteWrappers::Base
-
include Common
def call
@@ -17,14 +16,13 @@ def call
end
end
-
def remove_redmine_key
# RedmineGitHosting key must be in [RW+][''] group
# Return if those groups are absent : it means that our key is not here
return if perms.empty? || !perms[0]['RW+'].include?('')
# Check for key presence
- return if !users.include?(redmine_gitolite_key)
+ return unless users.include?(redmine_gitolite_key)
# Delete the key
repo_conf.permissions[0]['RW+'][''].delete(redmine_gitolite_key)
@@ -34,7 +32,6 @@ def remove_redmine_key
# RW+ = is not valid
repo_conf.permissions[0]['RW+'][''].push('DUMMY_REDMINE_KEY') if repo_conf.permissions[0]['RW+'][''].empty?
end
-
end
end
end
diff --git a/lib/redmine_git_hosting/gitolite_wrappers/global/enable_rw_access.rb b/lib/redmine_git_hosting/gitolite_wrappers/global/enable_rw_access.rb
index cc090631384..56795d8f2d6 100644
--- a/lib/redmine_git_hosting/gitolite_wrappers/global/enable_rw_access.rb
+++ b/lib/redmine_git_hosting/gitolite_wrappers/global/enable_rw_access.rb
@@ -2,7 +2,6 @@ module RedmineGitHosting
module GitoliteWrappers
module Global
class EnableRwAccess < GitoliteWrappers::Base
-
include Common
def call
@@ -20,7 +19,6 @@ def call
end
end
-
def add_redmine_key
# RedmineGitHosting key must be in RW+ group
# If not create the RW+ group and add the key
@@ -38,9 +36,10 @@ def add_redmine_key
end
# Delete DUMMY_REDMINE_KEY if present
- repo_conf.permissions[0]['RW+'][''].delete('DUMMY_REDMINE_KEY') if repo_conf.permissions[0]['RW+'][''].include?('DUMMY_REDMINE_KEY')
- end
+ return unless repo_conf.permissions[0]['RW+'][''].include?('DUMMY_REDMINE_KEY')
+ repo_conf.permissions[0]['RW+'][''].delete('DUMMY_REDMINE_KEY')
+ end
end
end
end
diff --git a/lib/redmine_git_hosting/gitolite_wrappers/global/purge_recycle_bin.rb b/lib/redmine_git_hosting/gitolite_wrappers/global/purge_recycle_bin.rb
index 68d5afe6cd1..bd28b8f3686 100644
--- a/lib/redmine_git_hosting/gitolite_wrappers/global/purge_recycle_bin.rb
+++ b/lib/redmine_git_hosting/gitolite_wrappers/global/purge_recycle_bin.rb
@@ -2,12 +2,10 @@ module RedmineGitHosting
module GitoliteWrappers
module Global
class PurgeRecycleBin < GitoliteWrappers::Base
-
def call
RedmineGitHosting::RecycleBin.delete_expired_content
RedmineGitHosting.logger.info('purge_recycle_bin : done !')
end
-
end
end
end
diff --git a/lib/redmine_git_hosting/gitolite_wrappers/projects/common.rb b/lib/redmine_git_hosting/gitolite_wrappers/projects/common.rb
index be8e043b59c..329dd4efcda 100644
--- a/lib/redmine_git_hosting/gitolite_wrappers/projects/common.rb
+++ b/lib/redmine_git_hosting/gitolite_wrappers/projects/common.rb
@@ -2,7 +2,6 @@ module RedmineGitHosting
module GitoliteWrappers
module Projects
module Common
-
def handle_repositories_move(projects)
repo_list = []
delete_parent_path = []
@@ -16,14 +15,12 @@ def handle_repositories_move(projects)
delete_parent_path
end
-
def clean_path(path_list)
path_list.compact.uniq.sort.reverse.each do |path|
rmdir(path)
end
end
-
def rmdir(path)
logger.info("#{context} : cleaning repository path : '#{path}'")
begin
@@ -32,7 +29,6 @@ def rmdir(path)
logger.error("#{context} : error while cleaning repository path '#{path}'")
end
end
-
end
end
end
diff --git a/lib/redmine_git_hosting/gitolite_wrappers/projects/move_repositories.rb b/lib/redmine_git_hosting/gitolite_wrappers/projects/move_repositories.rb
index 9348222eb0b..2b39dc56b08 100644
--- a/lib/redmine_git_hosting/gitolite_wrappers/projects/move_repositories.rb
+++ b/lib/redmine_git_hosting/gitolite_wrappers/projects/move_repositories.rb
@@ -2,11 +2,11 @@ module RedmineGitHosting
module GitoliteWrappers
module Projects
class MoveRepositories < GitoliteWrappers::Base
-
include Common
def call
return if git_projects.empty?
+
admin.transaction do
@delete_parent_path = []
@delete_parent_path += handle_repositories_move(git_projects)
@@ -15,16 +15,13 @@ def call
end
end
-
def git_projects
@git_projects ||= projects.uniq.select { |p| p.gitolite_repos.any? }
end
-
def projects
@projects ||= Project.find_by_id(object_id).self_and_descendants
end
-
end
end
end
diff --git a/lib/redmine_git_hosting/gitolite_wrappers/projects/move_repositories_tree.rb b/lib/redmine_git_hosting/gitolite_wrappers/projects/move_repositories_tree.rb
index 75a5f01afe9..feb7376d23e 100644
--- a/lib/redmine_git_hosting/gitolite_wrappers/projects/move_repositories_tree.rb
+++ b/lib/redmine_git_hosting/gitolite_wrappers/projects/move_repositories_tree.rb
@@ -2,7 +2,6 @@ module RedmineGitHosting
module GitoliteWrappers
module Projects
class MoveRepositoriesTree < GitoliteWrappers::Base
-
include Common
# Move repositories tree in a single transaction
@@ -14,6 +13,7 @@ def call
# Only take projects that have Git repos.
git_projects = project.self_and_descendants.uniq.select { |p| p.gitolite_repos.any? }
next if git_projects.empty?
+
@delete_parent_path += handle_repositories_move(git_projects)
end
# Remove empty directories
@@ -21,11 +21,9 @@ def call
end
end
-
def projects
@projects ||= Project.includes(:repositories).all.select { |x| x.parent_id.nil? }
end
-
end
end
end
diff --git a/lib/redmine_git_hosting/gitolite_wrappers/projects/update_projects.rb b/lib/redmine_git_hosting/gitolite_wrappers/projects/update_projects.rb
index 778381a730f..142fabc15f5 100644
--- a/lib/redmine_git_hosting/gitolite_wrappers/projects/update_projects.rb
+++ b/lib/redmine_git_hosting/gitolite_wrappers/projects/update_projects.rb
@@ -2,9 +2,9 @@ module RedmineGitHosting
module GitoliteWrappers
module Projects
class UpdateProjects < GitoliteWrappers::Base
-
def call
return if git_projects.empty?
+
admin.transaction do
git_projects.each do |project|
if project.gitolite_repos.any?
@@ -15,12 +15,10 @@ def call
end
end
-
def git_projects
@git_projects ||= projects.uniq.select { |p| p.gitolite_repos.any? }
end
-
def projects
@projects ||=
case object_id
@@ -35,13 +33,11 @@ def projects
end
end
-
def handle_project_update(project)
project.gitolite_repos.each do |repository|
options[:force] == true ? create_gitolite_repository(repository) : update_gitolite_repository(repository)
end
end
-
end
end
end
diff --git a/lib/redmine_git_hosting/gitolite_wrappers/repositories/add_repository.rb b/lib/redmine_git_hosting/gitolite_wrappers/repositories/add_repository.rb
index 33d8a35acc3..a77bde4c31d 100644
--- a/lib/redmine_git_hosting/gitolite_wrappers/repositories/add_repository.rb
+++ b/lib/redmine_git_hosting/gitolite_wrappers/repositories/add_repository.rb
@@ -2,7 +2,6 @@ module RedmineGitHosting
module GitoliteWrappers
module Repositories
class AddRepository < GitoliteWrappers::Base
-
def call
if !repository.nil?
create_repository
@@ -11,18 +10,17 @@ def call
end
end
-
def repository
@repository ||= Repository.find_by_id(object_id)
end
-
def create_repository
admin.transaction do
create_gitolite_repository(repository)
gitolite_admin_repo_commit(repository.gitolite_repository_name)
- @recovered = RedmineGitHosting::RecycleBin.restore_object_from_recycle(repository.gitolite_repository_name, repository.gitolite_full_repository_path)
+ @recovered = RedmineGitHosting::RecycleBin.restore_object_from_recycle repository.gitolite_repository_name,
+ repository.gitolite_full_repository_path
if !@recovered
logger.info("#{context} : let Gitolite create empty repository '#{repository.gitolite_repository_path}'")
@@ -40,7 +38,6 @@ def create_repository
# Fetch changeset
repository.fetch_changesets
end
-
end
end
end
diff --git a/lib/redmine_git_hosting/gitolite_wrappers/repositories/delete_repository.rb b/lib/redmine_git_hosting/gitolite_wrappers/repositories/delete_repository.rb
index 9e6fd27825f..f1f16bc44c0 100644
--- a/lib/redmine_git_hosting/gitolite_wrappers/repositories/delete_repository.rb
+++ b/lib/redmine_git_hosting/gitolite_wrappers/repositories/delete_repository.rb
@@ -2,7 +2,6 @@ module RedmineGitHosting
module GitoliteWrappers
module Repositories
class DeleteRepository < GitoliteWrappers::Base
-
def call
if !repository.nil? && !repository.empty?
delete_repository
@@ -11,12 +10,10 @@ def call
end
end
-
def repository
@repository ||= object_id.symbolize_keys
end
-
def delete_repository
admin.transaction do
delete_gitolite_repository(repository)
@@ -29,7 +26,6 @@ def delete_repository
# Move repository to RecycleBin
RedmineGitHosting::Plugins.execute(:post_delete, repository)
end
-
end
end
end
diff --git a/lib/redmine_git_hosting/gitolite_wrappers/repositories/move_repository.rb b/lib/redmine_git_hosting/gitolite_wrappers/repositories/move_repository.rb
index f2ea0207b89..1d8b410f44f 100644
--- a/lib/redmine_git_hosting/gitolite_wrappers/repositories/move_repository.rb
+++ b/lib/redmine_git_hosting/gitolite_wrappers/repositories/move_repository.rb
@@ -2,7 +2,6 @@ module RedmineGitHosting
module GitoliteWrappers
module Repositories
class MoveRepository < GitoliteWrappers::Base
-
def call
if !repository.nil?
move_repository
@@ -11,12 +10,10 @@ def call
end
end
-
def repository
@repository ||= Repository.find_by_id(object_id)
end
-
def move_repository
admin.transaction do
move_gitolite_repository(repository)
@@ -26,7 +23,6 @@ def move_repository
# Fetch changeset
repository.fetch_changesets
end
-
end
end
end
diff --git a/lib/redmine_git_hosting/gitolite_wrappers/repositories/update_repository.rb b/lib/redmine_git_hosting/gitolite_wrappers/repositories/update_repository.rb
index 71d7788dde3..4f0401f1cca 100644
--- a/lib/redmine_git_hosting/gitolite_wrappers/repositories/update_repository.rb
+++ b/lib/redmine_git_hosting/gitolite_wrappers/repositories/update_repository.rb
@@ -2,7 +2,6 @@ module RedmineGitHosting
module GitoliteWrappers
module Repositories
class UpdateRepository < GitoliteWrappers::Base
-
def call
if !repository.nil?
update_repository
@@ -11,12 +10,10 @@ def call
end
end
-
def repository
@repository ||= Repository.find_by_id(object_id)
end
-
def update_repository
admin.transaction do
update_gitolite_repository(repository)
@@ -32,7 +29,6 @@ def update_repository
# Fetch changeset
repository.fetch_changesets
end
-
end
end
end
diff --git a/lib/redmine_git_hosting/gitolite_wrappers/users/add_ssh_key.rb b/lib/redmine_git_hosting/gitolite_wrappers/users/add_ssh_key.rb
index afc290c4583..07810aaa3f7 100644
--- a/lib/redmine_git_hosting/gitolite_wrappers/users/add_ssh_key.rb
+++ b/lib/redmine_git_hosting/gitolite_wrappers/users/add_ssh_key.rb
@@ -2,7 +2,6 @@ module RedmineGitHosting
module GitoliteWrappers
module Users
class AddSshKey < GitoliteWrappers::Base
-
def call
logger.info("Adding SSH key '#{ssh_key.identifier}'")
admin.transaction do
@@ -11,11 +10,9 @@ def call
end
end
-
def ssh_key
@ssh_key ||= GitolitePublicKey.find_by_id(object_id)
end
-
end
end
end
diff --git a/lib/redmine_git_hosting/gitolite_wrappers/users/delete_ssh_key.rb b/lib/redmine_git_hosting/gitolite_wrappers/users/delete_ssh_key.rb
index 926c29c5f05..679b1b0a249 100644
--- a/lib/redmine_git_hosting/gitolite_wrappers/users/delete_ssh_key.rb
+++ b/lib/redmine_git_hosting/gitolite_wrappers/users/delete_ssh_key.rb
@@ -2,7 +2,6 @@ module RedmineGitHosting
module GitoliteWrappers
module Users
class DeleteSshKey < GitoliteWrappers::Base
-
def call
logger.info("Deleting SSH key '#{ssh_key[:title]}'")
admin.transaction do
@@ -11,11 +10,9 @@ def call
end
end
-
def ssh_key
@ssh_key ||= object_id.symbolize_keys
end
-
end
end
end
diff --git a/lib/redmine_git_hosting/gitolite_wrappers/users/regenerate_ssh_keys.rb b/lib/redmine_git_hosting/gitolite_wrappers/users/regenerate_ssh_keys.rb
index 2f8ab0f7b11..84787389aec 100644
--- a/lib/redmine_git_hosting/gitolite_wrappers/users/regenerate_ssh_keys.rb
+++ b/lib/redmine_git_hosting/gitolite_wrappers/users/regenerate_ssh_keys.rb
@@ -2,7 +2,6 @@ module RedmineGitHosting
module GitoliteWrappers
module Users
class RegenerateSshKeys < GitoliteWrappers::Base
-
def call
GitolitePublicKey.all.each do |ssh_key|
gitolite_accessor.destroy_ssh_key(ssh_key, bypass_sidekiq: true)
@@ -10,7 +9,6 @@ def call
gitolite_accessor.create_ssh_key(ssh_key, bypass_sidekiq: true)
end
end
-
end
end
end
diff --git a/lib/redmine_git_hosting/gitolite_wrappers/users/resync_ssh_keys.rb b/lib/redmine_git_hosting/gitolite_wrappers/users/resync_ssh_keys.rb
index 823a46bb463..7b778838523 100644
--- a/lib/redmine_git_hosting/gitolite_wrappers/users/resync_ssh_keys.rb
+++ b/lib/redmine_git_hosting/gitolite_wrappers/users/resync_ssh_keys.rb
@@ -2,7 +2,6 @@ module RedmineGitHosting
module GitoliteWrappers
module Users
class ResyncSshKeys < GitoliteWrappers::Base
-
def call
admin.transaction do
GitolitePublicKey.all.each do |ssh_key|
@@ -11,7 +10,6 @@ def call
end
end
end
-
end
end
end
diff --git a/lib/redmine_git_hosting/hooks.rb b/lib/redmine_git_hosting/hooks.rb
index dd7921c106f..aef5183e3c5 100644
--- a/lib/redmine_git_hosting/hooks.rb
+++ b/lib/redmine_git_hosting/hooks.rb
@@ -2,7 +2,6 @@
module RedmineGitHosting
class GitHostingHookListener < Redmine::Hook::ViewListener
- render_on :view_projects_show_left, partial: 'projects/git_urls'
render_on :view_repository_edit_top, partial: 'repositories/edit_top'
render_on :view_repositories_show_contextual, partial: 'repositories/show_top'
render_on :view_repository_edit_bottom, partial: 'repositories/edit_bottom'
@@ -25,9 +24,6 @@ def self.default_url_options
{ script_name: Redmine::Utils.relative_url_root }
end
- REDMINE_MARKDOWN_EXT = %w[.txt].freeze
- GITHUB_MARKDOWN_EXT = %w[.markdown .mdown .mkdn .md].freeze
-
def view_repositories_show_bottom(context)
path = get_path(context)
rev = get_rev(context)
@@ -58,24 +54,23 @@ def find_readme_file(repository, path, rev)
def get_formated_text(repository, file, rev)
raw_readme_text = Redmine::CodesetUtil.to_utf8_by_setting(repository.cat(file.path, rev))
- content =
- if redmine_file?(file)
- formatter_name = Redmine::WikiFormatting.format_names.find { |name| name =~ /markdown/i }
- Redmine::WikiFormatting.formatter_for(formatter_name).new(raw_readme_text).to_html
- elsif github_file?(file)
- RedmineGitHosting::MarkdownRenderer.to_html(raw_readme_text)
- else
- GitHub::Markup.render(file.path, raw_readme_text)
- end
- content
+
+ if redmine_file?(file)
+ formatter_name = Redmine::WikiFormatting.format_names.find { |name| name =~ /markdown/i }
+ Redmine::WikiFormatting.formatter_for(formatter_name).new(raw_readme_text).to_html
+ elsif github_file?(file)
+ RedmineGitHosting::MarkdownRenderer.to_html(raw_readme_text)
+ else
+ GitHub::Markup.render(file.path, raw_readme_text)
+ end
end
def redmine_file?(file)
- REDMINE_MARKDOWN_EXT.include?(File.extname(file.path))
+ %w[.txt].include?(File.extname(file.path))
end
def github_file?(file)
- GITHUB_MARKDOWN_EXT.include?(File.extname(file.path))
+ %w[.markdown .mdown .mkdn .md].include?(File.extname(file.path))
end
end
end
diff --git a/lib/redmine_git_hosting/journal_logger.rb b/lib/redmine_git_hosting/journal_logger.rb
new file mode 100644
index 00000000000..88f63875124
--- /dev/null
+++ b/lib/redmine_git_hosting/journal_logger.rb
@@ -0,0 +1,36 @@
+module RedmineGitHosting
+ # @see https://github.com/theforeman/journald-logger
+ class JournalLogger < ::Journald::Logger
+ def self.init_logs!(progname, loglevel)
+ logger = new progname, type: progname
+ logger.level = loglevel
+
+ logger
+ end
+
+ def debug(msg)
+ super msg2str(msg)
+ end
+
+ def info(msg)
+ super msg2str(msg)
+ end
+
+ def warn(msg)
+ super msg2str(msg)
+ end
+
+ def error(msg)
+ super msg2str(msg)
+ end
+
+ def msg2str(msg)
+ case msg
+ when ::String
+ msg
+ else
+ msg.inspect
+ end
+ end
+ end
+end
diff --git a/lib/redmine_git_hosting/markdown_renderer.rb b/lib/redmine_git_hosting/markdown_renderer.rb
index f6f3c318b44..d19aedfc45f 100644
--- a/lib/redmine_git_hosting/markdown_renderer.rb
+++ b/lib/redmine_git_hosting/markdown_renderer.rb
@@ -1,4 +1,6 @@
require 'html/pipeline'
+require 'task_list/filter'
+require 'task_list/railtie'
module RedmineGitHosting
module MarkdownRenderer
@@ -8,22 +10,17 @@ def to_html(markdown)
pipeline.call(markdown)[:output].to_s
end
-
private
+ def pipeline
+ HTML::Pipeline.new(filters)
+ end
- def pipeline
- HTML::Pipeline.new(filters)
- end
-
-
- def filters
- [
- RedmineGitHosting::RedcarpetFilter,
- HTML::Pipeline::AutolinkFilter,
- HTML::Pipeline::TableOfContentsFilter
- ]
- end
-
+ def filters
+ [RedmineGitHosting::RedcarpetFilter,
+ TaskList::Filter,
+ HTML::Pipeline::AutolinkFilter,
+ HTML::Pipeline::TableOfContentsFilter]
+ end
end
end
diff --git a/lib/redmine_git_hosting/mirror_keys_installer.rb b/lib/redmine_git_hosting/mirror_keys_installer.rb
index c13112b87aa..c86a9f0e671 100644
--- a/lib/redmine_git_hosting/mirror_keys_installer.rb
+++ b/lib/redmine_git_hosting/mirror_keys_installer.rb
@@ -1,12 +1,8 @@
module RedmineGitHosting
class MirrorKeysInstaller
+ attr_reader :gitolite_home_dir, :gitolite_ssh_public_key, :gitolite_ssh_private_key
- attr_reader :gitolite_home_dir
- attr_reader :gitolite_ssh_public_key
- attr_reader :gitolite_ssh_private_key
-
- GITOLITE_MIRRORING_KEYS_NAME = 'redmine_gitolite_admin_id_rsa_mirroring'
-
+ GITOLITE_MIRRORING_KEYS_NAME = 'redmine_gitolite_admin_id_rsa_mirroring'.freeze
def initialize(gitolite_home_dir, gitolite_ssh_public_key, gitolite_ssh_private_key)
@gitolite_home_dir = gitolite_home_dir
@@ -14,39 +10,31 @@ def initialize(gitolite_home_dir, gitolite_ssh_public_key, gitolite_ssh_private_
@gitolite_ssh_private_key = gitolite_ssh_private_key
end
-
class << self
-
def mirroring_public_key(gitolite_ssh_public_key)
- begin
- format_mirror_key(File.read(gitolite_ssh_public_key))
- rescue => e
- RedmineGitHosting.logger.error("Error while loading mirroring public key : #{e.output}")
- nil
- end
+ format_mirror_key(File.read(gitolite_ssh_public_key))
+ rescue => e
+ RedmineGitHosting.logger.error("Error while loading mirroring public key : #{e.inspect}")
+ nil
end
-
def format_mirror_key(key)
key = key.chomp.strip
key.split(/[\t ]+/)[0].to_s + ' ' + key.split(/[\t ]+/)[1].to_s
end
-
end
-
def installed?
installable? && install!
end
-
def installable?
return false if gitolite_home_dir.nil?
return false if gitolite_ssh_public_key_content.nil?
return false if gitolite_ssh_private_key_content.nil?
- return true
- end
+ true
+ end
def install!
logger.info('Installing Redmine Gitolite mirroring SSH keys ...')
@@ -55,75 +43,63 @@ def install!
installed
end
-
def install_public_key
install_file(gitolite_ssh_public_key_content, gitolite_ssh_public_key_dest_path, '644') do
logger.error("Failed to install Redmine Git Hosting mirroring SSH public key : #{e.output}")
end
end
-
def install_private_key
install_file(gitolite_ssh_private_key_content, gitolite_ssh_private_key_dest_path, '600') do
logger.error("Failed to install Redmine Git Hosting mirroring SSH private key : #{e.output}")
end
end
-
def install_mirroring_script
install_file(mirroring_script_content, RedmineGitHosting::Config.gitolite_mirroring_script, '700') do
logger.error("Failed to install Redmine Git Hosting mirroring script : #{e.output}")
end
end
-
private
+ def logger
+ RedmineGitHosting.logger
+ end
- def logger
- RedmineGitHosting.logger
- end
-
-
- def mirroring_script_content
- [
- '#!/bin/sh', "\n",
- 'exec', 'ssh', '-T', '-o', 'BatchMode=yes', '-o', 'StrictHostKeyChecking=no', '-i', gitolite_ssh_private_key_dest_path, '"$@"',
- "\n"
- ].join(' ')
- end
-
-
- def gitolite_ssh_public_key_content
- File.read(gitolite_ssh_public_key)
- rescue => e
- nil
- end
-
-
- def gitolite_ssh_private_key_content
- File.read(gitolite_ssh_private_key)
- rescue => e
- nil
- end
-
-
- def gitolite_ssh_public_key_dest_path
- File.join(gitolite_home_dir, '.ssh', "#{GITOLITE_MIRRORING_KEYS_NAME}.pub")
- end
+ def mirroring_script_content
+ [
+ '#!/bin/sh', "\n",
+ 'exec', 'ssh', '-T', '-o', 'BatchMode=yes', '-o', 'StrictHostKeyChecking=no', '-i', gitolite_ssh_private_key_dest_path, '"$@"',
+ "\n"
+ ].join(' ')
+ end
+ def gitolite_ssh_public_key_content
+ File.read(gitolite_ssh_public_key)
+ rescue => e
+ nil
+ end
- def gitolite_ssh_private_key_dest_path
- File.join(gitolite_home_dir, '.ssh', GITOLITE_MIRRORING_KEYS_NAME)
- end
+ def gitolite_ssh_private_key_content
+ File.read(gitolite_ssh_private_key)
+ rescue => e
+ nil
+ end
+ def gitolite_ssh_public_key_dest_path
+ File.join(gitolite_home_dir, '.ssh', "#{GITOLITE_MIRRORING_KEYS_NAME}.pub")
+ end
- def install_file(source, destination, perms, &block)
- RedmineGitHosting::Commands.sudo_install_file(source, destination, perms)
- rescue RedmineGitHosting::Error::GitoliteCommandException => e
- yield
- false
- end
+ def gitolite_ssh_private_key_dest_path
+ File.join(gitolite_home_dir, '.ssh', GITOLITE_MIRRORING_KEYS_NAME)
+ end
+ def install_file(source, destination, perms, &block)
+ RedmineGitHosting::Commands.sudo_install_file(source, destination, perms)
+ rescue RedmineGitHosting::Error::GitoliteCommandException => e
+ yield
+ false
+ end
end
end
diff --git a/lib/redmine_git_hosting/patches/changeset_patch.rb b/lib/redmine_git_hosting/patches/changeset_patch.rb
index 99542cf95be..60ac9d93680 100644
--- a/lib/redmine_git_hosting/patches/changeset_patch.rb
+++ b/lib/redmine_git_hosting/patches/changeset_patch.rb
@@ -3,7 +3,6 @@
module RedmineGitHosting
module Patches
module ChangesetPatch
-
def github_payload
data = {}
data[:id] = revision
@@ -17,42 +16,34 @@ def github_payload
data
end
-
def author_data
{ name: author_name, email: author_email }
end
-
def author_name
RedmineGitHosting::Utils::Git.author_name(committer)
end
-
def author_email
RedmineGitHosting::Utils::Git.author_email(committer)
end
-
def added_files
filechanges_by_action('A')
end
-
def modified_files
filechanges_by_action('M')
end
-
def removed_files
filechanges_by_action('D')
end
-
def filechanges_by_action(action)
filechanges.select { |c| c.action == action }.map(&:path)
end
-
def url_for_revision(revision)
Rails.application.routes.url_helpers.url_for(
controller: 'repositories', action: 'revision',
@@ -60,11 +51,10 @@ def url_for_revision(revision)
only_path: false, host: Setting['host_name'], protocol: Setting['protocol']
)
end
-
end
end
end
unless Changeset.included_modules.include?(RedmineGitHosting::Patches::ChangesetPatch)
- Changeset.send(:prepend, RedmineGitHosting::Patches::ChangesetPatch)
+ Changeset.prepend RedmineGitHosting::Patches::ChangesetPatch
end
diff --git a/lib/redmine_git_hosting/patches/dashboard_content_project_patch.rb b/lib/redmine_git_hosting/patches/dashboard_content_project_patch.rb
new file mode 100644
index 00000000000..52e06221e73
--- /dev/null
+++ b/lib/redmine_git_hosting/patches/dashboard_content_project_patch.rb
@@ -0,0 +1,28 @@
+module RedmineGitHosting
+ module Patches
+ module DashboardContentProjectPatch
+ extend ActiveSupport::Concern
+
+ included do
+ prepend InstanceOverwriteMethods
+ end
+
+ module InstanceOverwriteMethods
+ def block_definitions
+ blocks = super
+
+ blocks['giturls'] = { label: l(:label_repository_url_plural),
+ permission: :manage_repository,
+ no_settings: true,
+ partial: 'dashboards/blocks/git_urls' }
+
+ blocks
+ end
+ end
+ end
+ end
+end
+
+if DashboardContentProject.included_modules.exclude? RedmineGitHosting::Patches::DashboardContentProjectPatch
+ DashboardContentProject.include RedmineGitHosting::Patches::DashboardContentProjectPatch
+end
diff --git a/lib/redmine_git_hosting/patches/grack_auth_patch.rb b/lib/redmine_git_hosting/patches/grack_auth_patch.rb
index c06cb3e1624..aa60776cdcc 100644
--- a/lib/redmine_git_hosting/patches/grack_auth_patch.rb
+++ b/lib/redmine_git_hosting/patches/grack_auth_patch.rb
@@ -3,7 +3,6 @@
module RedmineGitHosting
module Patches
module GrackAuthPatch
-
def call(env)
@env = env
@request = Rack::Request.new(env)
@@ -26,119 +25,103 @@ def call(env)
end
end
-
private
+ def auth!
+ if @auth.provided?
+ return bad_request unless @auth.basic?
- def auth!
- if @auth.provided?
- return bad_request unless @auth.basic?
-
- # Authentication with username and password
- login, password = @auth.credentials
- @user = authenticate_user(login, password)
+ # Authentication with username and password
+ login, password = @auth.credentials
+ @user = authenticate_user(login, password)
- @env['REMOTE_USER'] = @user.gitolite_identifier if @user
- end
-
- if authorized_request?
- @app.call(@env)
- else
- unauthorized
- end
+ @env['REMOTE_USER'] = @user.gitolite_identifier if @user
end
-
- def authenticate_user(login, password)
- auth = RedmineGitHosting::Auth.new
- auth.find(login, password)
+ if authorized_request?
+ @app.call(@env)
+ else
+ unauthorized
end
+ end
+ def authenticate_user(login, password)
+ auth = RedmineGitHosting::Auth.new
+ auth.find(login, password)
+ end
- def authorized_request?
- case git_cmd
- when *RedmineGitHosting::GitAccess::DOWNLOAD_COMMANDS
- if @user
- RedmineGitHosting::GitAccess.new.download_access_check(@user, repository, is_ssl?).allowed?
- elsif repository.public_project? || repository.public_repo?
- # Allow clone/fetch for public projects
- true
- else
- false
- end
- when *RedmineGitHosting::GitAccess::PUSH_COMMANDS
- # Push requires valid SSL
- if !is_ssl?
- logger.error('SmartHttp : your are trying to push data without SSL!, exiting !')
- false
- elsif @user
- RedmineGitHosting::GitAccess.new.upload_access_check(@user, repository).allowed?
- else
- false
- end
+ def authorized_request?
+ case git_cmd
+ when *RedmineGitHosting::GitAccess::DOWNLOAD_COMMANDS
+ if @user
+ RedmineGitHosting::GitAccess.new.download_access_check(@user, repository, is_ssl?).allowed?
+ elsif repository.public_project? || repository.public_repo?
+ # Allow clone/fetch for public projects
+ true
else
false
end
- end
-
-
- def git_cmd
- if @request.get?
- @request.params['service']
- elsif @request.post?
- File.basename(@request.path)
+ when *RedmineGitHosting::GitAccess::PUSH_COMMANDS
+ # Push requires valid SSL
+ if !is_ssl?
+ logger.error('SmartHttp : your are trying to push data without SSL!, exiting !')
+ false
+ elsif @user
+ RedmineGitHosting::GitAccess.new.upload_access_check(@user, repository).allowed?
else
- nil
- end
- end
-
-
- def repository
- @repository ||= repository_by_path(@request.path_info)
- end
-
-
- def repository_by_path(path)
- if m = /([^\/]+\/)*?[^\/]+\.git/.match(path).to_a
- repo_path = m.first
- Repository::Xitolite.find_by_path(repo_path, loose: true)
+ false
end
+ else
+ false
end
+ end
-
- def is_ssl?
- @request.ssl? || https_headers? || x_forwarded_proto_headers? || x_forwarded_ssl_headers?
- end
-
-
- def https_headers?
- @request.env['HTTPS'].to_s == 'on'
+ def git_cmd
+ if @request.get?
+ @request.params['service']
+ elsif @request.post?
+ File.basename(@request.path)
end
+ end
+ def repository
+ @repository ||= repository_by_path(@request.path_info)
+ end
- def x_forwarded_proto_headers?
- @request.env['HTTP_X_FORWARDED_PROTO'].to_s == 'https'
+ def repository_by_path(path)
+ if m = /([^\/]+\/)*?[^\/]+\.git/.match(path).to_a
+ repo_path = m.first
+ Repository::Xitolite.find_by_path(repo_path, loose: true)
end
+ end
+ def is_ssl?
+ @request.ssl? || https_headers? || x_forwarded_proto_headers? || x_forwarded_ssl_headers?
+ end
- def x_forwarded_ssl_headers?
- @request.env['HTTP_X_FORWARDED_SSL'].to_s == 'on'
- end
-
+ def https_headers?
+ @request.env['HTTPS'].to_s == 'on'
+ end
- def render_not_found
- [404, { 'Content-Type' => 'text/plain' }, ['Not Found']]
- end
+ def x_forwarded_proto_headers?
+ @request.env['HTTP_X_FORWARDED_PROTO'].to_s == 'https'
+ end
+ def x_forwarded_ssl_headers?
+ @request.env['HTTP_X_FORWARDED_SSL'].to_s == 'on'
+ end
- def logger
- RedmineGitHosting.logger
- end
+ def render_not_found
+ [404, { 'Content-Type' => 'text/plain' }, ['Not Found']]
+ end
+ def logger
+ RedmineGitHosting.logger
+ end
end
end
end
unless Grack::Auth.included_modules.include?(RedmineGitHosting::Patches::GrackAuthPatch)
- Grack::Auth.send(:prepend, RedmineGitHosting::Patches::GrackAuthPatch)
+ Grack::Auth.prepend RedmineGitHosting::Patches::GrackAuthPatch
end
diff --git a/lib/redmine_git_hosting/patches/grack_git_patch.rb b/lib/redmine_git_hosting/patches/grack_git_patch.rb
index 4e1df8d8fe2..170115cb61b 100644
--- a/lib/redmine_git_hosting/patches/grack_git_patch.rb
+++ b/lib/redmine_git_hosting/patches/grack_git_patch.rb
@@ -3,31 +3,28 @@
module RedmineGitHosting
module Patches
module GrackGitPatch
-
def initialize(git_path, repo_path, user)
@user = user
super(git_path, repo_path)
end
-
# Override original *valid_repo?* method to test directory presence with Sudo
def valid_repo?
directory_exists?(repo)
end
-
# Override original *command* method to prefix the command with Sudo and other args.
#
def command(cmd)
git_command_with_sudo(cmd)
end
-
# Override original *capture* method because the original IO.popen().read let zombie process behind.
# This method is called :
# * to get repository Git config (http.uploadpack || http.receivepack)
# * to get repository info refs :
- # 0087deab8f3d612a47e7e153ed21bbc52a480205035a refs/heads/devel report-status delete-refs side-band-64k quiet ofs-delta agent=git/1.9.1
+ # 0087deab8f3d612a47e7e153ed21bbc52a480205035a refs/heads/devel report-status delete-refs side-band-64k quiet \
+ # ofs-delta agent=git/1.9.1
# * to get repository refs :
# 003f91a7b1dad21020e96d52119c585881c02f2fae45 refs/heads/master
@@ -48,7 +45,6 @@ def capture(command)
end
end
-
# Override original *popen_options* method.
# The original one try to chdir before executing the command by
# passing 'chdir: @dir' option to IO.popen.
@@ -59,74 +55,63 @@ def popen_options
{ unsetenv_others: true }
end
-
# Override original *popen_env* method.
# The original one passes useless arg (GL_ID) to IO.popen.
# Notes : this method is called in *service_rpc* (not overriden)
#
def popen_env
- { 'PATH' => ENV['PATH'] }
+ { 'PATH' => ENV['PATH'] }
end
-
private
+ def directory_exists?(dir)
+ RedmineGitHosting::Commands.sudo_dir_exists?(dir)
+ end
- def directory_exists?(dir)
- RedmineGitHosting::Commands.sudo_dir_exists?(dir)
- end
-
-
- # We sometimes need to add *--git-dir* arg to Git command otherwise
- # Git looks for the repository in the current path.
- def git_command_with_sudo(params)
- if command_require_chdir?(params.last)
- git_command_with_chdir.concat(params)
- else
- git_command_without_chdir.concat(params)
- end
- end
-
-
- def command_require_chdir?(cmd)
- cmd == 'update-server-info' || cmd == 'http.receivepack' || cmd == 'http.uploadpack' || cmd == 'rev-parse'
- end
-
-
- def git_command_without_chdir
- RedmineGitHosting::Commands.sudo_git_cmd(smart_http_args)
- end
-
-
- def git_command_with_chdir
- RedmineGitHosting::Commands.sudo_git_args_for_repo(@repo, smart_http_args)
+ # We sometimes need to add *--git-dir* arg to Git command otherwise
+ # Git looks for the repository in the current path.
+ def git_command_with_sudo(params)
+ if command_require_chdir?(params.last)
+ git_command_with_chdir.concat(params)
+ else
+ git_command_without_chdir.concat(params)
end
+ end
+ def command_require_chdir?(cmd)
+ cmd == 'update-server-info' || cmd == 'http.receivepack' || cmd == 'http.uploadpack' || cmd == 'rev-parse'
+ end
- def smart_http_args
- [
- 'env',
- "GL_BINDIR=#{RedmineGitHosting::Config.gitolite_bin_dir}",
- "GL_LIBDIR=#{RedmineGitHosting::Config.gitolite_lib_dir}",
- "GL_REPO=#{repository_object.gitolite_repository_name}",
- "GL_USER=#{@user}"
- ]
- end
-
+ def git_command_without_chdir
+ RedmineGitHosting::Commands.sudo_git_cmd(smart_http_args)
+ end
- def logger
- RedmineGitHosting.logger
- end
+ def git_command_with_chdir
+ RedmineGitHosting::Commands.sudo_git_args_for_repo(@repo, smart_http_args)
+ end
+ def smart_http_args
+ [
+ 'env',
+ "GL_BINDIR=#{RedmineGitHosting::Config.gitolite_bin_dir}",
+ "GL_LIBDIR=#{RedmineGitHosting::Config.gitolite_lib_dir}",
+ "GL_REPO=#{repository_object.gitolite_repository_name}",
+ "GL_USER=#{@user}"
+ ]
+ end
- def repository_object
- @repository_object ||= Repository::Xitolite.find_by_path(@repo, loose: true)
- end
+ def logger
+ RedmineGitHosting.logger
+ end
+ def repository_object
+ @repository_object ||= Repository::Xitolite.find_by_path(@repo, loose: true)
+ end
end
end
end
unless Grack::Git.included_modules.include?(RedmineGitHosting::Patches::GrackGitPatch)
- Grack::Git.send(:prepend, RedmineGitHosting::Patches::GrackGitPatch)
+ Grack::Git.prepend RedmineGitHosting::Patches::GrackGitPatch
end
diff --git a/lib/redmine_git_hosting/patches/grack_server_patch.rb b/lib/redmine_git_hosting/patches/grack_server_patch.rb
index 395f8ae54fe..a85233dcc9d 100644
--- a/lib/redmine_git_hosting/patches/grack_server_patch.rb
+++ b/lib/redmine_git_hosting/patches/grack_server_patch.rb
@@ -3,7 +3,6 @@
module RedmineGitHosting
module Patches
module GrackServerPatch
-
# Override original *get_git* method to set the right path for the repository.
# Also pass the *@env['REMOTE_USER']* variable to the Git constructor so we
# can pass it to Gitolite hooks later.
@@ -14,14 +13,15 @@ def get_git(path)
private
- def gitolite_path(path)
- File.join(RedmineGitHosting::Config.gitolite_home_dir, RedmineGitHosting::Config.gitolite_global_storage_dir, RedmineGitHosting::Config.gitolite_redmine_storage_dir, path)
- end
-
+ def gitolite_path(path)
+ File.join(RedmineGitHosting::Config.gitolite_home_dir,
+ RedmineGitHosting::Config.gitolite_global_storage_dir,
+ RedmineGitHosting::Config.gitolite_redmine_storage_dir, path)
+ end
end
end
end
unless Grack::Server.included_modules.include?(RedmineGitHosting::Patches::GrackServerPatch)
- Grack::Server.send(:prepend, RedmineGitHosting::Patches::GrackServerPatch)
+ Grack::Server.prepend RedmineGitHosting::Patches::GrackServerPatch
end
diff --git a/lib/redmine_git_hosting/patches/group_patch.rb b/lib/redmine_git_hosting/patches/group_patch.rb
index 30d5fe247b2..39390d46d6c 100644
--- a/lib/redmine_git_hosting/patches/group_patch.rb
+++ b/lib/redmine_git_hosting/patches/group_patch.rb
@@ -3,7 +3,6 @@
module RedmineGitHosting
module Patches
module GroupPatch
-
def self.prepended(base)
base.class_eval do
# Relations
@@ -12,26 +11,21 @@ def self.prepended(base)
end
end
-
def user_added(user)
super
protected_branches.each do |pb|
- RepositoryProtectedBranches::MemberManager.new(pb).add_user_from_group(user, self.id)
+ RepositoryProtectedBranches::MemberManager.new(pb).add_user_from_group(user, id)
end
end
-
def user_removed(user)
super
protected_branches.each do |pb|
- RepositoryProtectedBranches::MemberManager.new(pb).remove_user_from_group(user, self.id)
+ RepositoryProtectedBranches::MemberManager.new(pb).remove_user_from_group(user, id)
end
end
-
end
end
end
-unless Group.included_modules.include?(RedmineGitHosting::Patches::GroupPatch)
- Group.send(:prepend, RedmineGitHosting::Patches::GroupPatch)
-end
+Group.prepend RedmineGitHosting::Patches::GroupPatch unless Group.included_modules.include?(RedmineGitHosting::Patches::GroupPatch)
diff --git a/lib/redmine_git_hosting/patches/issue_patch.rb b/lib/redmine_git_hosting/patches/issue_patch.rb
index 8f9614de064..a81c107c1f0 100644
--- a/lib/redmine_git_hosting/patches/issue_patch.rb
+++ b/lib/redmine_git_hosting/patches/issue_patch.rb
@@ -3,17 +3,13 @@
module RedmineGitHosting
module Patches
module IssuePatch
-
def self.prepended(base)
base.class_eval do
has_one :github_issue, foreign_key: 'issue_id', class_name: 'GithubIssue', dependent: :destroy
end
end
-
end
end
end
-unless Issue.included_modules.include?(RedmineGitHosting::Patches::IssuePatch)
- Issue.send(:prepend, RedmineGitHosting::Patches::IssuePatch)
-end
+Issue.prepend RedmineGitHosting::Patches::IssuePatch unless Issue.included_modules.include?(RedmineGitHosting::Patches::IssuePatch)
diff --git a/lib/redmine_git_hosting/patches/journal_patch.rb b/lib/redmine_git_hosting/patches/journal_patch.rb
index a46dc916e48..67333a47283 100644
--- a/lib/redmine_git_hosting/patches/journal_patch.rb
+++ b/lib/redmine_git_hosting/patches/journal_patch.rb
@@ -3,17 +3,13 @@
module RedmineGitHosting
module Patches
module JournalPatch
-
def self.prepended(base)
base.class_eval do
has_one :github_comment, foreign_key: 'journal_id', class_name: 'GithubComment', dependent: :destroy
end
end
-
end
end
end
-unless Journal.included_modules.include?(RedmineGitHosting::Patches::JournalPatch)
- Journal.send(:prepend, RedmineGitHosting::Patches::JournalPatch)
-end
+Journal.prepend RedmineGitHosting::Patches::JournalPatch unless Journal.included_modules.include?(RedmineGitHosting::Patches::JournalPatch)
diff --git a/lib/redmine_git_hosting/patches/member_patch.rb b/lib/redmine_git_hosting/patches/member_patch.rb
index ed9287128e0..90e80f926fe 100644
--- a/lib/redmine_git_hosting/patches/member_patch.rb
+++ b/lib/redmine_git_hosting/patches/member_patch.rb
@@ -3,7 +3,6 @@
module RedmineGitHosting
module Patches
module MemberPatch
-
include RedmineGitHosting::GitoliteAccessor::Methods
def self.prepended(base)
@@ -14,15 +13,12 @@ def self.prepended(base)
private
- def update_project
- options = { message: "Membership changes on project '#{project}', update!" }
- gitolite_accessor.update_projects([project.id], options)
- end
-
+ def update_project
+ options = { message: "Membership changes on project '#{project}', update!" }
+ gitolite_accessor.update_projects([project.id], options)
+ end
end
end
end
-unless Member.included_modules.include?(RedmineGitHosting::Patches::MemberPatch)
- Member.send(:prepend, RedmineGitHosting::Patches::MemberPatch)
-end
+Member.prepend RedmineGitHosting::Patches::MemberPatch unless Member.included_modules.include?(RedmineGitHosting::Patches::MemberPatch)
diff --git a/lib/redmine_git_hosting/patches/project_patch.rb b/lib/redmine_git_hosting/patches/project_patch.rb
index 4975148f57c..0818372e468 100644
--- a/lib/redmine_git_hosting/patches/project_patch.rb
+++ b/lib/redmine_git_hosting/patches/project_patch.rb
@@ -9,55 +9,45 @@ def self.prepended(base)
scope :active_or_closed, -> { where("status = #{Project::STATUS_ACTIVE} OR status = #{Project::STATUS_CLOSED}") }
# Make sure that identifier does not match Gitolite Admin repository
- validates_exclusion_of :identifier, in: %w(gitolite-admin)
+ validates_exclusion_of :identifier, in: %w[gitolite-admin]
# Place additional constraints on repository identifiers because of multi repos
validate :additional_constraints_on_identifier
end
end
-
# Find all repositories owned by project which are Repository::Xitolite
def gitolite_repos
repositories.select { |x| x.is_a?(Repository::Xitolite) }.sort { |x, y| x.id <=> y.id }
end
-
# Return first repo with a blank identifier (should be only one!)
def repo_blank_ident
Repository.where("project_id = ? and (identifier = '' or identifier is null)", id).first
end
-
def users_available
get_members_available('User')
end
-
def groups_available
get_members_available('Group')
end
-
private
+ def get_members_available(klass)
+ memberships.active.map(&:principal).select { |m| m.class.name == klass }.uniq.sort
+ end
- def get_members_available(klass)
- memberships.active.map(&:principal).select { |m| m.class.name == klass }.uniq.sort
- end
-
-
- def additional_constraints_on_identifier
- if new_record? && !identifier.blank?
- # Make sure that identifier does not match existing repository identifier
- errors.add(:identifier, :taken) if Repository.find_by_identifier_and_type(identifier, 'Repository::Xitolite')
- end
+ def additional_constraints_on_identifier
+ if new_record? && identifier.present?
+ # Make sure that identifier does not match existing repository identifier
+ errors.add(:identifier, :taken) if Repository.find_by_identifier_and_type(identifier, 'Repository::Xitolite')
end
-
+ end
end
end
end
-unless Project.included_modules.include?(RedmineGitHosting::Patches::ProjectPatch)
- Project.send(:prepend, RedmineGitHosting::Patches::ProjectPatch)
-end
+Project.prepend RedmineGitHosting::Patches::ProjectPatch unless Project.included_modules.include?(RedmineGitHosting::Patches::ProjectPatch)
diff --git a/lib/redmine_git_hosting/patches/projects_controller_patch.rb b/lib/redmine_git_hosting/patches/projects_controller_patch.rb
index 4fc175338dd..483ccda9095 100644
--- a/lib/redmine_git_hosting/patches/projects_controller_patch.rb
+++ b/lib/redmine_git_hosting/patches/projects_controller_patch.rb
@@ -7,7 +7,7 @@ module ProjectsControllerPatch
def self.prepended(base)
base.class_eval do
- helper :bootstrap_kit
+ helper :git_hosting
helper :additionals_clipboardjs
helper :extend_projects
end
diff --git a/lib/redmine_git_hosting/patches/repositories_controller_patch.rb b/lib/redmine_git_hosting/patches/repositories_controller_patch.rb
index 8d953acc411..08c36dd1958 100644
--- a/lib/redmine_git_hosting/patches/repositories_controller_patch.rb
+++ b/lib/redmine_git_hosting/patches/repositories_controller_patch.rb
@@ -8,7 +8,7 @@ def self.prepended(base)
base.class_eval do
before_action :set_current_tab, only: :edit
- helper :bootstrap_kit
+ helper :git_hosting
helper :additionals_clipboardjs
helper :watchers
@@ -138,7 +138,7 @@ def diff_with_options
User.current.preference.save
end
@cache_key = "repositories/diff/#{@repository.id}/" +
- Digest::MD5.hexdigest("#{@path}-#{@rev}-#{@rev_to}-#{@diff_type}-#{current_language}")
+ Digest::MD5.hexdigest("#{@path}-#{@rev}-#{@rev_to}-#{@diff_type}-#{current_language}")
unless read_fragment(@cache_key)
@diff = @repository.diff(@path, @rev, @rev_to)
unless @diff
diff --git a/lib/redmine_git_hosting/patches/repositories_helper_patch.rb b/lib/redmine_git_hosting/patches/repositories_helper_patch.rb
index dd4279ae91d..1054338b4f0 100644
--- a/lib/redmine_git_hosting/patches/repositories_helper_patch.rb
+++ b/lib/redmine_git_hosting/patches/repositories_helper_patch.rb
@@ -3,17 +3,15 @@
module RedmineGitHosting
module Patches
module RepositoriesHelperPatch
-
def xitolite_field_tags(form, repository)
encoding_field(form, repository) +
- create_readme_field(form, repository) +
- enable_git_annex_field(form, repository)
+ create_readme_field(form, repository) +
+ enable_git_annex_field(form, repository)
end
-
end
end
end
unless RepositoriesHelper.included_modules.include?(RedmineGitHosting::Patches::RepositoriesHelperPatch)
- RepositoriesHelper.send(:prepend, RedmineGitHosting::Patches::RepositoriesHelperPatch)
+ RepositoriesHelper.prepend RedmineGitHosting::Patches::RepositoriesHelperPatch
end
diff --git a/lib/redmine_git_hosting/patches/repository_patch.rb b/lib/redmine_git_hosting/patches/repository_patch.rb
index f108c408739..1eddb11accd 100644
--- a/lib/redmine_git_hosting/patches/repository_patch.rb
+++ b/lib/redmine_git_hosting/patches/repository_patch.rb
@@ -3,17 +3,14 @@
module RedmineGitHosting
module Patches
module RepositoryPatch
-
# This is the (possibly non-unique) basename for the Gitolite repository
- #
def redmine_name
- identifier.blank? ? project.identifier : identifier
+ identifier.presence || project.identifier
end
-
end
end
end
unless Repository.included_modules.include?(RedmineGitHosting::Patches::RepositoryPatch)
- Repository.send(:prepend, RedmineGitHosting::Patches::RepositoryPatch)
+ Repository.prepend RedmineGitHosting::Patches::RepositoryPatch
end
diff --git a/lib/redmine_git_hosting/patches/roles_controller_patch.rb b/lib/redmine_git_hosting/patches/roles_controller_patch.rb
index bda85f5fcd1..f16655d7cae 100644
--- a/lib/redmine_git_hosting/patches/roles_controller_patch.rb
+++ b/lib/redmine_git_hosting/patches/roles_controller_patch.rb
@@ -3,7 +3,6 @@
module RedmineGitHosting
module Patches
module RolesControllerPatch
-
include RedmineGitHosting::GitoliteAccessor::Methods
def create
@@ -11,37 +10,31 @@ def create
call_gitolite('created')
end
-
def update
super
call_gitolite('modified')
end
-
def destroy
super
call_gitolite('deleted')
end
-
def permissions
super
call_gitolite('modified') if request.post?
end
-
private
-
- def call_gitolite(message)
- options = { message: "Role has been #{message}, resync all projects (active or closed)..." }
- gitolite_accessor.update_projects('active_or_closed', options)
- end
-
+ def call_gitolite(message)
+ options = { message: "Role has been #{message}, resync all projects (active or closed)..." }
+ gitolite_accessor.update_projects('active_or_closed', options)
+ end
end
end
end
unless RolesController.included_modules.include?(RedmineGitHosting::Patches::RolesControllerPatch)
- RolesController.send(:prepend, RedmineGitHosting::Patches::RolesControllerPatch)
+ RolesController.prepend RedmineGitHosting::Patches::RolesControllerPatch
end
diff --git a/lib/redmine_git_hosting/patches/setting_patch.rb b/lib/redmine_git_hosting/patches/setting_patch.rb
index 767f5f75c38..070d2aa9483 100644
--- a/lib/redmine_git_hosting/patches/setting_patch.rb
+++ b/lib/redmine_git_hosting/patches/setting_patch.rb
@@ -3,16 +3,13 @@
module RedmineGitHosting
module Patches
module SettingPatch
-
def self.prepended(base)
class << base
prepend ClassMethods
end
end
-
module ClassMethods
-
def check_cache
settings_updated_on = Setting.maximum(:updated_on)
if settings_updated_on && @cached_cleared_on <= settings_updated_on
@@ -20,13 +17,9 @@ def check_cache
RedmineGitHosting::Config.check_cache
end
end
-
end
-
end
end
end
-unless Setting.included_modules.include?(RedmineGitHosting::Patches::SettingPatch)
- Setting.send(:prepend, RedmineGitHosting::Patches::SettingPatch)
-end
+Setting.prepend RedmineGitHosting::Patches::SettingPatch unless Setting.included_modules.include?(RedmineGitHosting::Patches::SettingPatch)
diff --git a/lib/redmine_git_hosting/patches/settings_controller_patch.rb b/lib/redmine_git_hosting/patches/settings_controller_patch.rb
index 0dbaaf112cb..06c7daebb3f 100644
--- a/lib/redmine_git_hosting/patches/settings_controller_patch.rb
+++ b/lib/redmine_git_hosting/patches/settings_controller_patch.rb
@@ -5,7 +5,7 @@ module Patches
module SettingsControllerPatch
def self.prepended(base)
base.class_eval do
- helper :bootstrap_kit
+ helper :git_hosting
helper :gitolite_plugin_settings
end
end
@@ -72,5 +72,5 @@ def execute_post_actions(old_settings, opts = {})
end
unless SettingsController.included_modules.include?(RedmineGitHosting::Patches::SettingsControllerPatch)
- SettingsController.send(:prepend, RedmineGitHosting::Patches::SettingsControllerPatch)
+ SettingsController.prepend RedmineGitHosting::Patches::SettingsControllerPatch
end
diff --git a/lib/redmine_git_hosting/patches/sys_controller_patch.rb b/lib/redmine_git_hosting/patches/sys_controller_patch.rb
index 07987f0cf86..427ddb3494b 100644
--- a/lib/redmine_git_hosting/patches/sys_controller_patch.rb
+++ b/lib/redmine_git_hosting/patches/sys_controller_patch.rb
@@ -3,7 +3,6 @@
module RedmineGitHosting
module Patches
module SysControllerPatch
-
include RedmineGitHosting::GitoliteAccessor::Methods
def fetch_changesets
@@ -15,11 +14,10 @@ def fetch_changesets
# Purge RecycleBin
gitolite_accessor.purge_recycle_bin
end
-
end
end
end
unless SysController.included_modules.include?(RedmineGitHosting::Patches::SysControllerPatch)
- SysController.send(:prepend, RedmineGitHosting::Patches::SysControllerPatch)
+ SysController.prepend RedmineGitHosting::Patches::SysControllerPatch
end
diff --git a/lib/redmine_git_hosting/patches/user_patch.rb b/lib/redmine_git_hosting/patches/user_patch.rb
index 01bfb2b1b1b..32d37becde6 100644
--- a/lib/redmine_git_hosting/patches/user_patch.rb
+++ b/lib/redmine_git_hosting/patches/user_patch.rb
@@ -3,7 +3,6 @@
module RedmineGitHosting
module Patches
module UserPatch
-
def self.prepended(base)
base.class_eval do
# Virtual attribute
@@ -20,7 +19,6 @@ def self.prepended(base)
end
end
-
# Returns a unique identifier for this user to use for gitolite keys.
# As login names may change (i.e., user renamed), we use the user id
# with its login name as a prefix for readibility.
@@ -30,43 +28,35 @@ def gitolite_identifier
identifier.join
end
-
def gitolite_projects
projects.uniq.select { |p| p.gitolite_repos.any? }
end
-
# Syntaxic sugar
def status_has_changed?
status_has_changed
end
-
def allowed_to_manage_repository?(repository)
!roles_for_project(repository.project).select { |role| role.allowed_to?(:manage_repository) }.empty?
end
-
def allowed_to_commit?(repository)
allowed_to?(:commit_access, repository.project)
end
-
def allowed_to_clone?(repository)
allowed_to?(:view_changesets, repository.project)
end
-
def allowed_to_create_ssh_keys?
allowed_to?(:create_gitolite_ssh_key, nil, global: true)
end
-
def allowed_to_download?(repository)
git_allowed_to?(:download_git_revision, repository)
end
-
def git_allowed_to?(permission, repository)
if repository.project.active?
allowed_to?(permission, repository.project)
@@ -75,31 +65,25 @@ def git_allowed_to?(permission, repository)
end
end
-
private
+ # This is Rails method : _changed?
+ # However, the value is cleared before passing the object to the controller.
+ # We need to save it in virtual attribute to trigger Gitolite resync if changed.
+ #
+ def check_if_status_changed
+ self.status_has_changed = if status_changed?
+ true
+ else
+ false
+ end
+ end
- # This is Rails method : _changed?
- # However, the value is cleared before passing the object to the controller.
- # We need to save it in virtual attribute to trigger Gitolite resync if changed.
- #
- def check_if_status_changed
- if status_changed?
- self.status_has_changed = true
- else
- self.status_has_changed = false
- end
- end
-
-
- def stripped_login
- login.underscore.gsub(/[^0-9a-zA-Z]/, '_')
- end
-
+ def stripped_login
+ login.underscore.gsub(/[^0-9a-zA-Z]/, '_')
+ end
end
end
end
-unless User.included_modules.include?(RedmineGitHosting::Patches::UserPatch)
- User.send(:prepend, RedmineGitHosting::Patches::UserPatch)
-end
+User.prepend RedmineGitHosting::Patches::UserPatch unless User.included_modules.include?(RedmineGitHosting::Patches::UserPatch)
diff --git a/lib/redmine_git_hosting/patches/users_controller_patch.rb b/lib/redmine_git_hosting/patches/users_controller_patch.rb
index 6399ec90379..bac1d547eea 100644
--- a/lib/redmine_git_hosting/patches/users_controller_patch.rb
+++ b/lib/redmine_git_hosting/patches/users_controller_patch.rb
@@ -6,10 +6,10 @@ module UsersControllerPatch
include RedmineGitHosting::GitoliteAccessor::Methods
def self.prepended(base)
- base.send :helper, GitHostingUsersHelper
base.class_eval do
helper :gitolite_public_keys
- helper :bootstrap_kit
+ helper :git_hosting
+ helper :git_hosting_users
end
end
@@ -43,8 +43,8 @@ def destroy
# Add in values for viewing public keys:
def set_public_key_values
- @gitolite_user_keys = @user.gitolite_public_keys.user_key.order('title ASC, created_at ASC')
- @gitolite_deploy_keys = @user.gitolite_public_keys.deploy_key.order('title ASC, created_at ASC')
+ @gitolite_user_keys = @user.gitolite_public_keys.user_key.order(:title, :created_at)
+ @gitolite_deploy_keys = @user.gitolite_public_keys.deploy_key.order(:title, :created_at)
end
def update_projects
@@ -70,5 +70,5 @@ def destroy_ssh_keys(ssh_keys_list)
end
unless UsersController.included_modules.include?(RedmineGitHosting::Patches::UsersControllerPatch)
- UsersController.send(:prepend, RedmineGitHosting::Patches::UsersControllerPatch)
+ UsersController.prepend RedmineGitHosting::Patches::UsersControllerPatch
end
diff --git a/lib/redmine_git_hosting/patches/watchers_controller_patch.rb b/lib/redmine_git_hosting/patches/watchers_controller_patch.rb
index 922c4085e05..bb4c1461ee4 100644
--- a/lib/redmine_git_hosting/patches/watchers_controller_patch.rb
+++ b/lib/redmine_git_hosting/patches/watchers_controller_patch.rb
@@ -3,7 +3,6 @@
module RedmineGitHosting
module Patches
module WatchersControllerPatch
-
include RedmineGitHosting::GitoliteAccessor::Methods
def create
@@ -11,38 +10,33 @@ def create
update_repository(@watched)
end
-
def destroy
super
update_repository(@watched)
end
-
def watch
super
update_repository(@watchables.first)
end
-
def unwatch
super
update_repository(@watchables.first)
end
-
private
+ def update_repository(repo)
+ return unless repo.is_a?(Repository::Xitolite)
- def update_repository(repo)
- return if !repo.is_a?(Repository::Xitolite)
- options = { message: "Watcher changes on repository '#{repo}', update!" }
- gitolite_accessor.update_repository(repo, options)
- end
-
+ options = { message: "Watcher changes on repository '#{repo}', update!" }
+ gitolite_accessor.update_repository(repo, options)
+ end
end
end
end
unless WatchersController.included_modules.include?(RedmineGitHosting::Patches::WatchersControllerPatch)
- WatchersController.send(:prepend, RedmineGitHosting::Patches::WatchersControllerPatch)
+ WatchersController.prepend RedmineGitHosting::Patches::WatchersControllerPatch
end
diff --git a/lib/redmine_git_hosting/patches/watchers_helper_patch.rb b/lib/redmine_git_hosting/patches/watchers_helper_patch.rb
index efc8879b280..75ba31d18f1 100644
--- a/lib/redmine_git_hosting/patches/watchers_helper_patch.rb
+++ b/lib/redmine_git_hosting/patches/watchers_helper_patch.rb
@@ -5,7 +5,6 @@
module RedmineGitHosting
module Patches
module WatchersHelperPatch
-
def self.prepended(base)
base.class_eval do
alias_method :watcher_css_without_git_hosting, :watcher_css
@@ -16,38 +15,37 @@ def self.prepended(base)
end
end
-
- def watcher_css_with_git_hosting(objects, &block)
- watcher_css_without_git_hosting(objects, &block).gsub('/', '-')
+ def watcher_css_with_git_hosting(objects)
+ watcher_css_without_git_hosting(objects).tr '/', '-'
end
-
- def watchers_list_with_git_hosting(object, &block)
- remove_allowed = User.current.allowed_to?("delete_#{object.class.name.underscore}_watchers".gsub('/', '_').to_sym, object.project)
+ def watchers_list_with_git_hosting(object)
+ remove_allowed = User.current.allowed_to? "delete_#{object.class.name.underscore}_watchers".tr('/', '_').to_sym, object.project
content = ''.html_safe
- lis = object.watcher_users.collect do |user|
+ object.watcher_users.preload(:email_address).each do |user|
s = ''.html_safe
- s << avatar(user, :size => "16").to_s
- s << link_to_user(user, :class => 'user')
+ s << avatar(user, size: '16').to_s
+ s << link_to_user(user, class: 'user')
if remove_allowed
- url = {:controller => 'watchers',
- :action => 'destroy',
- :object_type => object.class.to_s.underscore,
- :object_id => object.id,
- :user_id => user}
+ url = { controller: 'watchers',
+ action: 'destroy',
+ object_type: object.class.to_s.underscore,
+ object_id: object.id,
+ user_id: user }
s << ' '
- s << link_to(image_tag('delete.png'), url,
- :remote => true, :method => 'delete', :class => "delete")
+ s << link_to(l(:button_delete), url,
+ remote: true, method: 'delete',
+ class: 'delete icon-only icon-del',
+ title: l(:button_delete))
end
- content << content_tag('li', s, :class => "user-#{user.id}")
+ content << tag.li(s, class: "user-#{user.id}")
end
- content.present? ? content_tag('ul', content, :class => 'watchers') : content
+ content.present? ? tag.ul(content, class: 'watchers') : content
end
-
end
end
end
unless WatchersHelper.included_modules.include?(RedmineGitHosting::Patches::WatchersHelperPatch)
- WatchersHelper.send(:prepend, RedmineGitHosting::Patches::WatchersHelperPatch)
+ WatchersHelper.prepend RedmineGitHosting::Patches::WatchersHelperPatch
end
diff --git a/lib/redmine_git_hosting/plugin_author.rb b/lib/redmine_git_hosting/plugin_author.rb
index 70cee42657c..928c3513745 100644
--- a/lib/redmine_git_hosting/plugin_author.rb
+++ b/lib/redmine_git_hosting/plugin_author.rb
@@ -1,22 +1,17 @@
module RedmineGitHosting
class PluginAuthor
-
attr_reader :author
-
def initialize(author)
@author = author
end
-
def name
RedmineGitHosting::Utils::Git.author_name(author)
end
-
def email
RedmineGitHosting::Utils::Git.author_email(author).downcase
end
-
end
end
diff --git a/lib/redmine_git_hosting/plugins/extenders/base_extender.rb b/lib/redmine_git_hosting/plugins/extenders/base_extender.rb
index d99edb61342..b587ef2548d 100644
--- a/lib/redmine_git_hosting/plugins/extenders/base_extender.rb
+++ b/lib/redmine_git_hosting/plugins/extenders/base_extender.rb
@@ -1,13 +1,6 @@
module RedmineGitHosting::Plugins::Extenders
class BaseExtender < RedmineGitHosting::Plugins::GitolitePlugin
-
- attr_reader :repository
- attr_reader :recovered
- attr_reader :gitolite_repo_name
- attr_reader :gitolite_repo_path
- attr_reader :git_default_branch
- attr_reader :options
-
+ attr_reader :repository, :recovered, :gitolite_repo_name, :gitolite_repo_path, :git_default_branch, :options
def initialize(repository, options = {})
@repository = repository
@@ -18,18 +11,14 @@ def initialize(repository, options = {})
@options = options
end
-
private
+ def recovered?
+ recovered
+ end
- def recovered?
- recovered
- end
-
-
- def installable?
- false
- end
-
+ def installable?
+ false
+ end
end
end
diff --git a/lib/redmine_git_hosting/plugins/extenders/config_key_deletor.rb b/lib/redmine_git_hosting/plugins/extenders/config_key_deletor.rb
index f8bc9392552..85ea1fc7543 100644
--- a/lib/redmine_git_hosting/plugins/extenders/config_key_deletor.rb
+++ b/lib/redmine_git_hosting/plugins/extenders/config_key_deletor.rb
@@ -1,33 +1,25 @@
module RedmineGitHosting::Plugins::Extenders
class ConfigKeyDeletor < BaseExtender
-
attr_reader :delete_git_config_key
-
def initialize(*args)
super
@delete_git_config_key = options.delete(:delete_git_config_key) { '' }
end
-
def post_update
# Delete hook param if needed
- delete_hook_param unless delete_git_config_key.nil? || delete_git_config_key.empty?
+ delete_hook_param if delete_git_config_key.present?
end
-
private
-
- def delete_hook_param
- begin
- sudo_git('config', '--local', '--unset', delete_git_config_key)
- rescue RedmineGitHosting::Error::GitoliteCommandException => e
- logger.error("Error while deleting Git config key '#{delete_git_config_key}' for repository '#{gitolite_repo_name}'")
- else
- logger.info("Git config key '#{delete_git_config_key}' successfully deleted for repository '#{gitolite_repo_name}'")
- end
- end
-
+ def delete_hook_param
+ sudo_git('config', '--local', '--unset', delete_git_config_key)
+ rescue RedmineGitHosting::Error::GitoliteCommandException => e
+ logger.error("Error while deleting Git config key '#{delete_git_config_key}' for repository '#{gitolite_repo_name}'")
+ else
+ logger.info("Git config key '#{delete_git_config_key}' successfully deleted for repository '#{gitolite_repo_name}'")
+ end
end
end
diff --git a/lib/redmine_git_hosting/plugins/extenders/readme_creator.rb b/lib/redmine_git_hosting/plugins/extenders/readme_creator.rb
index d2cbaa3845a..4080090dac4 100644
--- a/lib/redmine_git_hosting/plugins/extenders/readme_creator.rb
+++ b/lib/redmine_git_hosting/plugins/extenders/readme_creator.rb
@@ -67,13 +67,12 @@ def create_file(repo)
def create_commit(repo, index)
commit_tree = index.write_tree(repo)
Rugged::Commit.create(repo,
- author: commit_author,
- committer: commit_author,
- message: 'Add README file',
- parents: repo.empty? ? [] : [ repo.head.target ].compact,
- tree: commit_tree,
- update_ref: 'HEAD'
- )
+ author: commit_author,
+ committer: commit_author,
+ message: 'Add README file',
+ parents: repo.empty? ? [] : [repo.head.target].compact,
+ tree: commit_tree,
+ update_ref: 'HEAD')
end
def push_commit(repo)
@@ -86,8 +85,8 @@ def remote_branch
def credentials
Rugged::Credentials::SshKey.new(
- username: RedmineGitHosting::Config.gitolite_user,
- publickey: RedmineGitHosting::Config.gitolite_ssh_public_key,
+ username: RedmineGitHosting::Config.gitolite_user,
+ publickey: RedmineGitHosting::Config.gitolite_ssh_public_key,
privatekey: RedmineGitHosting::Config.gitolite_ssh_private_key
)
end
@@ -95,8 +94,8 @@ def credentials
def commit_author
@commit_author ||= {
email: RedmineGitHosting::Config.git_config_username,
- name: RedmineGitHosting::Config.git_config_email,
- time: Time.now
+ name: RedmineGitHosting::Config.git_config_email,
+ time: Time.now
}
end
end
diff --git a/lib/redmine_git_hosting/plugins/gitolite_plugin.rb b/lib/redmine_git_hosting/plugins/gitolite_plugin.rb
index 6e47874ca8e..bb1ee551987 100644
--- a/lib/redmine_git_hosting/plugins/gitolite_plugin.rb
+++ b/lib/redmine_git_hosting/plugins/gitolite_plugin.rb
@@ -1,73 +1,58 @@
module RedmineGitHosting::Plugins
class GitolitePlugin
-
class << self
-
def plugins
@plugins ||= []
end
-
def all_plugins
sweepers + extenders
end
-
def sweepers
plugins.select { |p| p.name.demodulize == 'BaseSweeper' }.first.subclasses
end
-
def extenders
plugins.select { |p| p.name.demodulize == 'BaseExtender' }.first.subclasses
end
-
def inherited(klass)
@plugins ||= []
@plugins << klass
end
-
end
-
private
+ def logger
+ RedmineGitHosting.logger
+ end
- def logger
- RedmineGitHosting.logger
- end
-
-
- def repository_empty?
- RedmineGitHosting::Commands.sudo_repository_empty?(gitolite_repo_path)
- end
-
-
- def directory_exists?(dir)
- RedmineGitHosting::Commands.sudo_dir_exists?(dir)
- end
-
-
- def sudo_git(*params)
- cmd = RedmineGitHosting::Commands.sudo_git_args_for_repo(gitolite_repo_path, git_args).concat(params)
- RedmineGitHosting::Commands.capture(cmd, git_opts)
- end
-
+ def repository_empty?
+ RedmineGitHosting::Commands.sudo_repository_empty?(gitolite_repo_path)
+ end
- # You may override this method to prepend args like environment variables
- # to the git command.
- #
- def git_args
- []
- end
+ def directory_exists?(dir)
+ RedmineGitHosting::Commands.sudo_dir_exists?(dir)
+ end
+ def sudo_git(*params)
+ cmd = RedmineGitHosting::Commands.sudo_git_args_for_repo(gitolite_repo_path, git_args).concat(params)
+ RedmineGitHosting::Commands.capture(cmd, git_opts)
+ end
- # You may override this method to pass opts to Open3.capture.
- #
- def git_opts
- {}
- end
+ # You may override this method to prepend args like environment variables
+ # to the git command.
+ #
+ def git_args
+ []
+ end
+ # You may override this method to pass opts to Open3.capture.
+ #
+ def git_opts
+ {}
+ end
end
end
diff --git a/lib/redmine_git_hosting/plugins/sweepers/base_sweeper.rb b/lib/redmine_git_hosting/plugins/sweepers/base_sweeper.rb
index cc6b412858f..81e5c8eebe0 100644
--- a/lib/redmine_git_hosting/plugins/sweepers/base_sweeper.rb
+++ b/lib/redmine_git_hosting/plugins/sweepers/base_sweeper.rb
@@ -1,12 +1,8 @@
module RedmineGitHosting::Plugins::Sweepers
class BaseSweeper < RedmineGitHosting::Plugins::GitolitePlugin
- attr_reader :repository_data
- attr_reader :gitolite_repo_name
- attr_reader :gitolite_repo_path
- attr_reader :delete_repository
- attr_reader :git_cache_id
+ attr_reader :repository_data, :gitolite_repo_name, :gitolite_repo_path, :delete_repository, :git_cache_id
- def initialize(repository_data, options = {})
+ def initialize(repository_data, _options = {})
@repository_data = repository_data
@gitolite_repo_name = repository_data[:repo_name]
@gitolite_repo_path = repository_data[:repo_path]
diff --git a/lib/redmine_git_hosting/plugins/sweepers/repository_deletor.rb b/lib/redmine_git_hosting/plugins/sweepers/repository_deletor.rb
index a278a87540c..67723949edd 100644
--- a/lib/redmine_git_hosting/plugins/sweepers/repository_deletor.rb
+++ b/lib/redmine_git_hosting/plugins/sweepers/repository_deletor.rb
@@ -1,31 +1,26 @@
module RedmineGitHosting::Plugins::Sweepers
class RepositoryDeletor < BaseSweeper
-
def post_delete
# Delete hook param if needed
move_repository_to_recycle if delete_repository?
remove_git_cache
end
-
private
-
- def move_repository_to_recycle
- if repository_data.is_a?(Hash)
- RedmineGitHosting::RecycleBin.move_object_to_recycle(repository_data[:repo_name], repository_data[:repo_path])
- elsif repository_data.is_a?(Array)
- repository_data.each do |object_data|
- RedmineGitHosting::RecycleBin.move_object_to_recycle(object_data[:repo_name], object_data[:repo_path])
- end
+ def move_repository_to_recycle
+ if repository_data.is_a?(Hash)
+ RedmineGitHosting::RecycleBin.move_object_to_recycle(repository_data[:repo_name], repository_data[:repo_path])
+ elsif repository_data.is_a?(Array)
+ repository_data.each do |object_data|
+ RedmineGitHosting::RecycleBin.move_object_to_recycle(object_data[:repo_name], object_data[:repo_path])
end
end
+ end
-
- def remove_git_cache
- logger.info("Clean cache for repository '#{gitolite_repo_name}'")
- RedmineGitHosting::Cache.clear_cache_for_repository(git_cache_id)
- end
-
+ def remove_git_cache
+ logger.info("Clean cache for repository '#{gitolite_repo_name}'")
+ RedmineGitHosting::Cache.clear_cache_for_repository(git_cache_id)
+ end
end
end
diff --git a/lib/redmine_git_hosting/recycle_bin/deletable_item.rb b/lib/redmine_git_hosting/recycle_bin/deletable_item.rb
index b354b712153..437542434e4 100644
--- a/lib/redmine_git_hosting/recycle_bin/deletable_item.rb
+++ b/lib/redmine_git_hosting/recycle_bin/deletable_item.rb
@@ -1,10 +1,8 @@
module RedmineGitHosting
module RecycleBin
class DeletableItem
-
include RecycleBin::ItemBase
-
def move!(source_path)
if !directory_exists?(source_path)
logger.warn("Source directory does not exist '#{source_path}', exiting!")
@@ -16,26 +14,20 @@ def move!(source_path)
end
end
-
def target_path
@target_path ||= File.join(recycle_bin_dir, "#{Time.now.to_i.to_s}#{TRASH_DIR_SEP}#{trash_name}.git")
end
-
private
-
- def do_move(source_path)
- begin
- RedmineGitHosting::Commands.sudo_move(source_path, target_path)
- logger.info('Done !')
- true
- rescue RedmineGitHosting::Error::GitoliteCommandException => e
- logger.error("Attempt to move '#{source_path}' to Recycle Bin failed !")
- false
- end
- end
-
+ def do_move(source_path)
+ RedmineGitHosting::Commands.sudo_move(source_path, target_path)
+ logger.info('Done !')
+ true
+ rescue RedmineGitHosting::Error::GitoliteCommandException => e
+ logger.error("Attempt to move '#{source_path}' to Recycle Bin failed !")
+ false
+ end
end
end
end
diff --git a/lib/redmine_git_hosting/recycle_bin/item.rb b/lib/redmine_git_hosting/recycle_bin/item.rb
index 233744ebe6f..7017bf2b91c 100644
--- a/lib/redmine_git_hosting/recycle_bin/item.rb
+++ b/lib/redmine_git_hosting/recycle_bin/item.rb
@@ -1,20 +1,16 @@
module RedmineGitHosting
module RecycleBin
class Item
-
attr_reader :path
-
def initialize(path)
@path = path
end
-
def size
RedmineGitHosting::Commands.sudo_get_dir_size(path)
end
-
def destroy!
logger.info("Deleting '#{path}' from Recycle Bin")
begin
@@ -25,14 +21,11 @@ def destroy!
end
end
-
private
-
- def logger
- RedmineGitHosting.logger
- end
-
+ def logger
+ RedmineGitHosting.logger
+ end
end
end
end
diff --git a/lib/redmine_git_hosting/recycle_bin/item_base.rb b/lib/redmine_git_hosting/recycle_bin/item_base.rb
index a05752572ba..9b60f487378 100644
--- a/lib/redmine_git_hosting/recycle_bin/item_base.rb
+++ b/lib/redmine_git_hosting/recycle_bin/item_base.rb
@@ -1,41 +1,36 @@
module RedmineGitHosting
module RecycleBin
module ItemBase
-
TRASH_DIR_SEP = '__'
attr_reader :object_name
attr_reader :recycle_bin_dir
-
def initialize(recycle_bin_dir, object_name)
@recycle_bin_dir = recycle_bin_dir
@object_name = object_name
end
-
def trash_name
object_name.gsub(/\//, TRASH_DIR_SEP)
end
-
private
+ def logger
+ RedmineGitHosting.logger
+ end
- def logger
- RedmineGitHosting.logger
- end
-
-
- def directory_exists?(dir)
- RedmineGitHosting::Commands.sudo_dir_exists?(dir)
- end
-
-
- def find_trashed_object(regex)
- RedmineGitHosting::Commands.sudo_capture('find', recycle_bin_dir, '-type', 'd', '-regex', regex, '-prune', '-print').chomp.split("\n").sort { |x, y| y <=> x }
- end
+ def directory_exists?(dir)
+ RedmineGitHosting::Commands.sudo_dir_exists?(dir)
+ end
+ def find_trashed_object(regex)
+ RedmineGitHosting::Commands.sudo_capture('find', recycle_bin_dir, '-type', 'd', '-regex', regex, '-prune', '-print')
+ .chomp
+ .split("\n")
+ .sort { |x, y| y <=> x }
+ end
end
end
end
diff --git a/lib/redmine_git_hosting/recycle_bin/manager.rb b/lib/redmine_git_hosting/recycle_bin/manager.rb
index 8b2ed78fef4..e9e2af91b63 100644
--- a/lib/redmine_git_hosting/recycle_bin/manager.rb
+++ b/lib/redmine_git_hosting/recycle_bin/manager.rb
@@ -1,85 +1,71 @@
module RedmineGitHosting
module RecycleBin
class Manager
-
attr_reader :recycle_bin_dir
-
def initialize(recycle_bin_dir)
@recycle_bin_dir = recycle_bin_dir
create_recycle_bin_directory
end
-
def content
- begin
- load_recycle_bin_content(get_recycle_bin_content)
- rescue RedmineGitHosting::Error::GitoliteCommandException => e
- []
- end
+ load_recycle_bin_content(get_recycle_bin_content)
+ rescue RedmineGitHosting::Error::GitoliteCommandException => e
+ []
end
-
def delete_expired_content(expiration_time)
- begin
- expired_content = load_recycle_bin_content(get_expired_content(expiration_time))
- logger.info("Removing #{expired_content.length} expired objects from Recycle Bin :")
- expired_content.map(&:destroy!)
- rescue RedmineGitHosting::Error::GitoliteCommandException => e
- []
- end
+ expired_content = load_recycle_bin_content(get_expired_content(expiration_time))
+ logger.info("Removing #{expired_content.length} expired objects from Recycle Bin :")
+ expired_content.map(&:destroy!)
+ rescue RedmineGitHosting::Error::GitoliteCommandException => e
+ []
end
-
def delete_content(content_list = [])
load_recycle_bin_content(content_list).map(&:destroy!)
end
-
def move_object_to_recycle(object_name, source_path)
RedmineGitHosting::RecycleBin::DeletableItem.new(recycle_bin_dir, object_name).move!(source_path)
end
-
def restore_object_from_recycle(object_name, target_path)
RedmineGitHosting::RecycleBin::RestorableItem.new(recycle_bin_dir, object_name).restore!(target_path)
end
-
private
+ def logger
+ RedmineGitHosting.logger
+ end
- def logger
- RedmineGitHosting.logger
- end
-
-
- def load_recycle_bin_content(content_list = [])
- content_list.map { |dir| RedmineGitHosting::RecycleBin::Item.new(dir) }
- end
-
-
- def get_recycle_bin_content
- RedmineGitHosting::Commands.sudo_capture('find', recycle_bin_dir, '-type', 'd', '-regex', '.*\.git', '-prune', '-print').chomp.split("\n")
- end
-
-
- def get_expired_content(expiration_time)
- RedmineGitHosting::Commands.sudo_capture('find', recycle_bin_dir, '-type', 'd', '-regex', '.*\.git', '-cmin', "+#{expiration_time}", '-prune', '-print').chomp.split("\n")
- end
+ def load_recycle_bin_content(content_list = [])
+ content_list.map { |dir| RedmineGitHosting::RecycleBin::Item.new(dir) }
+ end
+ def get_recycle_bin_content
+ RedmineGitHosting::Commands.sudo_capture('find', recycle_bin_dir,
+ '-type', 'd', '-regex', '.*\.git', '-prune', '-print')
+ .chomp
+ .split("\n")
+ end
- def create_recycle_bin_directory
- begin
- RedmineGitHosting::Commands.sudo_mkdir_p(recycle_bin_dir)
- RedmineGitHosting::Commands.sudo_chmod('770', recycle_bin_dir)
- true
- rescue RedmineGitHosting::Error::GitoliteCommandException => e
- logger.error("Attempt to create recycle bin directory '#{recycle_bin_dir}' failed !")
- false
- end
- end
+ def get_expired_content(expiration_time)
+ RedmineGitHosting::Commands.sudo_capture('find', recycle_bin_dir,
+ '-type', 'd', '-regex', '.*\.git', '-cmin', "+#{expiration_time}", '-prune', '-print')
+ .chomp
+ .split("\n")
+ end
+ def create_recycle_bin_directory
+ RedmineGitHosting::Commands.sudo_mkdir_p(recycle_bin_dir)
+ RedmineGitHosting::Commands.sudo_chmod('770', recycle_bin_dir)
+ true
+ rescue RedmineGitHosting::Error::GitoliteCommandException => e
+ logger.error("Attempt to create recycle bin directory '#{recycle_bin_dir}' failed !")
+ false
+ end
end
end
end
diff --git a/lib/redmine_git_hosting/recycle_bin/restorable_item.rb b/lib/redmine_git_hosting/recycle_bin/restorable_item.rb
index 8dcbb56ba0a..45f9b88040d 100644
--- a/lib/redmine_git_hosting/recycle_bin/restorable_item.rb
+++ b/lib/redmine_git_hosting/recycle_bin/restorable_item.rb
@@ -1,10 +1,8 @@
module RedmineGitHosting
module RecycleBin
class RestorableItem
-
include RecycleBin::ItemBase
-
def restore!(target_path)
if trashed_object.nil?
logger.warn("No matching item found for '#{object_name}' in Recycle Bin, exiting !")
@@ -16,12 +14,10 @@ def restore!(target_path)
end
end
-
def source_path
File.join(recycle_bin_dir, "[0-9]+#{TRASH_DIR_SEP}#{trash_name}.git")
end
-
# Pull up any matching repositories. Sort them (beginning is representation of time)
#
def trashed_objects
@@ -32,38 +28,29 @@ def trashed_objects
end
end
-
def trashed_object
trashed_objects.first
end
-
private
+ def create_parent_dir(target_path)
+ logger.info("Creating parent dir : '#{File.dirname(target_path)}'")
+ RedmineGitHosting::Commands.sudo_mkdir_p(File.dirname(target_path))
+ true
+ rescue RedmineGitHosting::Error::GitoliteCommandException => e
+ logger.error("Attempt to create parent dir for '#{trashed_object}' failed !")
+ false
+ end
- def create_parent_dir(target_path)
- begin
- logger.info("Creating parent dir : '#{File.dirname(target_path)}'")
- RedmineGitHosting::Commands.sudo_mkdir_p(File.dirname(target_path))
- true
- rescue RedmineGitHosting::Error::GitoliteCommandException => e
- logger.error("Attempt to create parent dir for '#{trashed_object}' failed !")
- false
- end
- end
-
-
- def do_restore(target_path)
- begin
- RedmineGitHosting::Commands.sudo_move(trashed_object, target_path)
- logger.info('Done !')
- true
- rescue RedmineGitHosting::Error::GitoliteCommandException => e
- logger.error("Attempt to recover '#{trashed_object}' from Recycle Bin failed !")
- false
- end
- end
-
+ def do_restore(target_path)
+ RedmineGitHosting::Commands.sudo_move(trashed_object, target_path)
+ logger.info('Done !')
+ true
+ rescue RedmineGitHosting::Error::GitoliteCommandException => e
+ logger.error("Attempt to recover '#{trashed_object}' from Recycle Bin failed !")
+ false
+ end
end
end
end
diff --git a/lib/redmine_git_hosting/redcarpet_filter.rb b/lib/redmine_git_hosting/redcarpet_filter.rb
index 8ed9ffda227..4ea55aa599c 100644
--- a/lib/redmine_git_hosting/redcarpet_filter.rb
+++ b/lib/redmine_git_hosting/redcarpet_filter.rb
@@ -10,13 +10,11 @@ class HTMLwithRouge < Redcarpet::Render::HTML
end
class RedcarpetFilter < HTML::Pipeline::TextFilter
-
def initialize(text, context = nil, result = nil)
super text, context, result
@text = @text.delete "\r"
end
-
# Convert Markdown to HTML using the best available implementation
# and convert into a DocumentFragment.
#
@@ -26,23 +24,21 @@ def call
html
end
-
def self.renderer
@renderer ||= begin
Redcarpet::Markdown.new(HTMLwithRouge, markdown_options)
end
end
-
def self.markdown_options
@markdown_options ||= {
fenced_code_blocks: true,
- lax_spacing: true,
- strikethrough: true,
- autolink: true,
- tables: true,
- underline: true,
- highlight: true
+ lax_spacing: true,
+ strikethrough: true,
+ autolink: true,
+ tables: true,
+ underline: true,
+ highlight: true
}.freeze
end
diff --git a/lib/redmine_git_hosting/redmine_plugin_loader.rb b/lib/redmine_git_hosting/redmine_plugin_loader.rb
index c51d39259f5..1105885dc69 100644
--- a/lib/redmine_git_hosting/redmine_plugin_loader.rb
+++ b/lib/redmine_git_hosting/redmine_plugin_loader.rb
@@ -6,158 +6,134 @@ def set_plugin_name(name)
@name ||= name
end
-
def plugin_name
@name
end
-
def set_autoloaded_paths(*dirs)
@autoloaded_paths ||= dirs.map { |dir| plugin_app_dir(*dir) }
end
-
def autoloaded_paths
@autoloaded_paths
end
-
def authors
load_authors_file
end
-
def authors_file
plugin_dir('AUTHORS')
end
-
def settings
default_settings.merge(global_settings).merge(local_settings)
end
-
def global_settings
load_setting_file(global_settings_file)
end
-
def local_settings
load_setting_file(local_settings_file)
end
-
def default_settings
load_setting_file(default_settings_file)
end
-
def default_settings_file
plugin_lib_dir('default_settings.yml')
end
-
def global_settings_file
Rails.root.join("#{plugin_name}.yml")
end
-
def local_settings_file
plugin_dir('settings.yml')
end
-
def plugin_patches_dir
plugin_lib_dir(plugin_name, 'patches')
end
-
def plugin_hooks_dir
plugin_lib_dir(plugin_name, 'hooks')
end
-
def plugin_locales_dir
plugin_conf_dir('locales', '**', '*.yml')
end
-
def required_lib_dirs
plugin_lib_dir(plugin_name, '**', '*.rb')
end
-
def plugin_dir(*dirs)
Rails.root.join('plugins', plugin_name, *dirs)
end
-
def plugin_app_dir(*dirs)
plugin_dir('app', *dirs)
end
-
def plugin_conf_dir(*dirs)
plugin_dir('config', *dirs)
end
-
def plugin_lib_dir(*dirs)
plugin_dir('lib', *dirs)
end
-
def plugin_spec_dir(*dirs)
plugin_dir('spec', *dirs)
end
-
def load_plugin!
autoload_libs!
autoload_paths!
autoload_locales!
end
-
private
+ def load_setting_file(file)
+ return {} unless File.exist? file
- def load_setting_file(file)
- return {} unless File.exists?(file)
- data = YAML::load(ERB.new(IO.read(file)).result) || {}
- data.symbolize_keys
- end
-
-
- def load_authors_file
- return [] unless File.exists?(authors_file)
- File.read(authors_file).split("\n").map { |a| RedmineGitHosting::PluginAuthor.new(a) }
- end
+ data = YAML.safe_load(ERB.new(IO.read(file)).result) || {}
+ data.symbolize_keys
+ end
+ def load_authors_file
+ return [] unless File.exist? authors_file
- def hook_file?(file)
- File.dirname(file) == plugin_hooks_dir.to_s
- end
-
+ File.read(authors_file).split("\n").map { |a| RedmineGitHosting::PluginAuthor.new(a) }
+ end
- def autoload_libs!
- Dir.glob(required_lib_dirs).each do |file|
- # Exclude Redmine Views Hooks from Rails loader to avoid multiple calls to hooks on reload in dev environment.
- require_dependency file unless hook_file?(file)
- end
- end
+ def hook_file?(file)
+ File.dirname(file) == plugin_hooks_dir.to_s
+ end
+ def skip_lib_file?(file)
+ # Exclude Redmine Views Hooks from Rails loader to avoid multiple calls to hooks on reload in dev environment.
+ true if hook_file?(file) || (file.include?('journal_logger.rb') && !Object.const_defined?('Account'))
+ end
- def autoload_paths!
- autoloaded_paths.each do |dir|
- ActiveSupport::Dependencies.autoload_paths += [dir] if Dir.exists?(dir)
- end
+ def autoload_libs!
+ Dir.glob(required_lib_dirs).each do |file|
+ require_dependency file unless skip_lib_file?(file)
end
+ end
-
- def autoload_locales!
- ::I18n.load_path += Dir.glob(plugin_locales_dir)
+ def autoload_paths!
+ autoloaded_paths.each do |dir|
+ ActiveSupport::Dependencies.autoload_paths += [dir] if Dir.exist?(dir)
end
+ end
+ def autoload_locales!
+ ::I18n.load_path += Dir.glob(plugin_locales_dir)
+ end
end
end
diff --git a/lib/redmine_git_hosting/shell_redirector.rb b/lib/redmine_git_hosting/shell_redirector.rb
index fc10f485da6..f403a28319f 100644
--- a/lib/redmine_git_hosting/shell_redirector.rb
+++ b/lib/redmine_git_hosting/shell_redirector.rb
@@ -2,21 +2,17 @@
module RedmineGitHosting
class ShellRedirector
-
# Redirector states
WAIT_TO_CHECK = 0
RUNNING_SHELL = 1
STRING_IO = 2
DEAD = 3
-
class << self
-
def logger
RedmineGitHosting.logger
end
-
# Rewritten version of caching functionality to accommodate Redmine 1.4+
# When the shell is called with options[:write_stdin], then part of the
# argument on which caching is based is written to the input stream of the shell.
@@ -49,15 +45,14 @@ def execute(cmd_str, repo_id, options = {}, &block)
if status && status.exitstatus.to_i != 0
logger.error("Git exited with non-zero status : #{status.exitstatus} : #{cmd_str}")
- raise Redmine::Scm::Adapters::XitoliteAdapter::ScmCommandAborted, "Git exited with non-zero status : #{status.exitstatus} : #{cmd_str}"
+ raise Redmine::Scm::Adapters::XitoliteAdapter::ScmCommandAborted,
+ "Git exited with non-zero status : #{status.exitstatus} : #{cmd_str}"
end
- return retio
+ retio
end
-
end
-
def initialize(cmd_str, repo_id, options = {})
@cmd_str = cmd_str
@repo_id = repo_id
@@ -75,7 +70,6 @@ def initialize(cmd_str, repo_id, options = {})
end
end
-
def startup_shell
Thread.abort_on_exception = true
proxy_started = false
@@ -112,21 +106,20 @@ def startup_shell
@state = RUNNING_SHELL
end
-
def exit_shell
# If shell was running, kill off wrapper thread
if @state == RUNNING_SHELL
@wrap_thread.run
@wrap_thread.join
@state = DEAD
- if !@buffer_full
+ unless @buffer_full
# Insert result into cache
RedmineGitHosting::Cache.set_cache(@repo_id, @buffer, @cmd_str, @extra_args)
end
end
- return [@retio, @status]
- end
+ [@retio, @status]
+ end
# Catch any extra args placed into stdin. We explicitly code the
# output (write) functions here. Below, 'method_missing' traps the
@@ -137,17 +130,13 @@ def puts(*args)
@extra_args << args.join("\n") + "\n"
end
-
def write(obj)
@extra_args << obj.to_s
end
-
# Ignore this -- must handle it before we have chosen output stream
#
- def binmode
- end
-
+ def binmode; end
def close_write
cached = RedmineGitHosting::Cache.get_cache(@repo_id, @cmd_str, @extra_args)
@@ -159,12 +148,10 @@ def close_write
end
end
-
def logger
RedmineGitHosting.logger
end
-
# This class wraps a given enumerator and produces another one
# that logs all read data into the buffer.
#
@@ -178,6 +165,7 @@ def initialize(enum, redirector)
def each
return to_enum :each unless block_given?
+
@enum.each do |value|
@redirector.add_to_buffer(value)
yield value
@@ -185,9 +173,9 @@ def each
end
end
-
def add_to_buffer(value)
return if @buffer_full
+
if value.is_a?(Array)
value.each { |next_value| push_to_buffer(next_value) }
else
@@ -195,7 +183,6 @@ def add_to_buffer(value)
end
end
-
def push_to_buffer(value)
next_chunk = value.is_a?(Integer) ? value.chr : value
if @buffer.length + next_chunk.length <= RedmineGitHosting::Cache.max_cache_size
@@ -205,7 +192,6 @@ def push_to_buffer(value)
end
end
-
###############################################
# Duck-typing of an IO interface #
###############################################
@@ -214,12 +200,10 @@ def respond_to?(method)
io_method?(method) || super(method, *args, &block)
end
-
def io_method?(method)
IO.instance_methods.map(&:to_sym).include?(method.to_sym)
end
-
# On-the-fly compilation of any missing functions, including all of the
# read functions (with and without blocks), which we divert into the buffer
# for potential caching. Other functions are compiled as "proxies", which
@@ -263,7 +247,6 @@ def method_missing(method, *args, &block)
self.send(method, *args, &block)
end
-
def inject_enumerator_method(method)
self.class.class_eval <<-EOF, __FILE__, __LINE__
def #{method}(*args, &block)
@@ -285,7 +268,6 @@ def #{method}(*args, &block)
EOF
end
-
def inject_read_method(method)
self.class.class_eval <<-EOF, __FILE__, __LINE__
def #{method}(*args, &block)
@@ -296,7 +278,6 @@ def #{method}(*args, &block)
EOF
end
-
def inject_proxy_method(method)
self.class.class_eval <<-EOF, __FILE__, __LINE__
def #{method}(*args, &block)
@@ -305,7 +286,6 @@ def #{method}(*args, &block)
EOF
end
-
##############################################################################
# The following three functions are the generic versions of what is #
# currently "compiled" into function definitions above in missing_method(). #
@@ -330,7 +310,6 @@ def enumerator_diverter(method, *args, &block)
end
end
-
# Class #2 functions (Return of Array, String, or Integer)
#
def normal_diverter(method, *args)
@@ -339,12 +318,10 @@ def normal_diverter(method, *args)
value
end
-
# Class #3 functions (Everything by read functions)
#
def simple_proxy(method, *args, &block)
@read_stream.send(method, *args, &block)
end
-
end
end
diff --git a/lib/redmine_git_hosting/utils/crypto.rb b/lib/redmine_git_hosting/utils/crypto.rb
index 47add8a0cbe..06aa77d2fac 100644
--- a/lib/redmine_git_hosting/utils/crypto.rb
+++ b/lib/redmine_git_hosting/utils/crypto.rb
@@ -12,7 +12,6 @@ def generate_secret(length)
secret = secret.split(//).sample(length).join('')
secret
end
-
end
end
end
diff --git a/lib/redmine_git_hosting/utils/exec.rb b/lib/redmine_git_hosting/utils/exec.rb
index e5193f4f9db..bc9875daf59 100644
--- a/lib/redmine_git_hosting/utils/exec.rb
+++ b/lib/redmine_git_hosting/utils/exec.rb
@@ -22,7 +22,6 @@ def capture(command, args = [], opts = {}, &block)
merge_output ? stdout + stderr : stdout
end
-
# Executes the given command and a list of parameters on the shell
# and returns stdout, stderr, and the exit code.
#
@@ -35,7 +34,6 @@ def execute(command, args = [], opts = {}, &block)
RedmineGitHosting.logger.debug(error_msg)
raise RedmineGitHosting::Error::GitoliteCommandException.new(command, error_msg)
end
-
end
end
end
diff --git a/lib/redmine_git_hosting/utils/git.rb b/lib/redmine_git_hosting/utils/git.rb
index d4e03787df8..4a67fe6fd82 100644
--- a/lib/redmine_git_hosting/utils/git.rb
+++ b/lib/redmine_git_hosting/utils/git.rb
@@ -14,13 +14,10 @@ module Git
def parse_refspec(spec)
parsed_refspec = spec.match(REF_COMPONENT_REGEX)
return nil if parsed_refspec.nil?
+
if parsed_refspec[1]
# Should be first class. If no type component, return fail
- if parsed_refspec[3]
- { type: parsed_refspec[3], name: parsed_refspec[4] }
- else
- nil
- end
+ { type: parsed_refspec[3], name: parsed_refspec[4] } if parsed_refspec[3]
elsif parsed_refspec[3]
{ type: nil, name: "#{parsed_refspec[3]}/#{parsed_refspec[4]}" }
else
@@ -28,16 +25,13 @@ def parse_refspec(spec)
end
end
-
def author_name(committer)
committer.gsub(/\A([^<]+)\s+.*\z/, '\1')
end
-
def author_email(committer)
committer.gsub(/\A.*<([^>]+)>.*\z/, '\1')
end
-
end
end
end
diff --git a/lib/redmine_git_hosting/utils/http.rb b/lib/redmine_git_hosting/utils/http.rb
index 2643ac60036..1d14304458f 100644
--- a/lib/redmine_git_hosting/utils/http.rb
+++ b/lib/redmine_git_hosting/utils/http.rb
@@ -10,85 +10,79 @@ module Http
def http_post(url, opts = {})
data = opts.delete(:data) { {} }
- data = serialize_data(data)
- http, request = build_post_request(url, data)
- send_http_request(http, request)
+ data = serialize_data data
+ http, request = build_post_request url, data
+ send_http_request http, request
end
-
- def http_get(url, opts = {})
- http, request = build_get_request(url)
- send_http_request(http, request)
+ def http_get(url, _opts = {})
+ http, request = build_get_request url
+ send_http_request http, request
end
-
def valid_url?(url)
uri = URI.parse(url)
- uri.kind_of?(URI::HTTP)
+ uri.is_a?(URI::HTTP)
rescue URI::InvalidURIError
false
end
-
private
+ def serialize_data(data)
+ return data if data.empty?
- def serialize_data(data)
- return data if data.empty?
- serialized = {}
- data.each do |k, v|
- serialized[k.to_s] = v.to_json
- end
- serialized
+ serialized = {}
+ data.each do |k, v|
+ serialized[k.to_s] = v.to_json
end
+ serialized
+ end
+ def build_post_request(url, data)
+ uri, http = build_http_request url
+ request = Net::HTTP::Post.new uri.request_uri
+ request.basic_auth(uri.user, uri.password) if uri.user.present? && uri.password.present?
+ request.set_form_data data
+ [http, request]
+ end
- def build_post_request(url, data)
- uri, http = build_http_request(url)
- request = Net::HTTP::Post.new(uri.request_uri)
- request.set_form_data(data)
- return http, request
- end
-
-
- def build_get_request(url)
- uri, http = build_http_request(url)
- request = Net::HTTP::Get.new(uri.request_uri)
- return http, request
- end
-
+ def build_get_request(url)
+ uri, http = build_http_request url
+ request = Net::HTTP::Get.new uri.request_uri
+ [http, request]
+ end
- def build_http_request(url)
- uri = URI(url)
- http = Net::HTTP.new(uri.host, uri.port)
- if uri.scheme == 'https'
- http.use_ssl = true
- http.verify_mode = OpenSSL::SSL::VERIFY_NONE
- end
- return uri, http
+ def build_http_request(url)
+ uri = URI url
+ http = Net::HTTP.new uri.host, uri.port
+ if uri.scheme == 'https'
+ http.use_ssl = true
+ # @NOTE: do not allow requests with invalid certificates
+ # http.verify_mode = OpenSSL::SSL::VERIFY_NONE
end
+ [uri, http]
+ end
+ def send_http_request(http, request)
+ message = ''
- def send_http_request(http, request)
- message = ''
-
- begin
- res = http.start { |openhttp| openhttp.request request }
- if !res.is_a?(Net::HTTPSuccess)
- message = "Return code : #{res.code} (#{res.message})."
- failed = true
- else
- message = res.body
- failed = false
- end
- rescue => e
- message = "Exception : #{e.message}"
+ begin
+ res = http.start { |openhttp| openhttp.request request }
+ if !res.is_a?(Net::HTTPSuccess)
+ message = "Return code : #{res.code} (#{res.message})."
failed = true
+ else
+ message = res.body
+ failed = false
end
-
- return failed, message
+ rescue StandardError => e
+ message = "Exception : #{e.message}"
+ failed = true
end
+ [failed, message]
+ end
end
end
end
diff --git a/lib/redmine_git_hosting/utils/ssh.rb b/lib/redmine_git_hosting/utils/ssh.rb
index 36f1c6e22ff..93af9a63db4 100644
--- a/lib/redmine_git_hosting/utils/ssh.rb
+++ b/lib/redmine_git_hosting/utils/ssh.rb
@@ -11,7 +11,7 @@ def ssh_fingerprint(key)
begin
output = Utils::Exec.capture('ssh-keygen', ['-l', '-f', file.path])
rescue RedmineGitHosting::Error::GitoliteCommandException => e
- raise RedmineGitHosting::Error::InvalidSshKey.new("Invalid Ssh Key : #{key}")
+ raise RedmineGitHosting::Error::InvalidSshKey, "Invalid Ssh Key : #{key}"
else
output.split[1]
ensure
@@ -19,7 +19,6 @@ def ssh_fingerprint(key)
end
end
-
def sanitize_ssh_key(key)
# First -- let the first control char or space stand (to divide key type from key)
# Really, this is catching a special case in which there is a \n between type and key.
@@ -36,7 +35,6 @@ def sanitize_ssh_key(key)
# Return the sanitized key
key
end
-
end
end
end
diff --git a/lib/redmine_git_hosting/version.rb b/lib/redmine_git_hosting/version.rb
new file mode 100644
index 00000000000..701981a6275
--- /dev/null
+++ b/lib/redmine_git_hosting/version.rb
@@ -0,0 +1,3 @@
+module RedmineGitHosting
+ VERSION = '4.0.3-master'.freeze
+end
diff --git a/lib/redmine_menus.rb b/lib/redmine_menus.rb
index d1925aa94e3..ae8daf9409d 100644
--- a/lib/redmine_menus.rb
+++ b/lib/redmine_menus.rb
@@ -2,9 +2,3 @@
menu.push :redmine_git_hosting, { controller: 'settings', action: 'plugin', id: 'redmine_git_hosting' },
caption: :redmine_git_hosting, html: { class: 'icon' }
end
-
-Redmine::MenuManager.map :top_menu do |menu|
- menu.push :archived_repositories, { controller: '/archived_repositories', action: 'index' },
- caption: :label_archived_repositories, after: :administration,
- if: Proc.new { User.current.logged? && User.current.admin? }
-end
diff --git a/lib/redmine_permissions.rb b/lib/redmine_permissions.rb
index 500960ed03a..d418ca4a87b 100644
--- a/lib/redmine_permissions.rb
+++ b/lib/redmine_permissions.rb
@@ -1,27 +1,27 @@
Redmine::AccessControl.map do |main|
- main.permission :create_gitolite_ssh_key, gitolite_public_keys: [:index, :create, :destroy], require: :loggedin
+ main.permission :create_gitolite_ssh_key, gitolite_public_keys: %i[index create destroy], require: :loggedin
main.project_module :repository do |map|
- map.permission :create_repository_mirrors, repository_mirrors: [:new, :create]
- map.permission :view_repository_mirrors, repository_mirrors: [:index, :show]
- map.permission :edit_repository_mirrors, repository_mirrors: [:edit, :update, :destroy]
+ map.permission :create_repository_mirrors, repository_mirrors: %i[new create]
+ map.permission :view_repository_mirrors, repository_mirrors: %i[indexshow]
+ map.permission :edit_repository_mirrors, repository_mirrors: %i[edit update destroy]
map.permission :push_repository_mirrors, repository_mirrors: [:push]
- map.permission :create_repository_post_receive_urls, repository_post_receive_urls: [:new, :create]
- map.permission :view_repository_post_receive_urls, repository_post_receive_urls: [:index, :show]
- map.permission :edit_repository_post_receive_urls, repository_post_receive_urls: [:edit, :update, :destroy]
+ map.permission :create_repository_post_receive_urls, repository_post_receive_urls: %i[new create]
+ map.permission :view_repository_post_receive_urls, repository_post_receive_urls: %i[index show]
+ map.permission :edit_repository_post_receive_urls, repository_post_receive_urls: %i[edit update destroy]
- map.permission :create_repository_deployment_credentials, repository_deployment_credentials: [:new, :create]
- map.permission :view_repository_deployment_credentials, repository_deployment_credentials: [:index, :show]
- map.permission :edit_repository_deployment_credentials, repository_deployment_credentials: [:edit, :update, :destroy]
+ map.permission :create_repository_deployment_credentials, repository_deployment_credentials: %i[new create]
+ map.permission :view_repository_deployment_credentials, repository_deployment_credentials: %i[index show]
+ map.permission :edit_repository_deployment_credentials, repository_deployment_credentials: %i[edit update destroy]
- map.permission :create_repository_git_config_keys, repository_git_config_keys: [:new, :create]
- map.permission :view_repository_git_config_keys, repository_git_config_keys: [:index, :show]
- map.permission :edit_repository_git_config_keys, repository_git_config_keys: [:edit, :update, :destroy]
+ map.permission :create_repository_git_config_keys, repository_git_config_keys: %i[new create]
+ map.permission :view_repository_git_config_keys, repository_git_config_keys: %i[index show]
+ map.permission :edit_repository_git_config_keys, repository_git_config_keys: %i[edit update destroy]
- map.permission :create_repository_protected_branches, repository_protected_branches: [:new, :create]
- map.permission :view_repository_protected_branches, repository_protected_branches: [:index, :show]
- map.permission :edit_repository_protected_branches, repository_protected_branches: [:edit, :update, :destroy]
+ map.permission :create_repository_protected_branches, repository_protected_branches: %i[new create]
+ map.permission :view_repository_protected_branches, repository_protected_branches: %i[index show]
+ map.permission :edit_repository_protected_branches, repository_protected_branches: %i[edit update destroy]
map.permission :view_repository_xitolite_watchers, repositories: :show
map.permission :add_repository_xitolite_watchers, watchers: :create
diff --git a/lib/tasks/ci_tools.rake b/lib/tasks/ci_tools.rake
index ff68022d4fa..c5aa51174c9 100644
--- a/lib/tasks/ci_tools.rake
+++ b/lib/tasks/ci_tools.rake
@@ -29,11 +29,11 @@ namespace :redmine_git_hosting do
puts ''
puts 'GIT STATUS :'
puts '------------'
- puts %x[ git --work-tree "#{repo.workdir}" --git-dir "#{repo.path}" status ]
+ puts %x[git --work-tree "#{repo.workdir}" --git-dir "#{repo.path}" status]
puts ''
puts 'GIT LOG :'
puts '---------'
- puts %x[ git --work-tree "#{repo.workdir}" --git-dir "#{repo.path}" log ]
+ puts %x[git --work-tree "#{repo.workdir}" --git-dir "#{repo.path}" log]
rescue => e
puts 'Error while getting tests results'
puts e.message
@@ -44,7 +44,7 @@ namespace :redmine_git_hosting do
def ls_dir(dir)
puts "* ls -hal #{dir}"
- puts %x[ ls -hal "#{dir}" ]
+ puts %x[ls -hal "#{dir}"]
puts ''
end
end
diff --git a/lib/tasks/migration_tools.rake b/lib/tasks/migration_tools.rake
index 924cbed41b0..53a75f9207f 100644
--- a/lib/tasks/migration_tools.rake
+++ b/lib/tasks/migration_tools.rake
@@ -1,33 +1,37 @@
namespace :redmine_git_hosting do
-
namespace :migration_tools do
-
desc 'Fix migration numbers (add missing trailing 0 to some migrations)'
task fix_migration_numbers: [:environment] do
puts ''
%w[2011072600000 2011080700000 2011081300000 2011081700000 2012052100000 2012052100001 2012052200000].each do |migration|
-
old_name = "#{migration}-redmine_git_hosting"
new_name = "#{migration}0-redmine_git_hosting"
puts "old_name : #{old_name}"
puts "new_name : #{new_name}"
# Get the old migration name
- query = "SELECT * FROM #{ActiveRecord::Base.connection.quote_string('schema_migrations')} WHERE #{ActiveRecord::Base.connection.quote_string('version')} = '#{ActiveRecord::Base.connection.quote_string(old_name)}';"
- result = ActiveRecord::Base.connection.execute(query)
+ query = "SELECT * FROM #{ActiveRecord::Base.connection.quote_string('schema_migrations')}" \
+ " WHERE #{ActiveRecord::Base.connection.quote_string('version')} =" \
+ " '#{ActiveRecord::Base.connection.quote_string(old_name)}';"
+ result = ActiveRecord::Base.connection.execute query
# If present, rename
if !result.to_a.empty?
- query = "DELETE FROM #{ActiveRecord::Base.connection.quote_string('schema_migrations')} WHERE #{ActiveRecord::Base.connection.quote_string('version')} = '#{ActiveRecord::Base.connection.quote_string(old_name)}';"
- ActiveRecord::Base.connection.execute(query)
-
- query = "INSERT INTO #{ActiveRecord::Base.connection.quote_string('schema_migrations')} (VERSION) VALUES ('#{ActiveRecord::Base.connection.quote_string(new_name)}');"
- ActiveRecord::Base.connection.execute(query)
+ query = "DELETE FROM #{ActiveRecord::Base.connection.quote_string('schema_migrations')}" \
+ " WHERE #{ActiveRecord::Base.connection.quote_string('version')} =" \
+ " '#{ActiveRecord::Base.connection.quote_string(old_name)}';"
+ ActiveRecord::Base.connection.execute query
+
+ query = "INSERT INTO #{ActiveRecord::Base.connection.quote_string('schema_migrations')} (VERSION)" \
+ " VALUES ('#{ActiveRecord::Base.connection.quote_string(new_name)}');"
+ ActiveRecord::Base.connection.execute query
else
# Check the new name is present
- query = "SELECT * FROM #{ActiveRecord::Base.connection.quote_string('schema_migrations')} WHERE #{ActiveRecord::Base.connection.quote_string('version')} = '#{ActiveRecord::Base.connection.quote_string(new_name)}';"
- result = ActiveRecord::Base.connection.execute(query)
+ query = "SELECT * FROM #{ActiveRecord::Base.connection.quote_string('schema_migrations')}" \
+ " WHERE #{ActiveRecord::Base.connection.quote_string('version')} =" \
+ " '#{ActiveRecord::Base.connection.quote_string(new_name)}';"
+ result = ActiveRecord::Base.connection.execute query
if result.to_a.empty?
puts "Error : migration is missing #{new_name}"
@@ -43,10 +47,8 @@ namespace :redmine_git_hosting do
puts 'Done!'
end
-
desc 'Rename SSH keys'
task rename_ssh_keys: [:environment] do
-
puts ''
puts 'Delete SSH keys in Gitolite and reset identifier :'
puts ''
@@ -74,10 +76,8 @@ namespace :redmine_git_hosting do
puts 'Done!'
end
-
desc 'Update repositories type (from Git to Xitolite)'
task update_repositories_type: [:environment] do
-
puts ''
puts 'Update repositories type (from Git to Xitolite) :'
puts ''
@@ -88,13 +88,13 @@ namespace :redmine_git_hosting do
# Don't update orphan repositories
if repository.project.nil?
- puts "Repository with id : '#{repository.id}' doesn't have a project, skipping !!"
+ puts "Repository with id: '#{repository.id}' doesn't have a project, skipping!!"
puts ''
next
end
# Update Gitolite repositories
- if repository.identifier.nil? || repository.identifier.empty?
+ if repository.identifier.blank?
puts repository.project.identifier
repository.update_attribute(:type, 'Repository::Xitolite')
puts 'Done!'
@@ -108,10 +108,8 @@ namespace :redmine_git_hosting do
end
end
-
desc 'Check GitExtras presence'
task check_git_extras_presence: [:environment] do
-
puts ''
puts 'Checking for GitExtras presence'
puts ''
@@ -127,12 +125,12 @@ namespace :redmine_git_hosting do
else
puts " - Repository '#{repository.redmine_name}' has no entry in RepositoryGitExtras table, create it :"
default_extra_options = {
- git_http: RedmineGitHosting::Config.gitolite_http_by_default?,
- git_daemon: RedmineGitHosting::Config.gitolite_daemon_by_default?,
- git_notify: RedmineGitHosting::Config.gitolite_notify_by_default?,
- git_annex: false,
+ git_http: RedmineGitHosting::Config.gitolite_http_by_default?,
+ git_daemon: RedmineGitHosting::Config.gitolite_daemon_by_default?,
+ git_notify: RedmineGitHosting::Config.gitolite_notify_by_default?,
+ git_annex: false,
default_branch: 'master',
- key: RedmineGitHosting::Utils::Crypto.generate_secret(64)
+ key: RedmineGitHosting::Utils::Crypto.generate_secret(64)
}
extra = repository.build_extra(default_extra_options)
extra.save!
@@ -143,10 +141,8 @@ namespace :redmine_git_hosting do
puts 'Done!'
end
-
end
-
desc 'Migrate to v1.0 version'
task migrate_to_v1: [:environment] do
## First step : rename migrations in DB
@@ -159,5 +155,4 @@ namespace :redmine_git_hosting do
## Update repositories type
task('redmine_git_hosting:migration_tools:update_repositories_type').invoke
end
-
end
diff --git a/lib/tasks/redmine_git_hosting.rake b/lib/tasks/redmine_git_hosting.rake
index b141240895e..b6a1aa0aee3 100644
--- a/lib/tasks/redmine_git_hosting.rake
+++ b/lib/tasks/redmine_git_hosting.rake
@@ -1,19 +1,19 @@
namespace :redmine_git_hosting do
-
- desc 'Update plugin settings in database (This will read settings from `/redmine_git_hosting.yml` and `/settings.yml`)'
+ desc <<-DESCRIPTION
+ Update plugin settings in database (This will read settings from `/redmine_git_hosting.yml`
+ and `/settings.yml`)
+ DESCRIPTION
task update_settings: [:environment] do
RedmineGitHosting::ConsoleLogger.title('Reloading settings from command line') do
RedmineGitHosting::Config.reload_from_file!
end
end
-
desc 'Dump plugin settings in console'
task dump_settings: [:environment] do
RedmineGitHosting::Config.dump_settings
end
-
desc 'Purge expired repositories from Recycle Bin'
task purge_recycle_bin: [:environment] do
RedmineGitHosting::ConsoleLogger.title('Purging Recycle Bin from command line') do
@@ -21,7 +21,6 @@ namespace :redmine_git_hosting do
end
end
-
desc 'Update/repair Gitolite configuration'
task update_repositories: [:environment] do
RedmineGitHosting::ConsoleLogger.title('Performing manual update_repositories operation from command line') do
@@ -29,7 +28,6 @@ namespace :redmine_git_hosting do
end
end
-
desc 'Fetch commits from gitolite repositories/update gitolite configuration'
task fetch_changesets: [:environment] do
RedmineGitHosting::ConsoleLogger.title('Performing manual fetch_changesets operation from command line') do
@@ -38,20 +36,18 @@ namespace :redmine_git_hosting do
end
end
-
desc 'Check repositories identifier uniqueness'
task check_repository_uniqueness: [:environment] do
RedmineGitHosting::ConsoleLogger.title('Checking repositories identifier uniqueness...') do
if Repository::Xitolite.have_duplicated_identifier?
RedmineGitHosting::ConsoleLogger.warn('Detected non-unique repository identifiers!')
- puts YAML::dump(Repository::Xitolite.identifiers_to_hash.reject! { |k, v| v == 1 })
+ puts YAML.dump(Repository::Xitolite.identifiers_to_hash.reject! { |_k, v| v == 1 })
else
RedmineGitHosting::ConsoleLogger.info('No duplication detected, good !')
end
end
end
-
desc 'Resync ssh_keys'
task resync_ssh_keys: [:environment] do
RedmineGitHosting::ConsoleLogger.title('Performing manual resync_ssh_keys operation from command line') do
@@ -59,7 +55,6 @@ namespace :redmine_git_hosting do
end
end
-
desc 'Regenerate ssh_keys'
task regenerate_ssh_keys: [:environment] do
RedmineGitHosting::ConsoleLogger.title('Performing manual regenerate_ssh_keys operation from command line') do
@@ -67,32 +62,29 @@ namespace :redmine_git_hosting do
end
end
-
desc 'Install/update Gitolite hooks'
task install_hook_files: [:environment] do
RedmineGitHosting::ConsoleLogger.title('Installing/updating Gitolite hooks') do
- puts YAML::dump(RedmineGitHosting::Config.install_hooks!)
+ puts YAML.dump(RedmineGitHosting::Config.install_hooks!)
end
end
-
desc 'Install/update Gitolite hook parameters'
task install_hook_parameters: [:environment] do
RedmineGitHosting::ConsoleLogger.title('Installing/updating Gitolite hook parameters') do
- puts YAML::dump(RedmineGitHosting::Config.update_hook_params!)
+ puts YAML.dump(RedmineGitHosting::Config.update_hook_params!)
end
end
- task install_gitolite_hooks: [:install_hook_files, :install_hook_parameters]
+ task install_gitolite_hooks: %i[install_hook_files install_hook_parameters]
desc 'Show library version'
task :version do
- puts "Redmine Git Hosting #{version("plugins/redmine_git_hosting/init.rb")}"
+ puts "Redmine Git Hosting #{version('plugins/redmine_git_hosting/init.rb')}"
end
def version(path)
line = File.read(Rails.root.join(path))[/^\s*version\s*.*/]
line.match(/.*version\s*['"](.*)['"]/)[1]
end
-
end
diff --git a/spec/controllers/repository_deployment_credentials_controller_spec.rb b/spec/controllers/repository_deployment_credentials_controller_spec.rb
index 800c109709d..57248b51e2c 100644
--- a/spec/controllers/repository_deployment_credentials_controller_spec.rb
+++ b/spec/controllers/repository_deployment_credentials_controller_spec.rb
@@ -1,4 +1,4 @@
-require File.expand_path(File.dirname(__FILE__) + '/../spec_helper')
+require File.expand_path "#{File.dirname __FILE__}/../spec_helper"
require 'sshkey'
diff --git a/spec/controllers/repository_git_config_keys_controller_spec.rb b/spec/controllers/repository_git_config_keys_controller_spec.rb
index c935f160dd6..f8b0653dee2 100644
--- a/spec/controllers/repository_git_config_keys_controller_spec.rb
+++ b/spec/controllers/repository_git_config_keys_controller_spec.rb
@@ -1,10 +1,10 @@
-require File.expand_path(File.dirname(__FILE__) + '/../spec_helper')
+require File.expand_path "#{File.dirname __FILE__}/../spec_helper"
describe RepositoryGitConfigKeysController do
include CrudControllerSpec::Base
def permissions
- [:manage_repository, :create_repository_git_config_keys, :view_repository_git_config_keys, :edit_repository_git_config_keys]
+ %i[manage_repository create_repository_git_config_keys view_repository_git_config_keys edit_repository_git_config_keys]
end
def create_object
diff --git a/spec/controllers/repository_mirrors_controller_spec.rb b/spec/controllers/repository_mirrors_controller_spec.rb
index 08009423eec..50b241b5ee9 100644
--- a/spec/controllers/repository_mirrors_controller_spec.rb
+++ b/spec/controllers/repository_mirrors_controller_spec.rb
@@ -1,4 +1,4 @@
-require File.expand_path(File.dirname(__FILE__) + '/../spec_helper')
+require File.expand_path "#{File.dirname __FILE__}/../spec_helper"
describe RepositoryMirrorsController do
include CrudControllerSpec::Base
diff --git a/spec/controllers/repository_post_receive_urls_controller_spec.rb b/spec/controllers/repository_post_receive_urls_controller_spec.rb
index eed317937a3..39ec295f151 100644
--- a/spec/controllers/repository_post_receive_urls_controller_spec.rb
+++ b/spec/controllers/repository_post_receive_urls_controller_spec.rb
@@ -1,4 +1,4 @@
-require File.expand_path(File.dirname(__FILE__) + '/../spec_helper')
+require File.expand_path "#{File.dirname __FILE__}/../spec_helper"
describe RepositoryPostReceiveUrlsController do
include CrudControllerSpec::Base
diff --git a/spec/controllers/users_controller_spec.rb b/spec/controllers/users_controller_spec.rb
index 8c162b4a505..d670371076e 100644
--- a/spec/controllers/users_controller_spec.rb
+++ b/spec/controllers/users_controller_spec.rb
@@ -1,4 +1,4 @@
-require File.expand_path(File.dirname(__FILE__) + '/../spec_helper')
+require File.expand_path "#{File.dirname __FILE__}/../spec_helper"
require 'sshkey'
diff --git a/spec/factories/gitolite_public_key.rb b/spec/factories/gitolite_public_key.rb
index 481c699f655..7500275524e 100644
--- a/spec/factories/gitolite_public_key.rb
+++ b/spec/factories/gitolite_public_key.rb
@@ -1,7 +1,12 @@
FactoryBot.define do
factory :gitolite_public_key do
sequence(:title) { |n| "test-key#{n}" }
- key { 'ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDpqFJzsx3wTi3t3X/eOizU6rdtNQoqg5uSjL89F+Ojjm2/sah3ouzx+3E461FDYaoJL58Qs9eRhL+ev0BY7khYXph8nIVDzNEjhLqjevX+YhpaW9Ll7V807CwAyvMNm08aup/NrrlI/jO+At348/ivJrfO7ClcPhq4+Id9RZfvbrKaitGOURD7q6Bd7xjUjELUN8wmYxu5zvx/2n/5woVdBUMXamTPxOY5y6DxTNJ+EYzrCr+bNb7459rWUvBHUQGI2fXDGmFpGiv6ShKRhRtwob1JHI8QC9OtxonrIUesa2dW6RFneUaM7tfRfffC704Uo7yuSswb7YK+p1A9QIt5 nicolas@tchoum' }
+ key do
+ 'ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDpqFJzsx3wTi3t3X/eOizU6rdtNQoqg5uSjL89F+Ojjm2/sah3ouzx+3E461FDYaoJL58Qs9eRhL+ev0BY7khYXp' \
+ 'h8nIVDzNEjhLqjevX+YhpaW9Ll7V807CwAyvMNm08aup/NrrlI/jO+At348/ivJrfO7ClcPhq4+Id9RZfvbrKaitGOURD7q6Bd7xjUjELUN8wmYxu5zvx/2n/5woVd' \
+ 'BUMXamTPxOY5y6DxTNJ+EYzrCr+bNb7459rWUvBHUQGI2fXDGmFpGiv6ShKRhRtwob1JHI8QC9OtxonrIUesa2dW6RFneUaM7tfRfffC704Uo7yuSswb7YK+p1A9QI' \
+ 't5 nicolas@tchoum'
+ end
key_type { 0 }
association :user
end
diff --git a/spec/helpers/gitolite_public_keys_helper_spec.rb b/spec/helpers/gitolite_public_keys_helper_spec.rb
index f69fa2dfc2c..69f9eec88d0 100644
--- a/spec/helpers/gitolite_public_keys_helper_spec.rb
+++ b/spec/helpers/gitolite_public_keys_helper_spec.rb
@@ -1,12 +1,16 @@
-require File.expand_path(File.dirname(__FILE__) + '/../spec_helper')
+require File.expand_path "#{File.dirname __FILE__}/../spec_helper"
describe GitolitePublicKeysHelper do
- TEST_KEY = 'ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQCpOU1DzQzU4/acdt3wWhk43acGs3Jp7jVlnEtc+2C8QFAUiJMrAOzyUnEliwxarGonJ5gKbI9NkqqPpz9LATBQw382+3FjAlptgqn7eGBih0DgwN6wdHflTRdE6sRn7hxB5h50p547n26FpbX9GSOHPhgxSnyvGXnC+YZyTfMiw5JMhw68SfLS8YENrXukg2ItJPspn6mPqIHrcM2NJOG4Bm+1ibYpDfrWJqYp3Q6disgwrsN08pS6lDfoQRiRHXg8WFbQbHloVaYFpdT6VoBQiAydeSpDSYTBJd/v3qTpK8aheC8sdnrddZf1T6L51z7WZ6vPVKQYPjpAxZ4p6eef nicolas@tchoum'
+ TEST_KEY = 'ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQCpOU1DzQzU4/acdt3wWhk43acGs3Jp7jVlnEtc+2C8QFAUiJMrAOzyUnEliwxarGonJ5gKbI9NkqqPpz9LATB' \
+ 'Qw382+3FjAlptgqn7eGBih0DgwN6wdHflTRdE6sRn7hxB5h50p547n26FpbX9GSOHPhgxSnyvGXnC+YZyTfMiw5JMhw68SfLS8YENrXukg2ItJPspn6mPqIHrcM' \
+ '2NJOG4Bm+1ibYpDfrWJqYp3Q6disgwrsN08pS6lDfoQRiRHXg8WFbQbHloVaYFpdT6VoBQiAydeSpDSYTBJd/v3qTpK8aheC8sdnrddZf1T6L51z7WZ6vPVKQYP' \
+ 'jpAxZ4p6eef nicolas@tchoum'
# before(:all) do
# @admin_user = create_admin_user
# @user_without_perm = create_anonymous_user
- # @user_with_perm = create_user_with_permissions(FactoryBot.create(:project), permissions: [:create_repository_deployment_credentials])
+ # @user_with_perm = create_user_with_permissions(FactoryBot.create(:project),
+ # permissions: [:create_repository_deployment_credentials])
# @gitolite_public_key = create_ssh_key(user_id: @user_without_perm.id, key_type: 1, title: 'foo1', key: TEST_KEY)
# end
diff --git a/spec/lib/redmine_git_hosting/config_spec.rb b/spec/lib/redmine_git_hosting/config_spec.rb
index 849ef56bf57..c5f8451fdcf 100644
--- a/spec/lib/redmine_git_hosting/config_spec.rb
+++ b/spec/lib/redmine_git_hosting/config_spec.rb
@@ -6,11 +6,11 @@
'hello gitolite_admin_id_rsa, this is gitolite gitolite-2.3.1 running on git 1.8.1.5',
'hello gitolite_admin_id_rsa, this is gitolite 2.3.1-1.el6 running on git 1.7.1',
'hello gitolite_admin_id_rsa, this is gitolite 2.2-1 (Debian) running on git 1.7.9.5'
- ]
+ ].freeze
GITOLITE_VERSION_3 = [
'hello redmine_gitolite_admin_id_rsa, this is git@dev running gitolite3 v3.3-11-ga1aba93 on git 1.7.2.5'
- ]
+ ].freeze
GITOLITE_VERSION_2.each do |gitolite_version|
it 'should recognize Gitolite2' do
diff --git a/spec/lib/redmine_git_hosting/utils/git_spec.rb b/spec/lib/redmine_git_hosting/utils/git_spec.rb
index 6f6173ca8da..82b11842ae2 100644
--- a/spec/lib/redmine_git_hosting/utils/git_spec.rb
+++ b/spec/lib/redmine_git_hosting/utils/git_spec.rb
@@ -6,23 +6,23 @@
describe '.parse_refspec' do
context 'it should accept different refspec format' do
it 'should accept ' do
- expect(parse_refspec('dev')).to eq ({ type: nil, name: 'dev' })
+ expect(parse_refspec('dev')).to eq({ type: nil, name: 'dev' })
end
it 'should accept a branch path' do
- expect(parse_refspec('refs/branches/dev')).to eq ({ type: 'branches', name: 'dev' })
+ expect(parse_refspec('refs/branches/dev')).to eq({ type: 'branches', name: 'dev' })
end
it 'should accept the wildcard param (*)' do
- expect(parse_refspec('refs/branches/dev/*')).to eq ({ type: 'branches', name: 'dev/*' })
- expect(parse_refspec('refs/tags/*')).to eq ({ type: 'tags', name: '*' })
+ expect(parse_refspec('refs/branches/dev/*')).to eq({ type: 'branches', name: 'dev/*' })
+ expect(parse_refspec('refs/tags/*')).to eq({ type: 'tags', name: '*' })
end
it 'should parse different refspec path' do
- expect(parse_refspec('refs/remotes/origin/experiment/*')).to eq ({ type: 'remotes', name: 'origin/experiment/*' })
- expect(parse_refspec('refs/remotes/origin/experiment/master')).to eq ({ type: 'remotes', name: 'origin/experiment/master' })
- expect(parse_refspec('refs/remotes/origin/experiment')).to eq ({ type: 'remotes', name: 'origin/experiment' })
- expect(parse_refspec('refs/heads/experiment')).to eq ({ type: 'heads', name: 'experiment' })
+ expect(parse_refspec('refs/remotes/origin/experiment/*')).to eq({ type: 'remotes', name: 'origin/experiment/*' })
+ expect(parse_refspec('refs/remotes/origin/experiment/master')).to eq({ type: 'remotes', name: 'origin/experiment/master' })
+ expect(parse_refspec('refs/remotes/origin/experiment')).to eq({ type: 'remotes', name: 'origin/experiment' })
+ expect(parse_refspec('refs/heads/experiment')).to eq({ type: 'heads', name: 'experiment' })
end
end
end
diff --git a/spec/models/gitolite_public_key_spec.rb b/spec/models/gitolite_public_key_spec.rb
index c49e0a476d9..f387ed9c317 100644
--- a/spec/models/gitolite_public_key_spec.rb
+++ b/spec/models/gitolite_public_key_spec.rb
@@ -1,15 +1,30 @@
-require File.expand_path(File.dirname(__FILE__) + '/../spec_helper')
+require File.expand_path "#{File.dirname __FILE__}/../spec_helper"
describe GitolitePublicKey do
- SSH_KEY_0 = 'ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDpqFJzsx3wTi3t3X/eOizU6rdtNQoqg5uSjL89F+Ojjm2/sah3ouzx+3E461FDYaoJL58Qs9eRhL+ev0BY7khYXph8nIVDzNEjhLqjevX+YhpaW9Ll7V807CwAyvMNm08aup/NrrlI/jO+At348/ivJrfO7ClcPhq4+Id9RZfvbrKaitGOURD7q6Bd7xjUjELUN8wmYxu5zvx/2n/5woVdBUMXamTPxOY5y6DxTNJ+EYzrCr+bNb7459rWUvBHUQGI2fXDGmFpGiv6ShKRhRtwob1JHI8QC9OtxonrIUesa2dW6RFneUaM7tfRfffC704Uo7yuSswb7YK+p1A9QIt5 nicolas@tchoum'
- SSH_KEY_1 = 'ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQCz0pLXcQWS4gLUimUSLwDOvEmQF8l8EKoj0LjxOyM3y2dpLsn0aiqS0ecA0G/ROomaawop8EZGFetoJKJM468OZlx2aKoQemzvFIq0Mn1ZhcrlA1alAsDYqzZI8iHO4JIS3YbeLLkVGAlYA+bmA5enXN9mGhC9cgoMC79EZiLD9XvOw4iXDjqXaCzFZHU1shMWwaJfpyxBm+Mxs2vtZzwETDqeu9rohNMl60dODf6+JoXYiahP+B+P2iKlL7ORb1YsAH/4ZMsVgRckj8snb4uc3XgwLRNNw+oB78ApZGr0j3Zc32U9rpmulbHIroWO07OV4Xsplnu8lhGvfodA2gjb nicolas@tchoum'
- SSH_KEY_2 = 'ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQC5+JfM82k03J98GWL6ghJ4TYM8DbvDnVh1s1rUDNlM/1U5rwbgXHOR4xV3lulgYEYRtYeMoL3rt4ZpEyXWkOreOVsUlkW66SZJR5aGVTNJOLX7HruEDqj7RWlt0u0MH6DgBVAJimQrxYN50jYD4XnDUjb/qv55EhPvbJ3jcAb3zuyRXMKZYGNVzVFLUagbvVaOwR23csWSLDTsAEI9JzaxMKvCNRwk3jFepiCovXbw+g0iyvJdp0+AJpC57ZupyxHeX9J2oz7im2UaHHqLa2qUZL6c4PNV/D2p0Bts4Tcnn3OFPL90RF/ao0tjiUFxM3ti8pRHOqRcZHcOgIhKiaLX nicolas@tchoum'
- SSH_KEY_3 = 'ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQC/pSRh11xbadAh24fQlc0i0dneG0lI+DCkng+bVmumgRvfD0w79vcJ2U1qir2ChjpNvi2n96HUGIEGNV60/VG05JY70mEb//YVBmQ3w0QPO7toEWNms9SQlwR0PN6tarATumFik4MI+8M23P6W8O8OYwsnMmYwaiEU5hDopH88x74MQKjPiRSrhMkGiThMZhLVK6j8yfNPoj9yUxPBWc7zsMCC2uAOfR5Fg6hl2TKGxTi0vecTh1csDcO2agXx42RRiZeIQbv9j0IJjVL8KhXvbndVnJRjGGbxQFAedicw8OrPH7jz6NimmaTooqU9SwaPInK/x3omd297/zzcQm3p nicolas@tchoum'
- SSH_KEY_4 = 'ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDCScLGus1vrZ9OyzOj3TtYa+IHUp5V+2hwcMW7pphGIAPRi5Pe6GwSbSV5GnanerOH9ucmEREaCIdGOzO2zVI35e3RD6wTeW28Ck7JN1r2LSgSvXGvxGyzu0H4Abf66Kajt+lN0/71tbFtoTaJTGSYE3W0rNU6OQBvHf1o4wIyBEFm3cu+e2OrmW/nVIqk8hCN2cU/0OutOWT+vaRLbIU3VQmHftqa4NVxdc4OG48vpZxlJwKexqAHj8Ok/sn3k4CIo8zR0vRaeGPqAmOpm84uEfRWoA71NNS4tIhENlikuD5SJIdyXE9d8CwGTth4jP9/BNT0y4C8cGYljjUWkx3v nicolas@tchoum'
+ SSH_KEY_0 = 'ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDpqFJzsx3wTi3t3X/eOizU6rdtNQoqg5uSjL89F+Ojjm2/sah3ouzx+3E461FDYaoJL58Qs9eRhL+ev0BY7k' \
+ 'hYXph8nIVDzNEjhLqjevX+YhpaW9Ll7V807CwAyvMNm08aup/NrrlI/jO+At348/ivJrfO7ClcPhq4+Id9RZfvbrKaitGOURD7q6Bd7xjUjELUN8wmYxu5zvx/' \
+ '2n/5woVdBUMXamTPxOY5y6DxTNJ+EYzrCr+bNb7459rWUvBHUQGI2fXDGmFpGiv6ShKRhRtwob1JHI8QC9OtxonrIUesa2dW6RFneUaM7tfRfffC704Uo7yuSs' \
+ 'wb7YK+p1A9QIt5 nicolas@tchoum'.freeze
+ SSH_KEY_1 = 'ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQCz0pLXcQWS4gLUimUSLwDOvEmQF8l8EKoj0LjxOyM3y2dpLsn0aiqS0ecA0G/ROomaawop8EZGFetoJKJM46' \
+ '8OZlx2aKoQemzvFIq0Mn1ZhcrlA1alAsDYqzZI8iHO4JIS3YbeLLkVGAlYA+bmA5enXN9mGhC9cgoMC79EZiLD9XvOw4iXDjqXaCzFZHU1shMWwaJfpyxBm+Mx' \
+ 's2vtZzwETDqeu9rohNMl60dODf6+JoXYiahP+B+P2iKlL7ORb1YsAH/4ZMsVgRckj8snb4uc3XgwLRNNw+oB78ApZGr0j3Zc32U9rpmulbHIroWO07OV4Xspln' \
+ 'u8lhGvfodA2gjb nicolas@tchoum'.freeze
+ SSH_KEY_2 = 'ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQC5+JfM82k03J98GWL6ghJ4TYM8DbvDnVh1s1rUDNlM/1U5rwbgXHOR4xV3lulgYEYRtYeMoL3rt4ZpEyXWkO' \
+ 'reOVsUlkW66SZJR5aGVTNJOLX7HruEDqj7RWlt0u0MH6DgBVAJimQrxYN50jYD4XnDUjb/qv55EhPvbJ3jcAb3zuyRXMKZYGNVzVFLUagbvVaOwR23csWSLDTs' \
+ 'AEI9JzaxMKvCNRwk3jFepiCovXbw+g0iyvJdp0+AJpC57ZupyxHeX9J2oz7im2UaHHqLa2qUZL6c4PNV/D2p0Bts4Tcnn3OFPL90RF/ao0tjiUFxM3ti8pRHOq' \
+ 'RcZHcOgIhKiaLX nicolas@tchoum'.freeze
+ SSH_KEY_3 = 'ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQC/pSRh11xbadAh24fQlc0i0dneG0lI+DCkng+bVmumgRvfD0w79vcJ2U1qir2ChjpNvi2n96HUGIEGNV60/V' \
+ 'G05JY70mEb//YVBmQ3w0QPO7toEWNms9SQlwR0PN6tarATumFik4MI+8M23P6W8O8OYwsnMmYwaiEU5hDopH88x74MQKjPiRSrhMkGiThMZhLVK6j8yfNPoj9y' \
+ 'UxPBWc7zsMCC2uAOfR5Fg6hl2TKGxTi0vecTh1csDcO2agXx42RRiZeIQbv9j0IJjVL8KhXvbndVnJRjGGbxQFAedicw8OrPH7jz6NimmaTooqU9SwaPInK/x3' \
+ 'omd297/zzcQm3p nicolas@tchoum'.freeze
+ SSH_KEY_4 = 'ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDCScLGus1vrZ9OyzOj3TtYa+IHUp5V+2hwcMW7pphGIAPRi5Pe6GwSbSV5GnanerOH9ucmEREaCIdGOzO2zV' \
+ 'I35e3RD6wTeW28Ck7JN1r2LSgSvXGvxGyzu0H4Abf66Kajt+lN0/71tbFtoTaJTGSYE3W0rNU6OQBvHf1o4wIyBEFm3cu+e2OrmW/nVIqk8hCN2cU/0OutOWT+' \
+ 'vaRLbIU3VQmHftqa4NVxdc4OG48vpZxlJwKexqAHj8Ok/sn3k4CIo8zR0vRaeGPqAmOpm84uEfRWoA71NNS4tIhENlikuD5SJIdyXE9d8CwGTth4jP9/BNT0y4' \
+ 'C8cGYljjUWkx3v nicolas@tchoum'.freeze
before(:all) do
- @user1 = create_user('git_user1')
- @user2 = create_user('git_user2')
+ @user1 = create_user 'git_user1'
+ @user2 = create_user 'git_user2'
end
# There is an isolation issue in tests.
@@ -104,7 +119,7 @@ def test_user
end
it 'has a fingerprint' do
- expect(ssh_key.fingerprint).to eq "SHA256:VgXjWgUbURtD6go5HV7Eop2UqVjmIAI68shaB66yv+c"
+ expect(ssh_key.fingerprint).to eq 'SHA256:VgXjWgUbURtD6go5HV7Eop2UqVjmIAI68shaB66yv+c'
end
it 'has a owner' do
@@ -172,9 +187,17 @@ def test_user
describe 'Valid SSH key format' do
describe 'when ssh key format is valid' do
ssh_keys = [
- 'ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQC/Ec2gummukPxlpPHZ7K96iBdG5n8v0PJEDvTVZRRFlS0QYa407gj9HuMrPjwEfVHqy+3KZmvKLWQBsSlf0Fn+eAPgnoqwVfZaJnfgkSxJiAzRraKQZX1m2wx2SVMfjw7/1j59zV60UhFiwEQ3Eqlg3xjQmjvrwDM+SoshrWB+TeqwO/K+QEP1ZbURYoCxc92GrLYWKixsAov/zr0loXqul9fydZcWwJE3H/BWC7PTtn4jfjG9+9F+SZ0OMwQvSGKhVlj3GBDtaDBnsuoHGh/CA2W240nwpQysG2BJ5DWXu6vKbjNn6uV91wXeKDEDpuWqv5Vi2XAxGTWKc5lF0IJ5 nicolas@tchoum',
- 'ssh-dss AAAAB3NzaC1kc3MAAACBAKscxrmjRgXtb0ZUaaBUteBtF2cI0vStnni9KVQd94L8qqxvKLbDl5JTKjUvG2s7rD4sVRzBoTkuDGb7OZLf56wJyF3k+k8uNRJzvH/CZbkKM2hjuRVYVort1EwcH7JiEQr7bCLe7MRaltuo/M1vhapwy7fhKxAo9YoYVWiGoFTVAAAAFQDPywT8yFDahFvxtt/95Q9Emq8R7QAAAIBHYnvt3hT9NYy+nOuZG+cQTz0hnVzUIWuj0XF2iyx52s2eSmF0HxIsZ0D9g2A0L1Xr/vlkWBMq/zJZJgJw2Ifys8L47HzjhL8K0Skdm23Z6rQR9hlOEZ5Rcank98U6VRYPWpYk7OLdRDruwXb+Ms5YhIztxsGO3YfRBdSBrW4DMAAAAIAJmmwivw3XoFP6C97LB+tJAjWRYJHpiDwOWNDKu0dZewUzUAo40NuHNgKJS2nsxW0sphaeMtf70IbvDsFQG45I+G2dlt+s19t4YCbVcz7xrw7LceEz+f0UR2/Z+LIK2GPIIoyymOq/kIIxni3xgKDl4mvvt45TTsQzs0zhkmEy/g== nicolas@tchoum',
- 'ecdsa-sha2-nistp256 AAAAE2VjZHNhLXNoYTItbmlzdHAyNTYAAAAIbmlzdHAyNTYAAABBBLIcYw8NbJc28tDsC+8sf/o14hQmQfdC31OFP0eb5qFVRgEjMJ9mwolqWIW+AcbIAhX2GJVdTLZoUJj6T5PiUtM= nicolas@tchoum'
+ 'ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQC/Ec2gummukPxlpPHZ7K96iBdG5n8v0PJEDvTVZRRFlS0QYa407gj9HuMrPjwEfVHqy+3KZmvKLWQBsSlf0Fn+eAPg' \
+ 'noqwVfZaJnfgkSxJiAzRraKQZX1m2wx2SVMfjw7/1j59zV60UhFiwEQ3Eqlg3xjQmjvrwDM+SoshrWB+TeqwO/K+QEP1ZbURYoCxc92GrLYWKixsAov/zr0loXqul9fy' \
+ 'dZcWwJE3H/BWC7PTtn4jfjG9+9F+SZ0OMwQvSGKhVlj3GBDtaDBnsuoHGh/CA2W240nwpQysG2BJ5DWXu6vKbjNn6uV91wXeKDEDpuWqv5Vi2XAxGTWKc5lF0IJ5' \
+ ' nicolas@tchoum',
+ 'ssh-dss AAAAB3NzaC1kc3MAAACBAKscxrmjRgXtb0ZUaaBUteBtF2cI0vStnni9KVQd94L8qqxvKLbDl5JTKjUvG2s7rD4sVRzBoTkuDGb7OZLf56wJyF3k+k8uNRJz' \
+ 'vH/CZbkKM2hjuRVYVort1EwcH7JiEQr7bCLe7MRaltuo/M1vhapwy7fhKxAo9YoYVWiGoFTVAAAAFQDPywT8yFDahFvxtt/95Q9Emq8R7QAAAIBHYnvt3hT9NYy+nOuZ' \
+ 'G+cQTz0hnVzUIWuj0XF2iyx52s2eSmF0HxIsZ0D9g2A0L1Xr/vlkWBMq/zJZJgJw2Ifys8L47HzjhL8K0Skdm23Z6rQR9hlOEZ5Rcank98U6VRYPWpYk7OLdRDruwXb+' \
+ 'Ms5YhIztxsGO3YfRBdSBrW4DMAAAAIAJmmwivw3XoFP6C97LB+tJAjWRYJHpiDwOWNDKu0dZewUzUAo40NuHNgKJS2nsxW0sphaeMtf70IbvDsFQG45I+G2dlt+s19t4' \
+ 'YCbVcz7xrw7LceEz+f0UR2/Z+LIK2GPIIoyymOq/kIIxni3xgKDl4mvvt45TTsQzs0zhkmEy/g== nicolas@tchoum',
+ 'ecdsa-sha2-nistp256 AAAAE2VjZHNhLXNoYTItbmlzdHAyNTYAAAAIbmlzdHAyNTYAAABBBLIcYw8NbJc28tDsC+8sf/o14hQmQfdC31OFP0eb5qFVRgEjMJ9mwolq' \
+ 'WIW+AcbIAhX2GJVdTLZoUJj6T5PiUtM= nicolas@tchoum'
]
ssh_keys.each do |valid_key|
@@ -185,7 +208,6 @@ def test_user
end
end
-
context 'when SSH key already exist' do
before { create_ssh_key(user_id: @user1.id, title: 'test-key2') }
@@ -223,7 +245,9 @@ def test_user
context 'when Gitolite Admin ssh key is reused' do
it 'should not be valid' do
- expect(build_ssh_key(user_id: @user1.id, title: 'foo', key: File.read(RedmineGitHosting::Config.gitolite_ssh_public_key))).not_to be_valid
+ expect(build_ssh_key(user_id: @user1.id,
+ title: 'foo',
+ key: File.read(RedmineGitHosting::Config.gitolite_ssh_public_key))).not_to be_valid
end
end
diff --git a/spec/models/project_spec.rb b/spec/models/project_spec.rb
index c6b6a708f38..c52be6cbd0f 100644
--- a/spec/models/project_spec.rb
+++ b/spec/models/project_spec.rb
@@ -1,7 +1,6 @@
-require File.expand_path(File.dirname(__FILE__) + '/../spec_helper')
+require File.expand_path "#{File.dirname __FILE__}/../spec_helper"
describe Project do
-
before(:all) do
@project = create(:project)
@git_repo_1 = create_git_repository(project: @project, is_default: true)
@@ -34,5 +33,4 @@
it 'should not match Gitolite Admin repository identifier' do
expect(build(:project, identifier: 'gitolite-admin')).to be_invalid
end
-
end
diff --git a/spec/models/repository_deployment_credential_spec.rb b/spec/models/repository_deployment_credential_spec.rb
index c85f5c95aa7..d25b82b85b4 100644
--- a/spec/models/repository_deployment_credential_spec.rb
+++ b/spec/models/repository_deployment_credential_spec.rb
@@ -1,9 +1,14 @@
-require File.expand_path(File.dirname(__FILE__) + '/../spec_helper')
+require File.expand_path "#{File.dirname __FILE__}/../spec_helper"
describe RepositoryDeploymentCredential do
-
- DEPLOY_KEY = 'ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQCz0pLXcQWS4gLUimUSLwDOvEmQF8l8EKoj0LjxOyM3y2dpLsn0aiqS0ecA0G/ROomaawop8EZGFetoJKJM468OZlx2aKoQemzvFIq0Mn1ZhcrlA1alAsDYqzZI8iHO4JIS3YbeLLkVGAlYA+bmA5enXN9mGhC9cgoMC79EZiLD9XvOw4iXDjqXaCzFZHU1shMWwaJfpyxBm+Mxs2vtZzwETDqeu9rohNMl60dODf6+JoXYiahP+B+P2iKlL7ORb1YsAH/4ZMsVgRckj8snb4uc3XgwLRNNw+oB78ApZGr0j3Zc32U9rpmulbHIroWO07OV4Xsplnu8lhGvfodA2gjb nicolas@tchoum'
- USER_KEY = 'ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQC5+JfM82k03J98GWL6ghJ4TYM8DbvDnVh1s1rUDNlM/1U5rwbgXHOR4xV3lulgYEYRtYeMoL3rt4ZpEyXWkOreOVsUlkW66SZJR5aGVTNJOLX7HruEDqj7RWlt0u0MH6DgBVAJimQrxYN50jYD4XnDUjb/qv55EhPvbJ3jcAb3zuyRXMKZYGNVzVFLUagbvVaOwR23csWSLDTsAEI9JzaxMKvCNRwk3jFepiCovXbw+g0iyvJdp0+AJpC57ZupyxHeX9J2oz7im2UaHHqLa2qUZL6c4PNV/D2p0Bts4Tcnn3OFPL90RF/ao0tjiUFxM3ti8pRHOqRcZHcOgIhKiaLX nicolas@tchoum'
+ DEPLOY_KEY = 'ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQCz0pLXcQWS4gLUimUSLwDOvEmQF8l8EKoj0LjxOyM3y2dpLsn0aiqS0ecA0G/ROomaawop8EZGFetoJKJM4' \
+ '68OZlx2aKoQemzvFIq0Mn1ZhcrlA1alAsDYqzZI8iHO4JIS3YbeLLkVGAlYA+bmA5enXN9mGhC9cgoMC79EZiLD9XvOw4iXDjqXaCzFZHU1shMWwaJfpyxBm+' \
+ 'Mxs2vtZzwETDqeu9rohNMl60dODf6+JoXYiahP+B+P2iKlL7ORb1YsAH/4ZMsVgRckj8snb4uc3XgwLRNNw+oB78ApZGr0j3Zc32U9rpmulbHIroWO07OV4Xs' \
+ 'plnu8lhGvfodA2gjb nicolas@tchoum'
+ USER_KEY = 'ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQC5+JfM82k03J98GWL6ghJ4TYM8DbvDnVh1s1rUDNlM/1U5rwbgXHOR4xV3lulgYEYRtYeMoL3rt4ZpEyXWk' \
+ 'OreOVsUlkW66SZJR5aGVTNJOLX7HruEDqj7RWlt0u0MH6DgBVAJimQrxYN50jYD4XnDUjb/qv55EhPvbJ3jcAb3zuyRXMKZYGNVzVFLUagbvVaOwR23csWSLD' \
+ 'TsAEI9JzaxMKvCNRwk3jFepiCovXbw+g0iyvJdp0+AJpC57ZupyxHeX9J2oz7im2UaHHqLa2qUZL6c4PNV/D2p0Bts4Tcnn3OFPL90RF/ao0tjiUFxM3ti8pR' \
+ 'HOqRcZHcOgIhKiaLX nicolas@tchoum'
before(:all) do
users = create_list(:user, 2)
@@ -14,12 +19,10 @@
@user_key = create(:gitolite_public_key, user: @user1, key_type: 0, title: 'foo2', key: USER_KEY)
end
-
def build_deployment_credential(opts = {})
build(:repository_deployment_credential, opts)
end
-
describe 'Valid RepositoryDeploymentCredential creation' do
before(:each) do
@deployment_credential = build_deployment_credential(user: @user1, gitolite_public_key: @deploy_key)
@@ -40,7 +43,7 @@ def build_deployment_credential(opts = {})
it { should validate_presence_of(:user_id) }
it { should validate_presence_of(:perm) }
- it { should validate_inclusion_of(:perm).in_array(%w(R RW+)) }
+ it { should validate_inclusion_of(:perm).in_array(%w[R RW+]) }
## Attributes content
it 'is a active credential' do
@@ -66,5 +69,4 @@ def build_deployment_credential(opts = {})
expect(build_deployment_credential(user: @user2, gitolite_public_key: @user_key)).not_to be_valid
end
end
-
end
diff --git a/spec/models/repository_git_config_key/option_spec.rb b/spec/models/repository_git_config_key/option_spec.rb
index 49ee1f66e9e..22fa2328ae9 100644
--- a/spec/models/repository_git_config_key/option_spec.rb
+++ b/spec/models/repository_git_config_key/option_spec.rb
@@ -13,7 +13,6 @@
it { should validate_uniqueness_of(:key).scoped_to(:repository_id) }
it { should allow_value('hookfoo', 'hookfoo.foo', 'hookfoo.foo.bar').for(:key) }
-
context 'when key is updated' do
before do
@git_config_key.save
diff --git a/spec/models/repository_git_config_key_spec.rb b/spec/models/repository_git_config_key_spec.rb
index 0c77d1b0c4e..0c0abb81824 100644
--- a/spec/models/repository_git_config_key_spec.rb
+++ b/spec/models/repository_git_config_key_spec.rb
@@ -1,7 +1,6 @@
-require File.expand_path(File.dirname(__FILE__) + '/../spec_helper')
+require File.expand_path "#{File.dirname __FILE__}/../spec_helper"
describe RepositoryGitConfigKey do
-
let(:git_config_key) { build(:repository_git_config_key_base) }
subject { git_config_key }
diff --git a/spec/models/repository_git_extra_spec.rb b/spec/models/repository_git_extra_spec.rb
index de9f35bce31..54e3a94b53a 100644
--- a/spec/models/repository_git_extra_spec.rb
+++ b/spec/models/repository_git_extra_spec.rb
@@ -1,7 +1,6 @@
-require File.expand_path(File.dirname(__FILE__) + '/../spec_helper')
+require File.expand_path "#{File.dirname __FILE__}/../spec_helper"
describe RepositoryGitExtra do
-
let(:git_extra) { build(:repository_git_extra) }
subject { git_extra }
@@ -21,7 +20,6 @@
## Serializations
# it { should serialize(:urls_order) }
-
describe '#git_daemon' do
it 'should return the value for git_daemon' do
expect(git_extra.git_daemon).to be true
@@ -72,7 +70,7 @@
describe '#key' do
it 'should return the value for key' do
- expect(git_extra.key).to match /\A[a-zA-Z0-9]+\z/
+ expect(git_extra.key).to match(/\A[a-zA-Z0-9]+\z/)
end
end
end
diff --git a/spec/models/repository_mirror_spec.rb b/spec/models/repository_mirror_spec.rb
index 29a56a6d33c..d4e585b00b7 100644
--- a/spec/models/repository_mirror_spec.rb
+++ b/spec/models/repository_mirror_spec.rb
@@ -1,7 +1,6 @@
-require File.expand_path(File.dirname(__FILE__) + '/../spec_helper')
+require File.expand_path "#{File.dirname __FILE__}/../spec_helper"
describe RepositoryMirror do
-
VALID_URLS = [
'ssh://user@host.xz:2222/path/to/repo.git',
'ssh://user@host.xz/path/to/repo.git',
@@ -17,22 +16,18 @@
'ssh://host.xz/~/path.to/repo.git'
]
-
def build_mirror(opts = {})
build(:repository_mirror, opts)
end
-
def expect_invalid_refspec(refspec)
expect(build_mirror(push_mode: 1, explicit_refspec: refspec)).not_to be_valid
end
-
def expect_valid_refspec(refspec)
expect(build_mirror(push_mode: 1, explicit_refspec: refspec)).to be_valid
end
-
describe 'Valid RepositoryMirror creation' do
before(:each) do
@mirror = build(:repository_mirror)
@@ -105,10 +100,8 @@ def expect_valid_refspec(refspec)
expect_valid_refspec '+devel:devel/*'
end
end
-
end
-
describe 'Invalid Mirror creation' do
## Test presence conflicts
it 'is invalid when include_all_branches && include_all_tags' do
@@ -149,7 +142,6 @@ def expect_valid_refspec(refspec)
end
end
-
context 'when many mirror are saved' do
before do
create(:repository_mirror, active: true)
@@ -161,5 +153,4 @@ def expect_valid_refspec(refspec)
it { expect(RepositoryMirror.active.length).to be == 3 }
it { expect(RepositoryMirror.inactive.length).to be == 2 }
end
-
end
diff --git a/spec/models/repository_post_receive_url_spec.rb b/spec/models/repository_post_receive_url_spec.rb
index c8da1173b52..50a7c601426 100644
--- a/spec/models/repository_post_receive_url_spec.rb
+++ b/spec/models/repository_post_receive_url_spec.rb
@@ -1,7 +1,6 @@
-require File.expand_path(File.dirname(__FILE__) + '/../spec_helper')
+require File.expand_path "#{File.dirname __FILE__}/../spec_helper"
describe RepositoryPostReceiveUrl do
-
let(:post_receive_url) { build(:repository_post_receive_url) }
subject { post_receive_url }
@@ -18,7 +17,7 @@
it { should validate_uniqueness_of(:url).scoped_to(:repository_id) }
- it { should validate_inclusion_of(:mode).in_array([:github, :get]) }
+ it { should validate_inclusion_of(:mode).in_array(%i[github get]) }
it { should allow_value('http://foo.com', 'https://bar.com/baz').for(:url) }
@@ -32,7 +31,6 @@
it { expect(post_receive_url.triggers).to be_a(Array) }
it { expect(post_receive_url.split_payloads).to be false }
-
# describe '.active' do
# it 'should return an array of active post_receive_urls' do
# expect(RepositoryPostReceiveUrl).to receive(:where).with(active: true)
@@ -40,12 +38,10 @@
# end
# end
-
# describe '.inactive' do
# it 'should return an array of inactive post_receive_urls' do
# expect(RepositoryPostReceiveUrl).to receive(:where).with(active: false)
# RepositoryPostReceiveUrl.inactive
# end
# end
-
end
diff --git a/spec/models/repository_protected_branche_spec.rb b/spec/models/repository_protected_branche_spec.rb
index f273ff0dcb7..5cbe667e3be 100644
--- a/spec/models/repository_protected_branche_spec.rb
+++ b/spec/models/repository_protected_branche_spec.rb
@@ -1,7 +1,6 @@
-require File.expand_path(File.dirname(__FILE__) + '/../spec_helper')
+require File.expand_path "#{File.dirname __FILE__}/../spec_helper"
describe RepositoryProtectedBranche do
-
let(:protected_branch) { build(:repository_protected_branche) }
subject { protected_branch }
@@ -18,7 +17,7 @@
it { should validate_presence_of(:path) }
it { should validate_presence_of(:permissions) }
- it { should validate_uniqueness_of(:path).scoped_to([:permissions, :repository_id]) }
+ it { should validate_uniqueness_of(:path).scoped_to(%i[permissions repository_id]) }
it { should validate_inclusion_of(:permissions).in_array RepositoryProtectedBranche::VALID_PERMS }
@@ -48,5 +47,4 @@
expect(protected_branch.allowed_users).to eq [user1.gitolite_identifier, user2.gitolite_identifier]
end
end
-
end
diff --git a/spec/models/repository_xitolite_spec.rb b/spec/models/repository_xitolite_spec.rb
index da206035057..85601f16930 100644
--- a/spec/models/repository_xitolite_spec.rb
+++ b/spec/models/repository_xitolite_spec.rb
@@ -1,8 +1,7 @@
-require File.expand_path(File.dirname(__FILE__) + '/../spec_helper')
+require File.expand_path "#{File.dirname __FILE__}/../spec_helper"
describe Repository::Xitolite do
-
- GIT_USER = 'git'
+ GIT_USER = 'git'.freeze
before(:all) do
Setting.plugin_redmine_git_hosting[:gitolite_redmine_storage_dir] = 'redmine/'
@@ -13,7 +12,6 @@
@project_child = FactoryBot.create(:project, identifier: 'project-child', parent_id: @project_parent.id, is_public: false)
end
-
describe 'common_tests : fast tests' do
before(:each) do
Setting.plugin_redmine_git_hosting[:hierarchical_organisation] = 'true'
@@ -41,7 +39,7 @@
it { expect(@repository_1.report_last_commit).to be true }
it { expect(@repository_1.extra_report_last_commit).to be true }
it { expect(@repository_1.git_default_branch).to eq 'master' }
- it { expect(@repository_1.gitolite_hook_key).to match /\A[a-zA-Z0-9]+\z/ }
+ it { expect(@repository_1.gitolite_hook_key).to match(/\A[a-zA-Z0-9]+\z/) }
it { expect(@repository_1.git_daemon_enabled?).to be true }
it { expect(@repository_1.git_annex_enabled?).to be false }
it { expect(@repository_1.git_notification_enabled?).to be true }
@@ -55,12 +53,10 @@
it { expect(@repository_1.public_repo?).to be false }
it { expect(@repository_1.urls_order).to eq [] }
-
it 'should not allow identifier gitolite-admin' do
expect(build_git_repository(project: @project_parent, identifier: 'gitolite-admin')).to be_invalid
end
-
describe '#exists_in_gitolite?' do
it 'should check if repository exists on Gitolite side' do
expect(RedmineGitHosting::Commands).to receive(:sudo_dir_exists?).with('repositories/redmine/project-parent/project-child.git')
@@ -70,26 +66,30 @@
describe '#empty_in_gitolite?' do
it 'should check if repository is empty on Gitolite side' do
- expect(RedmineGitHosting::Commands).to receive(:sudo_repository_empty?).with('repositories/redmine/project-parent/project-child.git')
+ expect(RedmineGitHosting::Commands).to receive(:sudo_repository_empty?)
+ .with('repositories/redmine/project-parent/project-child.git')
@repository_1.empty_in_gitolite?
end
end
describe '#git_objects_count' do
it 'should return repository objects count' do
- expect(RedmineGitHosting::Commands).to receive(:sudo_git_objects_count).with('repositories/redmine/project-parent/project-child.git/objects')
+ expect(RedmineGitHosting::Commands).to receive(:sudo_git_objects_count)
+ .with('repositories/redmine/project-parent/project-child.git/objects')
@repository_1.git_objects_count
end
end
describe '#data_for_destruction' do
it 'should return a hash of data' do
- expect(@repository_1.data_for_destruction).to eq({
- delete_repository: true,
- git_cache_id: 'project-child',
- repo_name: 'redmine/project-parent/project-child',
- repo_path: '/home/git/repositories/redmine/project-parent/project-child.git',
- })
+ expect(@repository_1.data_for_destruction).to eq(
+ {
+ delete_repository: true,
+ git_cache_id: 'project-child',
+ repo_name: 'redmine/project-parent/project-child',
+ repo_path: "#{HOME_BASE_DIR}/git/repositories/redmine/project-parent/project-child.git"
+ }
+ )
end
end
@@ -122,11 +122,11 @@
context 'with all options' do
my_hash = {
- ssh: { url: "ssh://#{GIT_USER}@localhost/redmine/project-parent/project-child.git", committer: 'true' },
+ ssh: { url: "ssh://#{GIT_USER}@localhost/redmine/project-parent/project-child.git", committer: 'true' },
https: { url: 'https://redmine-test-user@localhost/git/project-parent/project-child.git', committer: 'true' },
- http: { url: 'http://redmine-test-user@localhost/git/project-parent/project-child.git', committer: 'false' },
- go: { url: 'localhost/go/project-parent/project-child', committer: 'false' },
- git: { url: 'git://localhost/redmine/project-parent/project-child.git', committer: 'false' }
+ http: { url: 'http://redmine-test-user@localhost/git/project-parent/project-child.git', committer: 'false' },
+ go: { url: 'localhost/go/project-parent/project-child', committer: 'false' },
+ git: { url: 'git://localhost/redmine/project-parent/project-child.git', committer: 'false' }
}
it 'should return a Hash of Git url' do
@@ -210,7 +210,7 @@
context 'with http and https' do
my_hash = {
https: { url: 'https://localhost/git/project-parent/project-child.git', committer: 'false' },
- http: { url: 'http://localhost/git/project-parent/project-child.git', committer: 'false' }
+ http: { url: 'http://localhost/git/project-parent/project-child.git', committer: 'false' }
}
it 'should return a Hash of Git url' do
@@ -227,7 +227,6 @@
end
end
-
describe 'Repository::Xitolite class' do
it { expect(Repository::Xitolite).to respond_to(:repo_ident_unique?) }
it { expect(Repository::Xitolite).to respond_to(:have_duplicated_identifier?) }
@@ -236,7 +235,6 @@
end
end
-
describe 'common_tests : long tests' do
before do
Setting.plugin_redmine_git_hosting[:hierarchical_organisation] = 'true'
@@ -249,7 +247,7 @@
@repository_2 = create_git_repository(project: @project_child, identifier: 'repo-test')
end
- context 'when blank identifier' do
+ context 'when blank identifier' do
it 'should not allow identifier changes' do
@repository_1.identifier = 'new_repo'
expect(@repository_1).to be_invalid
@@ -265,7 +263,6 @@
end
end
-
describe 'Test uniqueness' do
context 'when blank identifier is already taken by a repository' do
it { expect(build_git_repository(project: @project_child, identifier: '')).to be_invalid }
diff --git a/spec/models/setting_spec.rb b/spec/models/setting_spec.rb
index 8ab55f91a0c..39512f246aa 100644
--- a/spec/models/setting_spec.rb
+++ b/spec/models/setting_spec.rb
@@ -1,4 +1,4 @@
-require File.expand_path(File.dirname(__FILE__) + '/../spec_helper')
+require File.expand_path "#{File.dirname __FILE__}/../spec_helper"
describe Setting do
before do
diff --git a/spec/root_spec_helper.rb b/spec/root_spec_helper.rb
index 84079beb4b7..428e068b6b6 100644
--- a/spec/root_spec_helper.rb
+++ b/spec/root_spec_helper.rb
@@ -1,4 +1,4 @@
-unless ENV['DISABLE_COVERAGE'] == 'true'
+if ENV['COVERAGE']
require 'simplecov'
## Start Simplecov
@@ -7,9 +7,13 @@
end
end
+unless defined? 'HOME_BASE_DIR'
+ HOME_BASE_DIR = RUBY_PLATFORM.include?('darwin') ? '/Users' : '/home'
+end
+
## Load Redmine App
ENV['RAILS_ENV'] = 'test'
-require File.expand_path(File.dirname(__FILE__) + '/../config/environment')
+require File.expand_path "#{File.dirname __FILE__}/../config/environment"
require 'rspec/rails'
## Load FactoryBots factories
diff --git a/spec/services/redmine_hooks/call_webservices_spec.rb b/spec/services/redmine_hooks/call_webservices_spec.rb
index 7d800195f21..19605dcdf31 100644
--- a/spec/services/redmine_hooks/call_webservices_spec.rb
+++ b/spec/services/redmine_hooks/call_webservices_spec.rb
@@ -1,18 +1,15 @@
require File.expand_path(File.dirname(__FILE__) + '/../../spec_helper')
describe RedmineHooks::CallWebservices do
-
let(:global_payload) { load_yaml_fixture('global_payload.yml') }
let(:master_payload) { load_yaml_fixture('master_payload.yml') }
let(:branches_payload) { load_yaml_fixture('branches_payload.yml') }
-
def build_web_hook(payload, opts = {})
post_receive_url = build(:repository_post_receive_url, opts)
RedmineHooks::CallWebservices.new(post_receive_url, payload)
end
-
describe '#needs_push' do
context 'when payload is empty' do
it 'shoud return false' do
@@ -52,5 +49,4 @@ def build_web_hook(payload, opts = {})
end
end
end
-
end
diff --git a/spec/spec_helper.rb b/spec/spec_helper.rb
index 37f6ab8a916..353eaa52521 100644
--- a/spec/spec_helper.rb
+++ b/spec/spec_helper.rb
@@ -1,14 +1,14 @@
-require File.expand_path(File.dirname(__FILE__) + '/../../../spec/spec_helper')
+require File.expand_path "#{File.dirname __FILE__}/../../../spec/spec_helper"
+
+HOME_BASE_DIR = RUBY_PLATFORM.include?('darwin') ? '/Users' : '/home'
## Configure RSpec
RSpec.configure do |config|
-
# Include our helpers from support directory
config.include GlobalHelpers
config.before(:suite) do
RedmineGitHosting::Config.reload_from_file!
- Setting.enabled_scm = ['Git', 'Subversion', 'Xitolite']
+ Setting.enabled_scm = %w[Git Subversion Xitolite]
end
-
end
diff --git a/spec/support/crud_controller_spec/base.rb b/spec/support/crud_controller_spec/base.rb
index eb1ead9e43e..20e48145aea 100644
--- a/spec/support/crud_controller_spec/base.rb
+++ b/spec/support/crud_controller_spec/base.rb
@@ -6,212 +6,226 @@ module Base
include CrudControllerSpec::Helpers
before(:all) do
- @project = create_project('git_project')
- @repository = find_or_create_git_repository(project: @project, identifier: 'git_repository')
- @repository2 = find_or_create_git_repository(project: @project, identifier: 'git_repository2')
- @member_user = create_user_with_permissions(@project, member_user_options)
+ @project = create_project 'git_project'
+ @repository = find_or_create_git_repository project: @project, identifier: 'git_repository'
+ @repository2 = find_or_create_git_repository project: @project, identifier: 'git_repository2'
+ @member_user = create_user_with_permissions @project, member_user_options
@anonymous_user = create_anonymous_user
@object = create_object
end
- describe 'GET #index' do
- context 'with sufficient permissions' do
- before(:each) { set_session_user(@member_user) }
+ unless respond_to?(:skip_actions) && skip_actions.include?('index')
+ describe 'GET #index' do
+ context 'with sufficient permissions' do
+ before(:each) { set_session_user(@member_user) }
- it 'renders the :index view' do
- check_index_template
+ it 'renders the :index view' do
+ check_index_template
+ end
end
- end
- context 'with unsufficient permissions' do
- it 'renders 403' do
- set_session_user(@anonymous_user)
- check_index_status(403)
+ context 'with unsufficient permissions' do
+ it 'renders 403' do
+ set_session_user @anonymous_user
+ check_index_status 403
+ end
end
end
- end unless respond_to?(:skip_actions) && skip_actions.include?('index')
+ end
- describe 'GET #show' do
- before { Setting.rest_api_enabled = 1 }
+ unless respond_to?(:skip_actions) && skip_actions.include?('show')
+ describe 'GET #show' do
+ before { Setting.rest_api_enabled = 1 }
- context 'with sufficient permissions' do
- it 'renders 200' do
- check_api_response(200, id: @object.id, key: @member_user.api_key)
+ context 'with sufficient permissions' do
+ it 'renders 200' do
+ check_api_response 200, id: @object.id, key: @member_user.api_key
+ end
end
- end
- context 'with unsufficient permissions' do
- it 'renders 403' do
- check_api_response(403, id: @object.id, key: @anonymous_user.api_key)
+ context 'with unsufficient permissions' do
+ it 'renders 403' do
+ check_api_response 403, id: @object.id, key: @anonymous_user.api_key
+ end
end
end
- end unless respond_to?(:skip_actions) && skip_actions.include?('show')
+ end
- describe 'GET #new' do
- context 'with sufficient permissions' do
- before(:each) { set_session_user(@member_user) }
+ unless respond_to?(:skip_actions) && skip_actions.include?('new')
+ describe 'GET #new' do
+ context 'with sufficient permissions' do
+ before(:each) { set_session_user(@member_user) }
- it 'assigns a new @object variable' do
- check_new_variable(main_variable, tested_klass)
- end
+ it 'assigns a new @object variable' do
+ check_new_variable main_variable, tested_klass
+ end
- it 'renders the :new template' do
- check_new_template
+ it 'renders the :new template' do
+ check_new_template
+ end
end
- end
- context 'with unsufficient permissions' do
- it 'renders 403' do
- set_session_user(@anonymous_user)
- check_new_status(403)
+ context 'with unsufficient permissions' do
+ it 'renders 403' do
+ set_session_user @anonymous_user
+ check_new_status 403
+ end
end
end
- end unless respond_to?(:skip_actions) && skip_actions.include?('new')
-
- describe 'POST #create' do
- context 'with sufficient permissions' do
- before(:each) do
- set_session_user(@member_user)
- allow(controller).to receive(:call_use_case)
- end
+ end
- context 'with valid attributes' do
- it 'saves the new object in the database' do
- check_counter_incremented_on_create(tested_klass, valid_params_for_create)
+ unless respond_to?(:skip_actions) && skip_actions.include?('create')
+ describe 'POST #create' do
+ context 'with sufficient permissions' do
+ before(:each) do
+ set_session_user @member_user
+ allow(controller).to receive(:call_use_case)
end
- it 'redirects to the repository page' do
- check_create_status(200, valid_params_for_create)
- end
- end
+ context 'with valid attributes' do
+ it 'saves the new object in the database' do
+ check_counter_incremented_on_create tested_klass, valid_params_for_create
+ end
- context 'with invalid attributes' do
- it 'does not save the new object in the database' do
- check_counter_not_changed_on_create(tested_klass, invalid_params_for_create)
+ it 'redirects to the repository page' do
+ check_create_status 200, valid_params_for_create
+ end
end
- it 're-renders the :new template' do
- check_create_template(:create, invalid_params_for_create)
+ context 'with invalid attributes' do
+ it 'does not save the new object in the database' do
+ check_counter_not_changed_on_create tested_klass, invalid_params_for_create
+ end
+
+ it 're-renders the :new template' do
+ check_create_template :create, invalid_params_for_create
+ end
end
end
- end
- context 'with unsufficient permissions' do
- it 'renders 403' do
- set_session_user(@anonymous_user)
- check_create_status(403, valid_params_for_create)
+ context 'with unsufficient permissions' do
+ it 'renders 403' do
+ set_session_user @anonymous_user
+ check_create_status 403, valid_params_for_create
+ end
end
end
- end unless respond_to?(:skip_actions) && skip_actions.include?('create')
+ end
- describe 'GET #edit' do
- context 'with sufficient permissions' do
- before(:each) { set_session_user(@member_user) }
+ unless respond_to?(:skip_actions) && skip_actions.include?('edit')
+ describe 'GET #edit' do
+ context 'with sufficient permissions' do
+ before(:each) { set_session_user(@member_user) }
- context 'with existing object' do
- it 'assigns the requested object to @object' do
- check_edit_variable(main_variable, @object, id: @object.id)
- end
+ context 'with existing object' do
+ it 'assigns the requested object to @object' do
+ check_edit_variable main_variable, @object, id: @object.id
+ end
- it 'renders the :edit template' do
- check_edit_template(id: @object.id)
+ it 'renders the :edit template' do
+ check_edit_template id: @object.id
+ end
end
- end
- context 'with non-existing object' do
- it 'renders 404' do
- check_edit_status(404, id: 100)
+ context 'with non-existing object' do
+ it 'renders 404' do
+ check_edit_status 404, id: 100
+ end
end
- end
- context 'with non-matching repository' do
- it 'renders 404' do
- check_edit_status(404, repository_id: @repository2.id, id: @object.id)
+ context 'with non-matching repository' do
+ it 'renders 404' do
+ check_edit_status 404, repository_id: @repository2.id, id: @object.id
+ end
end
- end
- context 'with non-existing repository' do
- it 'renders 404' do
- check_edit_status(404, repository_id: 345, id: @object.id)
+ context 'with non-existing repository' do
+ it 'renders 404' do
+ check_edit_status 404, repository_id: 345, id: @object.id
+ end
end
end
- end
- context 'with unsufficient permissions' do
- it 'renders 403' do
- set_session_user(@anonymous_user)
- check_edit_status(403, id: @object.id)
+ context 'with unsufficient permissions' do
+ it 'renders 403' do
+ set_session_user @anonymous_user
+ check_edit_status 403, id: @object.id
+ end
end
end
- end unless respond_to?(:skip_actions) && skip_actions.include?('edit')
-
- describe 'PUT #update' do
- context 'with sufficient permissions' do
- before(:each) do
- set_session_user(@member_user)
- allow(controller).to receive(:call_use_case)
- end
+ end
- context 'with valid attributes' do
- it 'located the requested @object' do
- check_update_variable(main_variable, @object, valid_params_for_update)
+ unless respond_to?(:skip_actions) && skip_actions.include?('update')
+ describe 'PUT #update' do
+ context 'with sufficient permissions' do
+ before(:each) do
+ set_session_user @member_user
+ allow(controller).to receive(:call_use_case)
end
- it 'changes @object attributes' do
- check_attribute_has_changed(updated_attribute, updated_attribute_value, valid_params_for_update)
- end
+ context 'with valid attributes' do
+ it 'located the requested @object' do
+ check_update_variable main_variable, @object, valid_params_for_update
+ end
- it 'redirects to the repository page' do
- check_update_status(200, valid_params_for_update)
- end
- end
+ it 'changes @object attributes' do
+ check_attribute_has_changed updated_attribute, updated_attribute_value, valid_params_for_update
+ end
- context 'with invalid attributes' do
- it 'located the requested @object' do
- check_update_variable(main_variable, @object, invalid_params_for_update)
+ it 'redirects to the repository page' do
+ check_update_status 200, valid_params_for_update
+ end
end
- it 'does not change @object attributes' do
- check_attribute_has_not_changed(updated_attribute, invalid_params_for_update)
- end
+ context 'with invalid attributes' do
+ it 'located the requested @object' do
+ check_update_variable main_variable, @object, invalid_params_for_update
+ end
+
+ it 'does not change @object attributes' do
+ check_attribute_has_not_changed updated_attribute, invalid_params_for_update
+ end
- it 're-renders the :edit template' do
- check_update_template(invalid_params_for_update)
+ it 're-renders the :edit template' do
+ check_update_template invalid_params_for_update
+ end
end
end
- end
- context 'with unsufficient permissions' do
- it 'renders 403' do
- set_session_user(@anonymous_user)
- check_update_status(403, valid_params_for_update)
+ context 'with unsufficient permissions' do
+ it 'renders 403' do
+ set_session_user @anonymous_user
+ check_update_status 403, valid_params_for_update
+ end
end
end
- end unless respond_to?(:skip_actions) && skip_actions.include?('update')
+ end
- describe 'DELETE #destroy' do
- context 'with sufficient permissions' do
- before(:each) do
- set_session_user(@member_user)
- allow(controller).to receive(:call_use_case)
- end
+ unless respond_to?(:skip_actions) && skip_actions.include?('destroy')
+ describe 'DELETE #destroy' do
+ context 'with sufficient permissions' do
+ before(:each) do
+ set_session_user @member_user
+ allow(controller).to receive(:call_use_case)
+ end
- it 'deletes the object' do
- check_counter_decremented_on_delete(tested_klass, id: create_object.id)
- end
+ it 'deletes the object' do
+ check_counter_decremented_on_delete tested_klass, id: create_object.id
+ end
- it 'redirects to repositories#edit' do
- check_delete_status(200, id: create_object.id)
+ it 'redirects to repositories#edit' do
+ check_delete_status 200, id: create_object.id
+ end
end
- end
- context 'with unsufficient permissions' do
- it 'renders 403' do
- set_session_user(@anonymous_user)
- check_delete_status(403, id: create_object.id)
+ context 'with unsufficient permissions' do
+ it 'renders 403' do
+ set_session_user @anonymous_user
+ check_delete_status 403, id: create_object.id
+ end
end
end
- end unless respond_to?(:skip_actions) && skip_actions.include?('destroy')
+ end
end
end
end
diff --git a/spec/support/crud_controller_spec/helpers.rb b/spec/support/crud_controller_spec/helpers.rb
index 095440ac1a0..742c3c0d0f6 100644
--- a/spec/support/crud_controller_spec/helpers.rb
+++ b/spec/support/crud_controller_spec/helpers.rb
@@ -8,42 +8,42 @@ def check_index_template
def check_index_status(status)
get :index, params: base_options
- check_status(status)
+ check_status status
end
##### SHOW
def check_api_response(status, opts = {})
get :show, params: merge_options(opts).merge(format: 'json')
- check_status(status)
+ check_status status
end
##### NEW
- def check_new_variable(variable, klass)
- get :new, params: base_options
+ def check_new_variable(_variable, _klass)
+ get :new, params: base_options, xhr: true
assert_response :success
end
def check_new_template
- get :new, params: base_options
+ get :new, params: base_options, xhr: true
assert_response :success
end
def check_new_status(status)
- get :new, params: base_options
- check_status(status)
+ get :new, params: base_options, xhr: true
+ check_status status
end
##### CREATE
- def check_create_template(template, opts = {})
- xhr_post merge_options(opts)
+ def check_create_template(_template, opts = {})
+ xhr_post merge_options opts
end
def check_create_status(status, opts = {})
- xhr_post merge_options(opts)
- check_status(status)
+ xhr_post merge_options opts
+ check_status status
end
def check_counter_incremented_on_create(klass, opts = {})
@@ -57,17 +57,17 @@ def check_counter_not_changed_on_create(klass, opts = {})
##### EDIT
def check_edit_variable(variable, value, opts = {})
- get :edit, params: merge_options(opts)
+ get :edit, params: merge_options(opts), xhr: true
end
def check_edit_template(opts = {})
- get :edit, params: merge_options(opts)
+ get :edit, params: merge_options(opts), xhr: true
assert_response :success
end
def check_edit_status(status, opts = {})
- get :edit, params: merge_options(opts)
- check_status(status)
+ get :edit, params: merge_options(opts), xhr: true
+ check_status status
end
##### UPDATE
@@ -96,7 +96,7 @@ def check_update_template(opts = {})
def check_update_status(status, opts = {})
xhr_put merge_options(opts)
- check_status(status)
+ check_status status
end
##### DELETE
@@ -107,7 +107,7 @@ def check_counter_decremented_on_delete(klass, opts = {})
def check_delete_status(status, opts = {})
delete :destroy, params: merge_options(opts).merge(format: 'js')
- check_status(status)
+ check_status status
end
private
diff --git a/spec/support/flat_organization.rb b/spec/support/flat_organization.rb
index dabb42b6020..409a30a15a6 100644
--- a/spec/support/flat_organization.rb
+++ b/spec/support/flat_organization.rb
@@ -1,5 +1,4 @@
RSpec.shared_context 'flat_organisation' do
-
##################################################
# #
# FLAT ORGANISATION / UNIQUE REPOSITORIES TESTS #
@@ -8,93 +7,93 @@
UNIQUE_REPOSITORIES_MATRIX = {
repository_1: {
- is_default: true,
- identifier: '',
- url: 'repositories/redmine/project-child.git',
- root_url: 'repositories/redmine/project-child.git',
- git_cache_id: 'project-child',
- redmine_name: 'project-child',
- gitolite_repository_path: 'repositories/redmine/project-child.git',
- gitolite_full_repository_path: '/home/git/repositories/redmine/project-child.git',
- gitolite_repository_name: 'redmine/project-child',
- redmine_repository_path: 'project-child',
- new_repository_name: 'redmine/project-child',
- old_repository_name: 'redmine/project-child',
- http_user_login: '',
- git_access_path: 'redmine/project-child.git',
- http_access_path: 'git/project-child.git',
- ssh_url: "ssh://#{GIT_USER}@localhost/redmine/project-child.git",
- git_url: 'git://localhost/redmine/project-child.git',
- http_url: 'http://localhost/git/project-child.git',
- https_url: 'https://localhost/git/project-child.git',
+ is_default: true,
+ identifier: '',
+ url: 'repositories/redmine/project-child.git',
+ root_url: 'repositories/redmine/project-child.git',
+ git_cache_id: 'project-child',
+ redmine_name: 'project-child',
+ gitolite_repository_path: 'repositories/redmine/project-child.git',
+ gitolite_full_repository_path: "#{HOME_BASE_DIR}/git/repositories/redmine/project-child.git",
+ gitolite_repository_name: 'redmine/project-child',
+ redmine_repository_path: 'project-child',
+ new_repository_name: 'redmine/project-child',
+ old_repository_name: 'redmine/project-child',
+ http_user_login: '',
+ git_access_path: 'redmine/project-child.git',
+ http_access_path: 'git/project-child.git',
+ ssh_url: "ssh://#{GIT_USER}@localhost/redmine/project-child.git",
+ git_url: 'git://localhost/redmine/project-child.git',
+ http_url: 'http://localhost/git/project-child.git',
+ https_url: 'https://localhost/git/project-child.git'
},
repository_2: {
- is_default: false,
- identifier: 'repo1-test',
- url: 'repositories/redmine/repo1-test.git',
- root_url: 'repositories/redmine/repo1-test.git',
- git_cache_id: 'repo1-test',
- redmine_name: 'repo1-test',
- gitolite_repository_path: 'repositories/redmine/repo1-test.git',
- gitolite_full_repository_path: '/home/git/repositories/redmine/repo1-test.git',
- gitolite_repository_name: 'redmine/repo1-test',
- redmine_repository_path: 'repo1-test',
- new_repository_name: 'redmine/repo1-test',
- old_repository_name: 'redmine/repo1-test',
- http_user_login: '',
- git_access_path: 'redmine/repo1-test.git',
- http_access_path: 'git/repo1-test.git',
- ssh_url: "ssh://#{GIT_USER}@localhost/redmine/repo1-test.git",
- git_url: 'git://localhost/redmine/repo1-test.git',
- http_url: 'http://localhost/git/repo1-test.git',
- https_url: 'https://localhost/git/repo1-test.git',
+ is_default: false,
+ identifier: 'repo1-test',
+ url: 'repositories/redmine/repo1-test.git',
+ root_url: 'repositories/redmine/repo1-test.git',
+ git_cache_id: 'repo1-test',
+ redmine_name: 'repo1-test',
+ gitolite_repository_path: 'repositories/redmine/repo1-test.git',
+ gitolite_full_repository_path: "#{HOME_BASE_DIR}/git/repositories/redmine/repo1-test.git",
+ gitolite_repository_name: 'redmine/repo1-test',
+ redmine_repository_path: 'repo1-test',
+ new_repository_name: 'redmine/repo1-test',
+ old_repository_name: 'redmine/repo1-test',
+ http_user_login: '',
+ git_access_path: 'redmine/repo1-test.git',
+ http_access_path: 'git/repo1-test.git',
+ ssh_url: "ssh://#{GIT_USER}@localhost/redmine/repo1-test.git",
+ git_url: 'git://localhost/redmine/repo1-test.git',
+ http_url: 'http://localhost/git/repo1-test.git',
+ https_url: 'https://localhost/git/repo1-test.git'
},
repository_3: {
- is_default: true,
- identifier: '',
- url: 'repositories/redmine/project-parent.git',
- root_url: 'repositories/redmine/project-parent.git',
- git_cache_id: 'project-parent',
- redmine_name: 'project-parent',
- gitolite_repository_path: 'repositories/redmine/project-parent.git',
- gitolite_full_repository_path: '/home/git/repositories/redmine/project-parent.git',
- gitolite_repository_name: 'redmine/project-parent',
- redmine_repository_path: 'project-parent',
- new_repository_name: 'redmine/project-parent',
- old_repository_name: 'redmine/project-parent',
- http_user_login: '',
- git_access_path: 'redmine/project-parent.git',
- http_access_path: 'git/project-parent.git',
- ssh_url: "ssh://#{GIT_USER}@localhost/redmine/project-parent.git",
- git_url: 'git://localhost/redmine/project-parent.git',
- http_url: 'http://localhost/git/project-parent.git',
- https_url: 'https://localhost/git/project-parent.git',
+ is_default: true,
+ identifier: '',
+ url: 'repositories/redmine/project-parent.git',
+ root_url: 'repositories/redmine/project-parent.git',
+ git_cache_id: 'project-parent',
+ redmine_name: 'project-parent',
+ gitolite_repository_path: 'repositories/redmine/project-parent.git',
+ gitolite_full_repository_path: "#{HOME_BASE_DIR}/git/repositories/redmine/project-parent.git",
+ gitolite_repository_name: 'redmine/project-parent',
+ redmine_repository_path: 'project-parent',
+ new_repository_name: 'redmine/project-parent',
+ old_repository_name: 'redmine/project-parent',
+ http_user_login: '',
+ git_access_path: 'redmine/project-parent.git',
+ http_access_path: 'git/project-parent.git',
+ ssh_url: "ssh://#{GIT_USER}@localhost/redmine/project-parent.git",
+ git_url: 'git://localhost/redmine/project-parent.git',
+ http_url: 'http://localhost/git/project-parent.git',
+ https_url: 'https://localhost/git/project-parent.git'
},
repository_4: {
- is_default: false,
- identifier: 'repo2-test',
- url: 'repositories/redmine/repo2-test.git',
- root_url: 'repositories/redmine/repo2-test.git',
- git_cache_id: 'repo2-test',
- redmine_name: 'repo2-test',
- gitolite_repository_path: 'repositories/redmine/repo2-test.git',
- gitolite_full_repository_path: '/home/git/repositories/redmine/repo2-test.git',
- gitolite_repository_name: 'redmine/repo2-test',
- redmine_repository_path: 'repo2-test',
- new_repository_name: 'redmine/repo2-test',
- old_repository_name: 'redmine/repo2-test',
- http_user_login: '',
- git_access_path: 'redmine/repo2-test.git',
- http_access_path: 'git/repo2-test.git',
- ssh_url: "ssh://#{GIT_USER}@localhost/redmine/repo2-test.git",
- git_url: 'git://localhost/redmine/repo2-test.git',
- http_url: 'http://localhost/git/repo2-test.git',
- https_url: 'https://localhost/git/repo2-test.git',
- },
- }
+ is_default: false,
+ identifier: 'repo2-test',
+ url: 'repositories/redmine/repo2-test.git',
+ root_url: 'repositories/redmine/repo2-test.git',
+ git_cache_id: 'repo2-test',
+ redmine_name: 'repo2-test',
+ gitolite_repository_path: 'repositories/redmine/repo2-test.git',
+ gitolite_full_repository_path: "#{HOME_BASE_DIR}/git/repositories/redmine/repo2-test.git",
+ gitolite_repository_name: 'redmine/repo2-test',
+ redmine_repository_path: 'repo2-test',
+ new_repository_name: 'redmine/repo2-test',
+ old_repository_name: 'redmine/repo2-test',
+ http_user_login: '',
+ git_access_path: 'redmine/repo2-test.git',
+ http_access_path: 'git/repo2-test.git',
+ ssh_url: "ssh://#{GIT_USER}@localhost/redmine/repo2-test.git",
+ git_url: 'git://localhost/redmine/repo2-test.git',
+ http_url: 'http://localhost/git/repo2-test.git',
+ https_url: 'https://localhost/git/repo2-test.git'
+ }
+ }.freeze
def build_collection_of_unique_repositories
@repository_1 = build_git_repository(project: @project_child, is_default: true)
@@ -108,7 +107,6 @@ def build_collection_of_unique_repositories
@repository_4.valid?
end
-
def create_collection_of_unique_repositories
@repository_1 = create_git_repository(project: @project_child, is_default: true)
@repository_2 = create_git_repository(project: @project_child, identifier: 'repo1-test')
@@ -117,7 +115,6 @@ def create_collection_of_unique_repositories
@repository_4 = create_git_repository(project: @project_parent, identifier: 'repo2-test')
end
-
context 'when flat_organisation with unique_identifier: fast tests' do
before(:all) do
Setting.plugin_redmine_git_hosting[:hierarchical_organisation] = 'false'
@@ -138,7 +135,6 @@ def create_collection_of_unique_repositories
end
end
-
context 'when flat_organisation with unique_identifier: long tests' do
describe '.repo_ident_unique?' do
it 'should be true' do
diff --git a/spec/support/global_helpers.rb b/spec/support/global_helpers.rb
index b7db28916df..f445bcf0b4b 100644
--- a/spec/support/global_helpers.rb
+++ b/spec/support/global_helpers.rb
@@ -17,7 +17,6 @@ def create_user_with_permissions(project, permissions: [], login: nil)
user
end
-
def create_project(identifier = nil)
if identifier.nil?
FactoryBot.create(:project)
@@ -28,44 +27,36 @@ def create_project(identifier = nil)
end
end
-
def set_session_user(user)
request.session[:user_id] = user.id
end
-
def create_anonymous_user
create_user('git_anonymous')
end
-
def create_admin_user
create_user('git_admin', admin: true)
end
-
def create_user(login, admin: false)
user = User.find_by_login(login)
user = FactoryBot.create(:user, login: login, admin: admin) if user.nil?
user
end
-
def create_ssh_key(opts = {})
FactoryBot.create(:gitolite_public_key, opts)
end
-
def build_ssh_key(opts = {})
FactoryBot.build(:gitolite_public_key, opts)
end
-
def build_git_repository(opts = {})
FactoryBot.build(:repository_gitolite, opts)
end
-
def find_or_create_git_repository(opts = {})
repository = Repository::Xitolite.find_by_identifier(opts[:identifier])
if repository.nil?
@@ -75,32 +66,26 @@ def find_or_create_git_repository(opts = {})
repository
end
-
def create_git_repository(opts = {})
repository = FactoryBot.create(:repository_gitolite, opts)
build_extra(repository)
repository
end
-
def build_extra(repository)
extra = repository.build_extra(default_branch: 'master', key: RedmineGitHosting::Utils::Crypto.generate_secret(64))
extra.save!
end
-
def create_svn_repository(opts = {})
FactoryBot.create(:repository_svn, opts)
end
-
def load_yaml_fixture(fixture)
- YAML::load(load_fixture(fixture))
+ YAML.load(load_fixture(fixture))
end
-
def load_fixture(fixture)
File.read(RedmineGitHosting.plugin_spec_dir('fixtures', fixture))
end
-
end
diff --git a/spec/support/hierarchical_organisation.rb b/spec/support/hierarchical_organisation.rb
index b0fbf10b4e0..b28717001f8 100644
--- a/spec/support/hierarchical_organisation.rb
+++ b/spec/support/hierarchical_organisation.rb
@@ -1,5 +1,4 @@
RSpec.shared_context 'hierarchical_organisation' do
-
##############################################################
# #
# HIERARCHICAL ORGANISATION / NON-UNIQUE REPOSITORIES TESTS #
@@ -8,93 +7,93 @@
NON_UNIQUE_REPOSITORIES_MATRIX = {
repository_1: {
- is_default: true,
- identifier: '',
- url: 'repositories/redmine/project-parent/project-child.git',
- root_url: 'repositories/redmine/project-parent/project-child.git',
- git_cache_id: 'project-child',
- redmine_name: 'project-child',
- gitolite_repository_path: 'repositories/redmine/project-parent/project-child.git',
- gitolite_full_repository_path: '/home/git/repositories/redmine/project-parent/project-child.git',
- gitolite_repository_name: 'redmine/project-parent/project-child',
- redmine_repository_path: 'project-parent/project-child',
- new_repository_name: 'redmine/project-parent/project-child',
- old_repository_name: 'redmine/project-parent/project-child',
- http_user_login: '',
- git_access_path: 'redmine/project-parent/project-child.git',
- http_access_path: 'git/project-parent/project-child.git',
- ssh_url: "ssh://#{GIT_USER}@localhost/redmine/project-parent/project-child.git",
- git_url: 'git://localhost/redmine/project-parent/project-child.git',
- http_url: 'http://localhost/git/project-parent/project-child.git',
- https_url: 'https://localhost/git/project-parent/project-child.git',
+ is_default: true,
+ identifier: '',
+ url: 'repositories/redmine/project-parent/project-child.git',
+ root_url: 'repositories/redmine/project-parent/project-child.git',
+ git_cache_id: 'project-child',
+ redmine_name: 'project-child',
+ gitolite_repository_path: 'repositories/redmine/project-parent/project-child.git',
+ gitolite_full_repository_path: "#{HOME_BASE_DIR}/git/repositories/redmine/project-parent/project-child.git",
+ gitolite_repository_name: 'redmine/project-parent/project-child',
+ redmine_repository_path: 'project-parent/project-child',
+ new_repository_name: 'redmine/project-parent/project-child',
+ old_repository_name: 'redmine/project-parent/project-child',
+ http_user_login: '',
+ git_access_path: 'redmine/project-parent/project-child.git',
+ http_access_path: 'git/project-parent/project-child.git',
+ ssh_url: "ssh://#{GIT_USER}@localhost/redmine/project-parent/project-child.git",
+ git_url: 'git://localhost/redmine/project-parent/project-child.git',
+ http_url: 'http://localhost/git/project-parent/project-child.git',
+ https_url: 'https://localhost/git/project-parent/project-child.git'
},
repository_2: {
- is_default: false,
- identifier: 'repo-test',
- url: 'repositories/redmine/project-parent/project-child/repo-test.git',
- root_url: 'repositories/redmine/project-parent/project-child/repo-test.git',
- git_cache_id: 'project-child/repo-test',
- redmine_name: 'repo-test',
- gitolite_repository_path: 'repositories/redmine/project-parent/project-child/repo-test.git',
- gitolite_full_repository_path: '/home/git/repositories/redmine/project-parent/project-child/repo-test.git',
- gitolite_repository_name: 'redmine/project-parent/project-child/repo-test',
- redmine_repository_path: 'project-parent/project-child/repo-test',
- new_repository_name: 'redmine/project-parent/project-child/repo-test',
- old_repository_name: 'redmine/project-parent/project-child/repo-test',
- http_user_login: '',
- git_access_path: 'redmine/project-parent/project-child/repo-test.git',
- http_access_path: 'git/project-parent/project-child/repo-test.git',
- ssh_url: "ssh://#{GIT_USER}@localhost/redmine/project-parent/project-child/repo-test.git",
- git_url: 'git://localhost/redmine/project-parent/project-child/repo-test.git',
- http_url: 'http://localhost/git/project-parent/project-child/repo-test.git',
- https_url: 'https://localhost/git/project-parent/project-child/repo-test.git',
+ is_default: false,
+ identifier: 'repo-test',
+ url: 'repositories/redmine/project-parent/project-child/repo-test.git',
+ root_url: 'repositories/redmine/project-parent/project-child/repo-test.git',
+ git_cache_id: 'project-child/repo-test',
+ redmine_name: 'repo-test',
+ gitolite_repository_path: 'repositories/redmine/project-parent/project-child/repo-test.git',
+ gitolite_full_repository_path: "#{HOME_BASE_DIR}/git/repositories/redmine/project-parent/project-child/repo-test.git",
+ gitolite_repository_name: 'redmine/project-parent/project-child/repo-test',
+ redmine_repository_path: 'project-parent/project-child/repo-test',
+ new_repository_name: 'redmine/project-parent/project-child/repo-test',
+ old_repository_name: 'redmine/project-parent/project-child/repo-test',
+ http_user_login: '',
+ git_access_path: 'redmine/project-parent/project-child/repo-test.git',
+ http_access_path: 'git/project-parent/project-child/repo-test.git',
+ ssh_url: "ssh://#{GIT_USER}@localhost/redmine/project-parent/project-child/repo-test.git",
+ git_url: 'git://localhost/redmine/project-parent/project-child/repo-test.git',
+ http_url: 'http://localhost/git/project-parent/project-child/repo-test.git',
+ https_url: 'https://localhost/git/project-parent/project-child/repo-test.git'
},
repository_3: {
- is_default: true,
- identifier: '',
- url: 'repositories/redmine/project-parent.git',
- root_url: 'repositories/redmine/project-parent.git',
- git_cache_id: 'project-parent',
- redmine_name: 'project-parent',
- gitolite_repository_path: 'repositories/redmine/project-parent.git',
- gitolite_full_repository_path: '/home/git/repositories/redmine/project-parent.git',
- gitolite_repository_name: 'redmine/project-parent',
- redmine_repository_path: 'project-parent',
- new_repository_name: 'redmine/project-parent',
- old_repository_name: 'redmine/project-parent',
- http_user_login: '',
- git_access_path: 'redmine/project-parent.git',
- http_access_path: 'git/project-parent.git',
- ssh_url: "ssh://#{GIT_USER}@localhost/redmine/project-parent.git",
- git_url: 'git://localhost/redmine/project-parent.git',
- http_url: 'http://localhost/git/project-parent.git',
- https_url: 'https://localhost/git/project-parent.git',
+ is_default: true,
+ identifier: '',
+ url: 'repositories/redmine/project-parent.git',
+ root_url: 'repositories/redmine/project-parent.git',
+ git_cache_id: 'project-parent',
+ redmine_name: 'project-parent',
+ gitolite_repository_path: 'repositories/redmine/project-parent.git',
+ gitolite_full_repository_path: "#{HOME_BASE_DIR}/git/repositories/redmine/project-parent.git",
+ gitolite_repository_name: 'redmine/project-parent',
+ redmine_repository_path: 'project-parent',
+ new_repository_name: 'redmine/project-parent',
+ old_repository_name: 'redmine/project-parent',
+ http_user_login: '',
+ git_access_path: 'redmine/project-parent.git',
+ http_access_path: 'git/project-parent.git',
+ ssh_url: "ssh://#{GIT_USER}@localhost/redmine/project-parent.git",
+ git_url: 'git://localhost/redmine/project-parent.git',
+ http_url: 'http://localhost/git/project-parent.git',
+ https_url: 'https://localhost/git/project-parent.git'
},
repository_4: {
- is_default: false,
- identifier: 'repo-test',
- url: 'repositories/redmine/project-parent/repo-test.git',
- root_url: 'repositories/redmine/project-parent/repo-test.git',
- git_cache_id: 'project-parent/repo-test',
- redmine_name: 'repo-test',
- gitolite_repository_path: 'repositories/redmine/project-parent/repo-test.git',
- gitolite_full_repository_path: '/home/git/repositories/redmine/project-parent/repo-test.git',
- gitolite_repository_name: 'redmine/project-parent/repo-test',
- redmine_repository_path: 'project-parent/repo-test',
- new_repository_name: 'redmine/project-parent/repo-test',
- old_repository_name: 'redmine/project-parent/repo-test',
- http_user_login: '',
- git_access_path: 'redmine/project-parent/repo-test.git',
- http_access_path: 'git/project-parent/repo-test.git',
- ssh_url: "ssh://#{GIT_USER}@localhost/redmine/project-parent/repo-test.git",
- git_url: 'git://localhost/redmine/project-parent/repo-test.git',
- http_url: 'http://localhost/git/project-parent/repo-test.git',
- https_url: 'https://localhost/git/project-parent/repo-test.git',
+ is_default: false,
+ identifier: 'repo-test',
+ url: 'repositories/redmine/project-parent/repo-test.git',
+ root_url: 'repositories/redmine/project-parent/repo-test.git',
+ git_cache_id: 'project-parent/repo-test',
+ redmine_name: 'repo-test',
+ gitolite_repository_path: 'repositories/redmine/project-parent/repo-test.git',
+ gitolite_full_repository_path: "#{HOME_BASE_DIR}/git/repositories/redmine/project-parent/repo-test.git",
+ gitolite_repository_name: 'redmine/project-parent/repo-test',
+ redmine_repository_path: 'project-parent/repo-test',
+ new_repository_name: 'redmine/project-parent/repo-test',
+ old_repository_name: 'redmine/project-parent/repo-test',
+ http_user_login: '',
+ git_access_path: 'redmine/project-parent/repo-test.git',
+ http_access_path: 'git/project-parent/repo-test.git',
+ ssh_url: "ssh://#{GIT_USER}@localhost/redmine/project-parent/repo-test.git",
+ git_url: 'git://localhost/redmine/project-parent/repo-test.git',
+ http_url: 'http://localhost/git/project-parent/repo-test.git',
+ https_url: 'https://localhost/git/project-parent/repo-test.git'
}
- }
+ }.freeze
def build_collection_of_non_unique_repositories
@repository_1 = build_git_repository(project: @project_child, is_default: true)
@@ -108,7 +107,6 @@ def build_collection_of_non_unique_repositories
@repository_4.valid?
end
-
def create_collection_of_non_unique_repositories
@repository_1 = create_git_repository(project: @project_child, is_default: true)
@repository_2 = create_git_repository(project: @project_child, identifier: 'repo-test')
@@ -117,7 +115,6 @@ def create_collection_of_non_unique_repositories
@repository_4 = create_git_repository(project: @project_parent, identifier: 'repo-test')
end
-
context 'when hierarchical_organisation with non_unique_identifier: fast tests' do
before(:all) do
Setting.plugin_redmine_git_hosting[:hierarchical_organisation] = 'true'
@@ -138,7 +135,6 @@ def create_collection_of_non_unique_repositories
end
end
-
context 'when hierarchical_organisation with non_unique_identifier: long tests' do
describe '.repo_ident_unique?' do
it 'should be false' do
diff --git a/spec/use_cases/repository_mirrors/push.rb b/spec/use_cases/repository_mirrors/push.rb
index 907bcb91616..3c5ded56540 100644
--- a/spec/use_cases/repository_mirrors/push.rb
+++ b/spec/use_cases/repository_mirrors/push.rb
@@ -1,16 +1,13 @@
-require File.expand_path(File.dirname(__FILE__) + '/../../spec_helper')
+require File.expand_path("#{File.dirname __FILE__}/../../spec_helper")
describe RepositoryMirrors::Push do
-
let(:mirror_url) { 'ssh://git@redmine.example.org/project1/project2/project3/project4.git' }
-
def build_mirror_pusher(opts = {})
mirror = build(:repository_mirror, opts)
RepositoryMirrors::Push.new(mirror)
end
-
describe 'Push args' do
## Validate push args : forced mode
context 'when push_mode forced with params' do
@@ -52,5 +49,4 @@ def build_mirror_pusher(opts = {})
end
end
end
-
end
diff --git a/spec/use_cases/repository_protected_branches/member_manager_spec.rb b/spec/use_cases/repository_protected_branches/member_manager_spec.rb
index 9c9ba195290..4a35fdf4eec 100644
--- a/spec/use_cases/repository_protected_branches/member_manager_spec.rb
+++ b/spec/use_cases/repository_protected_branches/member_manager_spec.rb
@@ -1,13 +1,11 @@
-require File.expand_path(File.dirname(__FILE__) + '/../../spec_helper')
+require File.expand_path("#{File.dirname __FILE__}/../../spec_helper")
describe RepositoryProtectedBranches::MemberManager do
-
- def build_member_manager(opts = {})
+ def build_member_manager(_opts = {})
protected_branch = build(:repository_protected_branche)
member_manager = RepositoryProtectedBranches::MemberManager.new(protected_branch)
end
-
let(:member_manager) { build_member_manager }
subject { member_manager }
@@ -20,7 +18,6 @@ def build_member_manager(opts = {})
end
end
-
describe '#current_group_ids' do
it 'should return an array of group ids' do
group = build(:group, id: 12)
@@ -29,7 +26,6 @@ def build_member_manager(opts = {})
end
end
-
describe '#current_members' do
it 'should return the current protected_branch members' do
expect(member_manager.protected_branch).to receive(:protected_branches_members)
@@ -37,7 +33,6 @@ def build_member_manager(opts = {})
end
end
-
describe '#users_by_group_id' do
it 'should return the members of a protected_branch group' do
group_member = create(:protected_branch_group_member)
@@ -47,7 +42,6 @@ def build_member_manager(opts = {})
end
end
-
describe '#add_users' do
it 'should add users passed' do
expect(member_manager).to receive(:current_user_ids).and_return([1])
@@ -56,7 +50,6 @@ def build_member_manager(opts = {})
end
end
-
describe '#add_groups' do
it 'should add users passed' do
user = build(:user, id: 42)
@@ -70,7 +63,6 @@ def build_member_manager(opts = {})
end
end
-
describe '#create_user_member' do
it 'should create a new user member' do
expect(member_manager).to receive(:create_member).with([1], [], 'User', {})
@@ -78,7 +70,6 @@ def build_member_manager(opts = {})
end
end
-
describe '#create_group_member' do
it 'should create a new group member' do
expect(member_manager).to receive(:create_member).with([1], [], 'Group', {})
@@ -86,7 +77,6 @@ def build_member_manager(opts = {})
end
end
-
describe '#add_user_from_group' do
it 'should add a user from a group' do
user1 = build(:user, id: 20)
@@ -98,7 +88,6 @@ def build_member_manager(opts = {})
end
end
-
describe '#remove_user_from_group' do
context 'when user exists' do
it 'should remove a user from a group' do
@@ -119,7 +108,6 @@ def build_member_manager(opts = {})
end
end
-
describe '#create_member' do
it 'should create member' do
user = build(:user, id: 12)
@@ -147,5 +135,4 @@ def build_member_manager(opts = {})
end
end
end
-
end