isomorfeus-preact 22.9.0.rc1 → 22.9.0.rc2

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: f03a9caab0b34f6c66cc1b321a6b7ab89a42af5b5ffb58f775ed5ac2d5bf2a14
4
- data.tar.gz: f31916a7ca1e982c0f24f7fde58b0ae09aa834e14a3d872086842f802ffe0c45
3
+ metadata.gz: 1941d58313b84f914e1a02af158c082f7db2ff2dc807326937b2278ada18fe26
4
+ data.tar.gz: c8201b7ee9f43842e5a08cafe1342444d351effc2e14607c8d40b809fee1db7d
5
5
  SHA512:
6
- metadata.gz: d301859c505f127332372ab4c5ace3eb01d8357d581baa38c2f187e5564c41dbee9cef90cb4fc1d1ad47c3665bf6b415bf2f76adce43b9490dcfaae02da3e443
7
- data.tar.gz: aa70516de11b90de247423429e78def56967e780cb13bcd761d8d4de653310d7247d2ebd2ed87e66143ea31e3851136694df6effc9379d2f87738369ef55e518
6
+ metadata.gz: eaa0e1d7b8a55ddf4a2df7f1c84b042b5abe5d4be8eb88425fe58accebdea661d877dc7ad4c39d66419ade311951658b99670ba71d271bc5dd00f4f86a90250c
7
+ data.tar.gz: dc7ec144d1c841d1a95a23b45458bbda2f0ae1ca12e6f516a40024a526be72a5e7b50a18aa0c700808caea085c8399ae1d87e8e1f0c4536fa8ba065830f0ea93
@@ -1,5 +1,5 @@
1
1
  module Isomorfeus
2
2
  module Preact
3
- VERSION = '22.9.0.rc1'
3
+ VERSION = '22.9.0.rc2'
4
4
  end
5
5
  end
data/opal/iso_uri.rb ADDED
@@ -0,0 +1,29 @@
1
+ require "uri/common"
2
+ require "uri/generic"
3
+
4
+ module URI
5
+ @@schemes = {}
6
+
7
+ class InvalidURIError < Exception
8
+ end
9
+
10
+ def self.parse(url)
11
+ # scheme://conn_data/path?query#hash
12
+ match = url.match(%r[(\w+)://([^/]+)([^\?]+)(\?[^\#]+)?(\#.*)?])
13
+
14
+ _, scheme, connection_data, path, query, fragment = match.to_a
15
+
16
+ connection_data = connection_data.split(/@/)
17
+ userinfo = connection_data.size > 1 ? connection_data.first : nil
18
+ host, port = connection_data.last.split(/:/)
19
+
20
+ port = port.to_i
21
+ query = query[1..-1] if query
22
+
23
+ registry = opaque = nil
24
+
25
+ Generic.new(scheme, userinfo, host, port,
26
+ registry, path, opaque, query,
27
+ fragment)
28
+ end
29
+ end
@@ -0,0 +1,18 @@
1
+ module Kernel
2
+
3
+ #
4
+ # Returns +uri+ converted to a URI object.
5
+ #
6
+ def URI(uri)
7
+ if uri.is_a?(URI::Generic)
8
+ uri
9
+ elsif uri = String.try_convert(uri)
10
+ URI.parse(uri)
11
+ else
12
+ raise ArgumentError,
13
+ "bad argument (expected URI object or URI string)"
14
+ end
15
+ end
16
+ module_function :URI
17
+ end
18
+
@@ -0,0 +1,47 @@
1
+ module URI
2
+ class Generic
3
+ attr_reader :scheme, :userinfo, :user, :password, :host, :port, :path,
4
+ :query, :fragment, :opaque, :registry
5
+
6
+ #
7
+ # An Array of the available components for URI::Generic
8
+ #
9
+ COMPONENT = [
10
+ :scheme,
11
+ :userinfo, :host, :port, :registry,
12
+ :path, :opaque,
13
+ :query,
14
+ :fragment
15
+ ]
16
+
17
+ def initialize(scheme,
18
+ userinfo, host, port, registry,
19
+ path, opaque,
20
+ query,
21
+ fragment,
22
+ parser = nil,
23
+ arg_check = false)
24
+ @scheme = scheme
25
+ @userinfo = userinfo
26
+ @host = host
27
+ @port = port
28
+ @path = path
29
+ @query = query
30
+ @fragment = fragment
31
+ @user, @password = userinfo.split(/:/) if userinfo
32
+ end
33
+
34
+ def ==(other)
35
+ self.class == other.class &&
36
+ component_ary == other.component_ary
37
+ end
38
+
39
+ protected
40
+
41
+ def component_ary
42
+ self.class::COMPONENT.collect do |x|
43
+ self.send(x)
44
+ end
45
+ end
46
+ end
47
+ end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: isomorfeus-preact
3
3
  version: !ruby/object:Gem::Version
4
- version: 22.9.0.rc1
4
+ version: 22.9.0.rc2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jan Biedermann
@@ -58,28 +58,28 @@ dependencies:
58
58
  requirements:
59
59
  - - '='
60
60
  - !ruby/object:Gem::Version
61
- version: 22.9.0.rc1
61
+ version: 22.9.0.rc2
62
62
  type: :runtime
63
63
  prerelease: false
64
64
  version_requirements: !ruby/object:Gem::Requirement
65
65
  requirements:
66
66
  - - '='
67
67
  - !ruby/object:Gem::Version
68
- version: 22.9.0.rc1
68
+ version: 22.9.0.rc2
69
69
  - !ruby/object:Gem::Dependency
70
70
  name: isomorfeus-redux
71
71
  requirement: !ruby/object:Gem::Requirement
72
72
  requirements:
73
73
  - - '='
74
74
  - !ruby/object:Gem::Version
75
- version: 22.9.0.rc1
75
+ version: 22.9.0.rc2
76
76
  type: :runtime
77
77
  prerelease: false
78
78
  version_requirements: !ruby/object:Gem::Requirement
79
79
  requirements:
80
80
  - - '='
81
81
  - !ruby/object:Gem::Version
82
- version: 22.9.0.rc1
82
+ version: 22.9.0.rc2
83
83
  - !ruby/object:Gem::Dependency
84
84
  name: isomorfeus-puppetmaster
85
85
  requirement: !ruby/object:Gem::Requirement
@@ -171,6 +171,9 @@ files:
171
171
  - lib/route.rb
172
172
  - lib/router.rb
173
173
  - lib/switch.rb
174
+ - opal/iso_uri.rb
175
+ - opal/uri/common.rb
176
+ - opal/uri/generic.rb
174
177
  homepage: https://isomorfeus.com
175
178
  licenses:
176
179
  - MIT