national_ids 0.0.1.pre → 0.0.2.pre
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.
- checksums.yaml +4 -4
- checksums.yaml.gz.sig +0 -0
- data.tar.gz.sig +2 -1
- data/.rubocop.yml +2 -0
- data/Guardfile +21 -0
- data/README.md +1 -1
- data/Rakefile +0 -1
- data/lib/national_ids.rb +4 -1
- data/lib/national_ids/number.rb +14 -0
- data/lib/national_ids/version.rb +4 -1
- data/national_ids.gemspec +16 -6
- data/spec/number_spec.rb +11 -0
- data/spec/spec_helper.rb +2 -0
- metadata +97 -4
- metadata.gz.sig +0 -0
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 1972b233d79c829cdee732a4b067832fd95ea520
|
4
|
+
data.tar.gz: 70a8569bb69000fe5e488a265834b9231700a00d
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 05656961358c9b9503e35a387d1f1b7f0fc96bae11efc5c6ae076f6400504c473860b05cc8a97df2a09306b89f3cb3b73d017a78ee4143438de9f391eb9c572f
|
7
|
+
data.tar.gz: 4381423a54b92956b530a2e6c9507a42014036f7fb3ae5bc0881ab137a2be15ab47e0d729f19d08b706e17d2d6b7f252d0254f578aafd82f8811c55db64c78be
|
checksums.yaml.gz.sig
CHANGED
Binary file
|
data.tar.gz.sig
CHANGED
@@ -1 +1,2 @@
|
|
1
|
-
|
1
|
+
��R�"��#�Zu�w���ޯf��n�M���K&���h�77�&V\4`�>
|
2
|
+
#�������ej��2�\|S�a�7�!b�F7��q5��C���t�"���{�Y6W�+��˦��
|
data/.rubocop.yml
ADDED
data/Guardfile
ADDED
@@ -0,0 +1,21 @@
|
|
1
|
+
# A sample Guardfile
|
2
|
+
# More info at https://github.com/guard/guard#readme
|
3
|
+
|
4
|
+
guard :rspec do
|
5
|
+
watch(%r{^spec/.+_spec\.rb$})
|
6
|
+
watch(%r{^lib/(.+)\.rb$}) { |m| "spec/lib/#{m[1]}_spec.rb" }
|
7
|
+
watch('spec/spec_helper.rb') { "spec" }
|
8
|
+
end
|
9
|
+
|
10
|
+
guard :flay do
|
11
|
+
watch(%r{^lib/(.+)\.rb$})
|
12
|
+
end
|
13
|
+
|
14
|
+
guard :flog do
|
15
|
+
watch(%r{^lib/(.+)\.rb$})
|
16
|
+
end
|
17
|
+
|
18
|
+
guard :rubocop do
|
19
|
+
watch(%r{.+\.rb$})
|
20
|
+
watch(%r{(?:.+/)?\.rubocop\.yml$}) { |m| File.dirname(m[0]) }
|
21
|
+
end
|
data/README.md
CHANGED
data/Rakefile
CHANGED
data/lib/national_ids.rb
CHANGED
@@ -0,0 +1,14 @@
|
|
1
|
+
module NationalIds
|
2
|
+
#
|
3
|
+
# NationalId Number abstraction
|
4
|
+
#
|
5
|
+
class Number
|
6
|
+
attr_accessor :country, :value, :type
|
7
|
+
|
8
|
+
def initialize(country: nil, value: nil, type: :person_id)
|
9
|
+
@country = country
|
10
|
+
@value = value
|
11
|
+
@type = type
|
12
|
+
end
|
13
|
+
end
|
14
|
+
end
|
data/lib/national_ids/version.rb
CHANGED
data/national_ids.gemspec
CHANGED
@@ -1,25 +1,35 @@
|
|
1
1
|
# coding: utf-8
|
2
|
-
|
3
|
-
|
4
|
-
require 'national_ids/version'
|
2
|
+
$LOAD_PATH.push File.expand_path("../lib", __FILE__)
|
3
|
+
require "national_ids/version"
|
5
4
|
|
6
5
|
Gem::Specification.new do |spec|
|
7
6
|
spec.name = "national_ids"
|
8
7
|
spec.version = NationalIds::VERSION
|
9
8
|
spec.authors = ["Aleksandrs Ļedovskis"]
|
10
9
|
spec.email = ["aleksandrs@ledovskis.lv"]
|
11
|
-
spec.summary = %q
|
12
|
-
|
10
|
+
spec.summary = %q(A library for national identification
|
11
|
+
number related tasks)
|
12
|
+
spec.description = %q(Collection of national identification
|
13
|
+
number validators and examples)
|
13
14
|
spec.homepage = "https://github.com/aledovsky/national_ids"
|
14
15
|
spec.license = "BSD-3"
|
15
16
|
|
16
17
|
spec.files = `git ls-files -z`.split("\x0")
|
17
|
-
spec.test_files = spec.files.grep(
|
18
|
+
spec.test_files = spec.files.grep(/^(test|spec)\//)
|
18
19
|
spec.require_paths = ["lib"]
|
19
20
|
|
20
21
|
spec.cert_chain = ["certs/gem-public_cert.pem"]
|
21
22
|
spec.signing_key = "certs/gem-private_key.pem"
|
22
23
|
|
24
|
+
spec.required_ruby_version = ">= 2.0.0"
|
25
|
+
|
23
26
|
spec.add_development_dependency "bundler", "~> 1.6"
|
24
27
|
spec.add_development_dependency "rake", "~> 10.3"
|
28
|
+
|
29
|
+
spec.add_development_dependency "rspec"
|
30
|
+
spec.add_development_dependency "guard"
|
31
|
+
spec.add_development_dependency "guard-rspec"
|
32
|
+
spec.add_development_dependency "guard-flay"
|
33
|
+
spec.add_development_dependency "guard-flog"
|
34
|
+
spec.add_development_dependency "guard-rubocop"
|
25
35
|
end
|
data/spec/number_spec.rb
ADDED
data/spec/spec_helper.rb
ADDED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: national_ids
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.2.pre
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Aleksandrs Ļedovskis
|
@@ -60,7 +60,93 @@ dependencies:
|
|
60
60
|
- - "~>"
|
61
61
|
- !ruby/object:Gem::Version
|
62
62
|
version: '10.3'
|
63
|
-
|
63
|
+
- !ruby/object:Gem::Dependency
|
64
|
+
name: rspec
|
65
|
+
requirement: !ruby/object:Gem::Requirement
|
66
|
+
requirements:
|
67
|
+
- - ">="
|
68
|
+
- !ruby/object:Gem::Version
|
69
|
+
version: '0'
|
70
|
+
type: :development
|
71
|
+
prerelease: false
|
72
|
+
version_requirements: !ruby/object:Gem::Requirement
|
73
|
+
requirements:
|
74
|
+
- - ">="
|
75
|
+
- !ruby/object:Gem::Version
|
76
|
+
version: '0'
|
77
|
+
- !ruby/object:Gem::Dependency
|
78
|
+
name: guard
|
79
|
+
requirement: !ruby/object:Gem::Requirement
|
80
|
+
requirements:
|
81
|
+
- - ">="
|
82
|
+
- !ruby/object:Gem::Version
|
83
|
+
version: '0'
|
84
|
+
type: :development
|
85
|
+
prerelease: false
|
86
|
+
version_requirements: !ruby/object:Gem::Requirement
|
87
|
+
requirements:
|
88
|
+
- - ">="
|
89
|
+
- !ruby/object:Gem::Version
|
90
|
+
version: '0'
|
91
|
+
- !ruby/object:Gem::Dependency
|
92
|
+
name: guard-rspec
|
93
|
+
requirement: !ruby/object:Gem::Requirement
|
94
|
+
requirements:
|
95
|
+
- - ">="
|
96
|
+
- !ruby/object:Gem::Version
|
97
|
+
version: '0'
|
98
|
+
type: :development
|
99
|
+
prerelease: false
|
100
|
+
version_requirements: !ruby/object:Gem::Requirement
|
101
|
+
requirements:
|
102
|
+
- - ">="
|
103
|
+
- !ruby/object:Gem::Version
|
104
|
+
version: '0'
|
105
|
+
- !ruby/object:Gem::Dependency
|
106
|
+
name: guard-flay
|
107
|
+
requirement: !ruby/object:Gem::Requirement
|
108
|
+
requirements:
|
109
|
+
- - ">="
|
110
|
+
- !ruby/object:Gem::Version
|
111
|
+
version: '0'
|
112
|
+
type: :development
|
113
|
+
prerelease: false
|
114
|
+
version_requirements: !ruby/object:Gem::Requirement
|
115
|
+
requirements:
|
116
|
+
- - ">="
|
117
|
+
- !ruby/object:Gem::Version
|
118
|
+
version: '0'
|
119
|
+
- !ruby/object:Gem::Dependency
|
120
|
+
name: guard-flog
|
121
|
+
requirement: !ruby/object:Gem::Requirement
|
122
|
+
requirements:
|
123
|
+
- - ">="
|
124
|
+
- !ruby/object:Gem::Version
|
125
|
+
version: '0'
|
126
|
+
type: :development
|
127
|
+
prerelease: false
|
128
|
+
version_requirements: !ruby/object:Gem::Requirement
|
129
|
+
requirements:
|
130
|
+
- - ">="
|
131
|
+
- !ruby/object:Gem::Version
|
132
|
+
version: '0'
|
133
|
+
- !ruby/object:Gem::Dependency
|
134
|
+
name: guard-rubocop
|
135
|
+
requirement: !ruby/object:Gem::Requirement
|
136
|
+
requirements:
|
137
|
+
- - ">="
|
138
|
+
- !ruby/object:Gem::Version
|
139
|
+
version: '0'
|
140
|
+
type: :development
|
141
|
+
prerelease: false
|
142
|
+
version_requirements: !ruby/object:Gem::Requirement
|
143
|
+
requirements:
|
144
|
+
- - ">="
|
145
|
+
- !ruby/object:Gem::Version
|
146
|
+
version: '0'
|
147
|
+
description: |-
|
148
|
+
Collection of national identification
|
149
|
+
number validators and examples
|
64
150
|
email:
|
65
151
|
- aleksandrs@ledovskis.lv
|
66
152
|
executables: []
|
@@ -68,14 +154,19 @@ extensions: []
|
|
68
154
|
extra_rdoc_files: []
|
69
155
|
files:
|
70
156
|
- ".gitignore"
|
157
|
+
- ".rubocop.yml"
|
71
158
|
- Gemfile
|
159
|
+
- Guardfile
|
72
160
|
- LICENSE.txt
|
73
161
|
- README.md
|
74
162
|
- Rakefile
|
75
163
|
- certs/gem-public_cert.pem
|
76
164
|
- lib/national_ids.rb
|
165
|
+
- lib/national_ids/number.rb
|
77
166
|
- lib/national_ids/version.rb
|
78
167
|
- national_ids.gemspec
|
168
|
+
- spec/number_spec.rb
|
169
|
+
- spec/spec_helper.rb
|
79
170
|
homepage: https://github.com/aledovsky/national_ids
|
80
171
|
licenses:
|
81
172
|
- BSD-3
|
@@ -88,7 +179,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
88
179
|
requirements:
|
89
180
|
- - ">="
|
90
181
|
- !ruby/object:Gem::Version
|
91
|
-
version:
|
182
|
+
version: 2.0.0
|
92
183
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
93
184
|
requirements:
|
94
185
|
- - ">"
|
@@ -100,4 +191,6 @@ rubygems_version: 2.2.2
|
|
100
191
|
signing_key:
|
101
192
|
specification_version: 4
|
102
193
|
summary: A library for national identification number related tasks
|
103
|
-
test_files:
|
194
|
+
test_files:
|
195
|
+
- spec/number_spec.rb
|
196
|
+
- spec/spec_helper.rb
|
metadata.gz.sig
CHANGED
Binary file
|