pikelet 1.1.0 → 1.1.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: 0f85a72791e86e65cc0074bbb3912015240b280f
4
- data.tar.gz: 76b4aab6edad8e711a2df279b07d616e33de878d
3
+ metadata.gz: 22fadd28f1e37b036e1f2cf7c5b2afee9a0bee74
4
+ data.tar.gz: 51c14989ef2bbd19eb3c04107d45b87a1e5396fb
5
5
  SHA512:
6
- metadata.gz: acc91a2a79c79bfb32f361ee41a0085cbf80c1196202e250335f7666625d153675de3ea163884c8ff3b5634f3b9a78c4498f243a19fd54f554da894cbbb13805
7
- data.tar.gz: ce8f7386d344c99f65548b124dc6f0d3909296c04773ed744a33c8fdd77daf89b7595d7df66950f483c7783739b96e8d3280e6baa8e9107f68fe75a9d278d6a1
6
+ metadata.gz: 5ecea7731c540fd6626f96cbf9ce6058adad82f616f06066255858f0ba53906c04b844e06747774636990114bc350bc6df5ead169d80b99fc328d3de46672fc7
7
+ data.tar.gz: a8c75d1f053b7f732a61d50da20b538735c67b97777103d8f43101e82c17512cb2233eac37e4e6fa5c7d84e59c72373581b8f3fa65bfdaf87d65e77be4cb161b
@@ -8,7 +8,9 @@ module Pikelet
8
8
  end
9
9
 
10
10
  def parse(text)
11
- parser.call(text[index])
11
+ if value = text[index]
12
+ parser.call(value)
13
+ end
12
14
  end
13
15
  end
14
16
  end
@@ -1,3 +1,3 @@
1
1
  module Pikelet
2
- VERSION = "1.1.0"
2
+ VERSION = "1.1.1"
3
3
  end
@@ -54,4 +54,12 @@ describe Pikelet::FieldDefinition do
54
54
  expect(value).to eq "QUICK"
55
55
  end
56
56
  end
57
+
58
+ describe "given an index not covered in the data" do
59
+ let(:index) { 999..999 }
60
+
61
+ it "parses as nil" do
62
+ expect(value).to be_nil
63
+ end
64
+ end
57
65
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: pikelet
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.1.0
4
+ version: 1.1.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - John Carney
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-07-28 00:00:00.000000000 Z
11
+ date: 2014-07-29 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler