snippr 0.15.8 → 0.15.9
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +8 -8
- data/lib/snippr/segment_parser.rb +1 -1
- data/lib/snippr/snip.rb +1 -1
- data/snippr.gemspec +1 -1
- data/spec/snippr/segment_parser_spec.rb +10 -6
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,15 +1,15 @@
|
|
1
1
|
---
|
2
2
|
!binary "U0hBMQ==":
|
3
3
|
metadata.gz: !binary |-
|
4
|
-
|
4
|
+
NTQ4YTMwOTVhODM2N2ExOGI4YTU0ZWViNTZiOTFmYzJhNDJkMzg0Mg==
|
5
5
|
data.tar.gz: !binary |-
|
6
|
-
|
6
|
+
YzU2MTNkZDYzYTFkZGEwNzhmZjRkYzM5M2U4OTJmODVjYmFhNzE0YQ==
|
7
7
|
!binary "U0hBNTEy":
|
8
8
|
metadata.gz: !binary |-
|
9
|
-
|
10
|
-
|
11
|
-
|
9
|
+
Yjc5OThiZDEwZWVlODk3ZDY5OTVkNDNlYjFkOGM2OGUwMTUxNGU1YTI2MjMy
|
10
|
+
ZmI0Y2Y2NGUxYzk2ZDlkMzZjNzA2NDhiNDhjODEyMDJjZThlNDBiNTkwYWY1
|
11
|
+
ZGUzNTI4Zjg4NWMxNjBkZWJkMzg5ODUxMzg4MWJlZTBjMzY5ZmI=
|
12
12
|
data.tar.gz: !binary |-
|
13
|
-
|
14
|
-
|
15
|
-
|
13
|
+
MDgzY2RlZDUyODQ5MjVkZjUyY2E1N2JjOTBlMDIxNTEyODNjOGE1NTNjNTA1
|
14
|
+
NWMzZTExY2U0NjM1NmY0OGMxNzc2YWMxOTNkOGU2MGZlMjc2Mzg0NDE3YTQ5
|
15
|
+
NzkyZDUwNTAzM2Y1ODg0MWExMTYyNDgwYmM3YTdlZTQ4YTI2YjE=
|
data/lib/snippr/snip.rb
CHANGED
data/snippr.gemspec
CHANGED
@@ -4,26 +4,30 @@ require "spec_helper"
|
|
4
4
|
describe "SegmentParser" do
|
5
5
|
|
6
6
|
it "allows scissor symbols to be the delimiter. yay!" do
|
7
|
-
|
7
|
+
Snippr::SegmentParser.new("a\n=✄== valid_from: 3099-05-01 09:00:00 ====\nb").content.should == "a"
|
8
8
|
end
|
9
9
|
|
10
10
|
it "chooses the correct segment if no condition is given" do
|
11
|
-
|
11
|
+
Snippr::SegmentParser.new("a\nb").content.should == "a\nb"
|
12
12
|
end
|
13
13
|
|
14
14
|
it "chooses the correct segment if no valid condition is given" do
|
15
|
-
|
15
|
+
Snippr::SegmentParser.new("a\n==== valid_from: 3099-05-01 09:00:00 ====\nb").content.should == "a"
|
16
16
|
end
|
17
17
|
|
18
18
|
it "chooses the correct segment if a valid condition is given" do
|
19
|
-
|
19
|
+
Snippr::SegmentParser.new("a\n==== valid_from: 1099-05-01 09:00:00 ====\nb").content.should == "b"
|
20
20
|
end
|
21
21
|
|
22
22
|
it "returns the first matching segment if multiple segments are given" do
|
23
|
-
|
23
|
+
Snippr::SegmentParser.new("a\n==== valid_from: 1099-05-01 09:00:00 ====\nb\n==== valid_from: 1100-05-01 09:00:00 ====\nc").content.should == "b"
|
24
24
|
end
|
25
25
|
|
26
26
|
it "can handle more than two segments" do
|
27
|
-
|
27
|
+
Snippr::SegmentParser.new("a\n==== valid_from: 6099-05-01 09:00:00 ====\nb\n==== valid_from: 1100-05-01 09:00:00 ====\nc").content.should == "c"
|
28
|
+
end
|
29
|
+
|
30
|
+
it "doesn't need a newline after the last segment" do
|
31
|
+
Snippr::SegmentParser.new("a\n==== valid_from: 1099-05-01 09:00:00 ====").content.should be_empty
|
28
32
|
end
|
29
33
|
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.9
|
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-07
|
13
|
+
date: 2013-08-07 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.0.
|
215
|
+
rubygems_version: 2.0.6
|
216
216
|
signing_key:
|
217
217
|
specification_version: 4
|
218
218
|
summary: File based content management
|