thingfish 0.5.0.pre20161103181816 → 0.8.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +5 -5
- checksums.yaml.gz.sig +0 -0
- data.tar.gz.sig +0 -0
- data/History.md +48 -0
- data/{README.rdoc → README.md} +40 -26
- data/Rakefile +4 -88
- data/bin/thingfish +1 -1
- data/lib/strelka/app/metadata.rb +1 -1
- data/lib/strelka/apps.rb +9 -0
- data/lib/strelka/httprequest/metadata.rb +1 -1
- data/lib/thingfish.rb +2 -13
- data/lib/thingfish/behaviors.rb +1 -1
- data/lib/thingfish/datastore.rb +1 -1
- data/lib/thingfish/datastore/memory.rb +1 -1
- data/lib/thingfish/handler.rb +94 -53
- data/lib/thingfish/metastore.rb +1 -1
- data/lib/thingfish/metastore/memory.rb +1 -1
- data/lib/thingfish/mixins.rb +1 -1
- data/lib/thingfish/processor.rb +1 -1
- data/lib/thingfish/processor/sha256.rb +51 -0
- data/lib/thingfish/spechelpers.rb +1 -1
- data/spec/helpers.rb +19 -12
- data/spec/thingfish/datastore/memory_spec.rb +1 -1
- data/spec/thingfish/datastore_spec.rb +1 -1
- data/spec/thingfish/handler_spec.rb +235 -201
- data/spec/thingfish/metastore/memory_spec.rb +1 -1
- data/spec/thingfish/metastore_spec.rb +1 -1
- data/spec/thingfish/mixins_spec.rb +1 -1
- data/spec/thingfish/processor/{mp3_spec.rb → sha256_spec.rb} +10 -11
- data/spec/thingfish/processor_spec.rb +1 -1
- data/spec/thingfish_spec.rb +1 -1
- metadata +61 -141
- metadata.gz.sig +0 -0
- data/History.rdoc +0 -5
- data/Manifest.txt +0 -44
- data/Procfile +0 -4
- data/bin/tfprocessord +0 -6
- data/etc/thingfish.conf.example +0 -26
- data/lib/thingfish/processor/mp3.rb +0 -167
- data/lib/thingfish/processordaemon.rb +0 -16
@@ -8,14 +8,14 @@ require 'thingfish/processor'
|
|
8
8
|
require 'strelka/httprequest/metadata'
|
9
9
|
|
10
10
|
|
11
|
-
describe Thingfish::Processor, "
|
11
|
+
RSpec.describe Thingfish::Processor, "SHA256" do
|
12
12
|
|
13
13
|
before( :all ) do
|
14
14
|
Strelka::HTTPRequest.class_eval { include Strelka::HTTPRequest::Metadata }
|
15
15
|
end
|
16
16
|
|
17
17
|
|
18
|
-
let( :processor ) { described_class.create(:
|
18
|
+
let( :processor ) { described_class.create(:sha256) }
|
19
19
|
|
20
20
|
let( :factory ) do
|
21
21
|
Mongrel2::RequestFactory.new(
|
@@ -24,27 +24,26 @@ describe Thingfish::Processor, "MP3" do
|
|
24
24
|
end
|
25
25
|
|
26
26
|
|
27
|
-
it "
|
27
|
+
it "generates a sha256 checksum from an uploaded file" do
|
28
28
|
req = factory.post( '/tf', fixture_data('APIC-1-image.mp3'), 'Content-type' => 'audio/mp3' )
|
29
|
-
|
30
29
|
processor.process_request( req )
|
31
30
|
|
32
|
-
expect( req.metadata ).to
|
31
|
+
expect( req.metadata['checksum'] ).to eq( 'e6b7070cbec90cdc2d8206819d86d100f076f480c9ae19d3eb8f878b3b86f2d6' )
|
33
32
|
end
|
34
33
|
|
35
34
|
|
36
|
-
it "
|
35
|
+
it "generates a sha256 checksum for related resources" do
|
36
|
+
content = "data data data data data"
|
37
37
|
req = factory.post( '/tf', fixture_data('APIC-1-image.mp3'), 'Content-type' => 'audio/mp3' )
|
38
|
+
req.add_related_resource( StringIO.new( content ), {} )
|
38
39
|
|
39
40
|
processor.process_request( req )
|
40
41
|
|
41
42
|
related = req.related_resources
|
42
|
-
|
43
|
-
expect( related.values.first ).
|
44
|
-
to include( 'format' => 'image/jpeg', 'extent' => 7369, 'relationship' => 'album-art' )
|
45
|
-
expect( related.keys.first ).to respond_to( :read )
|
46
|
-
end
|
43
|
+
related_metadata = related.first.last
|
47
44
|
|
45
|
+
expect( related_metadata[:checksum] ).to eq( Digest::SHA256.hexdigest(content) )
|
46
|
+
end
|
48
47
|
end
|
49
48
|
|
50
49
|
# vim: set nosta noet ts=4 sw=4 ft=rspec:
|
data/spec/thingfish_spec.rb
CHANGED
metadata
CHANGED
@@ -1,42 +1,40 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: thingfish
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.8.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Michael Granger
|
8
8
|
- Mahlon E. Smith
|
9
|
-
autorequire:
|
9
|
+
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain:
|
12
12
|
- |
|
13
13
|
-----BEGIN CERTIFICATE-----
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
+
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
w8aNA5re5+Rt/Vvjxj5AcEnZnZiz5x959NaddQocX32Z1unHw44pzRNUur1GInfW
|
37
|
-
p4vpx2kUSFSAGjtCbDGTNV2AH8w9OU4xEmNz8c5lyoA=
|
14
|
+
MIID+DCCAmCgAwIBAgIBAzANBgkqhkiG9w0BAQsFADAiMSAwHgYDVQQDDBdnZWQv
|
15
|
+
REM9RmFlcmllTVVEL0RDPW9yZzAeFw0yMDEyMjQyMDU1MjlaFw0yMTEyMjQyMDU1
|
16
|
+
MjlaMCIxIDAeBgNVBAMMF2dlZC9EQz1GYWVyaWVNVUQvREM9b3JnMIIBojANBgkq
|
17
|
+
hkiG9w0BAQEFAAOCAY8AMIIBigKCAYEAvyVhkRzvlEs0fe7145BYLfN6njX9ih5H
|
18
|
+
L60U0p0euIurpv84op9CNKF9tx+1WKwyQvQP7qFGuZxkSUuWcP/sFhDXL1lWUuIl
|
19
|
+
M4uHbGCRmOshDrF4dgnBeOvkHr1fIhPlJm5FO+Vew8tSQmlDsosxLUx+VB7DrVFO
|
20
|
+
5PU2AEbf04GGSrmqADGWXeasla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
+
k9FjI4d9EP54gS/4
|
38
36
|
-----END CERTIFICATE-----
|
39
|
-
date:
|
37
|
+
date: 2021-01-02 00:00:00.000000000 Z
|
40
38
|
dependencies:
|
41
39
|
- !ruby/object:Gem::Dependency
|
42
40
|
name: strelka
|
@@ -44,154 +42,76 @@ dependencies:
|
|
44
42
|
requirements:
|
45
43
|
- - "~>"
|
46
44
|
- !ruby/object:Gem::Version
|
47
|
-
version: '0.
|
45
|
+
version: '0.14'
|
48
46
|
type: :runtime
|
49
47
|
prerelease: false
|
50
48
|
version_requirements: !ruby/object:Gem::Requirement
|
51
49
|
requirements:
|
52
50
|
- - "~>"
|
53
51
|
- !ruby/object:Gem::Version
|
54
|
-
version: '0.
|
52
|
+
version: '0.14'
|
55
53
|
- !ruby/object:Gem::Dependency
|
56
|
-
name:
|
54
|
+
name: rake-deveiate
|
57
55
|
requirement: !ruby/object:Gem::Requirement
|
58
56
|
requirements:
|
59
57
|
- - "~>"
|
60
58
|
- !ruby/object:Gem::Version
|
61
|
-
version: '0.
|
62
|
-
type: :runtime
|
63
|
-
prerelease: false
|
64
|
-
version_requirements: !ruby/object:Gem::Requirement
|
65
|
-
requirements:
|
66
|
-
- - "~>"
|
67
|
-
- !ruby/object:Gem::Version
|
68
|
-
version: '0.43'
|
69
|
-
- !ruby/object:Gem::Dependency
|
70
|
-
name: hoe-mercurial
|
71
|
-
requirement: !ruby/object:Gem::Requirement
|
72
|
-
requirements:
|
73
|
-
- - "~>"
|
74
|
-
- !ruby/object:Gem::Version
|
75
|
-
version: '1.4'
|
76
|
-
type: :development
|
77
|
-
prerelease: false
|
78
|
-
version_requirements: !ruby/object:Gem::Requirement
|
79
|
-
requirements:
|
80
|
-
- - "~>"
|
81
|
-
- !ruby/object:Gem::Version
|
82
|
-
version: '1.4'
|
83
|
-
- !ruby/object:Gem::Dependency
|
84
|
-
name: hoe-deveiate
|
85
|
-
requirement: !ruby/object:Gem::Requirement
|
86
|
-
requirements:
|
87
|
-
- - "~>"
|
88
|
-
- !ruby/object:Gem::Version
|
89
|
-
version: '0.8'
|
59
|
+
version: '0.10'
|
90
60
|
type: :development
|
91
61
|
prerelease: false
|
92
62
|
version_requirements: !ruby/object:Gem::Requirement
|
93
63
|
requirements:
|
94
64
|
- - "~>"
|
95
65
|
- !ruby/object:Gem::Version
|
96
|
-
version: '0.
|
66
|
+
version: '0.10'
|
97
67
|
- !ruby/object:Gem::Dependency
|
98
|
-
name:
|
68
|
+
name: rdoc-generator-fivefish
|
99
69
|
requirement: !ruby/object:Gem::Requirement
|
100
70
|
requirements:
|
101
71
|
- - "~>"
|
102
72
|
- !ruby/object:Gem::Version
|
103
|
-
version: '0.
|
73
|
+
version: '0.4'
|
104
74
|
type: :development
|
105
75
|
prerelease: false
|
106
76
|
version_requirements: !ruby/object:Gem::Requirement
|
107
77
|
requirements:
|
108
78
|
- - "~>"
|
109
79
|
- !ruby/object:Gem::Version
|
110
|
-
version: '0.
|
80
|
+
version: '0.4'
|
111
81
|
- !ruby/object:Gem::Dependency
|
112
82
|
name: simplecov
|
113
83
|
requirement: !ruby/object:Gem::Requirement
|
114
84
|
requirements:
|
115
85
|
- - "~>"
|
116
86
|
- !ruby/object:Gem::Version
|
117
|
-
version: '0.
|
118
|
-
type: :development
|
119
|
-
prerelease: false
|
120
|
-
version_requirements: !ruby/object:Gem::Requirement
|
121
|
-
requirements:
|
122
|
-
- - "~>"
|
123
|
-
- !ruby/object:Gem::Version
|
124
|
-
version: '0.7'
|
125
|
-
- !ruby/object:Gem::Dependency
|
126
|
-
name: ruby-mp3info
|
127
|
-
requirement: !ruby/object:Gem::Requirement
|
128
|
-
requirements:
|
129
|
-
- - "~>"
|
130
|
-
- !ruby/object:Gem::Version
|
131
|
-
version: '0.8'
|
132
|
-
type: :development
|
133
|
-
prerelease: false
|
134
|
-
version_requirements: !ruby/object:Gem::Requirement
|
135
|
-
requirements:
|
136
|
-
- - "~>"
|
137
|
-
- !ruby/object:Gem::Version
|
138
|
-
version: '0.8'
|
139
|
-
- !ruby/object:Gem::Dependency
|
140
|
-
name: rdoc
|
141
|
-
requirement: !ruby/object:Gem::Requirement
|
142
|
-
requirements:
|
143
|
-
- - "~>"
|
144
|
-
- !ruby/object:Gem::Version
|
145
|
-
version: '4.0'
|
146
|
-
type: :development
|
147
|
-
prerelease: false
|
148
|
-
version_requirements: !ruby/object:Gem::Requirement
|
149
|
-
requirements:
|
150
|
-
- - "~>"
|
151
|
-
- !ruby/object:Gem::Version
|
152
|
-
version: '4.0'
|
153
|
-
- !ruby/object:Gem::Dependency
|
154
|
-
name: hoe
|
155
|
-
requirement: !ruby/object:Gem::Requirement
|
156
|
-
requirements:
|
157
|
-
- - "~>"
|
158
|
-
- !ruby/object:Gem::Version
|
159
|
-
version: '3.15'
|
87
|
+
version: '0.18'
|
160
88
|
type: :development
|
161
89
|
prerelease: false
|
162
90
|
version_requirements: !ruby/object:Gem::Requirement
|
163
91
|
requirements:
|
164
92
|
- - "~>"
|
165
93
|
- !ruby/object:Gem::Version
|
166
|
-
version: '
|
167
|
-
description:
|
168
|
-
|
169
|
-
|
170
|
-
|
171
|
-
fetch it, all through a REST API.
|
94
|
+
version: '0.18'
|
95
|
+
description: Thingfish is a extensible, web-based digital asset manager. It can be
|
96
|
+
used to store chunks of data on the network in an application-independent way, link
|
97
|
+
the chunks together with metadata, and then search for the chunk you need later
|
98
|
+
and fetch it, all through a REST API.
|
172
99
|
email:
|
173
100
|
- ged@FaerieMUD.org
|
174
101
|
- mahlon@martini.nu
|
175
102
|
executables:
|
176
|
-
- tfprocessord
|
177
103
|
- thingfish
|
178
104
|
extensions: []
|
179
|
-
extra_rdoc_files:
|
180
|
-
- History.rdoc
|
181
|
-
- Manifest.txt
|
182
|
-
- README.rdoc
|
105
|
+
extra_rdoc_files: []
|
183
106
|
files:
|
184
107
|
- ".simplecov"
|
185
|
-
- History.
|
108
|
+
- History.md
|
186
109
|
- LICENSE
|
187
|
-
-
|
188
|
-
- Procfile
|
189
|
-
- README.rdoc
|
110
|
+
- README.md
|
190
111
|
- Rakefile
|
191
|
-
- bin/tfprocessord
|
192
112
|
- bin/thingfish
|
193
|
-
- etc/thingfish.conf.example
|
194
113
|
- lib/strelka/app/metadata.rb
|
114
|
+
- lib/strelka/apps.rb
|
195
115
|
- lib/strelka/httprequest/metadata.rb
|
196
116
|
- lib/thingfish.rb
|
197
117
|
- lib/thingfish/behaviors.rb
|
@@ -202,8 +122,7 @@ files:
|
|
202
122
|
- lib/thingfish/metastore/memory.rb
|
203
123
|
- lib/thingfish/mixins.rb
|
204
124
|
- lib/thingfish/processor.rb
|
205
|
-
- lib/thingfish/processor/
|
206
|
-
- lib/thingfish/processordaemon.rb
|
125
|
+
- lib/thingfish/processor/sha256.rb
|
207
126
|
- lib/thingfish/spechelpers.rb
|
208
127
|
- spec/data/APIC-1-image.mp3
|
209
128
|
- spec/data/APIC-2-images.mp3
|
@@ -217,34 +136,35 @@ files:
|
|
217
136
|
- spec/thingfish/metastore/memory_spec.rb
|
218
137
|
- spec/thingfish/metastore_spec.rb
|
219
138
|
- spec/thingfish/mixins_spec.rb
|
220
|
-
- spec/thingfish/processor/
|
139
|
+
- spec/thingfish/processor/sha256_spec.rb
|
221
140
|
- spec/thingfish/processor_spec.rb
|
222
141
|
- spec/thingfish_spec.rb
|
223
|
-
homepage:
|
142
|
+
homepage: https://thing.fish
|
224
143
|
licenses:
|
225
|
-
- BSD
|
226
|
-
|
227
|
-
|
228
|
-
|
229
|
-
|
230
|
-
|
231
|
-
|
144
|
+
- BSD-3-Clause
|
145
|
+
metadata:
|
146
|
+
homepage_uri: https://thing.fish
|
147
|
+
documentation_uri: https://thing.fish/docs/
|
148
|
+
changelog_uri: https://thing.fish/docs/History_md.html
|
149
|
+
source_uri: https://hg.sr.ht/~ged/thingfish
|
150
|
+
bug_tracker_uri: https://todo.sr.ht/~ged/thingfish
|
151
|
+
post_install_message:
|
152
|
+
rdoc_options: []
|
232
153
|
require_paths:
|
233
154
|
- lib
|
234
155
|
required_ruby_version: !ruby/object:Gem::Requirement
|
235
156
|
requirements:
|
236
157
|
- - ">="
|
237
158
|
- !ruby/object:Gem::Version
|
238
|
-
version:
|
159
|
+
version: '0'
|
239
160
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
240
161
|
requirements:
|
241
|
-
- - "
|
162
|
+
- - ">="
|
242
163
|
- !ruby/object:Gem::Version
|
243
|
-
version:
|
164
|
+
version: '0'
|
244
165
|
requirements: []
|
245
|
-
|
246
|
-
|
247
|
-
signing_key:
|
166
|
+
rubygems_version: 3.2.3
|
167
|
+
signing_key:
|
248
168
|
specification_version: 4
|
249
|
-
summary: Thingfish is a extensible, web-based digital asset manager
|
169
|
+
summary: Thingfish is a extensible, web-based digital asset manager.
|
250
170
|
test_files: []
|
metadata.gz.sig
CHANGED
Binary file
|
data/History.rdoc
DELETED
data/Manifest.txt
DELETED
@@ -1,44 +0,0 @@
|
|
1
|
-
.simplecov
|
2
|
-
ChangeLog
|
3
|
-
Gemfile
|
4
|
-
History.rdoc
|
5
|
-
LICENSE
|
6
|
-
Manifest.txt
|
7
|
-
Procfile
|
8
|
-
README.rdoc
|
9
|
-
Rakefile
|
10
|
-
bin/tfprocessord
|
11
|
-
bin/thingfish
|
12
|
-
etc/mongrel2-config.rb
|
13
|
-
etc/thingfish.conf.example
|
14
|
-
lib/strelka/app/metadata.rb
|
15
|
-
lib/strelka/httprequest/metadata.rb
|
16
|
-
lib/thingfish.rb
|
17
|
-
lib/thingfish/behaviors.rb
|
18
|
-
lib/thingfish/datastore.rb
|
19
|
-
lib/thingfish/datastore/memory.rb
|
20
|
-
lib/thingfish/handler.rb
|
21
|
-
lib/thingfish/metastore.rb
|
22
|
-
lib/thingfish/metastore/memory.rb
|
23
|
-
lib/thingfish/mixins.rb
|
24
|
-
lib/thingfish/processor.rb
|
25
|
-
lib/thingfish/processor/mp3.rb
|
26
|
-
lib/thingfish/processor/sha256.rb
|
27
|
-
lib/thingfish/processordaemon.rb
|
28
|
-
lib/thingfish/spechelpers.rb
|
29
|
-
spec/data/APIC-1-image.mp3
|
30
|
-
spec/data/APIC-2-images.mp3
|
31
|
-
spec/data/PIC-1-image.mp3
|
32
|
-
spec/data/PIC-2-images.mp3
|
33
|
-
spec/helpers.rb
|
34
|
-
spec/spec.opts
|
35
|
-
spec/thingfish/datastore/memory_spec.rb
|
36
|
-
spec/thingfish/datastore_spec.rb
|
37
|
-
spec/thingfish/handler_spec.rb
|
38
|
-
spec/thingfish/metastore/memory_spec.rb
|
39
|
-
spec/thingfish/metastore_spec.rb
|
40
|
-
spec/thingfish/mixins_spec.rb
|
41
|
-
spec/thingfish/processor/mp3_spec.rb
|
42
|
-
spec/thingfish/processor/sha256_spec.rb
|
43
|
-
spec/thingfish/processor_spec.rb
|
44
|
-
spec/thingfish_spec.rb
|