Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

update ruby to 2.7.4 and update gems #21

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
28 changes: 9 additions & 19 deletions .rubocop.yml
Original file line number Diff line number Diff line change
@@ -1,18 +1,12 @@
AllCops:
TargetRubyVersion: 2.4
TargetRubyVersion: 2.7
DisplayCopNames: true
DisabledByDefault: true

# Prefer &&/|| over and/or.
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
Expand Down Expand Up @@ -69,7 +63,7 @@ Layout/SpaceAroundOperators:
Enabled: true

Layout/SpaceBeforeFirstArg:
Enabled: true
Enabled: true

# Defining a method with parameters needs parentheses.
Style/MethodDefParentheses:
Expand Down Expand Up @@ -101,35 +95,31 @@ 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.
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

# Use my_method(my_arg) not my_method( my_arg ) or my_method my_arg.
Lint/RequireParentheses:
Enabled: true

# CMG Rules
Rails:
Enabled: true

Bundler:
Enabled: true

Expand All @@ -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
Expand All @@ -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:
Expand Down
2 changes: 1 addition & 1 deletion .ruby-version
Original file line number Diff line number Diff line change
@@ -1 +1 @@
ruby-2.4.2
ruby-2.7.4
4 changes: 2 additions & 2 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
sudo: false
language: ruby
rvm:
- 2.4.1
before_install: gem install bundler -v 1.16.0
- 2.7.4
before_install: gem install bundler -v 2.3.6
123 changes: 64 additions & 59 deletions Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -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/
Expand All @@ -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
6 changes: 3 additions & 3 deletions nextcloud.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -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
2 changes: 2 additions & 0 deletions spec/file_sharing_api_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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_")
Expand All @@ -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
Expand Down