From 4d12ecf1f4b611275d83c50054d926109116506f Mon Sep 17 00:00:00 2001 From: Sutou Kouhei Date: Fri, 1 May 2020 09:38:20 +0900 Subject: [PATCH] Remove needless dependencies --- .github/workflows/test.yml | 30 ++++++++++++++++++++++++++++++ .gitignore | 5 +++-- .travis.yml | 8 -------- Rakefile | 11 ++--------- chupa-text-decomposer-mail.gemspec | 6 ++---- test/run-test.rb | 6 ++++-- test/test-mail.rb | 4 ++-- 7 files changed, 43 insertions(+), 27 deletions(-) create mode 100644 .github/workflows/test.yml delete mode 100644 .travis.yml diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml new file mode 100644 index 0000000..6475a68 --- /dev/null +++ b/.github/workflows/test.yml @@ -0,0 +1,30 @@ +name: Test +on: + - push + - pull_request +jobs: + test: + name: Ruby ${{ matrix.ruby-version }} on ${{ matrix.runs-on }} + strategy: + fail-fast: false + matrix: + ruby-version: + - 2.5 + - 2.6 + - 2.7 + runs-on: + - macos-latest + - ubuntu-latest + - windows-latest + runs-on: ${{ matrix.runs-on }} + steps: + - uses: actions/checkout@v2 + - uses: actions/setup-ruby@v1 + with: + ruby-version: '${{ matrix.ruby-version }}' + - name: Install dependencies + run: | + bundle install + - name: Test + run: | + bundle exec rake diff --git a/.gitignore b/.gitignore index 327ad4d..fbe1846 100644 --- a/.gitignore +++ b/.gitignore @@ -1,4 +1,5 @@ -/doc/reference/ /.yardoc/ -/pkg/ /Gemfile.lock +/doc/reference/ +/pkg/ +/vendor/ diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index 8750087..0000000 --- a/.travis.yml +++ /dev/null @@ -1,8 +0,0 @@ -notifications: - email: - recipients: - - groonga-commit@lists.osdn.me -rvm: - - 2.2 - - 2.3.3 - - 2.4.0 diff --git a/Rakefile b/Rakefile index e4cff2d..5044ed1 100644 --- a/Rakefile +++ b/Rakefile @@ -1,6 +1,6 @@ # -*- ruby -*- # -# Copyright (C) 2017 Kouhei Sutou +# Copyright (C) 2017-2020 Sutou Kouhei # # This library is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser General Public @@ -22,9 +22,8 @@ require "pathname" require "rubygems" require "bundler/gem_helper" -require "packnga" -base_dir = Pathname(__FILE__).dirname +base_dir = Pathname(__dir__) helper = Bundler::GemHelper.new(base_dir.to_s) def helper.version_tag @@ -34,12 +33,6 @@ end helper.install spec = helper.gemspec -Packnga::DocumentTask.new(spec) do -end - -Packnga::ReleaseTask.new(spec) do -end - desc "Run tests" task :test do ruby("test/run-test.rb") diff --git a/chupa-text-decomposer-mail.gemspec b/chupa-text-decomposer-mail.gemspec index f6898d1..2af3f9b 100644 --- a/chupa-text-decomposer-mail.gemspec +++ b/chupa-text-decomposer-mail.gemspec @@ -1,6 +1,6 @@ # -*- ruby -*- # -# Copyright (C) 2017 Kouhei Sutou +# Copyright (C) 2017-2020 Sutou Kouhei # # This library is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser General Public @@ -24,7 +24,7 @@ Gem::Specification.new do |spec| spec.name = "chupa-text-decomposer-mail" spec.version = "1.0.0" spec.homepage = "https://github.com/ranguba/chupa-text-decomposer-mail" - spec.authors = ["Kouhei Sutou"] + spec.authors = ["Sutou Kouhei"] spec.email = ["kou@clear-code.com"] readme = File.read("README.md", :encoding => "UTF-8") entries = readme.split(/^\#\#\s(.*)$/) @@ -45,6 +45,4 @@ Gem::Specification.new do |spec| spec.add_development_dependency("bundler") spec.add_development_dependency("rake") spec.add_development_dependency("test-unit") - spec.add_development_dependency("packnga") - spec.add_development_dependency("kramdown") end diff --git a/test/run-test.rb b/test/run-test.rb index 6f1cb61..7f229a5 100755 --- a/test/run-test.rb +++ b/test/run-test.rb @@ -1,6 +1,6 @@ #!/usr/bin/env ruby # -# Copyright (C) 2017 Kouhei Sutou +# Copyright (C) 2017-2020 Sutou Kouhei # # This library is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser General Public @@ -20,6 +20,8 @@ ENV["TZ"] = "JST" +test_dir = __dir__ + require "bundler/setup" require "test-unit" @@ -30,4 +32,4 @@ require_relative "helper" -exit(Test::Unit::AutoRunner.run(true)) +exit(Test::Unit::AutoRunner.run(true, test_dir)) diff --git a/test/test-mail.rb b/test/test-mail.rb index f6905a2..4fce98f 100644 --- a/test/test-mail.rb +++ b/test/test-mail.rb @@ -1,4 +1,4 @@ -# Copyright (C) 2017 Kouhei Sutou +# Copyright (C) 2017-2020 Sutou Kouhei # # This library is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser General Public @@ -142,7 +142,7 @@ def decompose(attribute_name) sub_test_case("one page") do def test_body - assert_equal(["World\n"], decompose.collect(&:body)) + assert_equal(["World\r\n"], decompose.collect(&:body)) end private