diff --git a/.github/workflows/ruby.yml b/.github/workflows/ruby.yml index 7226b7a..9762ab3 100644 --- a/.github/workflows/ruby.yml +++ b/.github/workflows/ruby.yml @@ -1,30 +1,44 @@ -name: Ruby CI +name: Development -on: - push: - branches: [ master ] - pull_request: - branches: [ master ] +on: [push, pull_request] jobs: test: - - name: Ruby ${{ matrix.ruby-version }} ${{ matrix.os }} - runs-on: ${{ matrix.os }} + runs-on: ${{matrix.os}}-latest + continue-on-error: ${{matrix.experimental}} + strategy: - fail-fast: false matrix: - os: [ubuntu-latest] - ruby-version: ['2.6', '2.7', '3.0'] - + os: + - ubuntu + - macos + + ruby: + - "2.6" + - "2.7" + - "3.0" + + experimental: [false] + env: [""] + + include: + - os: ubuntu + ruby: truffleruby + experimental: true + - os: ubuntu + ruby: jruby + experimental: true + - os: ubuntu + ruby: head + experimental: true + steps: - uses: actions/checkout@v2 - - name: Set up Ruby - uses: ruby/setup-ruby@v1 + - uses: ruby/setup-ruby@v1 with: - ruby-version: ${{ matrix.ruby-version }} - bundler-cache: true # runs 'bundle install' and caches installed gems automatically + ruby-version: ${{matrix.ruby}} + bundler-cache: true + - name: Run tests - run: bundle exec rake - env: - RUBYOPT: --enable-frozen-string-literal + timeout-minutes: 5 + run: ${{matrix.env}} bundle exec rspec diff --git a/Gemfile b/Gemfile index 0c1a000..aef3a75 100644 --- a/Gemfile +++ b/Gemfile @@ -1,3 +1,5 @@ +# frozen_string_literal: true + source 'https://rubygems.org' gemspec diff --git a/Rakefile b/Rakefile index f5cbbfd..366c7f8 100644 --- a/Rakefile +++ b/Rakefile @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require "bundler/gem_tasks" require "rspec/core/rake_task" diff --git a/lib/multipart.rb b/lib/multipart.rb index 63bbf6e..c3f88ab 100644 --- a/lib/multipart.rb +++ b/lib/multipart.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + #-- # Copyright (c) 2007-2013 Nick Sieger. # See the file README.txt included with the distribution for diff --git a/lib/multipart/post.rb b/lib/multipart/post.rb index f726be1..c23691c 100644 --- a/lib/multipart/post.rb +++ b/lib/multipart/post.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + module Multipart module Post end diff --git a/lib/multipart/post/composite_read_io.rb b/lib/multipart/post/composite_read_io.rb index 56ef5db..b958959 100644 --- a/lib/multipart/post/composite_read_io.rb +++ b/lib/multipart/post/composite_read_io.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + #-- # Copyright (c) 2007-2012 Nick Sieger. # See the file README.txt included with the distribution for diff --git a/lib/multipart/post/multipartable.rb b/lib/multipart/post/multipartable.rb index 27ba8ed..ed4cdd8 100644 --- a/lib/multipart/post/multipartable.rb +++ b/lib/multipart/post/multipartable.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + #-- # Copyright (c) 2007-2013 Nick Sieger. # See the file README.txt included with the distribution for diff --git a/lib/multipart/post/parts.rb b/lib/multipart/post/parts.rb index 7ce5724..0b352eb 100644 --- a/lib/multipart/post/parts.rb +++ b/lib/multipart/post/parts.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + #-- # Copyright (c) 2007-2013 Nick Sieger. # See the file README.txt included with the distribution for diff --git a/lib/multipart/post/version.rb b/lib/multipart/post/version.rb index cb5120c..90c11fd 100644 --- a/lib/multipart/post/version.rb +++ b/lib/multipart/post/version.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + module Multipart module Post VERSION = "2.1.1" diff --git a/lib/net/http/post/multipart.rb b/lib/net/http/post/multipart.rb index ac56097..ca80323 100644 --- a/lib/net/http/post/multipart.rb +++ b/lib/net/http/post/multipart.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + #-- # Copyright (c) 2007-2012 Nick Sieger. # See the file README.txt included with the distribution for diff --git a/multipart-post.gemspec b/multipart-post.gemspec index ef5fed1..36ea033 100644 --- a/multipart-post.gemspec +++ b/multipart-post.gemspec @@ -1,3 +1,5 @@ +# frozen_string_literal: true + # -*- encoding: utf-8 -*- $:.push File.expand_path("../lib", __FILE__) require "multipart/post/version" diff --git a/spec/multipart/post/composite_read_io_spec.rb b/spec/multipart/post/composite_read_io_spec.rb index 5f2f23f..5517ced 100644 --- a/spec/multipart/post/composite_read_io_spec.rb +++ b/spec/multipart/post/composite_read_io_spec.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + # Copyright, 2012, by Nick Sieger. # Copyright, 2017, by Samuel G. D. Williams. # diff --git a/spec/multipart/post/parts_spec.rb b/spec/multipart/post/parts_spec.rb index 5c5d286..4b32a1d 100644 --- a/spec/multipart/post/parts_spec.rb +++ b/spec/multipart/post/parts_spec.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + # Copyright, 2012, by Nick Sieger. # Copyright, 2017, by Samuel G. D. Williams. # diff --git a/spec/net/http/post/multipart_spec.rb b/spec/net/http/post/multipart_spec.rb index 3d6002e..679487d 100644 --- a/spec/net/http/post/multipart_spec.rb +++ b/spec/net/http/post/multipart_spec.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + #-- # Copyright (c) 2007-2013 Nick Sieger. # See the file README.txt included with the distribution for diff --git a/spec/spec_helper.rb b/spec/spec_helper.rb index 6082995..38e245c 100644 --- a/spec/spec_helper.rb +++ b/spec/spec_helper.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true if ENV['COVERAGE'] begin