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 +4 -4
- data/lib/isomorfeus/preact/version.rb +1 -1
- data/opal/iso_uri.rb +29 -0
- data/opal/uri/common.rb +18 -0
- data/opal/uri/generic.rb +47 -0
- metadata +8 -5
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 1941d58313b84f914e1a02af158c082f7db2ff2dc807326937b2278ada18fe26
|
|
4
|
+
data.tar.gz: c8201b7ee9f43842e5a08cafe1342444d351effc2e14607c8d40b809fee1db7d
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: eaa0e1d7b8a55ddf4a2df7f1c84b042b5abe5d4be8eb88425fe58accebdea661d877dc7ad4c39d66419ade311951658b99670ba71d271bc5dd00f4f86a90250c
|
|
7
|
+
data.tar.gz: dc7ec144d1c841d1a95a23b45458bbda2f0ae1ca12e6f516a40024a526be72a5e7b50a18aa0c700808caea085c8399ae1d87e8e1f0c4536fa8ba065830f0ea93
|
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
|
data/opal/uri/common.rb
ADDED
|
@@ -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
|
+
|
data/opal/uri/generic.rb
ADDED
|
@@ -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.
|
|
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.
|
|
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.
|
|
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.
|
|
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.
|
|
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
|