Skip to content

Commit 2843b96

Browse files
authored
Merge pull request #375 from zendesk/update-ruby
[APPS-7391] Update ruby support
2 parents 86580c4 + 817c961 commit 2843b96

File tree

9 files changed

+47
-41
lines changed

9 files changed

+47
-41
lines changed

.github/workflows/actions.yml

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,11 +14,9 @@ jobs:
1414
fail-fast: false
1515
matrix:
1616
ruby-version:
17-
- '2.7'
18-
- '3.0'
19-
- '3.1'
2017
- '3.2'
2118
- '3.3'
19+
- '3.4'
2220
steps:
2321
- uses: zendesk/checkout@v3
2422
- uses: zendesk/setup-ruby@v1

.rubocop.yml

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,18 @@
11
AllCops:
2-
TargetRubyVersion: 2.6
2+
NewCops: enable
33
Include:
44
- 'Gemfile'
55
- 'Rakefile'
66
Exclude:
77
- 'vendor/**/*'
88

9-
ClassLength:
9+
Metrics/ClassLength:
1010
Enabled: false
1111

12-
Documentation:
12+
Style/Documentation:
1313
Enabled: false
1414

15-
MethodLength:
15+
Metrics/MethodLength:
1616
Enabled: false
1717

1818
Style/Alias:
@@ -21,10 +21,10 @@ Style/Alias:
2121
Layout/FirstArrayElementIndentation:
2222
Enabled: false
2323

24-
HashSyntax:
24+
Style/HashSyntax:
2525
EnforcedStyle: ruby19
2626

27-
Metrics/LineLength:
27+
Layout/LineLength:
2828
Max: 120
2929

3030
Metrics/BlockLength:
@@ -35,7 +35,7 @@ Metrics/ModuleLength:
3535
CountComments: false # count full line comments?
3636
Max: 200
3737

38-
CommentAnnotation:
38+
Style/CommentAnnotation:
3939
Keywords:
4040
- TODO
4141
- FIXME

.rubocop_todo.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ Naming/BinaryOperatorParameterName:
5353
# NamePrefix: is_, has_, have_
5454
# NamePrefixBlacklist: is_, has_, have_
5555
# NameWhitelist: is_a?
56-
Style/PredicateName:
56+
Naming/PredicateName:
5757
Exclude:
5858
- 'spec/**/*'
5959
- 'lib/zendesk_apps_support/package.rb'

.ruby-version

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
2.7.8
1+
3.2.8

Gemfile.lock

Lines changed: 30 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -17,9 +17,9 @@ PATH
1717
GEM
1818
remote: https://rubygems.org/
1919
specs:
20-
ast (2.4.2)
20+
ast (2.4.3)
2121
bump (0.5.4)
22-
byebug (9.0.6)
22+
byebug (11.1.3)
2323
concurrent-ruby (1.2.2)
2424
crass (1.0.6)
2525
diff-lcs (1.5.0)
@@ -32,25 +32,28 @@ GEM
3232
image_size (2.0.2)
3333
ipaddress_2 (0.13.0)
3434
json (2.6.3)
35+
language_server-protocol (3.17.0.4)
36+
lint_roller (1.1.0)
3537
loofah (2.19.1)
3638
crass (~> 1.0.2)
3739
nokogiri (>= 1.5.9)
3840
marcel (1.0.2)
39-
mini_portile2 (2.8.2)
40-
nokogiri (1.14.3)
41-
mini_portile2 (~> 2.8.0)
41+
mini_portile2 (2.8.8)
42+
nokogiri (1.18.8)
43+
mini_portile2 (~> 2.8.2)
4244
racc (~> 1.4)
4345
parallel (1.12.1)
44-
parser (3.0.2.0)
46+
parser (3.3.8.0)
4547
ast (~> 2.4.1)
46-
racc (1.6.2)
47-
rainbow (3.0.0)
48+
racc
49+
prism (1.4.0)
50+
racc (1.8.1)
51+
rainbow (3.1.1)
4852
rake (13.0.6)
4953
rb-fsevent (0.11.2)
5054
rb-inotify (0.9.10)
5155
ffi (>= 0.5.0, < 2)
52-
regexp_parser (2.1.1)
53-
rexml (3.3.9)
56+
regexp_parser (2.10.0)
5457
rspec (3.12.0)
5558
rspec-core (~> 3.12.0)
5659
rspec-expectations (~> 3.12.0)
@@ -64,34 +67,39 @@ GEM
6467
diff-lcs (>= 1.2.0, < 2.0)
6568
rspec-support (~> 3.12.0)
6669
rspec-support (3.12.0)
67-
rubocop (1.20.0)
70+
rubocop (1.75.3)
71+
json (~> 2.3)
72+
language_server-protocol (~> 3.17.0.2)
73+
lint_roller (~> 1.1.0)
6874
parallel (~> 1.10)
69-
parser (>= 3.0.0.0)
75+
parser (>= 3.3.0.2)
7076
rainbow (>= 2.2.2, < 4.0)
71-
regexp_parser (>= 1.8, < 3.0)
72-
rexml
73-
rubocop-ast (>= 1.9.1, < 2.0)
77+
regexp_parser (>= 2.9.3, < 3.0)
78+
rubocop-ast (>= 1.44.0, < 2.0)
7479
ruby-progressbar (~> 1.7)
75-
unicode-display_width (>= 1.4.0, < 3.0)
76-
rubocop-ast (1.11.0)
77-
parser (>= 3.0.1.1)
78-
ruby-progressbar (1.11.0)
80+
unicode-display_width (>= 2.4.0, < 4.0)
81+
rubocop-ast (1.44.1)
82+
parser (>= 3.3.7.2)
83+
prism (~> 1.4)
84+
ruby-progressbar (1.13.0)
7985
sass (3.7.4)
8086
sass-listen (~> 4.0.0)
8187
sass-listen (4.0.0)
8288
rb-fsevent (~> 0.9, >= 0.9.4)
8389
rb-inotify (~> 0.9, >= 0.9.7)
8490
sassc (2.4.0)
8591
ffi (~> 1.9)
86-
unicode-display_width (2.0.0)
92+
unicode-display_width (3.1.4)
93+
unicode-emoji (~> 4.0, >= 4.0.4)
94+
unicode-emoji (4.0.4)
8795

