string_pattern 1.4.0 → 1.4.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.
data/README.md CHANGED
@@ -1,321 +1,323 @@
1
- # StringPattern
2
-
3
- [![Gem Version](https://badge.fury.io/rb/string_pattern.svg)](https://rubygems.org/gems/string_pattern)
4
-
5
- With this gem, you can easily generate strings supplying a very simple pattern.
6
- Also, you can validate if a text fulfills a specific pattern or even generate a string following a pattern and returning the wrong length, value... for testing your applications.
7
-
8
- ## Installation
9
-
10
- Add this line to your application's Gemfile:
11
-
12
- ```ruby
13
- gem 'string_pattern'
14
- ```
15
-
16
- And then execute:
17
-
18
- $ bundle
19
-
20
- Or install it yourself as:
21
-
22
- $ gem install string_pattern
23
-
24
- ## Usage
25
-
26
- ### What is a string pattern?
27
-
28
- A pattern is a string where we supply these elements "a-b:c" where a is min_length, b is max_length (optional) and c is a set of symbol_type
29
-
30
- min_length: minimum length of the string
31
-
32
- max_length (optional): maximum length of the string. If not provided, the result will be with the min_length provided
33
-
34
- symbol_type: The type of the string we want.
35
- x: from a to z (lowercase)
36
- X: A to Z (capital letters)
37
- L: A to Z and a to z
38
- T: National characters defined on StringPattern.national_chars
39
- n or N: for numbers. 0 to 9
40
- $: special characters, $%&#... (includes blank space)
41
- _: blank space
42
- *: all characters
43
- 0: empty string will be accepted. It needs to be at the beginning of the symbol_type string
44
- @: It will generate a valid email following the official algorithm. It cannot be used with other symbol_type
45
-
46
- ### How to generate a string following a pattern
47
-
48
- To generate a string following a pattern you can do it using directly the StringPattern class or the generate method in the class, be aware you can always use also the alias method: gen
49
-
50
- ```ruby
51
- require 'string_pattern'
52
-
53
- #StringPattern class
54
- p StringPattern.generate "10:N"
55
- #>3448910834
56
- p StringPattern.gen "5:X"
57
- #>JDDDK
58
-
59
- #String class
60
- p "4:Nx".gen
61
- #>xaa3
62
-
63
- #Symbol class
64
- p :"10:T".generate
65
- #>AccBdjklñD
66
-
67
- #Array class
68
- p [:"3:N", "fixed", :"3:N"].gen
69
- #>334fixed920
70
- p "(,3:N,) ,3:N,-,2:N,-,2:N".split(',').generate
71
- #>(937) 980-65-05
72
-
73
- #Kernel
74
- p gen "3:N"
75
- #>443
76
- ```
77
-
78
- If you want to generate for example 1000 strings and be sure all those strings are different you can use:
79
-
80
- ```ruby
81
- StringPattern.dont_repeat = true #default: false
82
- 1000.times {
83
- puts :"6-20:L/N/".gen
84
- }
85
- StringPattern.cache_values = Hash.new() #to clean the generated values from memory
86
- ```
87
-
88
- Using dont_repeat all the generated string during the current run will be unique.
89
-
90
- In case you just want one particular string to be unique but not the rest then add to the pattern just in the end the symbol: &
91
-
92
- The pattern needs to be a symbol object.
93
-
94
- ```ruby
95
- 1000.times {
96
- puts :"6-20:L/N/&".gen #will be unique
97
- puts :"10:N".gen
98
- }
99
- ```
100
-
101
- #### Custom characters
102
-
103
- Also, it's possible to provide the characters we want. To do that we'll use the symbol_type [characters]
104
-
105
- If we want to add the character ] we have to write ]]
106
-
107
- Examples
108
-
109
- ```ruby
110
- # four chars from the ones provided: asDF9
111
- p "4:[asDF9]".gen #> aaaa, asFF, 9sFD
112
-
113
- # from 2 to 20 chars, capital and lower chars (Xx) and also valid the characters $#6
114
- p "2-20:[$#6]Xx".gen #> aaaa, asFF, 66, B$DkKL#9aDD
115
-
116
- # four chars from these: asDF]9
117
- p "4:[asDF]]9]".gen #> aa]a, asFF, 9s]D
118
- ```
119
-
120
- #### Required characters or symbol types
121
-
122
- We'll use the symbol / to specify which characters or symbols we want to be included on the resulting string as required values /symbols or characters/
123
-
124
- If we need to add the character / we'll use //
125
-
126
- Examples:
127
-
128
- ```ruby
129
- # four characters. optional: capitals and numbers, required: lower
130
- "4:XN/x/".gen # aaaa, FF9b, j4em, asdf, ADFt
131
-
132
- # from 6 to 15 chars. optional: numbers, capitals and the chars $ and Æ. required the chars: 23abCD
133
- "6-15:[/23abCD/$Æ]NX".gen # bCa$D32, 32DJIOKLaCb, b23aD568C
134
-
135
- # from 4 to 9 chars. optional: numbers and capitals. required: lowers and the characters $ and 5
136
- "4-9:[/$5/]XN/x/".generate # aa5$, F5$F9b, j$4em5, a5sdf$, $ADFt5
137
- ```
138
-
139
- #### Excluded characters
140
-
141
- If we want to exclude a few characters in the result, we'll use the symbol %characters%
142
-
143
- If you need to exclude the character %, you should use %%
144
-
145
- Examples:
146
-
147
- ```ruby
148
- # from 2 to 20 characters. optional: Numbers and characters A, B and C. excluded: the characters 8 and 3
149
- "2-20:[%83%ABC]N".gen # B49, 22900, 9CAB, 22, 11CB6270C26C4572A50C
150
-
151
- # 10 chars. optional: Letters (capital and lower). required: numbers. excluded: the characters 0 and WXYzZ
152
- "10:L/n/[%0WXYzZ%]".gen # GoO2ukCt4l, Q1Je2remFL, qPg1T92T2H, 4445556781
153
- ```
154
-
155
- #### Not fulfilling a pattern
156
-
157
- If we want our resulting string doesn't fulfill the pattern we supply, then we'll use the symbol ! at the beginning
158
-
159
- Examples:
160
-
161
- ```ruby
162
- "!4:XN/x/".gen # a$aaa, FF9B, j4DDDem, as, 2345
163
-
164
- "!10:N".gen # 123, 34899Add34, 3434234234234008, AAFj#kd2x
165
- ```
166
-
167
- ### Generate a string with specific expected errors
168
-
169
- Usually, for testing purposes you need to generate strings that don't fulfill a specific pattern, then you can supply as a parameter expected_errors (alias: errors)
170
-
171
- The possible values you can specify is one or more of these ones: :length, :min_length, :max_length, :value, :required_data, :excluded_data, :string_set_not_allowed
172
-
173
- :length: wrong length, minimum or maximum
174
- :min_length: wrong minimum length
175
- :max_length: wrong maximum length
176
- :value: wrong resultant value
177
- :required_data: the output string won't include all necessary required data. It works only if required data supplied on the pattern.
178
- :excluded_data: the resultant string will include one or more characters that should be excluded. It works only if excluded data supplied on the pattern.
179
- :string_set_not_allowed: it will include one or more characters that are not supposed to be on the string.
180
-
181
- Examples:
182
-
183
- ```ruby
184
- "10-20:N".gen errors: [:min_length]
185
- #> 627, 098262, 3408
186
-
187
- "20:N".gen errors: [:length, :value]
188
- #> |13, tS1b)r-1)<RT65202eTo6bV0g~, 021400323<2ahL0NP86a698063*56076
189
-
190
- "10:L/n/".gen errors: [:value]
191
- #> 1hwIw;v{KQ, mpk*l]!7:!, wocipgZt8@
192
- ```
193
-
194
- ### Validate if a string is following a pattern
195
-
196
- If you need to validate if a specific text is fulfilling the pattern you can use the validate method.
197
-
198
- If a string pattern supplied and no other parameters supplied the output will be an array with the errors detected.
199
-
200
-
201
- Possible output values, empty array (validation without errors detected) or one or more of: :min_length, :max_length, :length, :value, :string_set_not_allowed, :required_data, :excluded_data
202
-
203
- In case an array of patterns supplied it will return only true or false
204
-
205
- Examples:
206
-
207
- ```ruby
208
- #StringPattern class
209
- StringPattern.validate((text: "This text will be validated", pattern: :"10-20:Xn")
210
- #> [:max_length, :length, :value, :string_set_not_allowed]
211
-
212
- #String class
213
- "10:N".validate "333444"
214
- #> [:min_length, :length]
215
-
216
- #Symbol class
217
- :"10:N".validate("333444")
218
- #> [:min_length, :length]
219
-
220
- #Array class
221
- ["5:L","3:xn","4-10:n"].validate "DjkljFFc343444390"
222
- #> false
223
- ```
224
-
225
- If we want to validate a string with a pattern and we are expecting to get specific errors, you can supply the parameter expected_errors (alias: errors) or not_expected_errors (aliases: non_expected_errors, not_errors).
226
-
227
- In this case, the validate method will return true or false.
228
-
229
- Examples:
230
-
231
- ```ruby
232
- "10:N".val "3445", errors: [:min_length]
233
- #> true
234
-
235
- "10:N/[09]/".validate "4434039440", errors: [:value]
236
- #> false
237
-
238
- "10-12:XN/x/".validate "FDDDDDAA343434", errors: [:max_length, :required_data]
239
- #> true
240
- ```
241
-
242
- ### Configure
243
-
244
- #### SP_ADD_TO_RUBY
245
-
246
- This gem adds the methods generate (alias: gen) and validate (alias: val) to the Ruby classes: String, Array, and Symbol.
247
-
248
- Also adds the method generate (alias: gen) to Kernel. By default (true) it is always added.
249
-
250
- In case you don't want to be added, just before requiring the library set:
251
-
252
- ```ruby
253
- SP_ADD_TO_RUBY = false
254
- require 'string_pattern'
255
- ```
256
-
257
- In case it is set to true (default) then you will be able to use:
258
-
259
- ```ruby
260
- require 'string_pattern'
261
-
262
- #String object
263
- "20-30:@".gen
264
- #>dkj34MljjJD-df@jfdluul.dfu
265
-
266
- "10:L/N/[/-./%d%]".validate("12ds6f--.s")
267
- #>[:value, :string_set_not_allowed]
268
-
269
- "20-40:@".validate(my_email)
270
-
271
- #Kernel
272
- gen "10:N"
273
- #>3433409877
274
-
275
- #Array object
276
- "(,3:N,) ,3:N,-,2:N,-,2:N".split(",").generate
277
- #>(937) 980-65-05
278
-
279
- %w{( 3:N ) 1:_ 3:N - 2:N - 2:N}.gen
280
- #>(045) 448-63-09
281
-
282
- ["1:L", "5-10:LN", "-", "3:N"].gen
283
- #>zqWihV-746
284
- ```
285
-
286
- #### national_chars
287
-
288
- To specify which national characters will be used when using the symbol type: T, you use StringPattern.national_chars, by default is the English alphabet
289
-
290
- ```ruby
291
- StringPattern.national_chars = (('a'..'z').to_a + ('A'..'Z').to_a).join + "áéíóúÁÉÍÓÚüÜñÑ"
292
- "10-20:Tn".gen #>AAñ34Ef99éNOP
293
- ```
294
-
295
- #### optimistic
296
-
297
- If true it will check on the strings of the array positions supplied if they have the pattern format and assume in that case that is a pattern. If not it will assume the patterns on the array will be supplied as symbols. By default is set to true.
298
-
299
- ```ruby
300
- StringPattern.optimistic = false
301
- ["5:X","fixedtext", "3:N"].generate
302
- #>5:Xfixedtext3:N
303
- [:"5:X","fixedtext", :"3:N"].generate
304
- #>AUJKJfixedtext454
305
-
306
- StringPattern.optimistic = true
307
- ["5:X","fixedtext", "3:N"].generate
308
- #>KKDMEfixedtext344
309
- [:"5:X","fixedtext", :"3:N"].generate
310
- #>SAAERfixedtext988
311
- ```
312
-
313
- ## Contributing
314
-
315
- Bug reports and pull requests are welcome on GitHub at https://github.com/marioruiz/string_pattern.
316
-
317
-
318
- ## License
319
-
320
- The gem is available as open source under the terms of the [MIT License](http://opensource.org/licenses/MIT).
321
-
1
+ # StringPattern
2
+
3
+ [![Gem Version](https://badge.fury.io/rb/string_pattern.svg)](https://rubygems.org/gems/string_pattern)
4
+
5
+ With this gem, you can easily generate strings supplying a very simple pattern.
6
+ Also, you can validate if a text fulfills a specific pattern or even generate a string following a pattern and returning the wrong length, value... for testing your applications.
7
+
8
+ To do even more take a look at [nice_hash gem](https://github.com/MarioRuiz/nice_hash)
9
+
10
+ ## Installation
11
+
12
+ Add this line to your application's Gemfile:
13
+
14
+ ```ruby
15
+ gem 'string_pattern'
16
+ ```
17
+
18
+ And then execute:
19
+
20
+ $ bundle
21
+
22
+ Or install it yourself as:
23
+
24
+ $ gem install string_pattern
25
+
26
+ ## Usage
27
+
28
+ ### What is a string pattern?
29
+
30
+ A pattern is a string where we supply these elements "a-b:c" where a is min_length, b is max_length (optional) and c is a set of symbol_type
31
+
32
+ min_length: minimum length of the string
33
+
34
+ max_length (optional): maximum length of the string. If not provided, the result will be with the min_length provided
35
+
36
+ symbol_type: The type of the string we want.
37
+ x: from a to z (lowercase)
38
+ X: A to Z (capital letters)
39
+ L: A to Z and a to z
40
+ T: National characters defined on StringPattern.national_chars
41
+ n or N: for numbers. 0 to 9
42
+ $: special characters, $%&#... (includes blank space)
43
+ _: blank space
44
+ *: all characters
45
+ 0: empty string will be accepted. It needs to be at the beginning of the symbol_type string
46
+ @: It will generate a valid email following the official algorithm. It cannot be used with other symbol_type
47
+
48
+ ### How to generate a string following a pattern
49
+
50
+ To generate a string following a pattern you can do it using directly the StringPattern class or the generate method in the class, be aware you can always use also the alias method: gen
51
+
52
+ ```ruby
53
+ require 'string_pattern'
54
+
55
+ #StringPattern class
56
+ p StringPattern.generate "10:N"
57
+ #>3448910834
58
+ p StringPattern.gen "5:X"
59
+ #>JDDDK
60
+
61
+ #String class
62
+ p "4:Nx".gen
63
+ #>xaa3
64
+
65
+ #Symbol class
66
+ p :"10:T".generate
67
+ #>AccBdjklñD
68
+
69
+ #Array class
70
+ p [:"3:N", "fixed", :"3:N"].gen
71
+ #>334fixed920
72
+ p "(,3:N,) ,3:N,-,2:N,-,2:N".split(',').generate
73
+ #>(937) 980-65-05
74
+
75
+ #Kernel
76
+ p gen "3:N"
77
+ #>443
78
+ ```
79
+
80
+ If you want to generate for example 1000 strings and be sure all those strings are different you can use:
81
+
82
+ ```ruby
83
+ StringPattern.dont_repeat = true #default: false
84
+ 1000.times {
85
+ puts :"6-20:L/N/".gen
86
+ }
87
+ StringPattern.cache_values = Hash.new() #to clean the generated values from memory
88
+ ```
89
+
90
+ Using dont_repeat all the generated string during the current run will be unique.
91
+
92
+ In case you just want one particular string to be unique but not the rest then add to the pattern just in the end the symbol: &
93
+
94
+ The pattern needs to be a symbol object.
95
+
96
+ ```ruby
97
+ 1000.times {
98
+ puts :"6-20:L/N/&".gen #will be unique
99
+ puts :"10:N".gen
100
+ }
101
+ ```
102
+
103
+ #### Custom characters
104
+
105
+ Also, it's possible to provide the characters we want. To do that we'll use the symbol_type [characters]
106
+
107
+ If we want to add the character ] we have to write ]]
108
+
109
+ Examples
110
+
111
+ ```ruby
112
+ # four chars from the ones provided: asDF9
113
+ p "4:[asDF9]".gen #> aaaa, asFF, 9sFD
114
+
115
+ # from 2 to 20 chars, capital and lower chars (Xx) and also valid the characters $#6
116
+ p "2-20:[$#6]Xx".gen #> aaaa, asFF, 66, B$DkKL#9aDD
117
+
118
+ # four chars from these: asDF]9
119
+ p "4:[asDF]]9]".gen #> aa]a, asFF, 9s]D
120
+ ```
121
+
122
+ #### Required characters or symbol types
123
+
124
+ We'll use the symbol / to specify which characters or symbols we want to be included on the resulting string as required values /symbols or characters/
125
+
126
+ If we need to add the character / we'll use //
127
+
128
+ Examples:
129
+
130
+ ```ruby
131
+ # four characters. optional: capitals and numbers, required: lower
132
+ "4:XN/x/".gen # aaaa, FF9b, j4em, asdf, ADFt
133
+
134
+ # from 6 to 15 chars. optional: numbers, capitals and the chars $ and Æ. required the chars: 23abCD
135
+ "6-15:[/23abCD/$Æ]NX".gen # bCa$D32, 32DJIOKLaCb, b23aD568C
136
+
137
+ # from 4 to 9 chars. optional: numbers and capitals. required: lowers and the characters $ and 5
138
+ "4-9:[/$5/]XN/x/".generate # aa5$, F5$F9b, j$4em5, a5sdf$, $ADFt5
139
+ ```
140
+
141
+ #### Excluded characters
142
+
143
+ If we want to exclude a few characters in the result, we'll use the symbol %characters%
144
+
145
+ If you need to exclude the character %, you should use %%
146
+
147
+ Examples:
148
+
149
+ ```ruby
150
+ # from 2 to 20 characters. optional: Numbers and characters A, B and C. excluded: the characters 8 and 3
151
+ "2-20:[%83%ABC]N".gen # B49, 22900, 9CAB, 22, 11CB6270C26C4572A50C
152
+
153
+ # 10 chars. optional: Letters (capital and lower). required: numbers. excluded: the characters 0 and WXYzZ
154
+ "10:L/n/[%0WXYzZ%]".gen # GoO2ukCt4l, Q1Je2remFL, qPg1T92T2H, 4445556781
155
+ ```
156
+
157
+ #### Not fulfilling a pattern
158
+
159
+ If we want our resulting string doesn't fulfill the pattern we supply, then we'll use the symbol ! at the beginning
160
+
161
+ Examples:
162
+
163
+ ```ruby
164
+ "!4:XN/x/".gen # a$aaa, FF9B, j4DDDem, as, 2345
165
+
166
+ "!10:N".gen # 123, 34899Add34, 3434234234234008, AAFj#kd2x
167
+ ```
168
+
169
+ ### Generate a string with specific expected errors
170
+
171
+ Usually, for testing purposes you need to generate strings that don't fulfill a specific pattern, then you can supply as a parameter expected_errors (alias: errors)
172
+
173
+ The possible values you can specify is one or more of these ones: :length, :min_length, :max_length, :value, :required_data, :excluded_data, :string_set_not_allowed
174
+
175
+ :length: wrong length, minimum or maximum
176
+ :min_length: wrong minimum length
177
+ :max_length: wrong maximum length
178
+ :value: wrong resultant value
179
+ :required_data: the output string won't include all necessary required data. It works only if required data supplied on the pattern.
180
+ :excluded_data: the resultant string will include one or more characters that should be excluded. It works only if excluded data supplied on the pattern.
181
+ :string_set_not_allowed: it will include one or more characters that are not supposed to be on the string.
182
+
183
+ Examples:
184
+
185
+ ```ruby
186
+ "10-20:N".gen errors: [:min_length]
187
+ #> 627, 098262, 3408
188
+
189
+ "20:N".gen errors: [:length, :value]
190
+ #> |13, tS1b)r-1)<RT65202eTo6bV0g~, 021400323<2ahL0NP86a698063*56076
191
+
192
+ "10:L/n/".gen errors: [:value]
193
+ #> 1hwIw;v{KQ, mpk*l]!7:!, wocipgZt8@
194
+ ```
195
+
196
+ ### Validate if a string is following a pattern
197
+
198
+ If you need to validate if a specific text is fulfilling the pattern you can use the validate method.
199
+
200
+ If a string pattern supplied and no other parameters supplied the output will be an array with the errors detected.
201
+
202
+
203
+ Possible output values, empty array (validation without errors detected) or one or more of: :min_length, :max_length, :length, :value, :string_set_not_allowed, :required_data, :excluded_data
204
+
205
+ In case an array of patterns supplied it will return only true or false
206
+
207
+ Examples:
208
+
209
+ ```ruby
210
+ #StringPattern class
211
+ StringPattern.validate((text: "This text will be validated", pattern: :"10-20:Xn")
212
+ #> [:max_length, :length, :value, :string_set_not_allowed]
213
+
214
+ #String class
215
+ "10:N".validate "333444"
216
+ #> [:min_length, :length]
217
+
218
+ #Symbol class
219
+ :"10:N".validate("333444")
220
+ #> [:min_length, :length]
221
+
222
+ #Array class
223
+ ["5:L","3:xn","4-10:n"].validate "DjkljFFc343444390"
224
+ #> false
225
+ ```
226
+
227
+ If we want to validate a string with a pattern and we are expecting to get specific errors, you can supply the parameter expected_errors (alias: errors) or not_expected_errors (aliases: non_expected_errors, not_errors).
228
+
229
+ In this case, the validate method will return true or false.
230
+
231
+ Examples:
232
+
233
+ ```ruby
234
+ "10:N".val "3445", errors: [:min_length]
235
+ #> true
236
+
237
+ "10:N/[09]/".validate "4434039440", errors: [:value]
238
+ #> false
239
+
240
+ "10-12:XN/x/".validate "FDDDDDAA343434", errors: [:max_length, :required_data]
241
+ #> true
242
+ ```
243
+
244
+ ### Configure
245
+
246
+ #### SP_ADD_TO_RUBY
247
+
248
+ This gem adds the methods generate (alias: gen) and validate (alias: val) to the Ruby classes: String, Array, and Symbol.
249
+
250
+ Also adds the method generate (alias: gen) to Kernel. By default (true) it is always added.
251
+
252
+ In case you don't want to be added, just before requiring the library set:
253
+
254
+ ```ruby
255
+ SP_ADD_TO_RUBY = false
256
+ require 'string_pattern'
257
+ ```
258
+
259
+ In case it is set to true (default) then you will be able to use:
260
+
261
+ ```ruby
262
+ require 'string_pattern'
263
+
264
+ #String object
265
+ "20-30:@".gen
266
+ #>dkj34MljjJD-df@jfdluul.dfu
267
+
268
+ "10:L/N/[/-./%d%]".validate("12ds6f--.s")
269
+ #>[:value, :string_set_not_allowed]
270
+
271
+ "20-40:@".validate(my_email)
272
+
273
+ #Kernel
274
+ gen "10:N"
275
+ #>3433409877
276
+
277
+ #Array object
278
+ "(,3:N,) ,3:N,-,2:N,-,2:N".split(",").generate
279
+ #>(937) 980-65-05
280
+
281
+ %w{( 3:N ) 1:_ 3:N - 2:N - 2:N}.gen
282
+ #>(045) 448-63-09
283
+
284
+ ["1:L", "5-10:LN", "-", "3:N"].gen
285
+ #>zqWihV-746
286
+ ```
287
+
288
+ #### national_chars
289
+
290
+ To specify which national characters will be used when using the symbol type: T, you use StringPattern.national_chars, by default is the English alphabet
291
+
292
+ ```ruby
293
+ StringPattern.national_chars = (('a'..'z').to_a + ('A'..'Z').to_a).join + "áéíóúÁÉÍÓÚüÜñÑ"
294
+ "10-20:Tn".gen #>AAñ34Ef99éNOP
295
+ ```
296
+
297
+ #### optimistic
298
+
299
+ If true it will check on the strings of the array positions supplied if they have the pattern format and assume in that case that is a pattern. If not it will assume the patterns on the array will be supplied as symbols. By default is set to true.
300
+
301
+ ```ruby
302
+ StringPattern.optimistic = false
303
+ ["5:X","fixedtext", "3:N"].generate
304
+ #>5:Xfixedtext3:N
305
+ [:"5:X","fixedtext", :"3:N"].generate
306
+ #>AUJKJfixedtext454
307
+
308
+ StringPattern.optimistic = true
309
+ ["5:X","fixedtext", "3:N"].generate
310
+ #>KKDMEfixedtext344
311
+ [:"5:X","fixedtext", :"3:N"].generate
312
+ #>SAAERfixedtext988
313
+ ```
314
+
315
+ ## Contributing
316
+
317
+ Bug reports and pull requests are welcome on GitHub at https://github.com/marioruiz/string_pattern.
318
+
319
+
320
+ ## License
321
+
322
+ The gem is available as open source under the terms of the [MIT License](http://opensource.org/licenses/MIT).
323
+