verbal 0.1.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/.rspec +3 -0
- data/.travis.yml +4 -0
- data/.yardopts +4 -0
- data/Gemfile +8 -0
- data/Gemfile.lock +64 -0
- data/LICENSE +20 -0
- data/README.md +69 -0
- data/Rakefile +35 -0
- data/VERSION +1 -0
- data/lib/verbal.rb +184 -0
- data/spec/spec_helper.rb +9 -0
- data/spec/verbal_spec.rb +68 -0
- data/verbal.gemspec +61 -0
- metadata +116 -0
checksums.yaml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
SHA1:
|
3
|
+
metadata.gz: 526bba90d57ec2d0d460252bee24f7068b531f39
|
4
|
+
data.tar.gz: 53190021c432f71d10c9f9f50e80176d20bedf42
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: d8fe772702fed5ec96203b6bcdcad4e46c9d1d7c8c898fd0d9a76cfd22f5608ac983f0381b17cd1951e0e27d9062576b44af64939050af70dd42feed047ed2ce
|
7
|
+
data.tar.gz: b2ff2540cdb9dc558d539b2a04a403ddcf028e4b3e92db27005e5bddbed83c6be144f9e48a32f491c9847172a8da24dff82eef5a771aa9ba2857421c414b348e
|
data/.rspec
ADDED
data/.travis.yml
ADDED
data/.yardopts
ADDED
data/Gemfile
ADDED
data/Gemfile.lock
ADDED
@@ -0,0 +1,64 @@
|
|
1
|
+
GEM
|
2
|
+
remote: http://rubygems.org/
|
3
|
+
specs:
|
4
|
+
addressable (2.3.5)
|
5
|
+
builder (3.2.2)
|
6
|
+
diff-lcs (1.2.4)
|
7
|
+
faraday (0.8.7)
|
8
|
+
multipart-post (~> 1.1)
|
9
|
+
git (1.2.5)
|
10
|
+
github_api (0.10.1)
|
11
|
+
addressable
|
12
|
+
faraday (~> 0.8.1)
|
13
|
+
hashie (>= 1.2)
|
14
|
+
multi_json (~> 1.4)
|
15
|
+
nokogiri (~> 1.5.2)
|
16
|
+
oauth2
|
17
|
+
hashie (2.0.5)
|
18
|
+
highline (1.6.19)
|
19
|
+
httpauth (0.2.0)
|
20
|
+
jeweler (1.8.6)
|
21
|
+
builder
|
22
|
+
bundler (~> 1.0)
|
23
|
+
git (>= 1.2.5)
|
24
|
+
github_api (= 0.10.1)
|
25
|
+
highline (>= 1.6.15)
|
26
|
+
nokogiri (= 1.5.10)
|
27
|
+
rake
|
28
|
+
rdoc
|
29
|
+
json (1.8.0)
|
30
|
+
jwt (0.1.8)
|
31
|
+
multi_json (>= 1.5)
|
32
|
+
multi_json (1.7.7)
|
33
|
+
multi_xml (0.5.4)
|
34
|
+
multipart-post (1.2.0)
|
35
|
+
nokogiri (1.5.10)
|
36
|
+
oauth2 (0.9.2)
|
37
|
+
faraday (~> 0.8)
|
38
|
+
httpauth (~> 0.2)
|
39
|
+
jwt (~> 0.1.4)
|
40
|
+
multi_json (~> 1.0)
|
41
|
+
multi_xml (~> 0.5)
|
42
|
+
rack (~> 1.2)
|
43
|
+
rack (1.5.2)
|
44
|
+
rake (10.1.0)
|
45
|
+
rdoc (3.12.2)
|
46
|
+
json (~> 1.4)
|
47
|
+
rspec (2.14.1)
|
48
|
+
rspec-core (~> 2.14.0)
|
49
|
+
rspec-expectations (~> 2.14.0)
|
50
|
+
rspec-mocks (~> 2.14.0)
|
51
|
+
rspec-core (2.14.4)
|
52
|
+
rspec-expectations (2.14.0)
|
53
|
+
diff-lcs (>= 1.1.3, < 2.0)
|
54
|
+
rspec-mocks (2.14.1)
|
55
|
+
yard (0.8.6.2)
|
56
|
+
|
57
|
+
PLATFORMS
|
58
|
+
ruby
|
59
|
+
|
60
|
+
DEPENDENCIES
|
61
|
+
bundler (~> 1.3)
|
62
|
+
jeweler (~> 1.8)
|
63
|
+
rspec (~> 2.14)
|
64
|
+
yard
|
data/LICENSE
ADDED
@@ -0,0 +1,20 @@
|
|
1
|
+
The MIT License (MIT)
|
2
|
+
|
3
|
+
Copyright (c) 2013 Ryan Endacott, Jiunn Haur Lim
|
4
|
+
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy of
|
6
|
+
this software and associated documentation files (the "Software"), to deal in
|
7
|
+
the Software without restriction, including without limitation the rights to
|
8
|
+
use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
|
9
|
+
the Software, and to permit persons to whom the Software is furnished to do so,
|
10
|
+
subject to the following conditions:
|
11
|
+
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
13
|
+
copies or substantial portions of the Software.
|
14
|
+
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
|
17
|
+
FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
|
18
|
+
COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
|
19
|
+
IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
|
20
|
+
CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
data/README.md
ADDED
@@ -0,0 +1,69 @@
|
|
1
|
+
Verbal
|
2
|
+
=====================
|
3
|
+
[![Build Status](https://travis-ci.org/jimjh/verbal.png?branch=master)](https://travis-ci.org/jimjh/verbal)
|
4
|
+
|
5
|
+
## Overview
|
6
|
+
Verbal is a Ruby library that helps to construct difficult regular expressions.
|
7
|
+
It's ported from the awesome JavaScript [VerbalExpressions](https://github.com/jehna/VerbalExpressions).
|
8
|
+
|
9
|
+
## Installation
|
10
|
+
|
11
|
+
```sh
|
12
|
+
$> gem install verbal
|
13
|
+
```
|
14
|
+
|
15
|
+
```ruby
|
16
|
+
require 'verbal'
|
17
|
+
```
|
18
|
+
|
19
|
+
## Examples
|
20
|
+
|
21
|
+
Here's a couple of simple examples to give an idea of how Verbal works:
|
22
|
+
|
23
|
+
### Testing if we have a valid URL
|
24
|
+
|
25
|
+
```ruby
|
26
|
+
# Create an example of how to test for correctly formed URLs
|
27
|
+
tester = Verbal.new do
|
28
|
+
start_of_line
|
29
|
+
find 'http'
|
30
|
+
maybe 's'
|
31
|
+
find '://'
|
32
|
+
maybe 'www.'
|
33
|
+
anything_but ' '
|
34
|
+
end_of_line
|
35
|
+
end
|
36
|
+
|
37
|
+
# Create an example URL
|
38
|
+
test_url = "https://www.google.com"
|
39
|
+
|
40
|
+
# Use it just like a regular Ruby regex:
|
41
|
+
puts 'Hooray! It works!' if tester.match(test_url)
|
42
|
+
puts 'This works too!' if tester =~ test_url
|
43
|
+
|
44
|
+
# Print the generated regex:
|
45
|
+
puts tester.source # => /^(?:http)(s)?(?::\/\/)(www\.)?([^\ ]*)$/i
|
46
|
+
```
|
47
|
+
|
48
|
+
### Replacing strings
|
49
|
+
|
50
|
+
```ruby
|
51
|
+
# Create a test string
|
52
|
+
replace_me = "Replace bird with a duck"
|
53
|
+
|
54
|
+
# Create an expression that seeks for word "bird"
|
55
|
+
expression = Verbal.new { find 'bird' }
|
56
|
+
|
57
|
+
# Execute the expression like a normal Regexp object
|
58
|
+
result = replace_me.gsub( expression, "duck" );
|
59
|
+
|
60
|
+
puts result # Outputs "Replace duck with a duck"
|
61
|
+
```
|
62
|
+
|
63
|
+
## Issues
|
64
|
+
- I haven't yet ported the modifier code because Ruby Regexp handles modifiers a little differently.
|
65
|
+
|
66
|
+
## Thanks!
|
67
|
+
Thank you to @jehna for coming up with the awesome original idea.
|
68
|
+
|
69
|
+
Thank you to @ryan-endacott for the original port.
|
data/Rakefile
ADDED
@@ -0,0 +1,35 @@
|
|
1
|
+
# encoding: utf-8
|
2
|
+
|
3
|
+
require 'rubygems'
|
4
|
+
require 'bundler'
|
5
|
+
begin
|
6
|
+
Bundler.setup(:default, :development)
|
7
|
+
rescue Bundler::BundlerError => e
|
8
|
+
$stderr.puts e.message
|
9
|
+
$stderr.puts "Run `bundle install` to install missing gems"
|
10
|
+
exit e.status_code
|
11
|
+
end
|
12
|
+
require 'rake'
|
13
|
+
|
14
|
+
require 'jeweler'
|
15
|
+
Jeweler::Tasks.new do |gem|
|
16
|
+
gem.name = 'verbal'
|
17
|
+
gem.summary = %Q{Library that makes difficult regular expressions easy!}
|
18
|
+
gem.description = %Q{Verbal Expressions is a library that makes constructing difficult regular expressions simple and easy!}
|
19
|
+
gem.authors = ['Ryan Endacott', 'Jim Lim']
|
20
|
+
gem.email = 'jim@jimjh.com'
|
21
|
+
gem.homepage = 'http://github.com/jimjh/verbal'
|
22
|
+
gem.platform = Gem::Platform::RUBY
|
23
|
+
gem.license = 'MIT'
|
24
|
+
gem.has_rdoc = 'yard'
|
25
|
+
gem.files.include 'LICENSE', 'VERSION', 'README.md', '.yardopts', 'Rakefile'
|
26
|
+
end
|
27
|
+
Jeweler::RubygemsDotOrgTasks.new
|
28
|
+
|
29
|
+
require 'rspec/core'
|
30
|
+
require 'rspec/core/rake_task'
|
31
|
+
RSpec::Core::RakeTask.new(:spec) do |spec|
|
32
|
+
spec.pattern = FileList['spec/**/*_spec.rb']
|
33
|
+
end
|
34
|
+
|
35
|
+
task :default => :spec
|
data/VERSION
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
0.1.1
|
data/lib/verbal.rb
ADDED
@@ -0,0 +1,184 @@
|
|
1
|
+
# Ruby Verbal Expressions, based on the awesome JavaScript repo by @jehna.
|
2
|
+
#
|
3
|
+
# @see https://github.com/jehna/VerbalExpressions Original idea
|
4
|
+
# @see https://github.com/jimjh/verbal Main repository
|
5
|
+
class Verbal < Regexp
|
6
|
+
|
7
|
+
# @example Create a new RegExp
|
8
|
+
# verbal = Verbal.new do
|
9
|
+
# start_of_line
|
10
|
+
# find 'x'
|
11
|
+
# end
|
12
|
+
# verbal =~ 'x' # => 0
|
13
|
+
def initialize(&block)
|
14
|
+
@prefixes = ""
|
15
|
+
@source = ""
|
16
|
+
@suffixes = ""
|
17
|
+
@modifiers = "" # TODO: Ruby Regexp option flags
|
18
|
+
instance_eval(&block)
|
19
|
+
super(@prefixes + @source + @suffixes, @modifiers)
|
20
|
+
end
|
21
|
+
|
22
|
+
# Matches an exact string.
|
23
|
+
# @param [String] value string to match
|
24
|
+
# @example Replace all dots with the word "Stop".
|
25
|
+
# paragraph = "Lorem. Dolor."
|
26
|
+
# verbal = Verbal.new do
|
27
|
+
# find '.'
|
28
|
+
# end
|
29
|
+
# paragraph.gsub(verbal, 'Stop') # => "Lorem Stop Dolor Stop"
|
30
|
+
def find(value)
|
31
|
+
append "(?:#{sanitize value})"
|
32
|
+
end
|
33
|
+
|
34
|
+
# Marks the expression to start at the beginning of a line.
|
35
|
+
# @example Add a hyphen to the beginning of each line.
|
36
|
+
# lines = "first\nsecond\nthird"
|
37
|
+
# verbal = Verbal.new do
|
38
|
+
# start_of_line
|
39
|
+
# end
|
40
|
+
# lines.gsub(verbal, '- ') # => "- first\n- second\n- third"
|
41
|
+
def start_of_line
|
42
|
+
@prefixes = '^'
|
43
|
+
end
|
44
|
+
|
45
|
+
# Marks the expression to end at the last character of a line.
|
46
|
+
# @example Add a hyphen to the end of each line.
|
47
|
+
# lines = "first\nsecond\nthird"
|
48
|
+
# verbal = Verbal.new do
|
49
|
+
# end_of_line
|
50
|
+
# end
|
51
|
+
# lines.gsub(verbal, '- ') # => "first- \nsecond- \nthird"
|
52
|
+
def end_of_line
|
53
|
+
@suffixes = '$'
|
54
|
+
end
|
55
|
+
|
56
|
+
# Add a string to the expression that might appear once.
|
57
|
+
# @param [String] value the string to look for
|
58
|
+
# @example Find http or https.
|
59
|
+
# Verbal.new do
|
60
|
+
# find 'http'
|
61
|
+
# maybe 's'
|
62
|
+
# end
|
63
|
+
def maybe(value)
|
64
|
+
append "(#{sanitize value})?"
|
65
|
+
end
|
66
|
+
|
67
|
+
# Matches any character any number of times.
|
68
|
+
# @example Match the entire string.
|
69
|
+
# Verbal.new do
|
70
|
+
# anything
|
71
|
+
# end
|
72
|
+
def anything
|
73
|
+
append '(.*)'
|
74
|
+
end
|
75
|
+
|
76
|
+
# Matches any number of any character that is not in +value+.
|
77
|
+
# @example Match everything except underscores.
|
78
|
+
# Verbal.new do
|
79
|
+
# anything_but '_'
|
80
|
+
# end
|
81
|
+
# @param [String] value characters to excluded
|
82
|
+
def anything_but(value)
|
83
|
+
append "([^#{sanitize value}]*)"
|
84
|
+
end
|
85
|
+
|
86
|
+
# Adds a universal line break expression.
|
87
|
+
# @example Converts all line breaks to unix-style with \<br\> tag.
|
88
|
+
# lorem = "Lorem.\r\nDolor\namet."
|
89
|
+
# verbal = Verbal.new do
|
90
|
+
# line_break
|
91
|
+
# end
|
92
|
+
# lorem.gsub(veral, "<br>\n") # => "Lorem.<br>\nDolor<br>\namet."
|
93
|
+
def line_break
|
94
|
+
append '(\n|(\r\n))'
|
95
|
+
end
|
96
|
+
alias_method :br, :line_break
|
97
|
+
|
98
|
+
# Matches the tab character.
|
99
|
+
# @example Find the tab character.
|
100
|
+
# "\n\t" =~ Verbal.new { tab | # => 1
|
101
|
+
def tab
|
102
|
+
append '\t'
|
103
|
+
end
|
104
|
+
|
105
|
+
# Matches a word, which is a continuous chunk of any alphanumeric character.
|
106
|
+
# @example Split a sentence into words.
|
107
|
+
# s = "this is a sentence"
|
108
|
+
# s.scan Verbal.new { word } # => ["this", "is", "a", "sentence"]
|
109
|
+
def word
|
110
|
+
append '\w+'
|
111
|
+
end
|
112
|
+
|
113
|
+
# Matches any one of the characters in +value+.
|
114
|
+
# @param [String] value string of characters to match
|
115
|
+
# @example Find one of 'abc' in 'xkcd'
|
116
|
+
# verbal = Verbal.new do
|
117
|
+
# any_of 'abc'
|
118
|
+
# end
|
119
|
+
# 'xkcd'.scan verbal # => ['c']
|
120
|
+
def any_of(value)
|
121
|
+
append "[#{sanitize value}]"
|
122
|
+
end
|
123
|
+
alias_method :any, :any_of
|
124
|
+
|
125
|
+
# Matches a character from the given range.
|
126
|
+
# @param [Array] args alternate starting and ending characters.
|
127
|
+
# @example Find any character in the alphabet.
|
128
|
+
# verbal = Verbal.new do
|
129
|
+
# range 'a', 'z', 'A', 'Z'
|
130
|
+
# end
|
131
|
+
def range(*args)
|
132
|
+
value = "["
|
133
|
+
args.each_slice(2) do |from, to|
|
134
|
+
from = sanitize(from)
|
135
|
+
to = sanitize(to)
|
136
|
+
value += "#{from}-#{to}"
|
137
|
+
end
|
138
|
+
value += "]"
|
139
|
+
append value
|
140
|
+
end
|
141
|
+
|
142
|
+
# Matches multiple of +value+. Defaults to one or many. You can specify zero
|
143
|
+
# or more by suffixing +value+ with +'*'+.
|
144
|
+
# @param [String] value string to match
|
145
|
+
def multiple(value)
|
146
|
+
value = sanitize value
|
147
|
+
value += '+' unless %w[+ *].include? value[-1]
|
148
|
+
append value
|
149
|
+
end
|
150
|
+
|
151
|
+
# Adds a alternative expression to be matched.
|
152
|
+
# @example Tests if the string begins with 'http://' or 'ftp://'
|
153
|
+
# link = 'ftp://ftp.google.com/';
|
154
|
+
# verbal = Verbal.new do
|
155
|
+
# find 'http'
|
156
|
+
# maybe 's'
|
157
|
+
# find '://'
|
158
|
+
# otherwise
|
159
|
+
# find 'ftp://'
|
160
|
+
# end
|
161
|
+
# link =~ verbal # => 0
|
162
|
+
def otherwise(value = nil)
|
163
|
+
@prefixes += "(" unless @prefixes.include?("(")
|
164
|
+
@suffixes = ")" + @suffixes unless @suffixes.include?(")")
|
165
|
+
append(")|(")
|
166
|
+
find(value) if value
|
167
|
+
end
|
168
|
+
|
169
|
+
private
|
170
|
+
|
171
|
+
# Escapes +value+ so that it can be used in a regular expression.
|
172
|
+
def sanitize(value)
|
173
|
+
case value
|
174
|
+
when Regexp then value.source
|
175
|
+
else Regexp.escape value
|
176
|
+
end
|
177
|
+
end
|
178
|
+
|
179
|
+
# Appends +value+ to the regex source.
|
180
|
+
def append(value = '')
|
181
|
+
@source += value
|
182
|
+
end
|
183
|
+
|
184
|
+
end
|
data/spec/spec_helper.rb
ADDED
data/spec/verbal_spec.rb
ADDED
@@ -0,0 +1,68 @@
|
|
1
|
+
require 'spec_helper'
|
2
|
+
|
3
|
+
describe Verbal do
|
4
|
+
|
5
|
+
describe '#find' do
|
6
|
+
|
7
|
+
let(:matcher) do
|
8
|
+
Verbal.new do
|
9
|
+
find 'lions'
|
10
|
+
end
|
11
|
+
end
|
12
|
+
|
13
|
+
it 'should correctly build find regex' do
|
14
|
+
matcher.source.should == '(?:lions)'
|
15
|
+
end
|
16
|
+
|
17
|
+
it 'should correctly match find' do
|
18
|
+
matcher.match('lions').should be_true
|
19
|
+
end
|
20
|
+
|
21
|
+
it 'should match part of a string with find' do
|
22
|
+
matcher.match('lions, tigers, and bears, oh my!').should be_true
|
23
|
+
end
|
24
|
+
|
25
|
+
it 'should only match the `find` part of a string' do
|
26
|
+
matcher.match('lions, tigers, and bears, oh my!')[0].should == 'lions'
|
27
|
+
end
|
28
|
+
end
|
29
|
+
|
30
|
+
describe 'URL Regex Test' do
|
31
|
+
|
32
|
+
let(:matcher) do
|
33
|
+
Verbal.new do
|
34
|
+
start_of_line
|
35
|
+
find 'http'
|
36
|
+
maybe 's'
|
37
|
+
find '://'
|
38
|
+
maybe 'www.'
|
39
|
+
anything_but ' '
|
40
|
+
end_of_line
|
41
|
+
end
|
42
|
+
end
|
43
|
+
|
44
|
+
it 'successfully builds regex for matching URLs' do
|
45
|
+
matcher.source.should == "^(?:http)(s)?(?:://)(www\\.)?([^\\ ]*)$"
|
46
|
+
end
|
47
|
+
|
48
|
+
it 'matches regular http URL' do
|
49
|
+
matcher.match('http://google.com').should be_true
|
50
|
+
end
|
51
|
+
|
52
|
+
it 'matches https URL' do
|
53
|
+
matcher.match('https://google.com').should be_true
|
54
|
+
end
|
55
|
+
|
56
|
+
it 'matches a URL with www' do
|
57
|
+
matcher.match('https://www.google.com').should be_true
|
58
|
+
end
|
59
|
+
|
60
|
+
it 'fails to match when URL has a space' do
|
61
|
+
matcher.match('http://goo gle.com').should be_false
|
62
|
+
end
|
63
|
+
|
64
|
+
it 'fails to match with htp:// is malformed' do
|
65
|
+
matcher.match('htp://google.com').should be_false
|
66
|
+
end
|
67
|
+
end
|
68
|
+
end
|
data/verbal.gemspec
ADDED
@@ -0,0 +1,61 @@
|
|
1
|
+
# Generated by jeweler
|
2
|
+
# DO NOT EDIT THIS FILE DIRECTLY
|
3
|
+
# Instead, edit Jeweler::Tasks in Rakefile, and run 'rake gemspec'
|
4
|
+
# -*- encoding: utf-8 -*-
|
5
|
+
|
6
|
+
Gem::Specification.new do |s|
|
7
|
+
s.name = "verbal"
|
8
|
+
s.version = "0.1.1"
|
9
|
+
|
10
|
+
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
|
11
|
+
s.authors = ["Ryan Endacott", "Jim Lim"]
|
12
|
+
s.date = "2013-07-25"
|
13
|
+
s.description = "Verbal Expressions is a library that makes constructing difficult regular expressions simple and easy!"
|
14
|
+
s.email = "jim@jimjh.com"
|
15
|
+
s.extra_rdoc_files = [
|
16
|
+
"LICENSE",
|
17
|
+
"README.md"
|
18
|
+
]
|
19
|
+
s.files = [
|
20
|
+
".rspec",
|
21
|
+
".travis.yml",
|
22
|
+
".yardopts",
|
23
|
+
"Gemfile",
|
24
|
+
"Gemfile.lock",
|
25
|
+
"LICENSE",
|
26
|
+
"README.md",
|
27
|
+
"Rakefile",
|
28
|
+
"VERSION",
|
29
|
+
"lib/verbal.rb",
|
30
|
+
"spec/spec_helper.rb",
|
31
|
+
"spec/verbal_spec.rb",
|
32
|
+
"verbal.gemspec"
|
33
|
+
]
|
34
|
+
s.homepage = "http://github.com/jimjh/verbal"
|
35
|
+
s.licenses = ["MIT"]
|
36
|
+
s.require_paths = ["lib"]
|
37
|
+
s.rubygems_version = "2.0.2"
|
38
|
+
s.summary = "Library that makes difficult regular expressions easy!"
|
39
|
+
|
40
|
+
if s.respond_to? :specification_version then
|
41
|
+
s.specification_version = 4
|
42
|
+
|
43
|
+
if Gem::Version.new(Gem::VERSION) >= Gem::Version.new('1.2.0') then
|
44
|
+
s.add_development_dependency(%q<rspec>, ["~> 2.14"])
|
45
|
+
s.add_development_dependency(%q<bundler>, ["~> 1.3"])
|
46
|
+
s.add_development_dependency(%q<jeweler>, ["~> 1.8"])
|
47
|
+
s.add_development_dependency(%q<yard>, [">= 0"])
|
48
|
+
else
|
49
|
+
s.add_dependency(%q<rspec>, ["~> 2.14"])
|
50
|
+
s.add_dependency(%q<bundler>, ["~> 1.3"])
|
51
|
+
s.add_dependency(%q<jeweler>, ["~> 1.8"])
|
52
|
+
s.add_dependency(%q<yard>, [">= 0"])
|
53
|
+
end
|
54
|
+
else
|
55
|
+
s.add_dependency(%q<rspec>, ["~> 2.14"])
|
56
|
+
s.add_dependency(%q<bundler>, ["~> 1.3"])
|
57
|
+
s.add_dependency(%q<jeweler>, ["~> 1.8"])
|
58
|
+
s.add_dependency(%q<yard>, [">= 0"])
|
59
|
+
end
|
60
|
+
end
|
61
|
+
|
metadata
ADDED
@@ -0,0 +1,116 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: verbal
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 0.1.1
|
5
|
+
platform: ruby
|
6
|
+
authors:
|
7
|
+
- Ryan Endacott
|
8
|
+
- Jim Lim
|
9
|
+
autorequire:
|
10
|
+
bindir: bin
|
11
|
+
cert_chain: []
|
12
|
+
date: 2013-07-25 00:00:00.000000000 Z
|
13
|
+
dependencies:
|
14
|
+
- !ruby/object:Gem::Dependency
|
15
|
+
name: rspec
|
16
|
+
requirement: !ruby/object:Gem::Requirement
|
17
|
+
requirements:
|
18
|
+
- - ~>
|
19
|
+
- !ruby/object:Gem::Version
|
20
|
+
version: '2.14'
|
21
|
+
type: :development
|
22
|
+
prerelease: false
|
23
|
+
version_requirements: !ruby/object:Gem::Requirement
|
24
|
+
requirements:
|
25
|
+
- - ~>
|
26
|
+
- !ruby/object:Gem::Version
|
27
|
+
version: '2.14'
|
28
|
+
- !ruby/object:Gem::Dependency
|
29
|
+
name: bundler
|
30
|
+
requirement: !ruby/object:Gem::Requirement
|
31
|
+
requirements:
|
32
|
+
- - ~>
|
33
|
+
- !ruby/object:Gem::Version
|
34
|
+
version: '1.3'
|
35
|
+
type: :development
|
36
|
+
prerelease: false
|
37
|
+
version_requirements: !ruby/object:Gem::Requirement
|
38
|
+
requirements:
|
39
|
+
- - ~>
|
40
|
+
- !ruby/object:Gem::Version
|
41
|
+
version: '1.3'
|
42
|
+
- !ruby/object:Gem::Dependency
|
43
|
+
name: jeweler
|
44
|
+
requirement: !ruby/object:Gem::Requirement
|
45
|
+
requirements:
|
46
|
+
- - ~>
|
47
|
+
- !ruby/object:Gem::Version
|
48
|
+
version: '1.8'
|
49
|
+
type: :development
|
50
|
+
prerelease: false
|
51
|
+
version_requirements: !ruby/object:Gem::Requirement
|
52
|
+
requirements:
|
53
|
+
- - ~>
|
54
|
+
- !ruby/object:Gem::Version
|
55
|
+
version: '1.8'
|
56
|
+
- !ruby/object:Gem::Dependency
|
57
|
+
name: yard
|
58
|
+
requirement: !ruby/object:Gem::Requirement
|
59
|
+
requirements:
|
60
|
+
- - '>='
|
61
|
+
- !ruby/object:Gem::Version
|
62
|
+
version: '0'
|
63
|
+
type: :development
|
64
|
+
prerelease: false
|
65
|
+
version_requirements: !ruby/object:Gem::Requirement
|
66
|
+
requirements:
|
67
|
+
- - '>='
|
68
|
+
- !ruby/object:Gem::Version
|
69
|
+
version: '0'
|
70
|
+
description: Verbal Expressions is a library that makes constructing difficult regular
|
71
|
+
expressions simple and easy!
|
72
|
+
email: jim@jimjh.com
|
73
|
+
executables: []
|
74
|
+
extensions: []
|
75
|
+
extra_rdoc_files:
|
76
|
+
- LICENSE
|
77
|
+
- README.md
|
78
|
+
files:
|
79
|
+
- .rspec
|
80
|
+
- .travis.yml
|
81
|
+
- .yardopts
|
82
|
+
- Gemfile
|
83
|
+
- Gemfile.lock
|
84
|
+
- LICENSE
|
85
|
+
- README.md
|
86
|
+
- Rakefile
|
87
|
+
- VERSION
|
88
|
+
- lib/verbal.rb
|
89
|
+
- spec/spec_helper.rb
|
90
|
+
- spec/verbal_spec.rb
|
91
|
+
- verbal.gemspec
|
92
|
+
homepage: http://github.com/jimjh/verbal
|
93
|
+
licenses:
|
94
|
+
- MIT
|
95
|
+
metadata: {}
|
96
|
+
post_install_message:
|
97
|
+
rdoc_options: []
|
98
|
+
require_paths:
|
99
|
+
- lib
|
100
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
101
|
+
requirements:
|
102
|
+
- - '>='
|
103
|
+
- !ruby/object:Gem::Version
|
104
|
+
version: '0'
|
105
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
106
|
+
requirements:
|
107
|
+
- - '>='
|
108
|
+
- !ruby/object:Gem::Version
|
109
|
+
version: '0'
|
110
|
+
requirements: []
|
111
|
+
rubyforge_project:
|
112
|
+
rubygems_version: 2.0.2
|
113
|
+
signing_key:
|
114
|
+
specification_version: 4
|
115
|
+
summary: Library that makes difficult regular expressions easy!
|
116
|
+
test_files: []
|