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
add ruby 3.1 and 3.2 support, drop ruby 2.6 #355
Changes from all commits
22bd5f0
8dc7844
4fed852
fd14a66
4160b4b
247c5cd
847c967
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
2.6.10 | ||
2.7.8 |
Original file line number | Diff line number | Diff line change | ||||
---|---|---|---|---|---|---|
|
@@ -18,7 +18,7 @@ def message | |||||
|
||||||
# if the error contains the word `_legacy` in the second sentence, let's | ||||||
# only use the first one. | ||||||
if [original, attempted].any? { |val| val =~ /_legacy/ } | ||||||
if [original, attempted].any? { |val| val.is_a?(String) && val =~ /_legacy/ } | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Would the following work?
Suggested change
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. No: |
||||||
return translated_error | ||||||
end | ||||||
translated_detail_key = 'txt.apps.admin.error.app_build.duplicate_reference_values' | ||||||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -434,7 +434,8 @@ def no_template_format_error(manifest) | |
|
||
def valid_url?(value) | ||
uri = URI.parse(value) | ||
uri.is_a?(URI::HTTP) && !uri.host.nil? | ||
host_empty = uri.host.nil? || uri.host == '' | ||
uri.is_a?(URI::HTTP) && !host_empty | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. In newer URI versions, host for "https://" is an empty string, not |
||
rescue URI::InvalidURIError | ||
false | ||
end | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -300,7 +300,7 @@ def build_app_source_with_files(files) | |
|
||
it 'includes zh-cn in translations' do | ||
expected_translations = JSON.parse(File.read('spec/translations/zh-cn.json')) | ||
expect(package.send(:translations)['zh-cn'].except('custom1')).to eq(expected_translations) | ||
expect(I18n::Utils.except(package.send(:translations)['zh-cn'], 'custom1')).to eq(expected_translations) | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Hash refinements are removed in recents i18n versions (ruby-i18n/i18n#573). |
||
end | ||
|
||
it 'merges missing keys with the default locale' do | ||
|
@@ -319,7 +319,7 @@ def build_app_source_with_files(files) | |
|
||
it 'removes zendesk-specific keys in translations' do | ||
expected_translations = JSON.parse(File.read('spec/translations/zh-cn.json')) | ||
expect(package.send(:translations)['zh-cn'].except('custom1')).to eq(expected_translations) | ||
expect(I18n::Utils.except(package.send(:translations)['zh-cn'], 'custom1')).to eq(expected_translations) | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Hash refinements are removed in recents i18n versions (ruby-i18n/i18n#573). |
||
end | ||
|
||
it 'merges missing keys with the default locale' do | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,18 +2,18 @@ | |
|
||
Gem::Specification.new do |s| | ||
s.name = 'zendesk_apps_support' | ||
s.version = '4.38.3' | ||
s.version = '4.39.0' | ||
s.license = 'Apache License Version 2.0' | ||
s.authors = ['James A. Rosen', 'Likun Liu', 'Sean Caffery', 'Daniel Ribeiro'] | ||
s.email = ['dev@zendesk.com'] | ||
s.homepage = 'http://github.com/zendesk/zendesk_apps_support' | ||
s.summary = 'Support to help you develop Zendesk Apps.' | ||
s.description = s.summary | ||
|
||
s.required_ruby_version = Gem::Requirement.new('>= 2.6', '< 3.1') | ||
s.required_ruby_version = Gem::Requirement.new('>= 2.7') | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I think we can drop v2.7 support given it's past EOL now. |
||
s.required_rubygems_version = '>= 1.3.6' | ||
|
||
s.add_runtime_dependency 'i18n' | ||
s.add_runtime_dependency 'i18n', '>= 1.7.1' | ||
s.add_runtime_dependency 'sassc' | ||
s.add_runtime_dependency 'sass' # remove explicit dependency when all compilation uses SassC | ||
s.add_runtime_dependency 'json' | ||
|
@@ -24,9 +24,9 @@ Gem::Specification.new do |s| | |
s.add_runtime_dependency 'rb-inotify', '0.9.10' | ||
s.add_runtime_dependency 'marcel' | ||
s.add_runtime_dependency 'ipaddress_2', '~> 0.13.0' | ||
s.add_development_dependency 'rspec', '~> 3.4.0' | ||
s.add_development_dependency 'rspec' | ||
s.add_development_dependency 'bump', '~> 0.5.1' | ||
s.add_development_dependency 'faker', '~> 1.6.6' | ||
s.add_development_dependency 'faker' | ||
s.add_development_dependency 'rubocop' | ||
s.add_development_dependency 'byebug', '~> 9.0.6' | ||
s.add_development_dependency 'bundler', '~> 2.2' | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
=~
for non-strings has been removed from recent Ruby versions (and was deprecated—and often meaningless—before), so now we compare only strings to this regex.