diff --git a/.github/workflows/functional-test.yml b/.github/workflows/functional-test.yml index 8ac4822c..4777020f 100644 --- a/.github/workflows/functional-test.yml +++ b/.github/workflows/functional-test.yml @@ -60,7 +60,7 @@ jobs: - name: Set up Ruby uses: ruby/setup-ruby@v1 with: - ruby-version: 3.2 + ruby-version: 3.3 - run: | bundle install rake ios diff --git a/.github/workflows/rubocop.yml b/.github/workflows/rubocop.yml index a6afb6cd..3534caf5 100644 --- a/.github/workflows/rubocop.yml +++ b/.github/workflows/rubocop.yml @@ -11,7 +11,7 @@ jobs: strategy: fail-fast: false matrix: - ruby: [3.0, 3.1, 3.2, 3.3] + ruby: [3.1, 3.2, 3.3] runs-on: ubuntu-latest diff --git a/.rubocop.yml b/.rubocop.yml index 1fce213c..08e9817b 100644 --- a/.rubocop.yml +++ b/.rubocop.yml @@ -1,5 +1,5 @@ AllCops: - TargetRubyVersion: 3.0 + TargetRubyVersion: 3.1 Metrics/LineLength: Max: 128 Metrics/MethodLength: @@ -219,3 +219,81 @@ Style/OpenStructUse: # new in 1.23 Enabled: false Lint/RedundantStringCoercion: Enabled: false +Gemspec/AddRuntimeDependency: # new in 1.65 + Enabled: true +Lint/ConstantReassignment: # new in 1.70 + Enabled: true +Lint/DuplicateMatchPattern: # new in 1.50 + Enabled: true +Lint/DuplicateSetElement: # new in 1.67 + Enabled: true +Lint/HashNewWithKeywordArgumentsAsDefault: # new in 1.69 + Enabled: true +Lint/ItWithoutArgumentsInBlock: # new in 1.59 + Enabled: true +Lint/LiteralAssignmentInCondition: # new in 1.58 + Enabled: true +Lint/MixedCaseRange: # new in 1.53 + Enabled: true +Lint/NumericOperationWithConstantResult: # new in 1.69 + Enabled: true +Lint/RedundantRegexpQuantifiers: # new in 1.53 + Enabled: true +Lint/SharedMutableDefault: # new in 1.70 + Enabled: true +Lint/UnescapedBracketInRegexp: # new in 1.68 + Enabled: true +Lint/UselessDefined: # new in 1.69 + Enabled: true +Lint/UselessNumericOperation: # new in 1.66 + Enabled: true +Style/AmbiguousEndlessMethodDefinition: # new in 1.68 + Enabled: true +Style/BitwisePredicate: # new in 1.68 + Enabled: true +Style/CombinableDefined: # new in 1.68 + Enabled: true +Style/DataInheritance: # new in 1.49 + Enabled: true +Style/DigChain: # new in 1.69 + Enabled: true +Style/ExactRegexpMatch: # new in 1.51 + Enabled: true +Style/FileNull: # new in 1.69 + Enabled: true +Style/FileTouch: # new in 1.69 + Enabled: true +Style/ItAssignment: # new in 1.70 + Enabled: true +Style/KeywordArgumentsMerging: # new in 1.68 + Enabled: true +Style/MapIntoArray: # new in 1.63 + Enabled: true +Style/RedundantArrayConstructor: # new in 1.52 + Enabled: true +Style/RedundantCurrentDirectoryInPath: # new in 1.53 + Enabled: true +Style/RedundantFilterChain: # new in 1.52 + Enabled: true +Style/RedundantInterpolationUnfreeze: # new in 1.66 + Enabled: true +Style/RedundantLineContinuation: # new in 1.49 + Enabled: true +Style/RedundantRegexpArgument: # new in 1.53 + Enabled: true +Style/RedundantRegexpConstructor: # new in 1.52 + Enabled: true +Style/ReturnNilInPredicateMethodDefinition: # new in 1.53 + Enabled: true +Style/SafeNavigationChainLength: # new in 1.68 + Enabled: false +Style/SendWithLiteralMethodName: # new in 1.64 + Enabled: true +Style/SingleLineDoEndBlock: # new in 1.57 + Enabled: true +Style/SuperArguments: # new in 1.64 + Enabled: true +Style/SuperWithArgsParentheses: # new in 1.58 + Enabled: true +Style/YAMLFileRead: # new in 1.53 + Enabled: true diff --git a/Gemfile b/Gemfile index 233cb63a..60a7c223 100644 --- a/Gemfile +++ b/Gemfile @@ -14,3 +14,13 @@ source 'https://rubygems.org' gemspec + +gem 'appium_thor', '~> 2.0' +gem 'fakefs', '~> 2.8.0' +gem 'hashdiff', '~> 1.1.0' +gem 'minitest', '~> 5.0' +gem 'minitest-reporters', '~> 1.1' +gem 'pry' +gem 'rake', '~> 13.0' +gem 'rubocop', '1.70.0' +gem 'yard', '~> 0.9.11' diff --git a/android_tests/Gemfile b/android_tests/Gemfile index b1100415..576c4882 100644 --- a/android_tests/Gemfile +++ b/android_tests/Gemfile @@ -13,4 +13,5 @@ # limitations under the License. source 'https://rubygems.org' -gemspec path: File.expand_path('..', __dir__) # __dir__ fails on 1.9 +gemspec path: File.expand_path('..', __dir__) +eval_gemfile File.join(File.expand_path('..', __dir__), 'Gemfile') diff --git a/appium_lib.gemspec b/appium_lib.gemspec index 8d0ae385..e31f6592 100644 --- a/appium_lib.gemspec +++ b/appium_lib.gemspec @@ -1,7 +1,7 @@ require_relative 'lib/appium_lib/version' Gem::Specification.new do |s| - s.required_ruby_version = '>= 3.0' + s.required_ruby_version = '>= 3.1' s.name = 'appium_lib' s.version = Appium::VERSION @@ -13,19 +13,9 @@ Gem::Specification.new do |s| s.homepage = 'https://github.com/appium/ruby_lib' # published as appium_lib s.require_paths = ['lib'] - s.add_runtime_dependency 'appium_lib_core', '~> 9.2', '>= 9.2.1' - s.add_runtime_dependency 'nokogiri', '~> 1.8', '>= 1.8.1' - s.add_runtime_dependency 'tomlrb', '>= 1.1', '< 3.0' - - s.add_development_dependency 'appium_thor', '~> 2.0' - s.add_development_dependency 'fakefs', '~> 2.8.0' - s.add_development_dependency 'hashdiff', '~> 1.1.0' - s.add_development_dependency 'minitest', '~> 5.0' - s.add_development_dependency 'minitest-reporters', '~> 1.1' - s.add_development_dependency 'pry' - s.add_development_dependency 'rake', '~> 13.0' - s.add_development_dependency 'rubocop', '1.70.0' - s.add_development_dependency 'yard', '~> 0.9.11' + s.add_dependency 'appium_lib_core', '~> 9.2', '>= 9.2.1' + s.add_dependency 'nokogiri', '~> 1.8', '>= 1.8.1' + s.add_dependency 'tomlrb', '>= 1.1', '< 3.0' s.files = `git ls-files`.split("\n").reject { |v| v.match(/\A^(ios_tests|android_tests|grid|test_apps)\/.+/) } s.metadata['rubygems_mfa_required'] = 'true' diff --git a/ios_tests/Gemfile b/ios_tests/Gemfile index c152c0d2..94a7e609 100644 --- a/ios_tests/Gemfile +++ b/ios_tests/Gemfile @@ -14,6 +14,7 @@ source 'https://rubygems.org' gemspec path: File.expand_path('..', __dir__) +eval_gemfile File.join(File.expand_path('..', __dir__), 'Gemfile') gem 'appium_console' gem 'parallel_tests' diff --git a/ios_tests/Rakefile b/ios_tests/Rakefile index 09a7c421..8cde5a3a 100644 --- a/ios_tests/Rakefile +++ b/ios_tests/Rakefile @@ -98,7 +98,7 @@ task :run_parallel_t do require_relative 'parallel/test' threads = [] - [Device.one, Device.two].each do |capability| + [Device.one, Device.two].map do |capability| threads << Thread.new do TestParallelRunThread.new(capability).test_run end