metaheader 1.2 → 1.2.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/metaheader.rb +11 -0
- data/lib/metaheader/version.rb +1 -1
- data/test/test_parser.rb +5 -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: 072b809611c9fdd9b3cda179f3a755ddef92685f
|
4
|
+
data.tar.gz: 0e68adce0f7675b27aa6ce58ce26f43de34f392e
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 64c0785eb124d9a096467f11b3449a6def1c5a7b65c8198b378c04cdcfd45c0c27297df386746c4f0e3d28e142a9d3fcce05e07287a7d5f0ad39cce3d9027a6a
|
7
|
+
data.tar.gz: 15b1bd95e2fc1d4c8578e0d1eae8fa2a4a61e153ce307cbbc8fbe4526bfd2813995dc276ba557a5317350878d26f80e263f903e2db34101953530fad46e0f1ad
|
data/lib/metaheader.rb
CHANGED
@@ -46,6 +46,17 @@ class MetaHeader
|
|
46
46
|
self.new File.read(path)
|
47
47
|
end
|
48
48
|
|
49
|
+
# Construct a new MetaHeader object or return the object untouched
|
50
|
+
# @param input [String, MetaHeader]
|
51
|
+
# @return [MetaHeader]
|
52
|
+
def self.parse(input)
|
53
|
+
if input.is_a? self
|
54
|
+
input
|
55
|
+
else
|
56
|
+
self.new input
|
57
|
+
end
|
58
|
+
end
|
59
|
+
|
49
60
|
# Parse every tags found in input up to the first newline.
|
50
61
|
# @param input [String]
|
51
62
|
def initialize(input)
|
data/lib/metaheader/version.rb
CHANGED
data/test/test_parser.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: metaheader
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version:
|
4
|
+
version: 1.2.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- cfillion
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2016-
|
11
|
+
date: 2016-06-07 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|