diff --git a/.github/workflows/rubocop.yml b/.github/workflows/rubocop.yml index 1aa0eb9a1e..88bf2116fe 100644 --- a/.github/workflows/rubocop.yml +++ b/.github/workflows/rubocop.yml @@ -10,11 +10,12 @@ jobs: uses: actions/checkout@v2 - uses: ruby/setup-ruby@v1 with: - ruby-version: 2.5 + ruby-version: 2.5.8 + - run: 'gem install activesupport -v 6.1.4.4' - name: Rubocop linter uses: reviewdog/action-rubocop@v1 with: - rubocop_version: 1.12.1 + rubocop_version: 1.23.0 github_token: ${{ secrets.github_token }} reporter: github-pr-check level: error diff --git a/.rubocop.yml b/.rubocop.yml index f400f7f904..5c202476ec 100644 --- a/.rubocop.yml +++ b/.rubocop.yml @@ -6,7 +6,7 @@ require: - rubocop-rspec AllCops: - TargetRubyVersion: 2.4 + TargetRubyVersion: 2.5 Exclude: - "vendor/**/*" - "db/schema.rb" diff --git a/NEWS.md b/NEWS.md index 545cbfd340..c30d07f4d2 100644 --- a/NEWS.md +++ b/NEWS.md @@ -20,6 +20,7 @@ Development * Setting to enable/disable random username generation on SAML authentication process [16372](https://github.com/CartoDB/cartodb/pull/16372) ### Bug fixes / enhancements +- Fix rubocop integration [#16382](https://github.com/CartoDB/cartodb/pull/16382) - Add marginTop to Page when notification is displayed [#16355](https://github.com/CartoDB/cartodb/pull/16355) - Add "element" param to DO-Catalog entry function [#16343](https://github.com/CartoDB/cartodb/pull/16343) - Add new DO Catalog route for internal usage [#16342](https://github.com/CartoDB/cartodb/pull/16342) @@ -51,6 +52,7 @@ Development - Fix verification process for active users [#16337](https://github.com/CartoDB/cartodb/pull/16337) - Avoid updating analysis nodes more than once when moving layers in Builder [#16279](https://github.com/CartoDB/cartodb/pull/16279) - Fix subscription/sample filter for datasets [#16254](https://github.com/CartoDB/cartodb/pull/16254) +- Fix form to search dataset when generating a new API key [#16378](https://github.com/CartoDB/cartodb/pull/16378) - Use fully qualified table name while creating a new map from a shared dataset [#16241](https://github.com/CartoDB/cartodb/pull/16241) - Render tileset viewer features in front of basemap [#16333](https://github.com/CartoDB/cartodb/pull/16333) - Rake task to migrate legacy synchronizations [#16353](https://github.com/CartoDB/cartodb/pull/16353) diff --git a/lib/assets/javascripts/dashboard/components/table-grants/table-grants-view.js b/lib/assets/javascripts/dashboard/components/table-grants/table-grants-view.js index f22a781314..7ca7bc7363 100644 --- a/lib/assets/javascripts/dashboard/components/table-grants/table-grants-view.js +++ b/lib/assets/javascripts/dashboard/components/table-grants/table-grants-view.js @@ -121,5 +121,5 @@ module.exports = CoreView.extend({ _onSearchChanged: _.debounce(function (event) { this._userTablesModel.setQuery(event.target.value); - }, 500, this) + }, 500) }); diff --git a/lib/assets/test/spec/dashboard/components/table-grants-view.spec.js b/lib/assets/test/spec/dashboard/components/table-grants-view.spec.js index 259ed7732a..2740aab714 100644 --- a/lib/assets/test/spec/dashboard/components/table-grants-view.spec.js +++ b/lib/assets/test/spec/dashboard/components/table-grants-view.spec.js @@ -221,7 +221,9 @@ describe('dashboard/components/table-grants/table-grants-view', function () { view._onSearchChanged(event); - expect(userTablesModel.setQuery).toHaveBeenCalledWith(event.target.value); + setTimeout(function () { + expect(userTablesModel.setQuery).toHaveBeenCalledWith(event.target.value); + }, 600); }); }); }); diff --git a/package-lock.json b/package-lock.json index bf3adbad15..6ecdfdff25 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,6 +1,6 @@ { "name": "cartodb-ui", - "version": "1.0.0-assets.278", + "version": "1.0.0-assets.279", "lockfileVersion": 1, "requires": true, "dependencies": { diff --git a/package.json b/package.json index 16a71bbe3c..4165da4749 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "cartodb-ui", - "version": "1.0.0-assets.278", + "version": "1.0.0-assets.279", "description": "CARTO UI frontend", "repository": { "type": "git", diff --git a/services/importer/spec/unit/unp_spec.rb b/services/importer/spec/unit/unp_spec.rb index d2675b02f8..d132c8fc7d 100644 --- a/services/importer/spec/unit/unp_spec.rb +++ b/services/importer/spec/unit/unp_spec.rb @@ -3,6 +3,16 @@ require_relative '../../lib/importer/unp' include CartoDB::Importer2 +module FileUtils + class Entry_ # rubocop:disable ClassAndModuleCamelCase, DepartmentName + + def copy_file(dest) + Open3.capture2('cp', path, dest) + end + + end +end + describe Unp do describe '#run' do it 'extracts the contents of the file' do @@ -352,7 +362,8 @@ describe Unp do FileUtils.rm_r(dir) if File.exists?(dir) FileUtils.mkdir_p(dir) - FileUtils.cp(File.join(File.dirname(__FILE__), "../fixtures/#{filename}"), zipfile) + new_dir = File.expand_path("../fixtures/#{filename}", File.dirname(__FILE__)) + FileUtils.cp(new_dir, zipfile) zipfile end