From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on dcvr.yhbt.net X-Spam-Level: X-Spam-ASN: AS22989 209.51.188.0/24 X-Spam-Status: No, score=-3.9 required=3.0 tests=AWL,BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,RCVD_IN_DNSWL_HI, RCVD_IN_MSPIKE_H3,RCVD_IN_MSPIKE_WL,SPF_HELO_PASS,SPF_PASS shortcircuit=no autolearn=ham autolearn_force=no version=3.4.2 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dcvr.yhbt.net (Postfix) with ESMTPS id AF1621F852 for ; Sun, 23 Jan 2022 21:38:06 +0000 (UTC) Received: from localhost ([::1]:56208 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nBkYn-0007Gb-Sa for e@80x24.org; Sun, 23 Jan 2022 16:38:05 -0500 Received: from eggs.gnu.org ([209.51.188.92]:40786) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nBkYm-0007EW-CE for dtas-all@nongnu.org; Sun, 23 Jan 2022 16:38:04 -0500 Received: from dcvr.yhbt.net ([64.71.152.64]:39884) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nBkYk-00007u-Ep for dtas-all@nongnu.org; Sun, 23 Jan 2022 16:38:04 -0500 Received: from localhost (dcvr.yhbt.net [127.0.0.1]) by dcvr.yhbt.net (Postfix) with ESMTP id B15641FA00 for ; Sun, 23 Jan 2022 21:37:46 +0000 (UTC) From: Eric Wong To: dtas-all@nongnu.org Subject: [PATCH 3/9] dtas: drop unnecessary "require 'yaml'" statements Date: Sun, 23 Jan 2022 21:37:40 +0000 Message-Id: <20220123213746.21085-4-e@80x24.org> In-Reply-To: <20220123213746.21085-1-e@80x24.org> References: <20220123213746.21085-1-e@80x24.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Received-SPF: pass client-ip=64.71.152.64; envelope-from=e@80x24.org; helo=dcvr.yhbt.net X-Spam_score_int: -18 X-Spam_score: -1.9 X-Spam_bar: - X-Spam_report: (-1.9 / 5.0 requ) BAYES_00=-1.9, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: dtas-all@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: duct tape audio suite List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dtas-all-bounces+e=80x24.org@nongnu.org Sender: "dtas-all" We use DTAS.yaml_load to wrap all YAML.*load calls, but we still need "require 'yaml'" for various .to_yaml calls. --- bin/dtas-console | 1 - bin/dtas-msinkctl | 1 - bin/dtas-player | 3 +-- bin/dtas-readahead | 1 - bin/dtas-splitfx | 1 - bin/dtas-tl | 1 - lib/dtas/edit_client.rb | 1 - lib/dtas/player.rb | 1 + lib/dtas/sink.rb | 3 +-- lib/dtas/source/splitfx.rb | 1 - test/player_integration.rb | 3 +-- test/test_encoding.rb | 1 - test/test_splitfx.rb | 1 - test/test_tfx.rb | 1 - 14 files changed, 4 insertions(+), 16 deletions(-) diff --git a/bin/dtas-console b/bin/dtas-console index a519ba9..eedd0f0 100755 --- a/bin/dtas-console +++ b/bin/dtas-console @@ -11,7 +11,6 @@ require 'dtas/process' require 'dtas/format' include DTAS::Process -require 'yaml' begin require 'curses' rescue LoadError diff --git a/bin/dtas-msinkctl b/bin/dtas-msinkctl index 6fb3863..79c7f26 100755 --- a/bin/dtas-msinkctl +++ b/bin/dtas-msinkctl @@ -2,7 +2,6 @@ # Copyright (C) all contributors # License: GPL-3.0+ # frozen_string_literal: true -require 'yaml' require 'dtas/unix_client' usage = "#$0 SINK" c = DTAS::UNIXClient.new diff --git a/bin/dtas-player b/bin/dtas-player index 21bc45f..c926e5f 100755 --- a/bin/dtas-player +++ b/bin/dtas-player @@ -1,9 +1,8 @@ #!/usr/bin/env ruby -# Copyright (C) 2013-2020 all contributors +# Copyright (C) all contributors # License: GPL-3.0+ # frozen_string_literal: true Thread.abort_on_exception = $stderr.sync = $stdout.sync = true -require 'yaml' require 'dtas/player' sock = (ENV["DTAS_PLAYER_SOCK"] || File.expand_path("~/.dtas/player.sock")) state = (ENV["DTAS_PLAYER_STATE"] || diff --git a/bin/dtas-readahead b/bin/dtas-readahead index 996142c..d3c6e79 100755 --- a/bin/dtas-readahead +++ b/bin/dtas-readahead @@ -12,7 +12,6 @@ @ffprobe = 'ffprobe' @avprobe = 'avprobe' -require 'yaml' require 'io/wait' require 'dtas/unix_client' require 'dtas/process' diff --git a/bin/dtas-splitfx b/bin/dtas-splitfx index 05e71e5..6ce6521 100755 --- a/bin/dtas-splitfx +++ b/bin/dtas-splitfx @@ -2,7 +2,6 @@ # Copyright (C) all contributors # License: GPL-3.0+ # frozen_string_literal: true -require 'yaml' require 'optparse' require 'dtas/splitfx' usage = "#$0 [-n|--dry-run][-j [JOBS]][-s|--silent] SPLITFX_FILE.yml [TARGET]" diff --git a/bin/dtas-tl b/bin/dtas-tl index c1af933..2b34937 100755 --- a/bin/dtas-tl +++ b/bin/dtas-tl @@ -23,7 +23,6 @@ def fix_enc!(str, enc) def do_edit(c) require 'dtas/edit_client' - require 'yaml' require 'tempfile' extend DTAS::EditClient tmp = Tempfile.new(%w(dtas-tl-edit .txt)) diff --git a/lib/dtas/edit_client.rb b/lib/dtas/edit_client.rb index 036d036..2bdc4d8 100644 --- a/lib/dtas/edit_client.rb +++ b/lib/dtas/edit_client.rb @@ -2,7 +2,6 @@ # License: GPL-3.0+ # frozen_string_literal: true require 'tempfile' -require 'yaml' require_relative 'unix_client' require_relative 'disclaimer' diff --git a/lib/dtas/player.rb b/lib/dtas/player.rb index 3db15c3..06ba788 100644 --- a/lib/dtas/player.rb +++ b/lib/dtas/player.rb @@ -2,6 +2,7 @@ # License: GPL-3.0+ # frozen_string_literal: true require 'shellwords' +require 'yaml' require_relative '../dtas' require_relative 'xs' require_relative 'source' diff --git a/lib/dtas/sink.rb b/lib/dtas/sink.rb index 735cdef..966bab4 100644 --- a/lib/dtas/sink.rb +++ b/lib/dtas/sink.rb @@ -1,7 +1,6 @@ -# Copyright (C) 2013-2020 all contributors +# Copyright (C) all contributors # License: GPL-3.0+ # frozen_string_literal: true -require 'yaml' require_relative '../dtas' require_relative 'pipe' require_relative 'process' diff --git a/lib/dtas/source/splitfx.rb b/lib/dtas/source/splitfx.rb index afeb6a3..2268404 100644 --- a/lib/dtas/source/splitfx.rb +++ b/lib/dtas/source/splitfx.rb @@ -1,7 +1,6 @@ # Copyright (C) all contributors # License: GPL-3.0+ # frozen_string_literal: true -require 'yaml' require_relative 'sox' require_relative '../splitfx' require_relative '../watchable' diff --git a/test/player_integration.rb b/test/player_integration.rb index 4ad0e0c..66d1c6e 100644 --- a/test/player_integration.rb +++ b/test/player_integration.rb @@ -1,11 +1,10 @@ -# Copyright (C) 2013-2020 all contributors +# Copyright (C) all contributors # License: GPL-3.0+ # frozen_string_literal: true require './test/helper' require 'dtas/player' require 'dtas/state_file' require 'dtas/unix_client' -require 'yaml' require 'tempfile' require 'shellwords' require 'timeout' diff --git a/test/test_encoding.rb b/test/test_encoding.rb index 666d185..5cd5da7 100644 --- a/test/test_encoding.rb +++ b/test/test_encoding.rb @@ -3,7 +3,6 @@ # frozen_string_literal: true require './test/helper' require 'dtas' -require 'yaml' class TestEncoding < Testcase def test_encoding diff --git a/test/test_splitfx.rb b/test/test_splitfx.rb index e3bd19d..f2e0e09 100644 --- a/test/test_splitfx.rb +++ b/test/test_splitfx.rb @@ -1,7 +1,6 @@ # Copyright (C) all contributors # License: GPL-3.0+ # frozen_string_literal: true -require 'yaml' require 'dtas/splitfx' require 'thread' require_relative 'helper' diff --git a/test/test_tfx.rb b/test/test_tfx.rb index 51b1900..be68079 100644 --- a/test/test_tfx.rb +++ b/test/test_tfx.rb @@ -4,7 +4,6 @@ require './test/helper' require 'dtas/tfx' require 'dtas/format' -require 'yaml' class TestTFX < Testcase def rate