Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorDmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>2015-08-17 12:41:53 +0300
committerDmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>2015-08-17 12:41:53 +0300
commit4a0fa27017e3bdf33a61d198f692419359cd6c05 (patch)
tree6c610193350fe34de75c12d9896bd079425c199a /lib
parentbbe0e58aebbb804cb884662be9e7f0f40db9eacd (diff)
parent9f7c7c857b97c8124ed9af36218c3cad2c6a7fc3 (diff)
Merge branch 'master' into remove-satellites
Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
Diffstat (limited to 'lib')
-rw-r--r--lib/api/entities.rb3
-rw-r--r--lib/backup/database.rb7
-rw-r--r--lib/gitlab/markup_helper.rb2
-rw-r--r--lib/tasks/gitlab/check.rake2
4 files changed, 10 insertions, 4 deletions
diff --git a/lib/api/entities.rb b/lib/api/entities.rb
index b5556682449..09d231af41b 100644
--- a/lib/api/entities.rb
+++ b/lib/api/entities.rb
@@ -205,6 +205,9 @@ module API
expose :attachment_identifier, as: :attachment
expose :author, using: Entities::UserBasic
expose :created_at
+ expose :system?, as: :system
+ expose :upvote?, as: :upvote
+ expose :downvote?, as: :downvote
end
class MRNote < Grape::Entity
diff --git a/lib/backup/database.rb b/lib/backup/database.rb
index bbb230a10f0..939f28fc1c6 100644
--- a/lib/backup/database.rb
+++ b/lib/backup/database.rb
@@ -18,6 +18,8 @@ module Backup
success = case config["adapter"]
when /^mysql/ then
$progress.print "Dumping MySQL database #{config['database']} ... "
+ # Workaround warnings from MySQL 5.6 about passwords on cmd line
+ ENV['MYSQL_PWD'] = config["password"].to_s if config["password"]
system('mysqldump', *mysql_args, config['database'], out: db_file_name)
when "postgresql" then
$progress.print "Dumping PostgreSQL database #{config['database']} ... "
@@ -43,6 +45,8 @@ module Backup
success = case config["adapter"]
when /^mysql/ then
$progress.print "Restoring MySQL database #{config['database']} ... "
+ # Workaround warnings from MySQL 5.6 about passwords on cmd line
+ ENV['MYSQL_PWD'] = config["password"].to_s if config["password"]
system('mysql', *mysql_args, config['database'], in: db_file_name)
when "postgresql" then
$progress.print "Restoring PostgreSQL database #{config['database']} ... "
@@ -69,8 +73,7 @@ module Backup
'port' => '--port',
'socket' => '--socket',
'username' => '--user',
- 'encoding' => '--default-character-set',
- 'password' => '--password'
+ 'encoding' => '--default-character-set'
}
args.map { |opt, arg| "#{arg}=#{config[opt]}" if config[opt] }.compact
end
diff --git a/lib/gitlab/markup_helper.rb b/lib/gitlab/markup_helper.rb
index b1991e2e285..a5f767b134d 100644
--- a/lib/gitlab/markup_helper.rb
+++ b/lib/gitlab/markup_helper.rb
@@ -21,7 +21,7 @@ module Gitlab
#
# Returns boolean
def gitlab_markdown?(filename)
- filename.downcase.end_with?(*%w(.mdown .md .markdown))
+ filename.downcase.end_with?(*%w(.mdown .mkd .mkdn .md .markdown))
end
# Public: Determines if the given filename has AsciiDoc extension.
diff --git a/lib/tasks/gitlab/check.rake b/lib/tasks/gitlab/check.rake
index 8acb6a7fd19..80ee572938d 100644
--- a/lib/tasks/gitlab/check.rake
+++ b/lib/tasks/gitlab/check.rake
@@ -693,7 +693,7 @@ namespace :gitlab do
end
def check_ruby_version
- required_version = Gitlab::VersionInfo.new(2, 0, 0)
+ required_version = Gitlab::VersionInfo.new(2, 1, 0)
current_version = Gitlab::VersionInfo.parse(run(%W(ruby --version)))
print "Ruby version >= #{required_version} ? ... "