spintax_parser 0.2.0 → 0.2.1

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.
@@ -1,3 +1,3 @@
1
1
  module SpintaxParser
2
- VERSION = "0.2.0"
2
+ VERSION = "0.2.1"
3
3
  end
@@ -3,7 +3,7 @@ require 'backports/1.9.1/array/sample' if RUBY_VERSION < '1.9.1'
3
3
 
4
4
  module SpintaxParser
5
5
 
6
- SPINTAX_PATTERN = %r/\{([^{}]*)\}/
6
+ SPINTAX_PATTERN = %r/\{([^{|}]+(\|[^{|}]+)+)\}/
7
7
 
8
8
  def unspin(options={})
9
9
  spun = dup.to_s
@@ -6,7 +6,7 @@ end
6
6
 
7
7
  describe SpintaxParser do
8
8
 
9
- let(:plaintext) { 'Hello world.' }
9
+ let(:plaintext) { 'Hello world. { Please do not spin this. }' }
10
10
  let(:spintext) { 'Find this. {Hello|Hi} to the {{world|worlds} out there|planet}{!|.|?} Cool.' }
11
11
  let(:spintax_pattern) { /\{[^{}]*\}/ }
12
12
 
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: spintax_parser
3
3
  version: !ruby/object:Gem::Version
4
- hash: 23
4
+ hash: 21
5
5
  prerelease:
6
6
  segments:
7
7
  - 0
8
8
  - 2
9
- - 0
10
- version: 0.2.0
9
+ - 1
10
+ version: 0.2.1
11
11
  platform: ruby
12
12
  authors:
13
13
  - Scott McCormack
@@ -15,7 +15,7 @@ autorequire:
15
15
  bindir: bin
16
16
  cert_chain: []
17
17
 
18
- date: 2013-05-21 00:00:00 Z
18
+ date: 2013-05-23 00:00:00 Z
19
19
  dependencies:
20
20
  - !ruby/object:Gem::Dependency
21
21
  version_requirements: &id001 !ruby/object:Gem::Requirement