isomorfeus-data 2.0.0.rc6 → 2.0.0.rc10

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: f1d8edb157f6e6a1c730b2990fb560a5e0a7875eee1f9cac0aa348093ea45c01
4
- data.tar.gz: b281558cec63e67da219fb8ae066fa3ff5b4e07cdce4d499c4b14d509b242495
3
+ metadata.gz: 8a2f0943e4a38a407ced81717eb442a6b56704acff81a9781c9b9eaf963594c0
4
+ data.tar.gz: 8abf01a83944d091aaf02260bbab76953bd96951f3f54ef700b84d972a8ac806
5
5
  SHA512:
6
- metadata.gz: 29f922f97ea4a823e0628c85597c9dff34eae19c37593faab2a1c91c0415b7dd2404dc6552bd628a158e4269900d8e14e868e985c2b8eff6f9ca9412e6310a25
7
- data.tar.gz: 5fbb439bef35fb02795d983b84878fd286fd7c3db508cbc62771e531f83fc0751dc2d612c25427a9ecbf78b87ddb5f848254747d7ece0df9ba3390c86346e7d1
6
+ metadata.gz: edecd958848a0e01a0a1766649ef40a09b5ba64db2156960348bdc409be198df357610057f5d2958a58b488e720baaa65363e3c1a132adc90f021b407edff78c
7
+ data.tar.gz: 5c027c5102d9dd1b9335cdc1957eb42b5c3bb68f7b54f1ca79d754ff843b7f14f38348d7baabb471b3d12b813ac867171952a55b14e163cfdc635b3a01bd4492
data/LICENSE CHANGED
@@ -25,23 +25,11 @@ https://github.com/ajjahn/opal-uri:
25
25
 
26
26
  Copyright (c) 2015 Jamie Gaskins
27
27
 
28
- MIT License
28
+ MIT License as above
29
+
30
+ data_uri module in lib directoy originally taken from
31
+ https://github.com/dball/data_uri:
32
+
33
+ Copyright © 2010 Donald Ball <donald.ball@gmail.com>
29
34
 
30
- Permission is hereby granted, free of charge, to any person obtaining
31
- a copy of this software and associated documentation files (the
32
- "Software"), to deal in the Software without restriction, including
33
- without limitation the rights to use, copy, modify, merge, publish,
34
- distribute, sublicense, and/or sell copies of the Software, and to
35
- permit persons to whom the Software is furnished to do so, subject to
36
- the following conditions:
37
-
38
- The above copyright notice and this permission notice shall be
39
- included in all copies or substantial portions of the Software.
40
-
41
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
42
- EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
43
- MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
44
- NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
45
- LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
46
- OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
47
- WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
35
+ MIT License as above
@@ -0,0 +1,22 @@
1
+ module URI
2
+
3
+ class Data
4
+
5
+ def open
6
+ io = StringIO.new(data)
7
+ OpenURI::Meta.init(io)
8
+ io.meta_add_field('content-type', content_type)
9
+ if block_given?
10
+ begin
11
+ yield io
12
+ ensure
13
+ io.close
14
+ end
15
+ else
16
+ io
17
+ end
18
+ end
19
+
20
+ end
21
+
22
+ end
@@ -0,0 +1,61 @@
1
+ module URI
2
+ class Data < Generic
3
+ COMPONENT = [:scheme, :opaque].freeze
4
+ MIME_TYPE_RE = %r{^([-\w.+]+/[-\w.+]*)}.freeze
5
+ MIME_PARAM_RE = /^;([-\w.+]+)=([^;,]+)/.freeze
6
+
7
+ attr_reader :content_type, :data
8
+
9
+ def initialize(*args)
10
+ if args.length == 1
11
+ uri = args.first.to_s
12
+ unless uri.match(/^data:/)
13
+ raise URI::InvalidURIError.new('Invalid Data URI: ' + args.first.inspect)
14
+ end
15
+ @scheme = 'data'
16
+ @opaque = uri[5 .. -1]
17
+ else
18
+ super(*args)
19
+ end
20
+ @data = @opaque
21
+ if md = MIME_TYPE_RE.match(@data)
22
+ @content_type = md[1]
23
+ @data = @data[@content_type.length .. -1]
24
+ end
25
+ @content_type ||= 'text/plain'
26
+ @mime_params = {}
27
+ while md = MIME_PARAM_RE.match(@data)
28
+ @mime_params[md[1]] = md[2]
29
+ @data = @data[md[0].length .. -1]
30
+ end
31
+ if base64 = /^;base64/.match(@data)
32
+ @data = @data[7 .. -1]
33
+ end
34
+ unless /^,/.match(@data)
35
+ raise URI::InvalidURIError.new('Invalid data URI')
36
+ end
37
+ @data = @data[1 .. -1]
38
+ @data = base64 ? Base64.decode64(@data) : URI.decode(@data)
39
+ if @data.respond_to?(:force_encoding) && charset = @mime_params['charset']
40
+ @data.force_encoding(charset)
41
+ end
42
+ end
43
+
44
+ def self.build(arg)
45
+ data = nil
46
+ content_type = nil
47
+ case arg
48
+ when IO
49
+ data = arg
50
+ when Hash
51
+ data = arg[:data]
52
+ content_type = arg[:content_type]
53
+ end
54
+ raise 'Invalid build argument: ' + arg.inspect unless data
55
+ if !content_type && data.respond_to?(:content_type)
56
+ content_type = data.content_type
57
+ end
58
+ new('data', nil, nil, nil, nil, nil, "#{content_type};base64,#{Base64.encode64(data.read).chop}", nil, nil)
59
+ end
60
+ end
61
+ end
data/lib/data_uri.rb ADDED
@@ -0,0 +1,5 @@
1
+ require 'uri'
2
+ require 'base64'
3
+ require 'stringio'
4
+
5
+ require 'data_uri/uri'
@@ -1,5 +1,5 @@
1
1
  module Isomorfeus
2
2
  module Data
3
- VERSION = '2.0.0.rc6'
3
+ VERSION = '2.0.0.rc10'
4
4
  end
5
5
  end
@@ -47,9 +47,6 @@ else
47
47
  uri_path = File.expand_path(File.join(__dir__.untaint, '..', 'opal'))
48
48
  Opal.append_path(uri_path) unless IsoOpal.paths.include?(uri_path)
49
49
 
50
- data_uri_path = File.join(Gem::Specification.find_by_name('data_uri').gem_dir, 'lib')
51
- Opal.append_path(data_uri_path) unless IsoOpal.paths.include?(data_uri_path)
52
-
53
50
  path = File.expand_path(File.join('app', 'data'))
54
51
 
55
52
  Isomorfeus.zeitwerk.push_dir(path)
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: isomorfeus-data
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.0.0.rc6
4
+ version: 2.0.0.rc10
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jan Biedermann
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2021-11-26 00:00:00.000000000 Z
11
+ date: 2022-01-15 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activesupport
@@ -16,56 +16,42 @@ dependencies:
16
16
  requirements:
17
17
  - - "~>"
18
18
  - !ruby/object:Gem::Version
19
- version: '6.1'
19
+ version: 7.0.1
20
20
  type: :runtime
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
24
  - - "~>"
25
25
  - !ruby/object:Gem::Version
26
- version: '6.1'
27
- - !ruby/object:Gem::Dependency
28
- name: data_uri
29
- requirement: !ruby/object:Gem::Requirement
30
- requirements:
31
- - - "~>"
32
- - !ruby/object:Gem::Version
33
- version: 0.1.0
34
- type: :runtime
35
- prerelease: false
36
- version_requirements: !ruby/object:Gem::Requirement
37
- requirements:
38
- - - "~>"
39
- - !ruby/object:Gem::Version
40
- version: 0.1.0
26
+ version: 7.0.1
41
27
  - !ruby/object:Gem::Dependency
42
28
  name: oj
43
29
  requirement: !ruby/object:Gem::Requirement
44
30
  requirements:
45
31
  - - "~>"
46
32
  - !ruby/object:Gem::Version
47
- version: 3.13.9
33
+ version: 3.13.11
48
34
  type: :runtime
49
35
  prerelease: false
50
36
  version_requirements: !ruby/object:Gem::Requirement
51
37
  requirements:
52
38
  - - "~>"
53
39
  - !ruby/object:Gem::Version
54
- version: 3.13.9
40
+ version: 3.13.11
55
41
  - !ruby/object:Gem::Dependency
56
42
  name: opal
57
43
  requirement: !ruby/object:Gem::Requirement
58
44
  requirements:
59
45
  - - "~>"
60
46
  - !ruby/object:Gem::Version
61
- version: 1.3.2
47
+ version: 1.4.1
62
48
  type: :runtime
63
49
  prerelease: false
64
50
  version_requirements: !ruby/object:Gem::Requirement
65
51
  requirements:
66
52
  - - "~>"
67
53
  - !ruby/object:Gem::Version
68
- version: 1.3.2
54
+ version: 1.4.1
69
55
  - !ruby/object:Gem::Dependency
70
56
  name: opal-activesupport
71
57
  requirement: !ruby/object:Gem::Requirement
@@ -86,14 +72,14 @@ dependencies:
86
72
  requirements:
87
73
  - - "~>"
88
74
  - !ruby/object:Gem::Version
89
- version: 0.14.0
75
+ version: 0.14.4
90
76
  type: :runtime
91
77
  prerelease: false
92
78
  version_requirements: !ruby/object:Gem::Requirement
93
79
  requirements:
94
80
  - - "~>"
95
81
  - !ruby/object:Gem::Version
96
- version: 0.14.0
82
+ version: 0.14.4
97
83
  - !ruby/object:Gem::Dependency
98
84
  name: isomorfeus-ferret
99
85
  requirement: !ruby/object:Gem::Requirement
@@ -128,56 +114,56 @@ dependencies:
128
114
  requirements:
129
115
  - - "~>"
130
116
  - !ruby/object:Gem::Version
131
- version: 10.6.1
117
+ version: 10.6.6
132
118
  type: :runtime
133
119
  prerelease: false
134
120
  version_requirements: !ruby/object:Gem::Requirement
135
121
  requirements:
136
122
  - - "~>"
137
123
  - !ruby/object:Gem::Version
138
- version: 10.6.1
124
+ version: 10.6.6
139
125
  - !ruby/object:Gem::Dependency
140
126
  name: isomorfeus-redux
141
127
  requirement: !ruby/object:Gem::Requirement
142
128
  requirements:
143
129
  - - "~>"
144
130
  - !ruby/object:Gem::Version
145
- version: 4.1.10
131
+ version: 4.1.11
146
132
  type: :runtime
147
133
  prerelease: false
148
134
  version_requirements: !ruby/object:Gem::Requirement
149
135
  requirements:
150
136
  - - "~>"
151
137
  - !ruby/object:Gem::Version
152
- version: 4.1.10
138
+ version: 4.1.11
153
139
  - !ruby/object:Gem::Dependency
154
140
  name: isomorfeus-transport
155
141
  requirement: !ruby/object:Gem::Requirement
156
142
  requirements:
157
143
  - - '='
158
144
  - !ruby/object:Gem::Version
159
- version: 2.0.0.rc6
145
+ version: 2.0.0.rc10
160
146
  type: :runtime
161
147
  prerelease: false
162
148
  version_requirements: !ruby/object:Gem::Requirement
163
149
  requirements:
164
150
  - - '='
165
151
  - !ruby/object:Gem::Version
166
- version: 2.0.0.rc6
152
+ version: 2.0.0.rc10
167
153
  - !ruby/object:Gem::Dependency
168
154
  name: isomorfeus
169
155
  requirement: !ruby/object:Gem::Requirement
170
156
  requirements:
171
157
  - - '='
172
158
  - !ruby/object:Gem::Version
173
- version: 2.0.0.rc6
159
+ version: 2.0.0.rc10
174
160
  type: :development
175
161
  prerelease: false
176
162
  version_requirements: !ruby/object:Gem::Requirement
177
163
  requirements:
178
164
  - - '='
179
165
  - !ruby/object:Gem::Version
180
- version: 2.0.0.rc6
166
+ version: 2.0.0.rc10
181
167
  - !ruby/object:Gem::Dependency
182
168
  name: rake
183
169
  requirement: !ruby/object:Gem::Requirement
@@ -215,6 +201,9 @@ extra_rdoc_files: []
215
201
  files:
216
202
  - LICENSE
217
203
  - README.md
204
+ - lib/data_uri.rb
205
+ - lib/data_uri/open_uri.rb
206
+ - lib/data_uri/uri.rb
218
207
  - lib/isomorfeus-data.rb
219
208
  - lib/isomorfeus/data/attribute_support.rb
220
209
  - lib/isomorfeus/data/config.rb
@@ -260,7 +249,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
260
249
  - !ruby/object:Gem::Version
261
250
  version: 1.3.1
262
251
  requirements: []
263
- rubygems_version: 3.2.22
252
+ rubygems_version: 3.3.3
264
253
  signing_key:
265
254
  specification_version: 4
266
255
  summary: Compose Graphs and Collections of data just as needed for a isomorfeus app.