diff --git a/.github/workflows/Specs.yml b/.github/workflows/Specs.yml index 3d1fff6f8..9470c4de7 100644 --- a/.github/workflows/Specs.yml +++ b/.github/workflows/Specs.yml @@ -6,7 +6,7 @@ jobs: fail-fast: false matrix: os: [ubuntu-24.04] - ruby: [2.6, 2.7, 3.0.0, 3.2.2] + ruby: [2.6, 2.7, 3.0.0, 3.2.2, 3.4] include: - os: macos-15 ruby: system diff --git a/Gemfile.lock b/Gemfile.lock index 364ef60de..422a75e6b 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -27,8 +27,8 @@ GEM minitest (>= 5.1) securerandom (>= 0.3) tzinfo (~> 2.0, >= 2.0.5) - addressable (2.8.7) - public_suffix (>= 2.0.2, < 7.0) + addressable (2.9.0) + public_suffix (>= 2.0.2, < 8.0) algoliasearch (1.27.5) httpclient (~> 2.8, >= 2.8.3) json (>= 1.5.1) @@ -41,15 +41,17 @@ GEM coderay (1.1.3) concurrent-ruby (1.3.4) connection_pool (2.4.1) - crack (0.4.5) + crack (1.0.1) + bigdecimal rexml drb (2.2.1) ethon (0.16.0) ffi (>= 1.15.0) ffi (1.17.0) fuzzy_match (2.0.4) - hashdiff (1.0.1) - httpclient (2.8.3) + hashdiff (1.2.1) + httpclient (2.9.0) + mutex_m i18n (1.14.6) concurrent-ruby (~> 1.0) json (2.7.5) @@ -69,6 +71,7 @@ GEM metaclass (~> 0.0.1) mocha-on-bacon (0.2.3) mocha (>= 0.13.0) + mutex_m (0.3.0) nap (1.1.0) netrc (0.11.0) notify (0.5.2) @@ -91,7 +94,8 @@ GEM rb-kqueue (0.2.8) ffi (>= 0.5.0) regexp_parser (2.8.2) - rexml (3.2.6) + rexml (3.2.9) + strscan rubocop (1.57.1) base64 (~> 0.1.1) json (~> 2.3) @@ -111,13 +115,14 @@ GEM rubocop-ast (>= 0.4.0) ruby-progressbar (1.13.0) securerandom (0.3.1) + strscan (3.1.8) typhoeus (1.4.1) ethon (>= 0.9.0) tzinfo (2.0.6) concurrent-ruby (~> 1.0) unicode-display_width (2.5.0) vcr (6.2.0) - webmock (3.19.1) + webmock (3.26.2) addressable (>= 2.8.0) crack (>= 0.3.2) hashdiff (>= 0.4.0, < 2.0.0) diff --git a/spec/standard_error_spec.rb b/spec/standard_error_spec.rb index 40c5f9510..bd0b9a2e9 100644 --- a/spec/standard_error_spec.rb +++ b/spec/standard_error_spec.rb @@ -39,7 +39,24 @@ module Pod @err.stubs(:description).returns("Invalid `Three20.podspec` file: #{syntax_error.message}") @err.stubs(:underlying_exception).returns(syntax_error) File.stubs(:read).returns(code) - @err.message.should == if Pod::Version.new(RUBY_VERSION) >= Pod::Version.new('2.7.0') + expected = if Pod::Version.new(RUBY_VERSION) >= Pod::Version.new('3.4.0') + <<-MSG.strip_heredoc + +[!] Invalid `Three20.podspec` file: syntax errors found + 1 | puts 'hi' +> 2 | puts()) + | ^ unexpected ')', ignoring it + | ^ unexpected ')', expecting end-of-input + 3 | puts 'bye'\n. + + # from #{@dsl_path.expand_path}:2 + # ------------------------------------------- + # puts 'hi' + > puts()) + # puts 'bye' + # ------------------------------------------- + MSG + elsif Pod::Version.new(RUBY_VERSION) >= Pod::Version.new('2.7.0') <<-MSG.strip_heredoc [!] Invalid `Three20.podspec` file: syntax error, unexpected ')', expecting end-of-input @@ -66,7 +83,10 @@ module Pod # puts 'bye' # ------------------------------------------- MSG - end + end + # Ruby colorizes the syntax error snippet when running in a TTY, so + # strip ANSI escape sequences to keep the comparison TTY-agnostic. + @err.message.gsub(/\e\[[0-9;]*m/, '').should == expected end it 'uses the passed-in contents' do