From f7bce9de5ebe7c00a52e92f7bb1fd5503ae41d2f Mon Sep 17 00:00:00 2001 From: Eduardo Bonet <ebonet@gitlab.com> Date: Thu, 18 Nov 2021 16:44:47 +0100 Subject: [PATCH] Upgrading ipynbdiff to 0.3.8 This fixes a few issues related to unexpected .ipynb structure, mainly source being a single string rather than a list. / Changelog: fixed --- Gemfile | 2 +- Gemfile.lock | 4 ++-- spec/lib/gitlab/diff/file_spec.rb | 6 +++--- spec/support/helpers/test_env.rb | 2 +- 4 files changed, 7 insertions(+), 7 deletions(-) diff --git a/Gemfile b/Gemfile index 87a0cff84c1fb..4861bb8808290 100644 --- a/Gemfile +++ b/Gemfile @@ -539,4 +539,4 @@ gem 'ipaddress', '~> 0.8.3' gem 'parslet', '~> 1.8' -gem 'ipynbdiff', '0.3.7' +gem 'ipynbdiff', '0.3.8' diff --git a/Gemfile.lock b/Gemfile.lock index 270ea4532f92d..42a0e00f1707b 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -640,7 +640,7 @@ GEM invisible_captcha (1.1.0) rails (>= 4.2) ipaddress (0.8.3) - ipynbdiff (0.3.7) + ipynbdiff (0.3.8) diffy (= 3.3.0) json (= 2.5.1) jaeger-client (1.1.0) @@ -1507,7 +1507,7 @@ DEPENDENCIES icalendar invisible_captcha (~> 1.1.0) ipaddress (~> 0.8.3) - ipynbdiff (= 0.3.7) + ipynbdiff (= 0.3.8) jira-ruby (~> 2.1.4) js_regex (~> 3.7) json (~> 2.5.1) diff --git a/spec/lib/gitlab/diff/file_spec.rb b/spec/lib/gitlab/diff/file_spec.rb index 4b437397688ca..45a49a36fe223 100644 --- a/spec/lib/gitlab/diff/file_spec.rb +++ b/spec/lib/gitlab/diff/file_spec.rb @@ -53,7 +53,7 @@ def delete_file(file_name) describe 'initialize' do context 'when file is ipynb with a change after transformation' do - let(:commit) { project.commit("f6b7a707") } + let(:commit) { project.commit("532c837") } let(:diff) { commit.raw_diffs.first } let(:diff_file) { described_class.new(diff, diff_refs: commit.diff_refs, repository: project.repository) } @@ -63,7 +63,7 @@ def delete_file(file_name) end it 'recreates the diff by transforming the files' do - expect(diff_file.diff.diff).not_to include('"| Fake') + expect(diff_file.diff.diff).not_to include('cell_type') end end @@ -73,7 +73,7 @@ def delete_file(file_name) end it 'does not recreate the diff' do - expect(diff_file.diff.diff).to include('"| Fake') + expect(diff_file.diff.diff).to include('cell_type') end end end diff --git a/spec/support/helpers/test_env.rb b/spec/support/helpers/test_env.rb index acbc15f7b6271..24e0a571de31e 100644 --- a/spec/support/helpers/test_env.rb +++ b/spec/support/helpers/test_env.rb @@ -53,7 +53,7 @@ module TestEnv 'wip' => 'b9238ee', 'csv' => '3dd0896', 'v1.1.0' => 'b83d6e3', - 'add-ipython-files' => '2b5ef814', + 'add-ipython-files' => '532c837', 'add-pdf-file' => 'e774ebd', 'squash-large-files' => '54cec52', 'add-pdf-text-binary' => '79faa7b', -- GitLab