merritt-manifest 0.1.1 → 0.1.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGES.md +4 -1
- data/lib/merritt/manifest/fields.rb +1 -1
- data/lib/merritt/manifest/module_info.rb +1 -1
- data/merritt-manifest.iml +1 -1
- data/spec/unit/merritt/manifest/fields_spec.rb +20 -0
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 97265a1be13c6b40971aaa4a05738b1ada70633e
|
4
|
+
data.tar.gz: 6a0888f89af7a22b94da963ccfb08e7c10f435f1
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: c6eda103c0db71f4aac2211dfeb16ff94febe6a5f073aaaa9cba2379a7b8599017e5eb0499922d9cfeeb5a02f47b1bc04b4de524cdf53d1e4eff4cff9806e3f3
|
7
|
+
data.tar.gz: cc894aa3b71fec2ce83d9f43a4c6bb56957a21c89afcee2332eeca140ca81fa759638ddea6262693779e6b7834d442a6484cdd6dce8552b36a6f3593d529ddec
|
data/CHANGES.md
CHANGED
@@ -1,3 +1,7 @@
|
|
1
|
+
# 0.1.2 (22 April 2017)
|
2
|
+
|
3
|
+
- Fixed issue where unknown MIME types would not be written to the manifest (#1)
|
4
|
+
|
1
5
|
# 0.1.1 (18 April 2017)
|
2
6
|
|
3
7
|
- `Merritt::Manifest::Fields::Object::MIME_TYPE` now correctly parses strings as
|
@@ -5,7 +9,6 @@
|
|
5
9
|
- **BREAKING CHANGE:** `Merritt::Manifest::DataONE` now uses the standard `file_name`
|
6
10
|
and `mime_type` fields rather than `name` and `type`.
|
7
11
|
|
8
|
-
|
9
12
|
# 0.1.0 (18 April 2017)
|
10
13
|
|
11
14
|
- Initial release.
|
data/merritt-manifest.iml
CHANGED
@@ -30,7 +30,7 @@
|
|
30
30
|
<orderEntry type="library" scope="PROVIDED" name="simplecov-html (v0.10.0, ruby-2.2.5-p319) [gem]" level="application" />
|
31
31
|
<orderEntry type="library" scope="PROVIDED" name="typesafe_enum (v0.1.7, ruby-2.2.5-p319) [gem]" level="application" />
|
32
32
|
<orderEntry type="library" scope="PROVIDED" name="unicode-display_width (v1.2.1, ruby-2.2.5-p319) [gem]" level="application" />
|
33
|
-
<orderEntry type="library" scope="PROVIDED" name="yard (v0.9.
|
33
|
+
<orderEntry type="library" scope="PROVIDED" name="yard (v0.9.9, ruby-2.2.5-p319) [gem]" level="application" />
|
34
34
|
</component>
|
35
35
|
<component name="RModuleSettingsStorage">
|
36
36
|
<LOAD_PATH number="2" string0="$MODULE_DIR$/lib" string1="$MODULE_DIR$/spec" />
|
@@ -50,6 +50,26 @@ module Merritt
|
|
50
50
|
expect(actual).to eq(expected)
|
51
51
|
end
|
52
52
|
end
|
53
|
+
|
54
|
+
describe :MIME_TYPE do
|
55
|
+
it 'extracts the mime type' do
|
56
|
+
mime_type = 'text/html'
|
57
|
+
obj = OpenStruct.new(mime_type: mime_type)
|
58
|
+
mt_val = ::MIME::Types[mime_type].first
|
59
|
+
expect(mt_val).not_to be_nil # just to be sure
|
60
|
+
actual = Manifest::Fields::Object::MIME_TYPE.value_from(obj)
|
61
|
+
expect(actual).to eq(mt_val.to_s)
|
62
|
+
end
|
63
|
+
|
64
|
+
it 'accepts unknown or garbage types' do
|
65
|
+
mime_type = 'I am not a mime type, but whatever'
|
66
|
+
obj = OpenStruct.new(mime_type: mime_type)
|
67
|
+
mt_val = ::MIME::Types[mime_type].first
|
68
|
+
expect(mt_val).to be_nil # just to be sure
|
69
|
+
actual = Manifest::Fields::Object::MIME_TYPE.value_from(obj)
|
70
|
+
expect(actual).to eq(mime_type)
|
71
|
+
end
|
72
|
+
end
|
53
73
|
end
|
54
74
|
end
|
55
75
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: merritt-manifest
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- David Moles
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2017-
|
11
|
+
date: 2017-05-22 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: mime-types
|