Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bump localhost from 1.2.0 to 1.3.1 #620

Merged
merged 1 commit into from
Apr 26, 2024
Merged

Conversation

dependabot[bot]
Copy link
Contributor

@dependabot dependabot bot commented on behalf of github Apr 17, 2024

Bumps localhost from 1.2.0 to 1.3.1.

Release notes

Sourced from localhost's releases.

v1.3.1

What's Changed

New Contributors

Full Changelog: socketry/localhost@v1.3.0...v1.3.1

v1.3.0

What's Changed

Instead of storing certificate files in .localhost, we now follow the XDG standard and store them in .local/state/localhost.rb.

New Contributors

Full Changelog: socketry/localhost@v1.2.0...v1.3.0

Commits
  • f559472 Bump patch version.
  • 02fade4 100% code coverage. (#31)
  • ccc9330 Improve handling of old ~/.localhost directory. (#30)
  • 7159819 Fix "No such file or directory @ rb_file_s_rename" on migrating to '~/.local/...
  • 10790d5 Note about removal of legacy directory support.
  • 18820b9 Prefer mktmpdir for testing.
  • ac2f604 Improve HTTPS tests.
  • 2e7ec47 Update documentation.
  • 7acdd15 Set Ruby v3.1 as the required minimum Ruby version.
  • a91072f Bump minor version.
  • Additional commits viewable in compare view

Dependabot compatibility score

Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


Dependabot commands and options

You can trigger Dependabot actions by commenting on this PR:

  • @dependabot rebase will rebase this PR
  • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
  • @dependabot merge will merge this PR after your CI passes on it
  • @dependabot squash and merge will squash and merge this PR after your CI passes on it
  • @dependabot cancel merge will cancel a previously requested merge and block automerging
  • @dependabot reopen will reopen this PR if it is closed
  • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
  • @dependabot show <dependency name> ignore conditions will show all of the ignore conditions of the specified dependency
  • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
  • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
  • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)

Bumps [localhost](https://github.com/socketry/localhost) from 1.2.0 to 1.3.1.
- [Release notes](https://github.com/socketry/localhost/releases)
- [Changelog](https://github.com/socketry/localhost/blob/main/release.cert)
- [Commits](socketry/localhost@v1.2.0...v1.3.1)

---
updated-dependencies:
- dependency-name: localhost
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <[email protected]>
@dependabot dependabot bot added dependencies ruby Pull requests that update Ruby code labels Apr 17, 2024
Copy link

Copy link

gem compare localhost 1.2.0 1.3.1

Compared versions: ["1.2.0", "1.3.1"]
  DIFFERENT authors:
    1.2.0: ["Samuel Williams", "Olle Jonsson", "Ye Lin Aung", "Akshay Birajdar", "Antonio Terceiro", "Gabriel Sobrinho", "Juri Hahn", "Richard S. Leung", "Yuuji Yaginuma"]
    1.3.1: ["Samuel Williams", "Olle Jonsson", "Ye Lin Aung", "Akshay Birajdar", "Antonio Terceiro", "Colin Shea", "Gabriel Sobrinho", "Juri Hahn", "Richard S. Leung", "Yuuji Yaginuma"]
  DIFFERENT date:
    1.2.0: 2024-02-01 00:00:00 UTC
    1.3.1: 2024-04-16 00:00:00 UTC
  DIFFERENT metadata:
    1.2.0: {}
    1.3.1: {"documentation_uri"=>"https://socketry.github.io/localhost/", "source_code_uri"=>"https://github.com/socketry/localhost.git"}
  DIFFERENT required_ruby_version:
    1.2.0: >= 3.0
    1.3.1: >= 3.1
  DIFFERENT version:
    1.2.0: 1.2.0
    1.3.1: 1.3.1
  DIFFERENT files:
    1.2.0->1.3.1:
      * Changed:
            lib/localhost/authority.rb +42/-29
            lib/localhost/version.rb +2/-2
            license.md +1/-0
            readme.md +7/-1

Copy link

gem compare --diff localhost 1.2.0 1.3.1

Compared versions: ["1.2.0", "1.3.1"]
  DIFFERENT files:
    1.2.0->1.3.1:
      * Changed:
        lib/localhost/authority.rb
                --- /tmp/d20240417-1812-73lo4w/localhost-1.2.0/lib/localhost/authority.rb	2024-04-17 02:11:51.914988147 +0000
                +++ /tmp/d20240417-1812-73lo4w/localhost-1.3.1/lib/localhost/authority.rb	2024-04-17 02:11:51.914988147 +0000
                @@ -4 +4 @@
                -# Copyright, 2018-2023, by Samuel Williams.
                +# Copyright, 2018-2024, by Samuel Williams.
                @@ -9,0 +10 @@
                +# Copyright, 2024, by Colin Shea.
                @@ -10,0 +12 @@
                +require 'fileutils'
                @@ -16,2 +18,23 @@
                -		def self.path
                -			File.expand_path("~/.localhost")
                +		# Where to store the key pair on the filesystem. This is a subdirectory
                +		# of $XDG_STATE_HOME, or ~/.local/state/ when that's not defined.
                +		#
                +		# Ensures that the directory to store the certificate exists. If the legacy
                +		# directory (~/.localhost/) exists, it is moved into the new XDG Basedir
                +		# compliant directory.
                +		#
                +		# After May 2025, the old_root option may be removed.
                +		def self.path(env = ENV, old_root: nil)
                +			path = File.expand_path("localhost.rb", env.fetch("XDG_STATE_HOME", "~/.local/state"))
                +			
                +			unless File.directory?(path)
                +				FileUtils.mkdir_p(path, mode: 0700)
                +			end
                +			
                +			# Migrates the legacy dir ~/.localhost/ to the XDG compliant directory
                +			old_root ||= File.expand_path("~/.localhost")
                +			if File.directory?(old_root)
                +				FileUtils.mv(Dir.glob(File.join(old_root, "*")), path, force: true)
                +				FileUtils.rmdir(old_root)
                +			end
                +			
                +			return path
                @@ -22 +45 @@
                -			return to_enum(:list) unless block_given?
                +			return to_enum(:list, root) unless block_given?
                @@ -65,4 +87,0 @@
                -		def ecdh_key
                -			@ecdh_key ||= OpenSSL::PKey::EC.new "prime256v1"
                -		end
                -		
                @@ -156,2 +174,0 @@
                -				elsif context.respond_to? :tmp_ecdh_callback=
                -					context.tmp_ecdh_callback = proc {self.ecdh_key}
                @@ -179,17 +196,15 @@
                -			if File.directory?(path)
                -				certificate_path = File.join(path, "#{@hostname}.crt")
                -				key_path = File.join(path, "#{@hostname}.key")
                -				
                -				return false unless File.exist?(certificate_path) and File.exist?(key_path)
                -				
                -				certificate = OpenSSL::X509::Certificate.new(File.read(certificate_path))
                -				key = OpenSSL::PKey::RSA.new(File.read(key_path))
                -				
                -				# Certificates with old version need to be regenerated.
                -				return false if certificate.version < 2
                -				
                -				@certificate = certificate
                -				@key = key
                -				
                -				return true
                -			end
                +			certificate_path = File.join(path, "#{@hostname}.crt")
                +			key_path = File.join(path, "#{@hostname}.key")
                +			
                +			return false unless File.exist?(certificate_path) and File.exist?(key_path)
                +			
                +			certificate = OpenSSL::X509::Certificate.new(File.read(certificate_path))
                +			key = OpenSSL::PKey::RSA.new(File.read(key_path))
                +			
                +			# Certificates with old version need to be regenerated.
                +			return false if certificate.version < 2
                +			
                +			@certificate = certificate
                +			@key = key
                +			
                +			return true
                @@ -199,2 +213,0 @@
                -			Dir.mkdir(path, 0700) unless File.directory?(path)
                -			
        lib/localhost/version.rb
                --- /tmp/d20240417-1812-73lo4w/localhost-1.2.0/lib/localhost/version.rb	2024-04-17 02:11:51.914988147 +0000
                +++ /tmp/d20240417-1812-73lo4w/localhost-1.3.1/lib/localhost/version.rb	2024-04-17 02:11:51.914988147 +0000
                @@ -4 +4 @@
                -# Copyright, 2018-2023, by Samuel Williams.
                +# Copyright, 2018-2024, by Samuel Williams.
                @@ -7 +7 @@
                -	VERSION = "1.2.0"
                +	VERSION = "1.3.1"
        license.md
                --- /tmp/d20240417-1812-73lo4w/localhost-1.2.0/license.md	2024-04-17 02:11:51.914988147 +0000
                +++ /tmp/d20240417-1812-73lo4w/localhost-1.3.1/license.md	2024-04-17 02:11:51.914988147 +0000
                @@ -11,0 +12 @@
                +Copyright, 2024, by Colin Shea.  
        readme.md
                --- /tmp/d20240417-1812-73lo4w/localhost-1.2.0/readme.md	2024-04-17 02:11:51.914988147 +0000
                +++ /tmp/d20240417-1812-73lo4w/localhost-1.3.1/readme.md	2024-04-17 02:11:51.914988147 +0000
                @@ -15 +15,7 @@
                -Please see the [project documentation](https://socketry.github.io/localhost/).
                +Please see the [project documentation](https://socketry.github.io/localhost/) for more details.
                +
                +  - [Getting Started](https://socketry.github.io/localhost/guides/getting-started/index) - This guide explains how to use `localhost` for provisioning local TLS certificates for development.
                +
                +  - [Browser Configuration](https://socketry.github.io/localhost/guides/browser-configuration/index) - This guide explains how to configure your local browser in order to avoid warnings about insecure self-signed certificates.
                +
                +  - [Example Server](https://socketry.github.io/localhost/guides/example-server/index) - This guide demonstrates how to use <code class="language-ruby">Localhost::Authority</code> to implement a simple HTTPS client & server.

@dentarg dentarg merged commit 1497c4c into main Apr 26, 2024
8 checks passed
@dentarg dentarg deleted the dependabot/bundler/localhost-1.3.1 branch April 26, 2024 17:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
dependencies ruby Pull requests that update Ruby code
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant