Skip to content

Commit

Permalink
Use ruby-3.4 as project base
Browse files Browse the repository at this point in the history
  • Loading branch information
VitaliySerov committed Dec 27, 2024
1 parent 26399cf commit e551df3
Show file tree
Hide file tree
Showing 12 changed files with 33 additions and 23 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ jobs:
- uses: actions/checkout@v4
- uses: ruby/setup-ruby@v1
with:
ruby-version: '3.3'
ruby-version: '3.4'
- name: Install gem dependencies
run: |
gem install bundler
Expand Down
2 changes: 1 addition & 1 deletion .rubocop.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ inherit_from: .rubocop_todo.yml

AllCops:
NewCops: enable
TargetRubyVersion: 3.0
TargetRubyVersion: 3.4

# Disable this check since we test end-user product
# And do not perform unit-testing of some ruby classes
Expand Down
8 changes: 4 additions & 4 deletions .rubocop_todo.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# This configuration was generated by
# `rubocop --auto-gen-config`
# on 2024-07-10 07:39:04 UTC using RuboCop version 1.64.1.
# on 2024-12-27 10:12:30 UTC using RuboCop version 1.69.2.
# The point is for the user to remove these configuration records
# one by one as the offenses are removed from the code base.
# Note that changes in the inspected code, or installation of new
Expand All @@ -11,14 +11,14 @@
Metrics/MethodLength:
Max: 24

# Offense count: 131
# Offense count: 150
# Configuration parameters: CountAsOne.
RSpec/ExampleLength:
Max: 21

# Offense count: 411
# Offense count: 417
# This cop supports safe autocorrection (--autocorrect).
# Configuration parameters: AllowHeredoc, AllowURI, URISchemes, IgnoreCopDirectives, AllowedPatterns.
# Configuration parameters: AllowHeredoc, AllowURI, URISchemes, IgnoreCopDirectives, AllowedPatterns, SplitStrings.
# URISchemes: http, https
Layout/LineLength:
Max: 179
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
* Ability to set Web Builder url via `WEB_BUILDER_URL`
* Add `yamllint` check in CI
* Add `dependabot` check for `GitHub Actions`
* Use `ruby-3.4` as project base

### Changes

Expand Down
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM ruby:3.3
FROM ruby:3.4

MAINTAINER Pavel.Lobashov "[email protected]"

Expand Down
4 changes: 4 additions & 0 deletions Gemfile
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
# frozen_string_literal: true

source 'https://rubygems.org'

ruby '>= 3.4.0'

gem 'csv', '~> 3'
gem 'jwt'
gem 'onlyoffice_pdf_parser'
gem 'ooxml_parser'
Expand Down
7 changes: 6 additions & 1 deletion Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ GEM
bigdecimal (3.1.9)
childprocess (5.1.0)
logger (~> 1.5)
csv (3.3.2)
diff-lcs (1.5.1)
hashery (2.1.2)
image_size (3.4.0)
Expand Down Expand Up @@ -106,6 +107,7 @@ PLATFORMS
ruby

DEPENDENCIES
csv (~> 3)
jwt
onlyoffice_pdf_parser
ooxml_parser
Expand All @@ -120,5 +122,8 @@ DEPENDENCIES
semantic
yard

RUBY VERSION
ruby 3.4.1p0

BUNDLED WITH
2.3.24
2.6.2
2 changes: 1 addition & 1 deletion dockerfiles/debian-develop/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM ruby:3.3
FROM ruby:3.4

MAINTAINER Pavel.Lobashov "[email protected]"
ENV VERSION="99.99.99"
Expand Down
2 changes: 1 addition & 1 deletion dockerfiles/debian-next-release/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM ruby:3.3
FROM ruby:3.4

