uscis_status 0.2.4 → 0.2.5
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +8 -8
- data/README.md +8 -3
- data/lib/uscis_status/version.rb +1 -1
- data/lib/uscis_status.rb +6 -6
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,15 +1,15 @@
|
|
1
1
|
---
|
2
2
|
!binary "U0hBMQ==":
|
3
3
|
metadata.gz: !binary |-
|
4
|
-
|
4
|
+
NzU0YjVlM2MyYmIzNmI0ZTg0OWM4YWNiYzg2NjVjNjBmMWQ3MmVlYw==
|
5
5
|
data.tar.gz: !binary |-
|
6
|
-
|
6
|
+
Mzc2ZDlhMzEyZGEwZWM0M2RlMDhjNzc2MjdhNWY0ZmU5ZjFhZTE2ZA==
|
7
7
|
!binary "U0hBNTEy":
|
8
8
|
metadata.gz: !binary |-
|
9
|
-
|
10
|
-
|
11
|
-
|
9
|
+
ZThlYzQxNzFlMTZlYmNlYjkwMTdhYjQxOGE4NjUyN2I3YTZhMmQxOTExOGE4
|
10
|
+
NmUzYjkxZmU3NDgwNTQyMTU0Njg5MjZhYTIzOTMzMjFmZTg0ZTY1YTdlMWE1
|
11
|
+
NGQ2MGY0MzA5MzM4OTIzZGZkYTZmZTJkZWM0NWJhYWQ4ZjA2OTk=
|
12
12
|
data.tar.gz: !binary |-
|
13
|
-
|
14
|
-
|
15
|
-
|
13
|
+
ZTY5NTcxNjU4YjE0YzAwMjViZWQxMTE4Nzk0NzA3YmU2MTZkOTI3MmM2ZDlj
|
14
|
+
ZTY3OTJmN2Y3ZDI4ODhhMmI1NzFkNTI1OTM5MWYzODc2NjlhMjVjNTExNTNi
|
15
|
+
OTkzYjFlZWZlYzQ4ZjA3MDMyYzU1Y2JmNzRmM2I5ZDI1NGEwMDA=
|
data/README.md
CHANGED
@@ -1,12 +1,17 @@
|
|
1
|
-
# USCIS Status Checker
|
1
|
+
# USCIS Status Checker Gem
|
2
2
|
|
3
|
-
|
3
|
+
This gem makes it easy to check multiple application statuses from USCIS website, without visiting the USCIS website.
|
4
4
|
|
5
5
|
## Important
|
6
6
|
|
7
7
|
This is not the official way to check the status of a USCIS application and it's not endorsed by USCIS either.
|
8
8
|
It's just a scraper of the USCIS website and it may break at any time if the website is updated. If it should happen, feel free to report me or to [fix](#contributing) the problem.
|
9
9
|
|
10
|
+
## Live Example
|
11
|
+
|
12
|
+
Take a look at the 'Multiple USCIS Status Checker' website that uses this gem:
|
13
|
+
|
14
|
+
[http://uscisstatus.herokuapp.com](http://uscisstatus.herokuapp.com)
|
10
15
|
|
11
16
|
## Installation
|
12
17
|
|
@@ -16,7 +21,7 @@ Add this line to your application's Gemfile:
|
|
16
21
|
|
17
22
|
And then execute:
|
18
23
|
|
19
|
-
$ bundle
|
24
|
+
$ bundle install
|
20
25
|
|
21
26
|
Or install it yourself as:
|
22
27
|
|
data/lib/uscis_status/version.rb
CHANGED
data/lib/uscis_status.rb
CHANGED
@@ -20,26 +20,26 @@ module USCISStatus
|
|
20
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
|
-
error = page.search('div
|
23
|
+
error = page.search('.//div[@class="errorContainer"]/ul')
|
24
24
|
if !error.empty?
|
25
25
|
statuses << {number: number, type: 'NONE', status: error.text.strip, description: '', general_description: ''}
|
26
26
|
next
|
27
27
|
end
|
28
28
|
|
29
29
|
# Get the application type and description (eg. Form I130...)
|
30
|
-
application_type = capitalize_words(page.search('div
|
30
|
+
application_type = capitalize_words(page.search('.//div[@id="caseStatus"]/h3').text.gsub(CURRENT_CASE, ""))
|
31
31
|
|
32
32
|
# Get current application block
|
33
|
-
current_application = page.search('div
|
33
|
+
current_application = page.search('.//div[@class="caseStatusInfo"]')
|
34
34
|
|
35
35
|
# Get the Status
|
36
|
-
status = current_application.search('h4').text.strip
|
36
|
+
status = current_application.search('.//h4').text.strip
|
37
37
|
|
38
38
|
# Get the Description
|
39
|
-
description = current_application.search('
|
39
|
+
description = current_application.search('.//p[@class="caseStatus"]').text.strip
|
40
40
|
|
41
41
|
# Get the General Description for the Application
|
42
|
-
general_description = current_application.search('
|
42
|
+
general_description = current_application.search('.//div[@id="bucketDesc"]').text.strip
|
43
43
|
|
44
44
|
statuses << {number: number, type: application_type, status: status, description: description, general_description: general_description}
|
45
45
|
|
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.5
|
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-
|
11
|
+
date: 2013-06-05 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|