protocol-quic 0.0.5 → 0.0.7

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: cebc4e910242d2f8a4b5eda4d7b44fcbbe3c6ae3220003d8d5886d3fce785a5c
4
- data.tar.gz: a3ae388d1abd5bf2736fe9bd0ace296ce30ca984b2097c535d78bc2fb8417b86
3
+ metadata.gz: ff0b2c9e479b40177c22144be2fb693a8150c24979764ec27e2279c94854f746
4
+ data.tar.gz: 1e5b8a83835b6b084076ce10a8b5815ac67759f259a7ca9d161f129f45534479
5
5
  SHA512:
6
- metadata.gz: 15f4ba97d0b2df5a56502f20300f6149f879be26b743eba97b7b3d8fd709cacba7d30b1a032bd312722c64614db156853bedd7e0dc13e9113c870ed8d719275c
7
- data.tar.gz: 4c64b7549057a6bd15eb383c1ba2efbf391701aa22f35ed62c412ad630b9642b570b4b31e552daa7606b9bd5e592f090e8e17fc2d538630214e3ca67c74c0a40
6
+ metadata.gz: 818acd40884c6b542b3134f327aeab00682cf3350ce4585979a50be2f985df953f529ff47c4ae764fe33f336247548a259a494fe92b2ef17b482b7af9b44031b
7
+ data.tar.gz: b70f4cfbce65c17d13a584661b679f3e64653ebb09e78e2484d7fa96c0b2e6655f4a5ea4e223b85b00f6bf181e08bf2836b51ff8a8d3250c8f5c7696a380f7d5
checksums.yaml.gz.sig CHANGED
Binary file
data/ext/gems.rb ADDED
@@ -0,0 +1,8 @@
1
+ # frozen_string_literal: true
2
+
3
+ # Released under the MIT License.
4
+ # Copyright, 2026, by Samuel Williams.
5
+
6
+ source "https://rubygems.org"
7
+
8
+ gem "teapot", "~> 3.5"
data/ext/rakefile.rb CHANGED
@@ -6,11 +6,15 @@
6
6
  require "rbconfig"
7
7
  require "rubygems"
8
8
 
9
+ BUILD_GEMFILE = File.expand_path("gems.rb", __dir__)
10
+ BUNDLE = [RbConfig.ruby, Gem.bin_path("bundler", "bundle")]
11
+
9
12
  task :default do
10
13
  ruby_library_directory = ENV.fetch("RUBYLIBDIR"){ENV.fetch("RUBYARCHDIR")}
11
- build_environment = {"RUBYLIBDIR" => ruby_library_directory}
12
- teapot = [RbConfig.ruby, Gem.bin_path("teapot", "teapot")]
14
+ bundle_environment = {"BUNDLE_GEMFILE" => BUILD_GEMFILE}
15
+ build_environment = bundle_environment.merge("RUBYLIBDIR" => ruby_library_directory)
13
16
 
14
- sh build_environment, *teapot, "fetch"
15
- sh build_environment, *teapot, "Ruby/Protocol/QUIC"
17
+ sh bundle_environment, *BUNDLE, "install"
18
+ sh build_environment, *BUNDLE, "exec", "teapot", "fetch"
19
+ sh build_environment, *BUNDLE, "exec", "teapot", "Ruby/Protocol/QUIC"
16
20
  end
@@ -104,6 +104,13 @@ static VALUE Ruby_Protocol_QUIC_Socket_connect(VALUE self, VALUE address) {
104
104
  );
105
105
  }
106
106
 
107
+ static VALUE Ruby_Protocol_QUIC_Socket_close(VALUE self) {
108
+ auto socket = Ruby_Protocol_QUIC_Socket_get(self);
109
+ socket->close();
110
+
111
+ return Qnil;
112
+ }
113
+
107
114
  void Init_Ruby_Protocol_QUIC_Socket(VALUE Protocol_QUIC) {
108
115
  Ruby_Protocol_QUIC_Socket = rb_define_class_under(Protocol_QUIC, "Socket", rb_cObject);
109
116
 
@@ -115,4 +122,5 @@ void Init_Ruby_Protocol_QUIC_Socket(VALUE Protocol_QUIC) {
115
122
 
116
123
  rb_define_method(Ruby_Protocol_QUIC_Socket, "bind", Ruby_Protocol_QUIC_Socket_bind, 1);
117
124
  rb_define_method(Ruby_Protocol_QUIC_Socket, "connect", Ruby_Protocol_QUIC_Socket_connect, 1);
125
+ rb_define_method(Ruby_Protocol_QUIC_Socket, "close", Ruby_Protocol_QUIC_Socket_close, 0);
118
126
  }
@@ -7,6 +7,6 @@
7
7
  module Protocol
8
8
  # @namespace
9
9
  module QUIC
10
- VERSION = "0.0.5"
10
+ VERSION = "0.0.7"
11
11
  end
12
12
  end
data.tar.gz.sig CHANGED
Binary file
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: protocol-quic
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.5
4
+ version: 0.0.7
5
5
  platform: ruby
6
6
  authors:
7
7
  - Samuel Williams
@@ -71,6 +71,7 @@ extensions:
71
71
  - ext/rakefile.rb
72
72
  extra_rdoc_files: []
73
73
  files:
74
+ - ext/gems.rb
74
75
  - ext/rakefile.rb
75
76
  - ext/ruby-protocol-quic-lock.yml
76
77
  - ext/source/Ruby/Protocol/QUIC.cpp
metadata.gz.sig CHANGED
Binary file