Skip to content

Commit

Permalink
Drop ruby 2.6 support
Browse files Browse the repository at this point in the history
  • Loading branch information
lacostej committed Feb 27, 2024
1 parent 2f3a2f6 commit 482fc28
Show file tree
Hide file tree
Showing 9 changed files with 19 additions and 41 deletions.
13 changes: 3 additions & 10 deletions .circleci/config.yml
Expand Up @@ -263,11 +263,6 @@ workflows:
version: 2
"Run Tests & Checks": # Name of the workflow, which ends up displayed on GitHub's PR Check
jobs:
- tests_macos:
name: 'Execute tests on macOS (Xcode 12.5.1, Ruby 2.6)'
xcode_version: '12.5.1'
ruby_version: '2.6.6'
<<: *important-branches
- tests_macos:
name: 'Execute tests on macOS (Xcode 12.5.1, Ruby 2.7)'
xcode_version: '12.5.1'
Expand Down Expand Up @@ -312,8 +307,7 @@ workflows:
ruby_opt: -W:deprecated
- tests_ubuntu:
name: 'Execute tests on Ubuntu'
image: 'fastlanetools/ci:0.3.0'
ruby_version: '2.6'
ruby_version: 'cimg/ruby:2.7'
- validate_fastlane_swift_generation:
name: 'Validate Fastlane.swift generation'
xcode_version: '12.5.1'
Expand All @@ -324,8 +318,7 @@ workflows:
ruby_version: '3.2'
- lint_source_code:
name: 'Lint source code'
image: 'cimg/ruby:2.6'
ruby_version: '2.6'
image: 'cimg/ruby:2.7'
- modules_load_up_tests:
name: 'Modules load up tests'
image: 'cimg/ruby:2.6'
image: 'cimg/ruby:2.7'
2 changes: 1 addition & 1 deletion .rubocop.yml
Expand Up @@ -8,7 +8,7 @@ require:
- ./rubocop/is_string_usage.rb

AllCops:
TargetRubyVersion: 2.6
TargetRubyVersion: 2.7
NewCops: enable
Include:
- '**/*.rb'
Expand Down
6 changes: 1 addition & 5 deletions Gemfile
Expand Up @@ -19,11 +19,7 @@ gem "fakefs", "1.8"
# for file uploads with Faraday
gem "mime-types", ['>= 1.16', '< 4.0']
# Fast XML parser and object marshaller.
if RUBY_VERSION < '2.7.0'
gem "ox", "2.13.2"
else
gem "ox", "2.14.16"
end
gem "ox", "2.14.16"
# Provides an interactive debugging environment for Ruby.
gem "pry"
# A plugin for pry that adds step-by-step debugging and stack navigation.
Expand Down
6 changes: 3 additions & 3 deletions Gemfile.lock
Expand Up @@ -216,7 +216,7 @@ GEM
open4 (1.3.4)
optparse (0.4.0)
os (1.1.4)
ox (2.13.2)
ox (2.14.16)
parallel (1.23.0)
parser (3.2.2.3)
ast (~> 2.4.1)
Expand Down Expand Up @@ -371,7 +371,7 @@ DEPENDENCIES
fastlane-plugin-ruby
fastlane-plugin-slack_train (>= 0.2.0)
mime-types (>= 1.16, < 4.0)
ox (= 2.13.2)
ox (= 2.14.16)
pry
pry-byebug
pry-rescue
Expand All @@ -390,4 +390,4 @@ DEPENDENCIES
yard (~> 0.9.11)

BUNDLED WITH
2.3.21
2.3.13
3 changes: 1 addition & 2 deletions appveyor.yml
Expand Up @@ -42,8 +42,7 @@ environment:
LANG: en_US.UTF-8
FASTLANE_ITUNES_TRANSPORTER_PATH: C:/tmp
matrix:
- ruby_version: 26-x64
# - ruby_version: 27-x64
- ruby_version: 27-x64
# - ruby_version: 30-x64 # disabled for now as we only have 1 concurent job
# - ruby_version: 31-x64
- ruby_version: 32-x64
Expand Down
4 changes: 2 additions & 2 deletions bin/fastlane
@@ -1,7 +1,7 @@
#!/usr/bin/env ruby

if RUBY_VERSION < '2.0.0'
abort("fastlane requires Ruby 2.0.0 or higher")
if RUBY_VERSION < '2.7.0'
abort("fastlane requires Ruby 2.7.0 or higher")
end

def self.windows?
Expand Down
4 changes: 2 additions & 2 deletions fastlane.gemspec
Expand Up @@ -7,7 +7,7 @@ require 'fastlane/version'
# Copy over the latest .rubocop.yml style guide
require 'yaml'
rubocop_config = File.expand_path('../.rubocop.yml', __FILE__)
config = YAML.safe_load(open(rubocop_config))
config = YAML.safe_load(open(rubocop_config), aliases: true)
config['require'] = [
'rubocop/require_tools',
'rubocop-performance'
Expand Down Expand Up @@ -62,7 +62,7 @@ Gem::Specification.new do |spec|
"source_code_uri" => "https://github.com/fastlane/fastlane"
}

spec.required_ruby_version = '>= 2.6'
spec.required_ruby_version = '>= 2.7'

spec.files = Dir.glob("*/lib/**/*", File::FNM_DOTMATCH) + Dir["fastlane/swift/**/*"] + Dir["bin/*"] + Dir["*/README.md"] + %w(README.md LICENSE .yardopts) - Dir["fastlane/lib/fastlane/actions/device_grid/assets/*"] - Dir["fastlane/lib/fastlane/actions/docs/assets/*"]
spec.bindir = "bin"
Expand Down
Expand Up @@ -15,7 +15,7 @@ Gem::Specification.new do |spec|
spec.files = Dir["lib/**/*"] + %w(README.md LICENSE)
spec.require_paths = ['lib']
spec.metadata['rubygems_mfa_required'] = 'true'
spec.required_ruby_version = '>= 2.6'
spec.required_ruby_version = '>= 2.7'

# Don't add a dependency to fastlane or fastlane_re
# since this would cause a circular dependency
Expand Down
20 changes: 5 additions & 15 deletions spaceship/lib/spaceship/spaceauth_runner.rb
Expand Up @@ -68,21 +68,11 @@ def run
end

def load_cookies(content)
# When Ruby 2.5 support is dropped, we can safely get rid of the latter branch.
if YAML.name == 'Psych' && Gem::Version.new(Psych::VERSION) >= Gem::Version.new('3.1')
YAML.safe_load(
content,
permitted_classes: [HTTP::Cookie, Time],
aliases: true
)
else
YAML.safe_load(
content,
[HTTP::Cookie, Time], # classes allowlist
[], # symbols allowlist
true # allow YAML aliases
)
end
YAML.safe_load(
content,
permitted_classes: [HTTP::Cookie, Time],
aliases: true
)
end

def session_string
Expand Down

0 comments on commit 482fc28

Please sign in to comment.