From 3b1be8f9575c2655d370682fe672a9e9c992193b Mon Sep 17 00:00:00 2001 From: Dirk Meier-Eickhoff Date: Thu, 3 Feb 2022 15:40:19 +0100 Subject: [PATCH] update ruby to 2.7.4 and update gems --- .rubocop.yml | 28 +++----- .ruby-version | 2 +- .travis.yml | 4 +- Gemfile.lock | 123 ++++++++++++++++++---------------- nextcloud.gemspec | 6 +- spec/file_sharing_api_spec.rb | 2 + 6 files changed, 81 insertions(+), 84 deletions(-) diff --git a/.rubocop.yml b/.rubocop.yml index a74828a..5050438 100644 --- a/.rubocop.yml +++ b/.rubocop.yml @@ -1,5 +1,5 @@ AllCops: - TargetRubyVersion: 2.4 + TargetRubyVersion: 2.7 DisplayCopNames: true DisabledByDefault: true @@ -7,12 +7,6 @@ AllCops: Style/AndOr: Enabled: true -# Do not use braces for hash literals when they are the last argument of a -# method call. -Style/BracesAroundHashParameters: - Enabled: true - EnforcedStyle: context_dependent - # Align `when` with `case`. Layout/CaseIndentation: Enabled: true @@ -69,7 +63,7 @@ Layout/SpaceAroundOperators: Enabled: true Layout/SpaceBeforeFirstArg: - Enabled: true + Enabled: true # Defining a method with parameters needs parentheses. Style/MethodDefParentheses: @@ -101,11 +95,11 @@ Style/StringLiterals: EnforcedStyle: double_quotes # Detect hard tabs, no hard tabs. -Layout/Tab: +Layout/IndentationStyle: Enabled: true # Blank lines should not have any spaces. -Layout/TrailingBlankLines: +Layout/TrailingEmptyLines: Enabled: true # No trailing whitespace. @@ -113,12 +107,12 @@ Layout/TrailingWhitespace: Enabled: true # Use quotes for string literals when they are enough. -Style/UnneededPercentQ: +Style/RedundantPercentQ: Enabled: true # Align `end` with the matching keyword or starting expression except for # assignments, where it should be aligned with the LHS. -Lint/EndAlignment: +Layout/EndAlignment: Enabled: true EnforcedStyleAlignWith: variable @@ -126,10 +120,6 @@ Lint/EndAlignment: Lint/RequireParentheses: Enabled: true -# CMG Rules -Rails: - Enabled: true - Bundler: Enabled: true @@ -150,7 +140,7 @@ Style/SymbolArray: Description: 'Use %i or %I for arrays of symbols.' Enabled: true -Metrics/LineLength: +Layout/LineLength: Description: 'Limit lines to 120 characters.' Enabled: true Max: 120 @@ -161,10 +151,10 @@ Metrics/LineLength: Lint/AmbiguousBlockAssociation: Enabled: false -Lint/RescueWithoutErrorClass: +Style/RescueStandardError: Enabled: false -Layout/AlignParameters: +Layout/ParameterAlignment: Enabled: true EnforcedStyle: with_fixed_indentation SupportedStyles: diff --git a/.ruby-version b/.ruby-version index 54f51e1..30c5992 100644 --- a/.ruby-version +++ b/.ruby-version @@ -1 +1 @@ -ruby-2.4.2 \ No newline at end of file +ruby-2.7.4 diff --git a/.travis.yml b/.travis.yml index d93d331..47702e1 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,5 +1,5 @@ sudo: false language: ruby rvm: - - 2.4.1 -before_install: gem install bundler -v 1.16.0 \ No newline at end of file + - 2.7.4 +before_install: gem install bundler -v 2.3.6 \ No newline at end of file diff --git a/Gemfile.lock b/Gemfile.lock index 2193cea..7e059b6 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -5,7 +5,7 @@ PATH activesupport (>= 5.1, <= 6.1) json (~> 2.1) net-http-report (~> 0.1) - nokogiri (~> 1.8) + nokogiri (~> 1.13) GEM remote: https://rubygems.org/ @@ -18,101 +18,106 @@ GEM zeitwerk (~> 2.3) addressable (2.8.0) public_suffix (>= 2.0.2, < 5.0) - ast (2.3.0) + ast (2.4.2) byebug (11.1.3) coderay (1.1.3) - concurrent-ruby (1.1.8) - coveralls (0.8.21) + concurrent-ruby (1.1.9) + coveralls (0.8.23) json (>= 1.8, < 3) - simplecov (~> 0.14.1) + simplecov (~> 0.16.1) term-ansicolor (~> 1.3) - thor (~> 0.19.4) + thor (>= 0.19.4, < 2.0) tins (~> 1.6) - crack (0.4.3) - safe_yaml (~> 1.0.0) - diff-lcs (1.3) - docile (1.1.5) - hashdiff (0.3.7) - i18n (1.8.10) + crack (0.4.5) + rexml + diff-lcs (1.5.0) + docile (1.4.0) + hashdiff (1.0.1) + i18n (1.9.1) concurrent-ruby (~> 1.0) - json (2.5.1) + json (2.6.1) method_source (1.0.0) - mini_portile2 (2.6.1) - minitest (5.14.4) + mini_portile2 (2.7.1) + minitest (5.15.0) net-http-report (0.2.0) - nokogiri (1.12.3) - mini_portile2 (~> 2.6.1) + nokogiri (1.13.1) + mini_portile2 (~> 2.7.0) racc (~> 1.4) - parallel (1.12.0) - parser (2.4.0.2) - ast (~> 2.3) - powerpack (0.1.1) - pry (0.13.1) + parallel (1.21.0) + parser (3.1.0.0) + ast (~> 2.4.1) + pry (0.14.1) coderay (~> 1.1) method_source (~> 1.0) - pry-byebug (3.9.0) + pry-byebug (3.8.0) byebug (~> 11.0) - pry (~> 0.13.0) + pry (~> 0.10) public_suffix (4.0.6) - racc (1.5.2) - rainbow (2.2.2) - rake - rake (13.0.1) - rspec (3.7.0) - rspec-core (~> 3.7.0) - rspec-expectations (~> 3.7.0) - rspec-mocks (~> 3.7.0) - rspec-core (3.7.0) - rspec-support (~> 3.7.0) - rspec-expectations (3.7.0) + racc (1.6.0) + rainbow (3.1.1) + rake (13.0.6) + regexp_parser (2.2.0) + rexml (3.2.5) + rspec (3.10.0) + rspec-core (~> 3.10.0) + rspec-expectations (~> 3.10.0) + rspec-mocks (~> 3.10.0) + rspec-core (3.10.2) + rspec-support (~> 3.10.0) + rspec-expectations (3.10.2) diff-lcs (>= 1.2.0, < 2.0) - rspec-support (~> 3.7.0) - rspec-mocks (3.7.0) + rspec-support (~> 3.10.0) + rspec-mocks (3.10.3) diff-lcs (>= 1.2.0, < 2.0) - rspec-support (~> 3.7.0) - rspec-support (3.7.0) - rubocop (0.51.0) + rspec-support (~> 3.10.0) + rspec-support (3.10.3) + rubocop (1.25.1) parallel (~> 1.10) - parser (>= 2.3.3.1, < 3.0) - powerpack (~> 0.1) - rainbow (>= 2.2.2, < 3.0) + parser (>= 3.1.0.0) + rainbow (>= 2.2.2, < 4.0) + regexp_parser (>= 1.8, < 3.0) + rexml + rubocop-ast (>= 1.15.1, < 2.0) ruby-progressbar (~> 1.7) - unicode-display_width (~> 1.0, >= 1.0.1) - ruby-progressbar (1.9.0) - safe_yaml (1.0.4) - simplecov (0.14.1) - docile (~> 1.1.0) + unicode-display_width (>= 1.4.0, < 3.0) + rubocop-ast (1.15.1) + parser (>= 3.0.1.1) + ruby-progressbar (1.11.0) + simplecov (0.16.1) + docile (~> 1.1) json (>= 1.8, < 3) simplecov-html (~> 0.10.0) simplecov-html (0.10.2) - term-ansicolor (1.6.0) + sync (0.5.0) + term-ansicolor (1.7.1) tins (~> 1.0) - thor (0.19.4) - tins (1.15.1) + thor (1.2.1) + tins (1.31.0) + sync tzinfo (2.0.4) concurrent-ruby (~> 1.0) - unicode-display_width (1.3.0) + unicode-display_width (2.1.0) vcr (3.0.3) - webmock (3.1.1) - addressable (>= 2.3.6) + webmock (3.14.0) + addressable (>= 2.8.0) crack (>= 0.3.2) - hashdiff - zeitwerk (2.4.2) + hashdiff (>= 0.4.0, < 2.0.0) + zeitwerk (2.5.4) PLATFORMS ruby DEPENDENCIES - bundler (~> 1.16) + bundler (~> 2.0) coveralls nextcloud! pry pry-byebug rake (~> 13.0) rspec (~> 3.0) - rubocop (~> 0.51) + rubocop (~> 1.0) vcr (~> 3.0) webmock (~> 3.1) BUNDLED WITH - 1.17.3 + 2.3.6 diff --git a/nextcloud.gemspec b/nextcloud.gemspec index 4a4b71e..badcc1a 100644 --- a/nextcloud.gemspec +++ b/nextcloud.gemspec @@ -33,13 +33,13 @@ Gem::Specification.new do |spec| spec.add_runtime_dependency "activesupport", ">= 5.1", "<= 6.1" spec.add_runtime_dependency "json", "~> 2.1" - spec.add_runtime_dependency "nokogiri", "~> 1.8" + spec.add_runtime_dependency "nokogiri", "~> 1.13" spec.add_runtime_dependency "net-http-report", "~> 0.1" - spec.add_development_dependency "bundler", "~> 1.16" + spec.add_development_dependency "bundler", "~> 2.0" spec.add_development_dependency "rake", "~> 13.0" spec.add_development_dependency "rspec", "~> 3.0" - spec.add_development_dependency "rubocop", "~> 0.51" + spec.add_development_dependency "rubocop", "~> 1.0" spec.add_development_dependency "vcr", "~> 3.0" spec.add_development_dependency "webmock", "~> 3.1" end diff --git a/spec/file_sharing_api_spec.rb b/spec/file_sharing_api_spec.rb index 0ad9625..382e023 100644 --- a/spec/file_sharing_api_spec.rb +++ b/spec/file_sharing_api_spec.rb @@ -42,6 +42,7 @@ end end + # rubocop:disable Security/Open it ".create creates a public link" do VCR.use_cassette("file_sharing_api/create-protected-public-link") do result = @subject.create("/some_file2.txt", 3, nil, nil, "somePassword1_") @@ -50,6 +51,7 @@ expect(open(url).read).to match("password-protected") end end + # rubocop:enable Security/Open it ".destroy unshares a file" do VCR.use_cassette("file_sharing_api/destroy") do