snippr 0.15.9 → 0.15.10
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +9 -9
- data/lib/snippr/segment_parser.rb +5 -1
- data/snippr.gemspec +1 -1
- data/spec/snippr/segment_parser_spec.rb +4 -0
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,15 +1,15 @@
|
|
1
1
|
---
|
2
2
|
!binary "U0hBMQ==":
|
3
3
|
metadata.gz: !binary |-
|
4
|
-
|
4
|
+
MTM3MjI1MmNmMmIxYmEzYTY4Nzk1MjI3MDFlNjVhNzEzZTQyYmFiZA==
|
5
5
|
data.tar.gz: !binary |-
|
6
|
-
|
7
|
-
|
6
|
+
MjJkYWVmM2Q2ZWVjOGUzNTdjZmY2OGZkMDQ4ODhmYWI4OGY1NmIzNQ==
|
7
|
+
SHA512:
|
8
8
|
metadata.gz: !binary |-
|
9
|
-
|
10
|
-
|
11
|
-
|
9
|
+
OTA3NjY3YmVkODRjZjlkYmJkMzIzNTE5NjY4NThiOTBlMjY2Y2JhYzJhMTQy
|
10
|
+
OGExN2Y4NTBkZjUyNjk1OTYxYTM3YTRjNWNjN2ZmZDFjN2I5OWUzZjRiYzBh
|
11
|
+
NjJjMjJiODQ3MmRkNWZhMzJjMjljNmQ0NDk0NjYyNTg2YzhkYmM=
|
12
12
|
data.tar.gz: !binary |-
|
13
|
-
|
14
|
-
|
15
|
-
|
13
|
+
YjM5NWEyZmM0MDY1OWUzNWZmZWVkNTA4ZTM2NjBjODk4MzBkYjQ2ZjRmNjY0
|
14
|
+
YjQxZjE4NmYzMjFmNjc5OWM3ODAzYmJhODIzYzdkYWMyMzU2OGRiMjcwNDQy
|
15
|
+
ZTY4M2Y2NmUxMWVhZWRkM2QwMWQwYTc0MjQ2NTNhN2EzOThlMTk=
|
@@ -5,7 +5,7 @@ module Snippr
|
|
5
5
|
SEGMENT_MARKER = /[=✄]{4}\s(.*?):\s(.*?)\s[=✄]{4}/
|
6
6
|
|
7
7
|
def initialize(raw_content)
|
8
|
-
@raw_content = insert_dummy_filter(raw_content.clone)
|
8
|
+
@raw_content = insert_dummy_filter(clean_up(raw_content.clone))
|
9
9
|
end
|
10
10
|
|
11
11
|
def content
|
@@ -42,5 +42,9 @@ module Snippr
|
|
42
42
|
end
|
43
43
|
content
|
44
44
|
end
|
45
|
+
|
46
|
+
def clean_up(content)
|
47
|
+
content.gsub("\r","")
|
48
|
+
end
|
45
49
|
end
|
46
50
|
end
|
data/snippr.gemspec
CHANGED
@@ -30,4 +30,8 @@ describe "SegmentParser" do
|
|
30
30
|
it "doesn't need a newline after the last segment" do
|
31
31
|
Snippr::SegmentParser.new("a\n==== valid_from: 1099-05-01 09:00:00 ====").content.should be_empty
|
32
32
|
end
|
33
|
+
|
34
|
+
it "chooses the correct segment even with \r\n" do
|
35
|
+
Snippr::SegmentParser.new("alt\r\n==== valid_from: 1099-05-01 09:00:00 ====\r\nneu\r\n").content.should == "neu"
|
36
|
+
end
|
33
37
|
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: snippr
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.15.
|
4
|
+
version: 0.15.10
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Daniel Harrington
|
@@ -10,7 +10,7 @@ authors:
|
|
10
10
|
autorequire:
|
11
11
|
bindir: bin
|
12
12
|
cert_chain: []
|
13
|
-
date: 2013-
|
13
|
+
date: 2013-09-18 00:00:00.000000000 Z
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|
16
16
|
name: i18n
|
@@ -212,7 +212,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
212
212
|
version: '0'
|
213
213
|
requirements: []
|
214
214
|
rubyforge_project: snippr
|
215
|
-
rubygems_version: 2.
|
215
|
+
rubygems_version: 2.1.4
|
216
216
|
signing_key:
|
217
217
|
specification_version: 4
|
218
218
|
summary: File based content management
|