diff --git a/.github/workflows/external.yml b/.github/workflows/test-external.yaml similarity index 58% rename from .github/workflows/external.yml rename to .github/workflows/test-external.yaml index 9683f25..214149c 100644 --- a/.github/workflows/external.yml +++ b/.github/workflows/test-external.yaml @@ -1,28 +1,37 @@ -name: External +name: Test External on: [push, pull_request] +permissions: + contents: read + +env: + CONSOLE_OUTPUT: XTerm + jobs: test: name: ${{matrix.ruby}} on ${{matrix.os}} runs-on: ${{matrix.os}}-latest - + strategy: matrix: os: - ubuntu - + - macos + ruby: - - "3.1.2" - - "head" - + - "2.7" + - "3.0" + - "3.1" + - "3.2" + steps: - uses: actions/checkout@v3 - uses: ruby/setup-ruby@v1 with: ruby-version: ${{matrix.ruby}} bundler-cache: true - + - name: Run tests - timeout-minutes: 5 - run: bundle exec bake external + timeout-minutes: 10 + run: bundle exec bake test:external diff --git a/.github/workflows/test.yml b/.github/workflows/test.yaml similarity index 88% rename from .github/workflows/test.yml rename to .github/workflows/test.yaml index 22f9c0b..5871633 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yaml @@ -2,6 +2,12 @@ name: Test on: [push, pull_request] +permissions: + contents: read + +env: + CONSOLE_OUTPUT: XTerm + jobs: test: name: ${{matrix.ruby}} on ${{matrix.os}} @@ -25,7 +31,6 @@ jobs: - "3.2" experimental: [false] - env: [""] include: - os: ubuntu @@ -46,6 +51,5 @@ jobs: bundler-cache: true - name: Run tests - timeout-minutes: 5 - run: | - ${{matrix.env}} bundle exec rspec + timeout-minutes: 10 + run: bundle exec rspec diff --git a/.mailmap b/.mailmap new file mode 100644 index 0000000..af2ffcd --- /dev/null +++ b/.mailmap @@ -0,0 +1,4 @@ +Nick Sieger +Tohru Hashimoto +Takuya Noguchi +Vincent Pellé diff --git a/bake.rb b/bake.rb deleted file mode 100644 index ab277aa..0000000 --- a/bake.rb +++ /dev/null @@ -1,37 +0,0 @@ -# frozen_string_literal: true - -def external - require 'bundler' - - Bundler.with_unbundled_env do - clone_and_test("faraday-multipart", "https://github.com/lostisland/faraday-multipart.git") - # clone_and_test("jira-ruby", "https://github.com/sumoheavy/jira-ruby.git") - # clone_and_test("zendesk_api", "https://github.com/zendesk/zendesk_api_client_rb.git") - # clone_and_test("fastlane", "https://github.com/fastlane/fastlane.git") - clone_and_test("twitter", "https://github.com/sferik/twitter.git") - end -end - -private - -def clone_and_test(name, remote) - require 'fileutils' - - path = "external/#{name}" - FileUtils.rm_rf path - FileUtils.mkdir_p path - - system("git clone #{remote} #{path}") - - # I tried using `bundle config --local local.async ../` but it simply doesn't work. - # system("bundle", "config", "--local", "local.async", __dir__, chdir: path) - - gemfile_paths = ["#{path}/Gemfile", "#{path}/gems.rb"] - gemfile_path = gemfile_paths.find{|path| File.exist?(path)} - - File.open(gemfile_path, "a") do |file| - file.puts('gem "multipart-post", path: "../../"') - end - - system("cd #{path} && bundle install && bundle exec rspec") or abort("Tests failed!") -end diff --git a/CHANGELOG.md b/changelog.md similarity index 100% rename from CHANGELOG.md rename to changelog.md diff --git a/config/external.yaml b/config/external.yaml new file mode 100644 index 0000000..0c4d915 --- /dev/null +++ b/config/external.yaml @@ -0,0 +1,6 @@ +faraday-multipart: + url: https://github.com/lostisland/faraday-multipart.git + command: bundle exec rspec +twitter: + url: https://github.com/sferik/twitter.git + command: bundle exec rspec \ No newline at end of file diff --git a/gems.rb b/gems.rb index b0919e5..2239cf2 100644 --- a/gems.rb +++ b/gems.rb @@ -1,3 +1,8 @@ +# frozen_string_literal: true + +# Released under the MIT License. +# Copyright, 2022, by Samuel Williams. + source "https://rubygems.org" gemspec @@ -10,3 +15,8 @@ gem "bake-modernize" end end + +group :test do + gem "bake-test" + gem "bake-test-external" +end diff --git a/lib/composite_io.rb b/lib/composite_io.rb index 3430a09..c0748a4 100644 --- a/lib/composite_io.rb +++ b/lib/composite_io.rb @@ -1,2 +1,17 @@ +# frozen_string_literal: true + +# Released under the MIT License. +# Copyright, 2006-2013, by Nick Sieger. +# Copyright, 2010, by Tohru Hashimoto. +# Copyright, 2011, by Jeff Hodges. +# Copyright, 2011, by Alex Koppel. +# Copyright, 2011, by Christine Yen. +# Copyright, 2011, by Gerrit Riessen. +# Copyright, 2011, by Luke Redpath. +# Copyright, 2013, by Mislav Marohnić. +# Copyright, 2013, by Leo Cassarani. +# Copyright, 2019, by Olle Jonsson. +# Copyright, 2022, by Samuel Williams. + warn "Top level ::CompositeIO is deprecated, require 'multipart/post' and use `Multipart::Post::CompositeReadIO` instead!" require_relative 'multipart/post' diff --git a/lib/multipart/post.rb b/lib/multipart/post.rb index a7221ec..29ab41a 100644 --- a/lib/multipart/post.rb +++ b/lib/multipart/post.rb @@ -1,24 +1,8 @@ # frozen_string_literal: true -# Copyright, 2007-2013, by Nick Sieger. -# -# Permission is hereby granted, free of charge, to any person obtaining a copy -# of this software and associated documentation files (the "Software"), to deal -# in the Software without restriction, including without limitation the rights -# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -# copies of the Software, and to permit persons to whom the Software is -# furnished to do so, subject to the following conditions: -# -# The above copyright notice and this permission notice shall be included in -# all copies or substantial portions of the Software. -# -# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -# THE SOFTWARE. +# Released under the MIT License. +# Copyright, 2019, by Patrick Davey. +# Copyright, 2021-2022, by Samuel Williams. require_relative 'post/multipartable' require_relative 'post/upload_io' diff --git a/lib/multipart/post/composite_read_io.rb b/lib/multipart/post/composite_read_io.rb index 54a1a46..44704b7 100644 --- a/lib/multipart/post/composite_read_io.rb +++ b/lib/multipart/post/composite_read_io.rb @@ -1,24 +1,19 @@ # frozen_string_literal: true -# Copyright, 2007-2013, by Nick Sieger. -# -# Permission is hereby granted, free of charge, to any person obtaining a copy -# of this software and associated documentation files (the "Software"), to deal -# in the Software without restriction, including without limitation the rights -# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -# copies of the Software, and to permit persons to whom the Software is -# furnished to do so, subject to the following conditions: -# -# The above copyright notice and this permission notice shall be included in -# all copies or substantial portions of the Software. -# -# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -# THE SOFTWARE. +# Released under the MIT License. +# Copyright, 2006-2013, by Nick Sieger. +# Copyright, 2010, by Tohru Hashimoto. +# Copyright, 2011, by Jeff Hodges. +# Copyright, 2011, by Alex Koppel. +# Copyright, 2011, by Christine Yen. +# Copyright, 2011, by Gerrit Riessen. +# Copyright, 2011, by Luke Redpath. +# Copyright, 2013, by Mislav Marohnić. +# Copyright, 2013, by Leo Cassarani. +# Copyright, 2019, by Olle Jonsson. +# Copyright, 2019, by Patrick Davey. +# Copyright, 2021, by Lewis Cowles. +# Copyright, 2021-2022, by Samuel Williams. module Multipart module Post diff --git a/lib/multipart/post/multipartable.rb b/lib/multipart/post/multipartable.rb index 2e35154..d4017ec 100644 --- a/lib/multipart/post/multipartable.rb +++ b/lib/multipart/post/multipartable.rb @@ -1,24 +1,17 @@ # frozen_string_literal: true -# Copyright, 2007-2013, by Nick Sieger. -# -# Permission is hereby granted, free of charge, to any person obtaining a copy -# of this software and associated documentation files (the "Software"), to deal -# in the Software without restriction, including without limitation the rights -# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -# copies of the Software, and to permit persons to whom the Software is -# furnished to do so, subject to the following conditions: -# -# The above copyright notice and this permission notice shall be included in -# all copies or substantial portions of the Software. -# -# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -# THE SOFTWARE. +# Released under the MIT License. +# Copyright, 2008, by McClain Looney. +# Copyright, 2008-2013, by Nick Sieger. +# Copyright, 2011, by Gerrit Riessen. +# Copyright, 2013, by Vincent Pellé. +# Copyright, 2013, by Gustav Ernberg. +# Copyright, 2013, by Socrates Vicente. +# Copyright, 2013, by Steffen Grunwald. +# Copyright, 2019, by Olle Jonsson. +# Copyright, 2019-2022, by Samuel Williams. +# Copyright, 2019, by Patrick Davey. +# Copyright, 2022, by Jason York. require_relative 'parts' require_relative 'composite_read_io' diff --git a/lib/multipart/post/parts.rb b/lib/multipart/post/parts.rb index f9b2514..14ab5aa 100644 --- a/lib/multipart/post/parts.rb +++ b/lib/multipart/post/parts.rb @@ -1,24 +1,23 @@ # frozen_string_literal: true -# Copyright, 2007-2013, by Nick Sieger. -# -# Permission is hereby granted, free of charge, to any person obtaining a copy -# of this software and associated documentation files (the "Software"), to deal -# in the Software without restriction, including without limitation the rights -# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -# copies of the Software, and to permit persons to whom the Software is -# furnished to do so, subject to the following conditions: -# -# The above copyright notice and this permission notice shall be included in -# all copies or substantial portions of the Software. -# -# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -# THE SOFTWARE. +# Released under the MIT License. +# Copyright, 2008-2009, by McClain Looney. +# Copyright, 2009-2013, by Nick Sieger. +# Copyright, 2011, by Johannes Wagener. +# Copyright, 2011, by Gerrit Riessen. +# Copyright, 2011, by Jason Moore. +# Copyright, 2012, by Steven Davidovitz. +# Copyright, 2012, by hexfet. +# Copyright, 2013, by Vincent Pellé. +# Copyright, 2013, by Gustav Ernberg. +# Copyright, 2013, by Socrates Vicente. +# Copyright, 2017, by David Moles. +# Copyright, 2017, by Matt Colyer. +# Copyright, 2017, by Eric Hutzelman. +# Copyright, 2019-2021, by Olle Jonsson. +# Copyright, 2019, by Ethan Turkeltaub. +# Copyright, 2019, by Patrick Davey. +# Copyright, 2021-2022, by Samuel Williams. require 'stringio' diff --git a/lib/multipart/post/upload_io.rb b/lib/multipart/post/upload_io.rb index 5b47b5d..6381744 100644 --- a/lib/multipart/post/upload_io.rb +++ b/lib/multipart/post/upload_io.rb @@ -1,24 +1,7 @@ # frozen_string_literal: true -# Copyright, 2007-2013, by Nick Sieger. -# -# Permission is hereby granted, free of charge, to any person obtaining a copy -# of this software and associated documentation files (the "Software"), to deal -# in the Software without restriction, including without limitation the rights -# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -# copies of the Software, and to permit persons to whom the Software is -# furnished to do so, subject to the following conditions: -# -# The above copyright notice and this permission notice shall be included in -# all copies or substantial portions of the Software. -# -# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -# THE SOFTWARE. +# Released under the MIT License. +# Copyright, 2022, by Samuel Williams. module Multipart module Post diff --git a/lib/multipart/post/version.rb b/lib/multipart/post/version.rb index b41461b..b89fe86 100644 --- a/lib/multipart/post/version.rb +++ b/lib/multipart/post/version.rb @@ -1,24 +1,8 @@ # frozen_string_literal: true -# Copyright, 2007-2013, by Nick Sieger. -# -# Permission is hereby granted, free of charge, to any person obtaining a copy -# of this software and associated documentation files (the "Software"), to deal -# in the Software without restriction, including without limitation the rights -# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -# copies of the Software, and to permit persons to whom the Software is -# furnished to do so, subject to the following conditions: -# -# The above copyright notice and this permission notice shall be included in -# all copies or substantial portions of the Software. -# -# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -# THE SOFTWARE. +# Released under the MIT License. +# Copyright, 2019, by Patrick Davey. +# Copyright, 2021-2023, by Samuel Williams. module Multipart module Post diff --git a/lib/multipart_post.rb b/lib/multipart_post.rb index a6fb97b..2913ab2 100644 --- a/lib/multipart_post.rb +++ b/lib/multipart_post.rb @@ -1,3 +1,9 @@ +# frozen_string_literal: true + +# Released under the MIT License. +# Copyright, 2009-2013, by Nick Sieger. +# Copyright, 2019-2022, by Samuel Williams. + warn "Top level ::MultipartPost is deprecated, require 'multipart/post' and use `Multipart::Post` instead!" require_relative 'multipart/post' diff --git a/lib/multipartable.rb b/lib/multipartable.rb index 67d68dd..aa5978a 100644 --- a/lib/multipartable.rb +++ b/lib/multipartable.rb @@ -1,3 +1,17 @@ +# frozen_string_literal: true + +# Released under the MIT License. +# Copyright, 2008, by McClain Looney. +# Copyright, 2008-2013, by Nick Sieger. +# Copyright, 2011, by Gerrit Riessen. +# Copyright, 2013, by Vincent Pellé. +# Copyright, 2013, by Gustav Ernberg. +# Copyright, 2013, by Socrates Vicente. +# Copyright, 2013, by Steffen Grunwald. +# Copyright, 2019, by Olle Jonsson. +# Copyright, 2019-2022, by Samuel Williams. +# Copyright, 2019, by Patrick Davey. + warn "Top level ::Multipartable is deprecated, require 'multipart/post' and use `Multipart::Post::Multipartable` instead!" require_relative 'multipart/post' diff --git a/lib/net/http/post/multipart.rb b/lib/net/http/post/multipart.rb index b504ba7..5a201d2 100644 --- a/lib/net/http/post/multipart.rb +++ b/lib/net/http/post/multipart.rb @@ -1,24 +1,11 @@ # frozen_string_literal: true -# Copyright, 2007-2013, by Nick Sieger. -# -# Permission is hereby granted, free of charge, to any person obtaining a copy -# of this software and associated documentation files (the "Software"), to deal -# in the Software without restriction, including without limitation the rights -# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -# copies of the Software, and to permit persons to whom the Software is -# furnished to do so, subject to the following conditions: -# -# The above copyright notice and this permission notice shall be included in -# all copies or substantial portions of the Software. -# -# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -# THE SOFTWARE. +# Released under the MIT License. +# Copyright, 2006-2012, by Nick Sieger. +# Copyright, 2008, by McClain Looney. +# Copyright, 2019, by Olle Jonsson. +# Copyright, 2019, by Patrick Davey. +# Copyright, 2021-2022, by Samuel Williams. require 'net/http' diff --git a/lib/parts.rb b/lib/parts.rb index bc747a9..c9a52d2 100644 --- a/lib/parts.rb +++ b/lib/parts.rb @@ -1,3 +1,23 @@ +# frozen_string_literal: true + +# Released under the MIT License. +# Copyright, 2008-2009, by McClain Looney. +# Copyright, 2009-2013, by Nick Sieger. +# Copyright, 2011, by Johannes Wagener. +# Copyright, 2011, by Gerrit Riessen. +# Copyright, 2011, by Jason Moore. +# Copyright, 2012, by Steven Davidovitz. +# Copyright, 2012, by hexfet. +# Copyright, 2013, by Vincent Pellé. +# Copyright, 2013, by Gustav Ernberg. +# Copyright, 2013, by Socrates Vicente. +# Copyright, 2017, by David Moles. +# Copyright, 2017, by Matt Colyer. +# Copyright, 2017, by Eric Hutzelman. +# Copyright, 2019, by Olle Jonsson. +# Copyright, 2019, by Ethan Turkeltaub. +# Copyright, 2022, by Samuel Williams. + warn "Top level ::Parts is deprecated, require 'multipart/post' and use `Multipart::Post::Parts` instead!" require_relative 'multipart/post' diff --git a/license.md b/license.md new file mode 100644 index 0000000..1e1a413 --- /dev/null +++ b/license.md @@ -0,0 +1,57 @@ +# MIT License + +Copyright, 2006-2014, by Nick Sieger. +Copyright, 2008-2009, by McClain Looney. +Copyright, 2010, by Tohru Hashimoto. +Copyright, 2011, by Jeff Hodges. +Copyright, 2011, by Alex Koppel. +Copyright, 2011, by Johannes Wagener. +Copyright, 2011, by Christine Yen. +Copyright, 2011, by Gerrit Riessen. +Copyright, 2011, by Jason Moore. +Copyright, 2011, by Luke Redpath. +Copyright, 2012, by Steven Davidovitz. +Copyright, 2012, by hexfet. +Copyright, 2013, by Jordi Massaguer Pla. +Copyright, 2013, by Mislav Marohnić. +Copyright, 2013, by Vincent Pellé. +Copyright, 2013, by Gustav Ernberg. +Copyright, 2013, by Socrates Vicente. +Copyright, 2013, by Leo Cassarani. +Copyright, 2013, by Jagtesh Chadha. +Copyright, 2013, by Steffen Grunwald. +Copyright, 2013, by Lonre Wang. +Copyright, 2017-2023, by Samuel Williams. +Copyright, 2017, by Feuda Nan. +Copyright, 2017, by David Moles. +Copyright, 2017, by Matt Colyer. +Copyright, 2017, by Eric Hutzelman. +Copyright, 2019, by Lachlan Priest. +Copyright, 2019, by Jan Piotrowski. +Copyright, 2019-2022, by Olle Jonsson. +Copyright, 2019, by Ethan Turkeltaub. +Copyright, 2019, by Jan-Joost Spanjers. +Copyright, 2019, by Patrick Davey. +Copyright, 2021, by Tim Barkley. +Copyright, 2021, by Lewis Cowles. +Copyright, 2022, by Jason York. +Copyright, 2022, by Takuya Noguchi. +Copyright, 2023, by Peter Goldstein. + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/multipart-post.gemspec b/multipart-post.gemspec index d01835f..525294f 100644 --- a/multipart-post.gemspec +++ b/multipart-post.gemspec @@ -7,17 +7,17 @@ Gem::Specification.new do |spec| spec.version = Multipart::Post::VERSION spec.summary = "A multipart form post accessory for Net::HTTP." - spec.authors = ["Nick Sieger", "Samuel Williams", "Olle Jonsson", "McClain Looney", "Lewis Cowles", "Gustav Ernberg", "Patrick Davey", "Steven Davidovitz", "Alex Koppel", "Ethan Turkeltaub", "Jagtesh Chadha", "Jason York", "Nick", "VincWebwag", "hasimo", "hexfet", "Christine Yen", "David Moles", "Eric Hutzelman", "Feuda Nan", "Gerrit Riessen", "Jan Piotrowski", "Jan-Joost Spanjers", "Jason Moore", "Jeff Hodges", "Johannes Wagener", "Jordi Massaguer Pla", "Lachlan Priest", "Leo Cassarani", "Lonre Wang", "Luke Redpath", "Matt Colyer", "Mislav Marohnić", "Socrates Vicente", "Steffen Grunwald", "Tim Barkley"] + spec.authors = ["Nick Sieger", "Samuel Williams", "Olle Jonsson", "McClain Looney", "Lewis Cowles", "Gustav Ernberg", "Patrick Davey", "Steven Davidovitz", "Alex Koppel", "Ethan Turkeltaub", "Jagtesh Chadha", "Jason York", "Tohru Hashimoto", "Vincent Pellé", "hexfet", "Christine Yen", "David Moles", "Eric Hutzelman", "Feuda Nan", "Gerrit Riessen", "Jan Piotrowski", "Jan-Joost Spanjers", "Jason Moore", "Jeff Hodges", "Johannes Wagener", "Jordi Massaguer Pla", "Lachlan Priest", "Leo Cassarani", "Lonre Wang", "Luke Redpath", "Matt Colyer", "Mislav Marohnić", "Peter Goldstein", "Socrates Vicente", "Steffen Grunwald", "Takuya Noguchi", "Tim Barkley"] spec.license = "MIT" - - spec.required_ruby_version = ">= 2.3.0" - + spec.cert_chain = ['release.cert'] spec.signing_key = File.expand_path('~/.gem/release.pem') spec.homepage = "https://github.com/socketry/multipart-post" - spec.files = Dir.glob('{lib}/**/*', File::FNM_DOTMATCH) + spec.files = Dir['{lib}/**/*', '*.md'] + + spec.required_ruby_version = ">= 2.3.0" spec.add_development_dependency "bundler" spec.add_development_dependency "rspec", "~> 3.4" diff --git a/README.md b/readme.md similarity index 77% rename from README.md rename to readme.md index 0a9fb37..84d22c8 100644 --- a/README.md +++ b/readme.md @@ -3,7 +3,7 @@ Adds a streamy multipart form post capability to `Net::HTTP`. Also supports other methods besides `POST`. -[![Development Status](https://github.com/socketry/multipart-post/workflows/Development/badge.svg)](https://github.com/socketry/multipart-post/actions?workflow=Development) +[![Development Status](https://github.com/socketry/multipart-post/workflows/Test/badge.svg)](https://github.com/socketry/multipart-post/actions?workflow=Test) ## Features/Problems @@ -168,29 +168,3 @@ For example: ``` ruby spec.add_dependency 'multipart-post', '~> 2.1' ``` - -## License - -Released under the MIT license. - -Copyright, 2007-2013, by [Nick Sieger](https://nicksieger.com). -Copyright, 2017, by [Samuel G. D. Williams](https://www.codeotaku.com). -Copyright, 2019, by [Patrick Davey](https://psdavey.com). - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. diff --git a/release.cert b/release.cert index f036666..d98e595 100644 --- a/release.cert +++ b/release.cert @@ -1,27 +1,28 @@ -----BEGIN CERTIFICATE----- -MIIEhDCCAuygAwIBAgIBATANBgkqhkiG9w0BAQsFADA3MTUwMwYDVQQDDCxzYW11 -ZWwud2lsbGlhbXMvREM9b3Jpb250cmFuc2Zlci9EQz1jby9EQz1uejAeFw0yMTA4 -MTYwNjMzNDRaFw0yMjA4MTYwNjMzNDRaMDcxNTAzBgNVBAMMLHNhbXVlbC53aWxs -aWFtcy9EQz1vcmlvbnRyYW5zZmVyL0RDPWNvL0RDPW56MIIBojANBgkqhkiG9w0B -AQEFAAOCAY8AMIIBigKCAYEAyXLSS/cw+fXJ5e7hi+U/TeChPWeYdwJojDsFY1xr -xvtqbTTL8gbLHz5LW3QD2nfwCv3qTlw0qI3Ie7a9VMJMbSvgVEGEfQirqIgJXWMj -eNMDgKsMJtC7u/43abRKx7TCURW3iWyR19NRngsJJmaR51yGGGm2Kfsr+JtKKLtL -L188Wm3f13KAx7QJU8qyuBnj1/gWem076hzdA7xi1DbrZrch9GCRz62xymJlrJHn -9iZEZ7AxrS7vokhMlzSr/XMUihx/8aFKtk+tMLClqxZSmBWIErWdicCGTULXCBNb -E/mljo4zEVKhlTWpJklMIhr55ZRrSarKFuW7en0+tpJrfsYiAmXMJNi4XAYJH7uL -rgJuJwSaa/dMz+VmUoo7VKtSfCoOI+6v5/z0sK3oT6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avOMra6PFiQyOE74kCtv7P+Fdc+FhgqI5lMon6tt9rNeXmnW/ +c1NaMRdxy999hmRGzUSFjozcCwxpy/LwabxtdXwXgSay4mQ32EDjqR1TixS1+smp +8C/NCWgpIfzpHGJsjvmH2wAfKtTTqB9CVKLCWEnCHyCaRVuKkrKjqhYCdmMBqCws +JkxfQWC+jBVeG9ZtPhQgZpfhvh+6hMhraUYRQ6XGyvBqEUe+yo6DKIT3MtGE2+CP +eX9i9ZWBydWb8/rvmwmX2kkcBbX0hZS1rcR593hGc61JR6lvkGYQ2MYskBveyaxt +Q2K9NVun/S785AP05vKkXZEFYxqG6EW012U4oLcFl5MySFajYXRYbuUpH6AY+HP8 +voD0MPg1DssDLKwXyt1eKD/+Fq0bFWhwVM/1XiAXL7lyYUyOq24KHgQ2Csg= -----END CERTIFICATE----- diff --git a/spec/multipart/post/composite_read_io_spec.rb b/spec/multipart/post/composite_read_io_spec.rb index 5517ced..1bd2cc2 100644 --- a/spec/multipart/post/composite_read_io_spec.rb +++ b/spec/multipart/post/composite_read_io_spec.rb @@ -1,25 +1,9 @@ # frozen_string_literal: true -# Copyright, 2012, by Nick Sieger. -# Copyright, 2017, by Samuel G. D. Williams. -# -# Permission is hereby granted, free of charge, to any person obtaining a copy -# of this software and associated documentation files (the "Software"), to deal -# in the Software without restriction, including without limitation the rights -# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -# copies of the Software, and to permit persons to whom the Software is -# furnished to do so, subject to the following conditions: -# -# The above copyright notice and this permission notice shall be included in -# all copies or substantial portions of the Software. -# -# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -# THE SOFTWARE. +# Released under the MIT License. +# Copyright, 2017-2021, by Samuel Williams. +# Copyright, 2019, by Patrick Davey. +# Copyright, 2021, by Lewis Cowles. require 'multipart/post/composite_read_io' require 'stringio' diff --git a/spec/multipart/post/parts_spec.rb b/spec/multipart/post/parts_spec.rb index 3bcbb33..0f4a189 100644 --- a/spec/multipart/post/parts_spec.rb +++ b/spec/multipart/post/parts_spec.rb @@ -1,25 +1,14 @@ # frozen_string_literal: true -# Copyright, 2012, by Nick Sieger. -# Copyright, 2017, by Samuel G. D. Williams. -# -# Permission is hereby granted, free of charge, to any person obtaining a copy -# of this software and associated documentation files (the "Software"), to deal -# in the Software without restriction, including without limitation the rights -# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -# copies of the Software, and to permit persons to whom the Software is -# furnished to do so, subject to the following conditions: -# -# The above copyright notice and this permission notice shall be included in -# all copies or substantial portions of the Software. -# -# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -# THE SOFTWARE. +# Released under the MIT License. +# Copyright, 2011, by Johannes Wagener. +# Copyright, 2011-2013, by Nick Sieger. +# Copyright, 2012, by Steven Davidovitz. +# Copyright, 2012, by hexfet. +# Copyright, 2017-2022, by Samuel Williams. +# Copyright, 2017, by Eric Hutzelman. +# Copyright, 2019, by Ethan Turkeltaub. +# Copyright, 2019, by Patrick Davey. require 'multipart/post/parts' require 'multipart/post/composite_read_io' diff --git a/spec/net/http/post/multipart_spec.rb b/spec/net/http/post/multipart_spec.rb index ecaf197..e310763 100644 --- a/spec/net/http/post/multipart_spec.rb +++ b/spec/net/http/post/multipart_spec.rb @@ -1,10 +1,16 @@ # frozen_string_literal: true -#-- -# Copyright (c) 2007-2013 Nick Sieger. -# See the file README.txt included with the distribution for -# software license details. -#++ +# Released under the MIT License. +# Copyright, 2006-2013, by Nick Sieger. +# Copyright, 2008, by McClain Looney. +# Copyright, 2011, by Jeff Hodges. +# Copyright, 2013, by Vincent Pellé. +# Copyright, 2013, by Gustav Ernberg. +# Copyright, 2013, by Socrates Vicente. +# Copyright, 2013, by Steffen Grunwald. +# Copyright, 2017-2021, by Samuel Williams. +# Copyright, 2019, by Patrick Davey. +# Copyright, 2022, by Jason York. require 'net/http/post/multipart' diff --git a/spec/spec_helper.rb b/spec/spec_helper.rb index 110e1c3..4196306 100644 --- a/spec/spec_helper.rb +++ b/spec/spec_helper.rb @@ -1,5 +1,9 @@ # frozen_string_literal: true +# Released under the MIT License. +# Copyright, 2017-2022, by Samuel Williams. +# Copyright, 2019, by Patrick Davey. + if ENV['COVERAGE'] begin require 'simplecov'