8896
PLATFORMS
8997
ruby
9098

9199
DEPENDENCIES
92100
bump (~> 0.5.1)
93101
bundler (~> 2.2)
94-
byebug (~> 9.0.6)
102+
byebug
95103
faker
96104
parallel (= 1.12.1)
97105
rake
@@ -100,4 +108,4 @@ DEPENDENCIES
100108
zendesk_apps_support!
101109

102110
BUNDLED WITH
103-
2.4.12
111+
2.4.19

Rakefile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,10 +27,10 @@ standard_i18n_file = project_root.join('config/locales/en.yml')
2727

2828
file standard_i18n_file => zendesk_i18n_file do |task|
2929
header = "# This is a generated file. Do NOT edit directly.\n# To update, run 'bundle exec rake i18n:standardize'.\n"
30-
input = YAML.safe_load(File.read(task.prerequisites.first))
30+
input = YAML.safe_load_file(task.prerequisites.first)
3131
translations = input['parts'].map { |part| part['translation'] }
3232
yaml = YAML.dump('en' => array_to_nested_hash(translations))
33-
File.open(task.name, 'w') { |f| f << header + yaml }
33+
File.open(task.name, 'w') { |f| f << (header + yaml) }
3434
end
3535

3636
namespace :i18n do

lib/zendesk_apps_support/validations/secrets.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ module Secrets
99
].freeze
1010

1111
APPLICATION_SECRETS = {
12-
# rubocop:disable Metrics/LineLength
12+
# rubocop:disable Layout/LineLength
1313
'Slack Token' => /(xox[p|b|o|a]-*.[a-z0-9])/,
1414
'RSA Private Key' => /-----BEGIN RSA PRIVATE KEY-----/,
1515
'SSH Private Key (OpenSSH)' => /-----BEGIN OPENSSH PRIVATE KEY-----/,
@@ -45,7 +45,7 @@ module Secrets
4545
'Attachment Token Key' => /(attachment_token_key.*.[0-9a-f]{24,72})/,
4646
'Password' => /([pP][aA][sS][sS][wW][oO][rR][dD].*.[0-9a-zA-Z+_.-]{4,156})/,
4747
'Token' => /([tT][oO][kK][eE][nN]( [:\"=-]|[:\"=-]).*.[0-9a-zA-Z+_.-]{4,156})/
48-
# rubocop:enable Metrics/LineLength
48+
# rubocop:enable Layout/LineLength
4949
}.freeze
5050

5151
class << self

lib/zendesk_apps_support/validations/translations.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ def call(package, opts = {})
1919
errors << locale_error(file, path_match[1]) << json_error(file) << format_error(file)
2020
next unless errors.compact.empty?
2121
if file.relative_path == 'translations/en.json'
22-
# rubocop:disable Metrics/LineLength
22+
# rubocop:disable Layout/LineLength
2323
errors.push(*validate_marketplace_content(file, package, opts.fetch(:skip_marketplace_translations, false)))
2424
end
2525
end.compact

zendesk_apps_support.gemspec

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ Gem::Specification.new do |s|
1010
s.summary = 'Support to help you develop Zendesk Apps.'
1111
s.description = s.summary
1212

13-
s.required_ruby_version = Gem::Requirement.new('>= 2.7')
13+
s.required_ruby_version = Gem::Requirement.new('>= 3.2')
1414
s.required_rubygems_version = '>= 1.3.6'
1515

1616
s.add_runtime_dependency 'i18n', '>= 1.7.1'
@@ -28,7 +28,7 @@ Gem::Specification.new do |s|
2828
s.add_development_dependency 'bump', '~> 0.5.1'
2929
s.add_development_dependency 'faker'
3030
s.add_development_dependency 'rubocop'
31-
s.add_development_dependency 'byebug', '~> 9.0.6'
31+
s.add_development_dependency 'byebug'
3232
s.add_development_dependency 'bundler', '~> 2.2'
3333
s.add_development_dependency 'parallel', '1.12.1'
3434
s.add_development_dependency 'rake'

0 commit comments

Comments
 (0)