metaheader 1.3 → 1.3.1

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
  SHA1:
3
- metadata.gz: c2ba1fb240013e847e4a7c0b20ab57ce00d21dc8
4
- data.tar.gz: 1e18c68f5bba95d4a704245b8cd73a0bceb10fbb
3
+ metadata.gz: 3bff210852c9274797ff6242ea138f86806fad05
4
+ data.tar.gz: 0734b967a2fc8997a7f8ed59945bbfedfd2bcdb3
5
5
  SHA512:
6
- metadata.gz: 28ed9d1b8410c237d515657e24aeaa848b3fff08a48d250d8e817ec8366985578250e809cc373108afd31ba50073236dbb2fca44a45b1556d146664d7d70e647
7
- data.tar.gz: da5231b7d71e256565918a378460320547dfa22cb25b780155b15473b20b070d9f694eece063bfa6c58bc966ab0bb551fd96d4604797687335fa92be3566e58f
6
+ metadata.gz: 20cf4d00d0029c9c7e3ba81d8a5924182b8be576414dd8f1127306d20453ef85d85f9d39cc3ad99e0141d6edd87eb2654780018790598f05a2bf255668f4ad8e
7
+ data.tar.gz: 6a07446e9cdc3d3cdad714459b3f58874efb32dc06da2b304c65b2f8954f79d004195e44339ae57756503bfdf4f01b019793ffb10f3d59fe56924d706e095f43
data/README.md CHANGED
@@ -2,7 +2,6 @@
2
2
 
3
3
  [![Gem Version](https://badge.fury.io/rb/metaheader.svg)](http://badge.fury.io/rb/metaheader)
4
4
  [![Build Status](https://travis-ci.org/cfillion/metaheader.svg?branch=master)](https://travis-ci.org/cfillion/metaheader)
5
- [![Coverage Status](https://coveralls.io/repos/cfillion/metaheader/badge.svg?branch=master&service=github)](https://coveralls.io/github/cfillion/metaheader?branch=master)
6
5
 
7
6
  ## Syntax
8
7
 
data/lib/metaheader.rb CHANGED
@@ -104,7 +104,7 @@ class MetaHeader
104
104
  end
105
105
 
106
106
  # Returns how many tags were found in the input.
107
- # @return [Fixnum]
107
+ # @return [Integer]
108
108
  def size
109
109
  @data.size
110
110
  end
@@ -204,6 +204,7 @@ private
204
204
 
205
205
  def parse(line)
206
206
  line.chomp!
207
+ line.encode! Encoding::UTF_8, invalid: :replace
207
208
 
208
209
  # multiline value must have the same line prefix as the key
209
210
  if @last_tag && line.start_with?(@last_prefix.rstrip)
@@ -1,4 +1,4 @@
1
1
  class MetaHeader
2
2
  # MetaHeader's version
3
- VERSION = '1.3'.freeze
3
+ VERSION = '1.3.1'.freeze
4
4
  end
data/metaheader.gemspec CHANGED
@@ -20,9 +20,8 @@ Gem::Specification.new do |spec|
20
20
 
21
21
  spec.required_ruby_version = '>= 2.3'
22
22
 
23
- spec.add_development_dependency 'bundler', '~> 1.10'
24
- spec.add_development_dependency 'coveralls', '~> 0.8'
25
- spec.add_development_dependency 'minitest', '~> 5.8'
26
- spec.add_development_dependency 'rake', '~> 11.0'
27
- spec.add_development_dependency 'simplecov', '~> 0.11'
23
+ spec.add_development_dependency 'bundler', '~> 1.14'
24
+ spec.add_development_dependency 'minitest', '~> 5.10'
25
+ spec.add_development_dependency 'rake', '~> 12.0'
26
+ spec.add_development_dependency 'simplecov', '~> 0.13'
28
27
  end
data/test/helper.rb CHANGED
@@ -1,11 +1,7 @@
1
- require 'coveralls'
2
1
  require 'simplecov'
3
2
 
4
- Coveralls::Output.silent = true
5
-
6
3
  SimpleCov.formatters = [
7
4
  SimpleCov::Formatter::HTMLFormatter,
8
- Coveralls::SimpleCov::Formatter,
9
5
  ]
10
6
 
11
7
  SimpleCov.start {
data/test/test_parser.rb CHANGED
@@ -257,4 +257,9 @@ class TestParser < MiniTest::Test
257
257
  assert_raises(ArgumentError) { mh.alias }
258
258
  assert_raises(ArgumentError) { mh.alias 1, 2, 3 }
259
259
  end
260
+
261
+ def test_utf16_bom
262
+ mh = MetaHeader.new "\xff\xfe@a b\n"
263
+ assert_equal 'b', mh[:a]
264
+ end
260
265
  end
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: '1.3'
4
+ version: 1.3.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-10-29 00:00:00.000000000 Z
11
+ date: 2017-03-17 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -16,70 +16,56 @@ dependencies:
16
16
  requirements:
17
17
  - - "~>"
18
18
  - !ruby/object:Gem::Version
19
- version: '1.10'
19
+ version: '1.14'
20
20
  type: :development
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: '1.10'
27
- - !ruby/object:Gem::Dependency
28
- name: coveralls
29
- requirement: !ruby/object:Gem::Requirement
30
- requirements:
31
- - - "~>"
32
- - !ruby/object:Gem::Version
33
- version: '0.8'
34
- type: :development
35
- prerelease: false
36
- version_requirements: !ruby/object:Gem::Requirement
37
- requirements:
38
- - - "~>"
39
- - !ruby/object:Gem::Version
40
- version: '0.8'
26
+ version: '1.14'
41
27
  - !ruby/object:Gem::Dependency
42
28
  name: minitest
43
29
  requirement: !ruby/object:Gem::Requirement
44
30
  requirements:
45
31
  - - "~>"
46
32
  - !ruby/object:Gem::Version
47
- version: '5.8'
33
+ version: '5.10'
48
34
  type: :development
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: '5.8'
40
+ version: '5.10'
55
41
  - !ruby/object:Gem::Dependency
56
42
  name: rake
57
43
  requirement: !ruby/object:Gem::Requirement
58
44
  requirements:
59
45
  - - "~>"
60
46
  - !ruby/object:Gem::Version
61
- version: '11.0'
47
+ version: '12.0'
62
48
  type: :development
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: '11.0'
54
+ version: '12.0'
69
55
  - !ruby/object:Gem::Dependency
70
56
  name: simplecov
71
57
  requirement: !ruby/object:Gem::Requirement
72
58
  requirements:
73
59
  - - "~>"
74
60
  - !ruby/object:Gem::Version
75
- version: '0.11'
61
+ version: '0.13'
76
62
  type: :development
77
63
  prerelease: false
78
64
  version_requirements: !ruby/object:Gem::Requirement
79
65
  requirements:
80
66
  - - "~>"
81
67
  - !ruby/object:Gem::Version
82
- version: '0.11'
68
+ version: '0.13'
83
69
  description:
84
70
  email:
85
71
  - metaheader@cfillion.tk
@@ -124,7 +110,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
124
110
  version: '0'
125
111
  requirements: []
126
112
  rubyforge_project:
127
- rubygems_version: 2.5.1
113
+ rubygems_version: 2.6.8
128
114
  signing_key:
129
115
  specification_version: 4
130
116
  summary: Parser for metadata headers in plain-text files