yukonisuru 0.0.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/.coveralls.yml +1 -0
- data/.gitignore +14 -0
- data/.rspec +4 -0
- data/.travis.yml +13 -0
- data/Gemfile +4 -0
- data/LICENSE.txt +22 -0
- data/README.md +1101 -0
- data/Rakefile +1 -0
- data/config/locales/en.yml +113 -0
- data/lib/yukonisuru.rb +93 -0
- data/lib/yukonisuru/matchers/ensure_valid_alpha_format_of.rb +26 -0
- data/lib/yukonisuru/matchers/ensure_valid_alpha_numeric_format_of.rb +26 -0
- data/lib/yukonisuru/matchers/ensure_valid_base64_format_of.rb +26 -0
- data/lib/yukonisuru/matchers/ensure_valid_boolean_format_of.rb +26 -0
- data/lib/yukonisuru/matchers/ensure_valid_credit_card_format_of.rb +26 -0
- data/lib/yukonisuru/matchers/ensure_valid_currency_format_of.rb +26 -0
- data/lib/yukonisuru/matchers/ensure_valid_cusip_format_of.rb +26 -0
- data/lib/yukonisuru/matchers/ensure_valid_email_format_of.rb +26 -0
- data/lib/yukonisuru/matchers/ensure_valid_equality_matcher_of.rb +40 -0
- data/lib/yukonisuru/matchers/ensure_valid_gtin_format_of.rb +26 -0
- data/lib/yukonisuru/matchers/ensure_valid_hex_format_of.rb +26 -0
- data/lib/yukonisuru/matchers/ensure_valid_imei_format_of.rb +26 -0
- data/lib/yukonisuru/matchers/ensure_valid_ip_format_of.rb +26 -0
- data/lib/yukonisuru/matchers/ensure_valid_isbn_format_of.rb +26 -0
- data/lib/yukonisuru/matchers/ensure_valid_isin_format_of.rb +26 -0
- data/lib/yukonisuru/matchers/ensure_valid_latitude_format_of.rb +26 -0
- data/lib/yukonisuru/matchers/ensure_valid_longitude_format_of.rb +26 -0
- data/lib/yukonisuru/matchers/ensure_valid_mac_address_format_of.rb +26 -0
- data/lib/yukonisuru/matchers/ensure_valid_name_format_of.rb +26 -0
- data/lib/yukonisuru/matchers/ensure_valid_password_format_of.rb +26 -0
- data/lib/yukonisuru/matchers/ensure_valid_phone_format_of.rb +26 -0
- data/lib/yukonisuru/matchers/ensure_valid_sedol_format_of.rb +26 -0
- data/lib/yukonisuru/matchers/ensure_valid_slug_format_of.rb +26 -0
- data/lib/yukonisuru/matchers/ensure_valid_ssn_format_of.rb +26 -0
- data/lib/yukonisuru/matchers/ensure_valid_url_format_of.rb +26 -0
- data/lib/yukonisuru/matchers/ensure_valid_username_format_of.rb +26 -0
- data/lib/yukonisuru/matchers/ensure_valid_uuid_format_of.rb +26 -0
- data/lib/yukonisuru/validators/alpha_numeric_validator.rb +31 -0
- data/lib/yukonisuru/validators/alpha_validator.rb +31 -0
- data/lib/yukonisuru/validators/base64_validator.rb +9 -0
- data/lib/yukonisuru/validators/boolean_validator.rb +9 -0
- data/lib/yukonisuru/validators/credit_card_validator.rb +133 -0
- data/lib/yukonisuru/validators/currency_validator.rb +23 -0
- data/lib/yukonisuru/validators/cusip_validator.rb +33 -0
- data/lib/yukonisuru/validators/email_validator.rb +25 -0
- data/lib/yukonisuru/validators/equality_validator.rb +27 -0
- data/lib/yukonisuru/validators/gtin_validator.rb +59 -0
- data/lib/yukonisuru/validators/hex_validator.rb +9 -0
- data/lib/yukonisuru/validators/imei_validator.rb +37 -0
- data/lib/yukonisuru/validators/ip_validator.rb +9 -0
- data/lib/yukonisuru/validators/isbn_validator.rb +24 -0
- data/lib/yukonisuru/validators/isin_validator.rb +38 -0
- data/lib/yukonisuru/validators/latitude_validator.rb +9 -0
- data/lib/yukonisuru/validators/longitude_validator.rb +9 -0
- data/lib/yukonisuru/validators/mac_address_validator.rb +24 -0
- data/lib/yukonisuru/validators/name_validator.rb +9 -0
- data/lib/yukonisuru/validators/password_validator.rb +23 -0
- data/lib/yukonisuru/validators/phone_validator.rb +9 -0
- data/lib/yukonisuru/validators/sedol_validator.rb +32 -0
- data/lib/yukonisuru/validators/slug_validator.rb +9 -0
- data/lib/yukonisuru/validators/ssn_validator.rb +9 -0
- data/lib/yukonisuru/validators/url_validator.rb +36 -0
- data/lib/yukonisuru/validators/username_validator.rb +9 -0
- data/lib/yukonisuru/validators/uuid_validator.rb +28 -0
- data/lib/yukonisuru/version.rb +3 -0
- data/spec/lib/alpha_numeric_validator_spec.rb +91 -0
- data/spec/lib/alpha_validator_spec.rb +182 -0
- data/spec/lib/base64_validator_spec.rb +33 -0
- data/spec/lib/boolean_validator_spec.rb +35 -0
- data/spec/lib/credit_card_validator_spec.rb +686 -0
- data/spec/lib/currency_validator_spec.rb +63 -0
- data/spec/lib/cusip_validator_spec.rb +27 -0
- data/spec/lib/email_validator_spec.rb +109 -0
- data/spec/lib/equality_validator_spec.rb +334 -0
- data/spec/lib/gtin_validator_spec.rb +101 -0
- data/spec/lib/hex_validator_spec.rb +73 -0
- data/spec/lib/imei_validator_spec.rb +41 -0
- data/spec/lib/ip_validator_spec.rb +33 -0
- data/spec/lib/isbn_validator_spec.rb +41 -0
- data/spec/lib/isin_validator_spec.rb +35 -0
- data/spec/lib/latitude_validator_spec.rb +31 -0
- data/spec/lib/longitude_validator_spec.rb +31 -0
- data/spec/lib/mac_address_validator_spec.rb +54 -0
- data/spec/lib/name_validator_spec.rb +39 -0
- data/spec/lib/password_validator_spec.rb +87 -0
- data/spec/lib/phone_validator_spec.rb +42 -0
- data/spec/lib/sedol_validator_spec.rb +31 -0
- data/spec/lib/slug_validator_spec.rb +41 -0
- data/spec/lib/ssn_validator_spec.rb +36 -0
- data/spec/lib/url_validator_spec.rb +109 -0
- data/spec/lib/username_validator_spec.rb +37 -0
- data/spec/lib/uuid_validator_spec.rb +157 -0
- data/spec/spec_helper.rb +12 -0
- data/yukonisuru.gemspec +29 -0
- metadata +264 -0
data/spec/spec_helper.rb
ADDED
@@ -0,0 +1,12 @@
|
|
1
|
+
require 'coveralls'
|
2
|
+
require 'active_model'
|
3
|
+
require 'active_support'
|
4
|
+
require 'yukonisuru'
|
5
|
+
|
6
|
+
require 'shoulda/matchers'
|
7
|
+
require 'shoulda-matchers'
|
8
|
+
|
9
|
+
I18n.load_path << File.expand_path("../../config/locales/en.yml", __FILE__)
|
10
|
+
I18n.enforce_available_locales = false
|
11
|
+
|
12
|
+
Coveralls.wear!
|
data/yukonisuru.gemspec
ADDED
@@ -0,0 +1,29 @@
|
|
1
|
+
# coding: utf-8
|
2
|
+
lib = File.expand_path('../lib', __FILE__)
|
3
|
+
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
4
|
+
require 'yukonisuru/version'
|
5
|
+
|
6
|
+
Gem::Specification.new do |spec|
|
7
|
+
spec.name = "yukonisuru"
|
8
|
+
spec.version = Yukonisuru::VERSION
|
9
|
+
spec.authors = ["Juan Gomez"]
|
10
|
+
spec.email = ["j.gomez@drexed.com"]
|
11
|
+
spec.summary = %q{Gem for commonly used validators.}
|
12
|
+
spec.description = %q{Validate commonly used attributes easily with Yukonisuru.}
|
13
|
+
spec.homepage = "https://github.com/drexed/yukonisuru"
|
14
|
+
spec.license = "MIT"
|
15
|
+
|
16
|
+
spec.files = `git ls-files -z`.split("\x0")
|
17
|
+
spec.executables = spec.files.grep(%r{^bin/}) { |f| File.basename(f) }
|
18
|
+
spec.test_files = spec.files.grep(%r{^(test|spec|features)/})
|
19
|
+
spec.require_paths = ["lib"]
|
20
|
+
|
21
|
+
spec.add_runtime_dependency "activemodel"
|
22
|
+
spec.add_runtime_dependency "activesupport"
|
23
|
+
|
24
|
+
spec.add_development_dependency "bundler"
|
25
|
+
spec.add_development_dependency "coveralls"
|
26
|
+
spec.add_development_dependency "rake"
|
27
|
+
spec.add_development_dependency "rspec"
|
28
|
+
spec.add_development_dependency "shoulda-matchers"
|
29
|
+
end
|
metadata
ADDED
@@ -0,0 +1,264 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: yukonisuru
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 0.0.1
|
5
|
+
platform: ruby
|
6
|
+
authors:
|
7
|
+
- Juan Gomez
|
8
|
+
autorequire:
|
9
|
+
bindir: bin
|
10
|
+
cert_chain: []
|
11
|
+
date: 2015-02-09 00:00:00.000000000 Z
|
12
|
+
dependencies:
|
13
|
+
- !ruby/object:Gem::Dependency
|
14
|
+
name: activemodel
|
15
|
+
requirement: !ruby/object:Gem::Requirement
|
16
|
+
requirements:
|
17
|
+
- - ">="
|
18
|
+
- !ruby/object:Gem::Version
|
19
|
+
version: '0'
|
20
|
+
type: :runtime
|
21
|
+
prerelease: false
|
22
|
+
version_requirements: !ruby/object:Gem::Requirement
|
23
|
+
requirements:
|
24
|
+
- - ">="
|
25
|
+
- !ruby/object:Gem::Version
|
26
|
+
version: '0'
|
27
|
+
- !ruby/object:Gem::Dependency
|
28
|
+
name: activesupport
|
29
|
+
requirement: !ruby/object:Gem::Requirement
|
30
|
+
requirements:
|
31
|
+
- - ">="
|
32
|
+
- !ruby/object:Gem::Version
|
33
|
+
version: '0'
|
34
|
+
type: :runtime
|
35
|
+
prerelease: false
|
36
|
+
version_requirements: !ruby/object:Gem::Requirement
|
37
|
+
requirements:
|
38
|
+
- - ">="
|
39
|
+
- !ruby/object:Gem::Version
|
40
|
+
version: '0'
|
41
|
+
- !ruby/object:Gem::Dependency
|
42
|
+
name: bundler
|
43
|
+
requirement: !ruby/object:Gem::Requirement
|
44
|
+
requirements:
|
45
|
+
- - ">="
|
46
|
+
- !ruby/object:Gem::Version
|
47
|
+
version: '0'
|
48
|
+
type: :development
|
49
|
+
prerelease: false
|
50
|
+
version_requirements: !ruby/object:Gem::Requirement
|
51
|
+
requirements:
|
52
|
+
- - ">="
|
53
|
+
- !ruby/object:Gem::Version
|
54
|
+
version: '0'
|
55
|
+
- !ruby/object:Gem::Dependency
|
56
|
+
name: coveralls
|
57
|
+
requirement: !ruby/object:Gem::Requirement
|
58
|
+
requirements:
|
59
|
+
- - ">="
|
60
|
+
- !ruby/object:Gem::Version
|
61
|
+
version: '0'
|
62
|
+
type: :development
|
63
|
+
prerelease: false
|
64
|
+
version_requirements: !ruby/object:Gem::Requirement
|
65
|
+
requirements:
|
66
|
+
- - ">="
|
67
|
+
- !ruby/object:Gem::Version
|
68
|
+
version: '0'
|
69
|
+
- !ruby/object:Gem::Dependency
|
70
|
+
name: rake
|
71
|
+
requirement: !ruby/object:Gem::Requirement
|
72
|
+
requirements:
|
73
|
+
- - ">="
|
74
|
+
- !ruby/object:Gem::Version
|
75
|
+
version: '0'
|
76
|
+
type: :development
|
77
|
+
prerelease: false
|
78
|
+
version_requirements: !ruby/object:Gem::Requirement
|
79
|
+
requirements:
|
80
|
+
- - ">="
|
81
|
+
- !ruby/object:Gem::Version
|
82
|
+
version: '0'
|
83
|
+
- !ruby/object:Gem::Dependency
|
84
|
+
name: rspec
|
85
|
+
requirement: !ruby/object:Gem::Requirement
|
86
|
+
requirements:
|
87
|
+
- - ">="
|
88
|
+
- !ruby/object:Gem::Version
|
89
|
+
version: '0'
|
90
|
+
type: :development
|
91
|
+
prerelease: false
|
92
|
+
version_requirements: !ruby/object:Gem::Requirement
|
93
|
+
requirements:
|
94
|
+
- - ">="
|
95
|
+
- !ruby/object:Gem::Version
|
96
|
+
version: '0'
|
97
|
+
- !ruby/object:Gem::Dependency
|
98
|
+
name: shoulda-matchers
|
99
|
+
requirement: !ruby/object:Gem::Requirement
|
100
|
+
requirements:
|
101
|
+
- - ">="
|
102
|
+
- !ruby/object:Gem::Version
|
103
|
+
version: '0'
|
104
|
+
type: :development
|
105
|
+
prerelease: false
|
106
|
+
version_requirements: !ruby/object:Gem::Requirement
|
107
|
+
requirements:
|
108
|
+
- - ">="
|
109
|
+
- !ruby/object:Gem::Version
|
110
|
+
version: '0'
|
111
|
+
description: Validate commonly used attributes easily with Yukonisuru.
|
112
|
+
email:
|
113
|
+
- j.gomez@drexed.com
|
114
|
+
executables: []
|
115
|
+
extensions: []
|
116
|
+
extra_rdoc_files: []
|
117
|
+
files:
|
118
|
+
- ".coveralls.yml"
|
119
|
+
- ".gitignore"
|
120
|
+
- ".rspec"
|
121
|
+
- ".travis.yml"
|
122
|
+
- Gemfile
|
123
|
+
- LICENSE.txt
|
124
|
+
- README.md
|
125
|
+
- Rakefile
|
126
|
+
- config/locales/en.yml
|
127
|
+
- lib/yukonisuru.rb
|
128
|
+
- lib/yukonisuru/matchers/ensure_valid_alpha_format_of.rb
|
129
|
+
- lib/yukonisuru/matchers/ensure_valid_alpha_numeric_format_of.rb
|
130
|
+
- lib/yukonisuru/matchers/ensure_valid_base64_format_of.rb
|
131
|
+
- lib/yukonisuru/matchers/ensure_valid_boolean_format_of.rb
|
132
|
+
- lib/yukonisuru/matchers/ensure_valid_credit_card_format_of.rb
|
133
|
+
- lib/yukonisuru/matchers/ensure_valid_currency_format_of.rb
|
134
|
+
- lib/yukonisuru/matchers/ensure_valid_cusip_format_of.rb
|
135
|
+
- lib/yukonisuru/matchers/ensure_valid_email_format_of.rb
|
136
|
+
- lib/yukonisuru/matchers/ensure_valid_equality_matcher_of.rb
|
137
|
+
- lib/yukonisuru/matchers/ensure_valid_gtin_format_of.rb
|
138
|
+
- lib/yukonisuru/matchers/ensure_valid_hex_format_of.rb
|
139
|
+
- lib/yukonisuru/matchers/ensure_valid_imei_format_of.rb
|
140
|
+
- lib/yukonisuru/matchers/ensure_valid_ip_format_of.rb
|
141
|
+
- lib/yukonisuru/matchers/ensure_valid_isbn_format_of.rb
|
142
|
+
- lib/yukonisuru/matchers/ensure_valid_isin_format_of.rb
|
143
|
+
- lib/yukonisuru/matchers/ensure_valid_latitude_format_of.rb
|
144
|
+
- lib/yukonisuru/matchers/ensure_valid_longitude_format_of.rb
|
145
|
+
- lib/yukonisuru/matchers/ensure_valid_mac_address_format_of.rb
|
146
|
+
- lib/yukonisuru/matchers/ensure_valid_name_format_of.rb
|
147
|
+
- lib/yukonisuru/matchers/ensure_valid_password_format_of.rb
|
148
|
+
- lib/yukonisuru/matchers/ensure_valid_phone_format_of.rb
|
149
|
+
- lib/yukonisuru/matchers/ensure_valid_sedol_format_of.rb
|
150
|
+
- lib/yukonisuru/matchers/ensure_valid_slug_format_of.rb
|
151
|
+
- lib/yukonisuru/matchers/ensure_valid_ssn_format_of.rb
|
152
|
+
- lib/yukonisuru/matchers/ensure_valid_url_format_of.rb
|
153
|
+
- lib/yukonisuru/matchers/ensure_valid_username_format_of.rb
|
154
|
+
- lib/yukonisuru/matchers/ensure_valid_uuid_format_of.rb
|
155
|
+
- lib/yukonisuru/validators/alpha_numeric_validator.rb
|
156
|
+
- lib/yukonisuru/validators/alpha_validator.rb
|
157
|
+
- lib/yukonisuru/validators/base64_validator.rb
|
158
|
+
- lib/yukonisuru/validators/boolean_validator.rb
|
159
|
+
- lib/yukonisuru/validators/credit_card_validator.rb
|
160
|
+
- lib/yukonisuru/validators/currency_validator.rb
|
161
|
+
- lib/yukonisuru/validators/cusip_validator.rb
|
162
|
+
- lib/yukonisuru/validators/email_validator.rb
|
163
|
+
- lib/yukonisuru/validators/equality_validator.rb
|
164
|
+
- lib/yukonisuru/validators/gtin_validator.rb
|
165
|
+
- lib/yukonisuru/validators/hex_validator.rb
|
166
|
+
- lib/yukonisuru/validators/imei_validator.rb
|
167
|
+
- lib/yukonisuru/validators/ip_validator.rb
|
168
|
+
- lib/yukonisuru/validators/isbn_validator.rb
|
169
|
+
- lib/yukonisuru/validators/isin_validator.rb
|
170
|
+
- lib/yukonisuru/validators/latitude_validator.rb
|
171
|
+
- lib/yukonisuru/validators/longitude_validator.rb
|
172
|
+
- lib/yukonisuru/validators/mac_address_validator.rb
|
173
|
+
- lib/yukonisuru/validators/name_validator.rb
|
174
|
+
- lib/yukonisuru/validators/password_validator.rb
|
175
|
+
- lib/yukonisuru/validators/phone_validator.rb
|
176
|
+
- lib/yukonisuru/validators/sedol_validator.rb
|
177
|
+
- lib/yukonisuru/validators/slug_validator.rb
|
178
|
+
- lib/yukonisuru/validators/ssn_validator.rb
|
179
|
+
- lib/yukonisuru/validators/url_validator.rb
|
180
|
+
- lib/yukonisuru/validators/username_validator.rb
|
181
|
+
- lib/yukonisuru/validators/uuid_validator.rb
|
182
|
+
- lib/yukonisuru/version.rb
|
183
|
+
- spec/lib/alpha_numeric_validator_spec.rb
|
184
|
+
- spec/lib/alpha_validator_spec.rb
|
185
|
+
- spec/lib/base64_validator_spec.rb
|
186
|
+
- spec/lib/boolean_validator_spec.rb
|
187
|
+
- spec/lib/credit_card_validator_spec.rb
|
188
|
+
- spec/lib/currency_validator_spec.rb
|
189
|
+
- spec/lib/cusip_validator_spec.rb
|
190
|
+
- spec/lib/email_validator_spec.rb
|
191
|
+
- spec/lib/equality_validator_spec.rb
|
192
|
+
- spec/lib/gtin_validator_spec.rb
|
193
|
+
- spec/lib/hex_validator_spec.rb
|
194
|
+
- spec/lib/imei_validator_spec.rb
|
195
|
+
- spec/lib/ip_validator_spec.rb
|
196
|
+
- spec/lib/isbn_validator_spec.rb
|
197
|
+
- spec/lib/isin_validator_spec.rb
|
198
|
+
- spec/lib/latitude_validator_spec.rb
|
199
|
+
- spec/lib/longitude_validator_spec.rb
|
200
|
+
- spec/lib/mac_address_validator_spec.rb
|
201
|
+
- spec/lib/name_validator_spec.rb
|
202
|
+
- spec/lib/password_validator_spec.rb
|
203
|
+
- spec/lib/phone_validator_spec.rb
|
204
|
+
- spec/lib/sedol_validator_spec.rb
|
205
|
+
- spec/lib/slug_validator_spec.rb
|
206
|
+
- spec/lib/ssn_validator_spec.rb
|
207
|
+
- spec/lib/url_validator_spec.rb
|
208
|
+
- spec/lib/username_validator_spec.rb
|
209
|
+
- spec/lib/uuid_validator_spec.rb
|
210
|
+
- spec/spec_helper.rb
|
211
|
+
- yukonisuru.gemspec
|
212
|
+
homepage: https://github.com/drexed/yukonisuru
|
213
|
+
licenses:
|
214
|
+
- MIT
|
215
|
+
metadata: {}
|
216
|
+
post_install_message:
|
217
|
+
rdoc_options: []
|
218
|
+
require_paths:
|
219
|
+
- lib
|
220
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
221
|
+
requirements:
|
222
|
+
- - ">="
|
223
|
+
- !ruby/object:Gem::Version
|
224
|
+
version: '0'
|
225
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
226
|
+
requirements:
|
227
|
+
- - ">="
|
228
|
+
- !ruby/object:Gem::Version
|
229
|
+
version: '0'
|
230
|
+
requirements: []
|
231
|
+
rubyforge_project:
|
232
|
+
rubygems_version: 2.4.5
|
233
|
+
signing_key:
|
234
|
+
specification_version: 4
|
235
|
+
summary: Gem for commonly used validators.
|
236
|
+
test_files:
|
237
|
+
- spec/lib/alpha_numeric_validator_spec.rb
|
238
|
+
- spec/lib/alpha_validator_spec.rb
|
239
|
+
- spec/lib/base64_validator_spec.rb
|
240
|
+
- spec/lib/boolean_validator_spec.rb
|
241
|
+
- spec/lib/credit_card_validator_spec.rb
|
242
|
+
- spec/lib/currency_validator_spec.rb
|
243
|
+
- spec/lib/cusip_validator_spec.rb
|
244
|
+
- spec/lib/email_validator_spec.rb
|
245
|
+
- spec/lib/equality_validator_spec.rb
|
246
|
+
- spec/lib/gtin_validator_spec.rb
|
247
|
+
- spec/lib/hex_validator_spec.rb
|
248
|
+
- spec/lib/imei_validator_spec.rb
|
249
|
+
- spec/lib/ip_validator_spec.rb
|
250
|
+
- spec/lib/isbn_validator_spec.rb
|
251
|
+
- spec/lib/isin_validator_spec.rb
|
252
|
+
- spec/lib/latitude_validator_spec.rb
|
253
|
+
- spec/lib/longitude_validator_spec.rb
|
254
|
+
- spec/lib/mac_address_validator_spec.rb
|
255
|
+
- spec/lib/name_validator_spec.rb
|
256
|
+
- spec/lib/password_validator_spec.rb
|
257
|
+
- spec/lib/phone_validator_spec.rb
|
258
|
+
- spec/lib/sedol_validator_spec.rb
|
259
|
+
- spec/lib/slug_validator_spec.rb
|
260
|
+
- spec/lib/ssn_validator_spec.rb
|
261
|
+
- spec/lib/url_validator_spec.rb
|
262
|
+
- spec/lib/username_validator_spec.rb
|
263
|
+
- spec/lib/uuid_validator_spec.rb
|
264
|
+
- spec/spec_helper.rb
|