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.
@@ -8,7 +8,7 @@ require 'thingfish/metastore/memory'
8
8
  require 'thingfish/behaviors'
9
9
 
10
10
 
11
- describe Thingfish::Metastore::Memory do
11
+ RSpec.describe Thingfish::Metastore::Memory do
12
12
 
13
13
  it_behaves_like "a Thingfish metastore"
14
14
 
@@ -9,7 +9,7 @@ class TestingMetastore < Thingfish::Metastore
9
9
  end
10
10
 
11
11
 
12
- describe Thingfish::Metastore do
12
+ RSpec.describe Thingfish::Metastore do
13
13
 
14
14
  before( :all ) do
15
15
  setup_logging()
@@ -8,7 +8,7 @@ require 'rspec'
8
8
  require 'thingfish/mixins'
9
9
 
10
10
 
11
- describe Thingfish, 'mixins' do
11
+ RSpec.describe Thingfish, 'mixins' do
12
12
 
13
13
  # A collection of functions for dealing with object IDs.
14
14
  describe 'Normalization' do
@@ -8,14 +8,14 @@ require 'thingfish/processor'
8
8
  require 'strelka/httprequest/metadata'
9
9
 
10
10
 
11
- describe Thingfish::Processor, "MP3" do
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(:mp3) }
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 "extracts metadata from uploaded MP3 ID3 tags" do
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 include( 'mp3:artist', 'mp3:bitrate', 'mp3:comments' )
31
+ expect( req.metadata['checksum'] ).to eq( 'e6b7070cbec90cdc2d8206819d86d100f076f480c9ae19d3eb8f878b3b86f2d6' )
33
32
  end
34
33
 
35
34
 
36
- it "attaches album art as a related resource" do
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
- expect( related.size ).to eq( 1 )
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:
@@ -6,7 +6,7 @@ require 'rspec'
6
6
  require 'thingfish/processor'
7
7
 
8
8
 
9
- describe Thingfish::Processor do
9
+ RSpec.describe Thingfish::Processor do
10
10
 
11
11
  before( :all ) do
12
12
  setup_logging()
@@ -6,7 +6,7 @@ require 'rspec'
6
6
  require 'thingfish'
7
7
 
8
8
 
9
- describe Thingfish do
9
+ RSpec.describe Thingfish do
10
10
 
11
11
  it "returns a version string if asked" do
12
12
  expect( described_class.version_string ).to match( /\w+ [\d.]+/ )
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.5.0.pre20161103181816
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
- MIIEbDCCAtSgAwIBAgIBATANBgkqhkiG9w0BAQsFADA+MQwwCgYDVQQDDANnZWQx
15
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Ee3XdZBRNmtOu/g81gvwA7fkJHKllJuaI
23
+ dXzdHqq+zbGZVSQ7pRYHYomD0IiDe1DbIouFnPWmagaBnGHwXkDT2bKKP+s2v21m
24
+ ozilJg4aar2okb/RA6VS87o+d7g6LpDDMMQjH4G9OPnJENLdhu8KnPw/ivSVvQw7
25
+ N2I4L/ZOIe2DIVuYH7aLHfjZDQv/mNgpAgMBAAGjOTA3MAkGA1UdEwQCMAAwCwYD
26
+ VR0PBAQDAgSwMB0GA1UdDgQWBBRyjf55EbrHagiRLqt5YAd3yb8k4DANBgkqhkiG
27
+ 9w0BAQsFAAOCAYEAMYegZanJi8zq7QKPT7wqXefX4C88I5JWeBHR3PvvWK0CwyMV
28
+ peyiu5I13w/lYX+HUZjE4qsSpJMJFXWl4WZCOo+AMprOcf0PxfuJpxCej5D4tavf
29
+ vRfhahSw7XJrcZih/3J+/UgoH7R05MJ+8LTcy3HGrB3a0vTafjm8OY7Xpa0LJDoN
30
+ JDqxK321VIHyTibbKeA1hWSE6ljlQDvFbTqiCj3Ulp1jTv3TOlvRl8fqcfhxUJI0
31
+ +5Q82jJODjEN+GaWs0V+NlrbU94cXwS2PH5dXogftB5YYA5Ex8A0ikZ73xns4Hdo
32
+ XxdLdd92F5ovxA23j/rKe/IDwqr6FpDkU3nPXH/Qp0TVGv9zZnVJc/Z6ChkuWj8z
33
+ pW7JAyyiiHZgKKDReDrA2LA7Zs3o/7KA6UtUH0FHf8LYhcK+pfHk6RtjRe65ffw+
34
+ MCh97sQ/Z/MOusb5+QddBmB+k8EicXyGNl4b5L4XpL7fIQu+Y96TB3JEJlShxFD9
35
+ k9FjI4d9EP54gS/4
38
36
  -----END CERTIFICATE-----
39
- date: 2016-11-04 00:00:00.000000000 Z
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.9'
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.9'
52
+ version: '0.14'
55
53
  - !ruby/object:Gem::Dependency
56
- name: mongrel2
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.43'
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.8'
66
+ version: '0.10'
97
67
  - !ruby/object:Gem::Dependency
98
- name: hoe-highline
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.2'
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.2'
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.7'
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: '3.15'
167
- description: |-
168
- Thingfish is a extensible, web-based digital asset manager. It can be used to
169
- store chunks of data on the network in an application-independent way, link the
170
- chunks together with metadata, and then search for the chunk you need later and
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.rdoc
108
+ - History.md
186
109
  - LICENSE
187
- - Manifest.txt
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/mp3.rb
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/mp3_spec.rb
139
+ - spec/thingfish/processor/sha256_spec.rb
221
140
  - spec/thingfish/processor_spec.rb
222
141
  - spec/thingfish_spec.rb
223
- homepage: http://bitbucket.org/ged/thingfish
142
+ homepage: https://thing.fish
224
143
  licenses:
225
- - BSD
226
- - BSD
227
- metadata: {}
228
- post_install_message:
229
- rdoc_options:
230
- - "--main"
231
- - README.rdoc
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: 2.0.0
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: 1.3.1
164
+ version: '0'
244
165
  requirements: []
245
- rubyforge_project:
246
- rubygems_version: 2.5.1
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
@@ -1,5 +0,0 @@
1
- == v0.5.0 [2011-01-18] Michael Granger <ged@FaerieMUD.org>
2
-
3
- Rewritten to use Strelka.
4
-
5
-
@@ -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