uscis_status 0.2.3 → 0.2.4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +8 -8
- data/lib/uscis_status/version.rb +1 -1
- data/lib/uscis_status.rb +4 -4
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,15 +1,15 @@
|
|
1
1
|
---
|
2
2
|
!binary "U0hBMQ==":
|
3
3
|
metadata.gz: !binary |-
|
4
|
-
|
4
|
+
Yjk3MTY1YTcyNTQ0ZmNjZTVkMjYwOWQ3MjVjYjMxZTEzNTliMjE5NQ==
|
5
5
|
data.tar.gz: !binary |-
|
6
|
-
|
6
|
+
M2FiZjZiOWE0OWVlYWRmNDM4YWJlMWY3YmIxNzY5MDBhOTY5OTc0ZA==
|
7
7
|
!binary "U0hBNTEy":
|
8
8
|
metadata.gz: !binary |-
|
9
|
-
|
10
|
-
|
11
|
-
|
9
|
+
ZWZhY2RkOWIyMDI4ZTkyMjZmMTBlODdiNGQ3NjE4MzI2N2U0ZTg4ZGZlNGEx
|
10
|
+
NTQ0NTg1ZDczMjA1NWM5YWYzMmE3OTg1MDQ4NTllZWIxMjZmM2RmODZiMjUy
|
11
|
+
M2I5NmU1MTcyNzJhNmU1M2QwZTM5YzVmOTQ4NjY4MTBkOGRmN2E=
|
12
12
|
data.tar.gz: !binary |-
|
13
|
-
|
14
|
-
|
15
|
-
|
13
|
+
MGIzM2IyZjIwMTY5NDQ0MTc3Y2Q5NWNmOGM3OWQ2NTliMjM2ZGM5ZGZkNDU4
|
14
|
+
ZDZlMDc2ZDZjYThkZDIzOWU0MWVlODRiMzZjYzc5MDQ5N2Y4NjgyNTZhZWFi
|
15
|
+
MjZjMjc1YjE4ZTcyYmI5MTg4YzJmMjcwZjRkZGJlNjc5MGNjN2I=
|
data/lib/uscis_status/version.rb
CHANGED
data/lib/uscis_status.rb
CHANGED
@@ -1,4 +1,4 @@
|
|
1
|
-
require
|
1
|
+
require 'uscis_status/version'
|
2
2
|
require 'mechanize'
|
3
3
|
require 'nokogiri'
|
4
4
|
|
@@ -11,18 +11,18 @@ module USCISStatus
|
|
11
11
|
# Check if the parameter is an Array, otherwise create one
|
12
12
|
applications = application_numbers.kind_of?(Array) ? application_numbers : application_numbers.split
|
13
13
|
|
14
|
-
a = Mechanize.new
|
15
14
|
statuses = []
|
16
15
|
|
17
16
|
applications.each do |number|
|
18
17
|
next if number.nil? or number.empty?
|
19
18
|
|
20
|
-
|
19
|
+
mechanize = Mechanize.new{|a| a.ssl_version, a.verify_mode = 'SSLv3', OpenSSL::SSL::VERIFY_NONE}
|
20
|
+
page = mechanize.post("https://egov.uscis.gov/cris/Dashboard/CaseStatus.do", { "appReceiptNum" => number })
|
21
21
|
|
22
22
|
# Look for possible errors with this application number
|
23
23
|
error = page.search('div.errorContainer > ul')
|
24
24
|
if !error.empty?
|
25
|
-
statuses << {number: number, type: '', status: error.text.strip, description: '', general_description: ''}
|
25
|
+
statuses << {number: number, type: 'NONE', status: error.text.strip, description: '', general_description: ''}
|
26
26
|
next
|
27
27
|
end
|
28
28
|
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: uscis_status
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.2.
|
4
|
+
version: 0.2.4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Guillermo Guerini
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2013-04-
|
11
|
+
date: 2013-04-26 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|