Skip to content

Commit

Permalink
Use frozen_string_literal: true.
Browse files Browse the repository at this point in the history
  • Loading branch information
ioquatix committed Aug 13, 2021
1 parent 418fa31 commit e855ab4
Show file tree
Hide file tree
Showing 15 changed files with 61 additions and 20 deletions.
54 changes: 34 additions & 20 deletions .github/workflows/ruby.yml
Original file line number Diff line number Diff line change
@@ -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
2 changes: 2 additions & 0 deletions Gemfile
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
# frozen_string_literal: true

source 'https://rubygems.org'
gemspec

Expand Down
2 changes: 2 additions & 0 deletions Rakefile
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
# frozen_string_literal: true

require "bundler/gem_tasks"
require "rspec/core/rake_task"

Expand Down
2 changes: 2 additions & 0 deletions lib/multipart.rb
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
# frozen_string_literal: true

#--
# Copyright (c) 2007-2013 Nick Sieger.
# See the file README.txt included with the distribution for
Expand Down
2 changes: 2 additions & 0 deletions lib/multipart/post.rb
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
# frozen_string_literal: true

module Multipart
module Post
end
Expand Down
2 changes: 2 additions & 0 deletions lib/multipart/post/composite_read_io.rb
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
# frozen_string_literal: true

#--
# Copyright (c) 2007-2012 Nick Sieger.
# See the file README.txt included with the distribution for
Expand Down
2 changes: 2 additions & 0 deletions lib/multipart/post/multipartable.rb
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
# frozen_string_literal: true

#--
# Copyright (c) 2007-2013 Nick Sieger.
# See the file README.txt included with the distribution for
Expand Down
2 changes: 2 additions & 0 deletions lib/multipart/post/parts.rb
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
# frozen_string_literal: true

#--
# Copyright (c) 2007-2013 Nick Sieger.
# See the file README.txt included with the distribution for
Expand Down
2 changes: 2 additions & 0 deletions lib/multipart/post/version.rb
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
# frozen_string_literal: true

module Multipart
module Post
VERSION = "2.1.1"
Expand Down
2 changes: 2 additions & 0 deletions lib/net/http/post/multipart.rb
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
# frozen_string_literal: true

#--
# Copyright (c) 2007-2012 Nick Sieger.
# See the file README.txt included with the distribution for
Expand Down
2 changes: 2 additions & 0 deletions multipart-post.gemspec
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
# frozen_string_literal: true

# -*- encoding: utf-8 -*-
$:.push File.expand_path("../lib", __FILE__)
require "multipart/post/version"
Expand Down
2 changes: 2 additions & 0 deletions spec/multipart/post/composite_read_io_spec.rb
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
# frozen_string_literal: true

# Copyright, 2012, by Nick Sieger.
# Copyright, 2017, by Samuel G. D. Williams. <http://www.codeotaku.com>
#
Expand Down
2 changes: 2 additions & 0 deletions spec/multipart/post/parts_spec.rb
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
# frozen_string_literal: true

# Copyright, 2012, by Nick Sieger.
# Copyright, 2017, by Samuel G. D. Williams. <http://www.codeotaku.com>
#
Expand Down
2 changes: 2 additions & 0 deletions spec/net/http/post/multipart_spec.rb
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
# frozen_string_literal: true

#--
# Copyright (c) 2007-2013 Nick Sieger.
# See the file README.txt included with the distribution for
Expand Down
1 change: 1 addition & 0 deletions spec/spec_helper.rb
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
# frozen_string_literal: true

if ENV['COVERAGE']
begin
Expand Down

0 comments on commit e855ab4

Please sign in to comment.