From c5e385bd5a0274e4d40e647eadcb22043f0f6e92 Mon Sep 17 00:00:00 2001 From: Ken Date: Wed, 21 Feb 2018 22:09:15 +1030 Subject: [PATCH] 36847 - update toml-rb to 1.0.0 36847 - add changelog --- Gemfile | 2 +- Gemfile.lock | 4 ++-- .../unreleased/36847-update-update-toml-rb-to-1-0-0.yml | 5 +++++ lib/gitlab/setup_helper.rb | 2 +- lib/tasks/gitlab/gitaly.rake | 4 ++-- spec/support/test_env.rb | 2 +- spec/tasks/gitlab/gitaly_rake_spec.rb | 2 +- 7 files changed, 13 insertions(+), 8 deletions(-) create mode 100644 changelogs/unreleased/36847-update-update-toml-rb-to-1-0-0.yml diff --git a/Gemfile b/Gemfile index a05ca23f5eb..08f16e11724 100644 --- a/Gemfile +++ b/Gemfile @@ -415,7 +415,7 @@ gem 'gitaly-proto', '~> 0.84.0', require: 'gitaly' # Locked until https://github.com/google/protobuf/issues/4210 is closed gem 'google-protobuf', '= 3.5.1' -gem 'toml-rb', '~> 0.3.15', require: false +gem 'toml-rb', '~> 1.0.0', require: false # Feature toggles gem 'flipper', '~> 0.11.0' diff --git a/Gemfile.lock b/Gemfile.lock index 8de6c8d80a8..2e0bf594f01 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -924,7 +924,7 @@ GEM timfel-krb5-auth (0.8.3) toml (0.1.2) parslet (~> 1.5.0) - toml-rb (0.3.15) + toml-rb (1.0.0) citrus (~> 3.0, > 3.0) truncato (0.7.10) htmlentities (~> 4.3.1) @@ -1201,7 +1201,7 @@ DEPENDENCIES test_after_commit (~> 1.1) thin (~> 1.7.0) timecop (~> 0.8.0) - toml-rb (~> 0.3.15) + toml-rb (~> 1.0.0) truncato (~> 0.7.9) u2f (~> 0.2.1) uglifier (~> 2.7.2) diff --git a/changelogs/unreleased/36847-update-update-toml-rb-to-1-0-0.yml b/changelogs/unreleased/36847-update-update-toml-rb-to-1-0-0.yml new file mode 100644 index 00000000000..74eaf57c056 --- /dev/null +++ b/changelogs/unreleased/36847-update-update-toml-rb-to-1-0-0.yml @@ -0,0 +1,5 @@ +--- +title: update toml-rb to 1.0.0 +merge_request: 17259 +author: Ken Ding +type: other diff --git a/lib/gitlab/setup_helper.rb b/lib/gitlab/setup_helper.rb index e90a90508a2..07d7c91cb5d 100644 --- a/lib/gitlab/setup_helper.rb +++ b/lib/gitlab/setup_helper.rb @@ -37,7 +37,7 @@ module Gitlab config[:'gitlab-shell'] = { dir: Gitlab.config.gitlab_shell.path } config[:bin_dir] = Gitlab.config.gitaly.client_path - TOML.dump(config) + TomlRB.dump(config) end # rubocop:disable Rails/Output diff --git a/lib/tasks/gitlab/gitaly.rake b/lib/tasks/gitlab/gitaly.rake index 107ff1d8aeb..e9ca6404fe8 100644 --- a/lib/tasks/gitlab/gitaly.rake +++ b/lib/tasks/gitlab/gitaly.rake @@ -2,7 +2,7 @@ namespace :gitlab do namespace :gitaly do desc "GitLab | Install or upgrade gitaly" task :install, [:dir, :repo] => :gitlab_environment do |t, args| - require 'toml' + require 'toml-rb' warn_user_is_not_gitlab @@ -38,7 +38,7 @@ namespace :gitlab do desc "GitLab | Print storage configuration in TOML format" task storage_config: :environment do - require 'toml' + require 'toml-rb' puts "# Gitaly storage configuration generated from #{Gitlab.config.source} on #{Time.current.to_s(:long)}" puts "# This is in TOML format suitable for use in Gitaly's config.toml file." diff --git a/spec/support/test_env.rb b/spec/support/test_env.rb index c275522159c..01321989f01 100644 --- a/spec/support/test_env.rb +++ b/spec/support/test_env.rb @@ -1,5 +1,5 @@ require 'rspec/mocks' -require 'toml' +require 'toml-rb' module TestEnv extend self diff --git a/spec/tasks/gitlab/gitaly_rake_spec.rb b/spec/tasks/gitlab/gitaly_rake_spec.rb index b37d6ac831f..1f4053ff9ad 100644 --- a/spec/tasks/gitlab/gitaly_rake_spec.rb +++ b/spec/tasks/gitlab/gitaly_rake_spec.rb @@ -132,7 +132,7 @@ describe 'gitlab:gitaly namespace rake task' do expect { run_rake_task('gitlab:gitaly:storage_config')} .to output(expected_output).to_stdout - parsed_output = TOML.parse(expected_output) + parsed_output = TomlRB.parse(expected_output) config.each do |name, params| expect(parsed_output['storage']).to include({ 'name' => name, 'path' => params['path'] }) end