From c37fb72bb40f4d96cf41d01cc43b23163b14b905 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=9A=D0=B8=D1=80=D0=B8=D0=BB=D0=BB=20=D0=9B=D0=B5=D0=BE?= =?UTF-8?q?=D0=BD=D0=BE=D0=B2?= <71232234+leonovk@users.noreply.github.com> Date: Mon, 26 Feb 2024 10:44:46 +0300 Subject: [PATCH] Remove unnecessary dependency (#12) --- .github/workflows/ruby.yml | 5 +---- Gemfile.lock | 6 +----- activeyaml.gemspec | 3 +-- lib/active_yaml/parser.rb | 4 ++-- lib/active_yaml/version.rb | 2 +- 5 files changed, 6 insertions(+), 14 deletions(-) diff --git a/.github/workflows/ruby.yml b/.github/workflows/ruby.yml index a33af6f..8effe39 100644 --- a/.github/workflows/ruby.yml +++ b/.github/workflows/ruby.yml @@ -14,7 +14,7 @@ jobs: - uses: actions/checkout@v3 - uses: ruby/setup-ruby@v1 with: - ruby-version: '2.7' + ruby-version: '3.3' - name: Install dependencies run: bundle install @@ -29,10 +29,7 @@ jobs: fail-fast: false # don't fail all matrix builds if one fails matrix: ruby: - - '2.7' - '3.0' - - '3.1' - - '3.2' - '3.3' continue-on-error: ${{ endsWith(matrix.ruby, 'head') }} steps: diff --git a/Gemfile.lock b/Gemfile.lock index 5d4c83b..4f0c864 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -1,8 +1,7 @@ PATH remote: . specs: - activeyaml (1.2.3) - psych (~> 5.1) + activeyaml (1.3.0) GEM remote: https://rubygems.org/ @@ -23,8 +22,6 @@ GEM parser (3.2.2.4) ast (~> 2.4.1) racc - psych (5.1.2) - stringio racc (1.7.3) rainbow (3.1.1) rake (13.1.0) @@ -46,7 +43,6 @@ GEM rubocop-minitest (0.33.0) rubocop (>= 1.39, < 2.0) ruby-progressbar (1.13.0) - stringio (3.1.0) unicode-display_width (2.5.0) PLATFORMS diff --git a/activeyaml.gemspec b/activeyaml.gemspec index 235982f..804e6ab 100644 --- a/activeyaml.gemspec +++ b/activeyaml.gemspec @@ -12,9 +12,8 @@ Gem::Specification.new do |s| s.files = Dir.glob('lib/**/*') s.homepage = 'https://github.com/leonovk/activeyaml' s.license = 'MIT' - s.required_ruby_version = '>= 2.4' + s.required_ruby_version = '>= 3.0' s.metadata['homepage_uri'] = s.homepage s.metadata['source_code_uri'] = s.homepage s.metadata['documentation_uri'] = s.homepage - s.add_dependency 'psych', '~> 5.1' end diff --git a/lib/active_yaml/parser.rb b/lib/active_yaml/parser.rb index f458f2a..cbd2385 100644 --- a/lib/active_yaml/parser.rb +++ b/lib/active_yaml/parser.rb @@ -1,12 +1,12 @@ # frozen_string_literal: true -require 'psych' +require 'yaml' module ActiveYaml # The main parser of Yaml files, uses psych under the hood class Parser def self.parse(file_path) - Psych.safe_load_file(file_path) + YAML.safe_load_file(file_path) end end end diff --git a/lib/active_yaml/version.rb b/lib/active_yaml/version.rb index 73d01e6..66f4548 100644 --- a/lib/active_yaml/version.rb +++ b/lib/active_yaml/version.rb @@ -1,5 +1,5 @@ # frozen_string_literal: true module ActiveYaml - VERSION = '1.2.3' + VERSION = '1.3.0' end