validocno 0.0.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.
checksums.yaml ADDED
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA512:
3
+ data.tar.gz: 25bbddece6831e40a60e0eb6f22f9997844ad49b129f9adb303923d059cc801db30748d3c8455da930d1160f28175aa3bdaf205ab70be29dd4677900932a346c
4
+ metadata.gz: 8535cc61da15947c2ae74b66edf66ab3c10cb45196c11a41177870334519d2d028b8d935e3137fd5d52029219adb19d803c8748bc2e9df111bb2d80fda0f1259
5
+ SHA1:
6
+ data.tar.gz: 52a602f7dfd4139430d88b238ac543e9c1acf426
7
+ metadata.gz: fc104f1ef30312c70dc88f74ec4fabc1e1f5b87d
data/.gitignore ADDED
@@ -0,0 +1,14 @@
1
+ /.bundle/
2
+ /.yardoc
3
+ /Gemfile.lock
4
+ /_yardoc/
5
+ /coverage/
6
+ /doc/
7
+ /pkg/
8
+ /spec/reports/
9
+ /tmp/
10
+ *.bundle
11
+ *.so
12
+ *.o
13
+ *.a
14
+ mkmf.log
data/Gemfile ADDED
@@ -0,0 +1,4 @@
1
+ source 'https://rubygems.org'
2
+
3
+ # Specify your gem's dependencies in validocno.gemspec
4
+ gemspec
data/LICENSE ADDED
@@ -0,0 +1,22 @@
1
+ The MIT License (MIT)
2
+
3
+ Copyright (c) 2014 OÜ Desk Rock
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, 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,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
22
+
data/README.md ADDED
@@ -0,0 +1,32 @@
1
+ # Validocno
2
+
3
+ Estonian ID card validator
4
+
5
+ ## Installation
6
+
7
+ Add this line to your application's Gemfile:
8
+
9
+ ```ruby
10
+ gem 'validocno'
11
+ ```
12
+
13
+ And then execute:
14
+
15
+ $ bundle
16
+
17
+ Or install it yourself as:
18
+
19
+ $ gem install validocno
20
+
21
+ ## Usage
22
+
23
+ > document = Validoc.new "A1234567"
24
+ > document.valid?
25
+
26
+ ## Contributing
27
+
28
+ 1. Fork it ( https://github.com/deskrock/validocno/fork )
29
+ 2. Create your feature branch (`git checkout -b my-new-feature`)
30
+ 3. Commit your changes (`git commit -am 'Add some feature'`)
31
+ 4. Push to the branch (`git push origin my-new-feature`)
32
+ 5. Create a new Pull Request
data/Rakefile ADDED
@@ -0,0 +1,15 @@
1
+ require 'bundler/gem_tasks'
2
+
3
+ require 'rspec/core/rake_task'
4
+
5
+ RSpec::Core::RakeTask.new('spec')
6
+ task :default => :spec
7
+
8
+ desc 'Launch irb console'
9
+ task :console do
10
+ require 'irb'
11
+ require 'irb/completion'
12
+ require 'validocno'
13
+ ARGV.clear
14
+ IRB.start
15
+ end
@@ -0,0 +1,3 @@
1
+ module Validocno
2
+ VERSION = "0.0.1"
3
+ end
data/lib/validocno.rb ADDED
@@ -0,0 +1,15 @@
1
+ $LOAD_PATH.unshift(File.dirname(__FILE__)) unless
2
+ $LOAD_PATH.include?(File.dirname(__FILE__)) ||
3
+ $LOAD_PATH.include?(File.expand_path(File.dirname(__FILE__)))
4
+
5
+ require 'rubygems'
6
+ require 'httparty'
7
+ require 'nokogiri'
8
+
9
+ require 'validocno/version'
10
+
11
+ module Validocno
12
+ def self.valid?(doc_number = '')
13
+ fail NotImplementedError
14
+ end
15
+ end
data/validocno.gemspec ADDED
@@ -0,0 +1,26 @@
1
+ # coding: utf-8
2
+ lib = File.expand_path('../lib', __FILE__)
3
+ $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
4
+ require 'validocno/version'
5
+
6
+ Gem::Specification.new do |spec|
7
+ spec.name = 'validocno'
8
+ spec.version = Validocno::VERSION
9
+ spec.authors = ['Artem Pakk']
10
+ spec.email = ['apakk@me.com']
11
+ spec.summary = %q{Estonian ID card validator}
12
+ spec.description = %q{Ruby gem to check validity of Estonian ID card}
13
+ spec.homepage = ""
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_dependency 'httparty', '~> 0.11.0'
22
+ spec.add_dependency 'nokogiri', '~> 1.5.10'
23
+ spec.add_development_dependency 'bundler', '~> 1.7'
24
+ spec.add_development_dependency 'rake', '~> 10.0'
25
+ spec.add_development_dependency 'rspec', '~> 3.1.0'
26
+ end
metadata ADDED
@@ -0,0 +1,109 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: validocno
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.0.1
5
+ platform: ruby
6
+ authors:
7
+ - Artem Pakk
8
+ autorequire:
9
+ bindir: bin
10
+ cert_chain: []
11
+
12
+ date: 2014-12-01 00:00:00 Z
13
+ dependencies:
14
+ - !ruby/object:Gem::Dependency
15
+ requirement: &id001 !ruby/object:Gem::Requirement
16
+ requirements:
17
+ - - ~>
18
+ - !ruby/object:Gem::Version
19
+ version: 0.11.0
20
+ prerelease: false
21
+ version_requirements: *id001
22
+ type: :runtime
23
+ name: httparty
24
+ - !ruby/object:Gem::Dependency
25
+ requirement: &id002 !ruby/object:Gem::Requirement
26
+ requirements:
27
+ - - ~>
28
+ - !ruby/object:Gem::Version
29
+ version: 1.5.10
30
+ prerelease: false
31
+ version_requirements: *id002
32
+ type: :runtime
33
+ name: nokogiri
34
+ - !ruby/object:Gem::Dependency
35
+ requirement: &id003 !ruby/object:Gem::Requirement
36
+ requirements:
37
+ - - ~>
38
+ - !ruby/object:Gem::Version
39
+ version: "1.7"
40
+ prerelease: false
41
+ version_requirements: *id003
42
+ type: :development
43
+ name: bundler
44
+ - !ruby/object:Gem::Dependency
45
+ requirement: &id004 !ruby/object:Gem::Requirement
46
+ requirements:
47
+ - - ~>
48
+ - !ruby/object:Gem::Version
49
+ version: "10.0"
50
+ prerelease: false
51
+ version_requirements: *id004
52
+ type: :development
53
+ name: rake
54
+ - !ruby/object:Gem::Dependency
55
+ requirement: &id005 !ruby/object:Gem::Requirement
56
+ requirements:
57
+ - - ~>
58
+ - !ruby/object:Gem::Version
59
+ version: 3.1.0
60
+ prerelease: false
61
+ version_requirements: *id005
62
+ type: :development
63
+ name: rspec
64
+ description: Ruby gem to check validity of Estonian ID card
65
+ email:
66
+ - apakk@me.com
67
+ executables: []
68
+
69
+ extensions: []
70
+
71
+ extra_rdoc_files: []
72
+
73
+ files:
74
+ - .gitignore
75
+ - Gemfile
76
+ - LICENSE
77
+ - README.md
78
+ - Rakefile
79
+ - lib/validocno.rb
80
+ - lib/validocno/version.rb
81
+ - validocno.gemspec
82
+ homepage: ""
83
+ licenses:
84
+ - MIT
85
+ metadata: {}
86
+
87
+ post_install_message:
88
+ rdoc_options: []
89
+
90
+ require_paths:
91
+ - lib
92
+ required_ruby_version: !ruby/object:Gem::Requirement
93
+ requirements:
94
+ - &id006
95
+ - ">="
96
+ - !ruby/object:Gem::Version
97
+ version: "0"
98
+ required_rubygems_version: !ruby/object:Gem::Requirement
99
+ requirements:
100
+ - *id006
101
+ requirements: []
102
+
103
+ rubyforge_project:
104
+ rubygems_version: 2.0.14
105
+ signing_key:
106
+ specification_version: 4
107
+ summary: Estonian ID card validator
108
+ test_files: []
109
+