MAINTAINER Pavel.Lobashov "[email protected]"
ENV VERSION="8.3.0"
Expand Down
2 changes: 1 addition & 1 deletion dockerfiles/rockylinux-latest/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM ghcr.io/onlyoffice-qa/rocky-ruby-image:3.3.1
FROM ghcr.io/onlyoffice-qa/rocky-ruby-image:3.4.1

COPY . /doc-builder-testing
WORKDIR /doc-builder-testing
Expand Down
16 changes: 8 additions & 8 deletions lib/doc_builder_testing/doc_builder_wrapper.rb
Original file line number Diff line number Diff line change
Expand Up @@ -42,8 +42,8 @@ def run_build_command(script_file, **kwargs)
# @param script_file [String] script file
# @param kwargs [Hash] build arguments passed to script in key=value format
# @return [nil]
def build(script_file, **kwargs)
build_result = `#{run_build_command(script_file, **kwargs)}`
def build(script_file, **)
build_result = `#{run_build_command(script_file, **)}`
raise DocBuilderError, build_result if /[Ee]rror|not found/.match?(build_result)
end

Expand All @@ -64,18 +64,18 @@ def license_path
# @param kwargs [Hash] build arguments passed to script in key=value format
# @return [OoxmlParser::CommonDocumentStructure] parsed file if file is Ooxml
# @return [OnlyofficePdfParser::PdfStructure] parsed structure if file is PDF
def build_and_parse(script_file, **kwargs)
temp_script_data = build_file(script_file, **kwargs)
def build_and_parse(script_file, **)
temp_script_data = build_file(script_file, **)
parse(temp_script_data)
end

# Build file from script file
# @param script_file [String] path to file with script
# @param kwargs [Hash] build arguments passed to script in key=value format
# @return [String] path to build file
def build_file(script_file, **kwargs)
def build_file(script_file, **)
temp_script_data = change_output_file(script_file)
build(temp_script_data[:temp_script_file].path, **kwargs)
build(temp_script_data[:temp_script_file].path, **)
wait_file_creation(temp_script_data[:output_file])
temp_script_data[:output_file]
end
Expand All @@ -84,9 +84,9 @@ def build_file(script_file, **kwargs)
# @param [String] script_file file to build
# @param kwargs [Hash] build arguments passed to script in key=value format
# @return [BinTimeResultParser] Process data
def build_file_with_usage_stats(script_file, **kwargs)
def build_file_with_usage_stats(script_file, **)
temp_script_data = change_output_file(script_file)
output = `/usr/bin/time -v #{run_build_command(temp_script_data[:temp_script_file].path, **kwargs)}`
output = `/usr/bin/time -v #{run_build_command(temp_script_data[:temp_script_file].path, **)}`
BinTimeResultParser.new(output)
end
end
8 changes: 4 additions & 4 deletions lib/doc_builder_testing/web_doc_builder_wrapper.rb
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,8 @@ def default_web_builder_url
# @param kwargs [Hash] build arguments passed to script in key=value format
# @return [OoxmlParser::CommonDocumentStructure] parsed file if file is Ooxml
# @return [OnlyofficePdfParser::PdfStructure] parsed structure if file is PDF
def build_and_parse(script_file, **kwargs)
output_file = build_file(script_file, **kwargs)
def build_and_parse(script_file, **)
output_file = build_file(script_file, **)
parse(output_file)
end

Expand All @@ -50,10 +50,10 @@ def version
# @param script_file [String] path to file with script
# @param kwargs [Hash] build arguments passed to script in key=value format
# @return [String] path to build file
def build_file(script_file, **kwargs)
def build_file(script_file, **)
temp_script_data = change_output_file(script_file)
@temp_script_data = temp_script_data
link_to_file = build(temp_script_data[:temp_script_file].path, **kwargs)
link_to_file = build(temp_script_data[:temp_script_file].path, **)
download_file(link_to_file, temp_script_data[:output_file])
temp_script_data[:output_file]
end
Expand Down

0 comments on commit e551df3

Please sign in to comment.