Skip to content

Commit

Permalink
added test task for validate estonian residences
Browse files Browse the repository at this point in the history
  • Loading branch information
olegphenomenon committed Oct 27, 2021
1 parent 37f8d5b commit 6a4c54d
Show file tree
Hide file tree
Showing 3 changed files with 39 additions and 1 deletion.
1 change: 1 addition & 0 deletions Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,7 @@ gem 'airbrake'
gem 'daemons-rails', '1.2.1'
gem 'epp', github: 'internetee/epp', branch: :master
gem 'epp-xml', '1.2.0', github: 'internetee/epp-xml', branch: :master
gem 'esteid_ldap', github: 'internetee/esteid_ldap', branch: :master
gem 'jquery-ui-rails', '6.0.1'
gem 'pdfkit'
gem 'que'
Expand Down
15 changes: 14 additions & 1 deletion Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,17 @@ GIT
hpricot
libxml-ruby

GIT
remote: https://github.com/internetee/esteid_ldap.git
revision: 03fdf71933ec1c134b2c80631e10f70edf3b6611
branch: master
specs:
esteid_ldap (2.0.0)
activesupport (~> 6.1)
bundler (~> 2.0)
net-ldap (~> 0.17.0)
rake (~> 13.0)

GIT
remote: https://github.com/internetee/lhv.git
revision: 1fb07818369425510a0172ad53bc86e85b6f83cc
Expand Down Expand Up @@ -308,6 +319,7 @@ GEM
multi_json (1.15.0)
mustermann (1.1.1)
ruby2_keywords (~> 0.0.1)
net-ldap (0.17.0)
netrc (0.11.0)
nio4r (2.5.8)
nokogiri (1.12.5)
Expand Down Expand Up @@ -536,6 +548,7 @@ DEPENDENCIES
e_invoice!
epp!
epp-xml (= 1.2.0)!
esteid_ldap!
figaro (~> 1.2)
haml (~> 5.2)
isikukood
Expand Down Expand Up @@ -579,4 +592,4 @@ DEPENDENCIES
wkhtmltopdf-binary (~> 0.12.5.1)

BUNDLED WITH
2.2.27
2.2.29
24 changes: 24 additions & 0 deletions lib/tasks/validate_est_citizen.rake
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
require 'syslog/logger'

namespace :validate_est_citizen do
# bundle exec rake validate_est_citizen:check_it['38903110313']
#
desc 'Starts validating estonian citizen by isikukood'
task :check_it, [:isikukood] => :environment do |t, args|
WITH_DATA=false
IN_JSON=false

isikukood = args.isikukood

esteid = EsteidLdap::Search.new
result = esteid.search_by_ident(code: isikukood, with_data: WITH_DATA, in_json: IN_JSON)
p "========Result||||||||"
p result
end


def logger
@logger ||= ActiveSupport::TaggedLogging.new(Syslog::Logger.new('registry'))
end
end

0 comments on commit 6a4c54d

Please sign in to comment.