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 CHANGED
@@ -1,15 +1,15 @@
1
1
  ---
2
2
  !binary "U0hBMQ==":
3
3
  metadata.gz: !binary |-
4
- Y2Q2ZmU1OGU5NWI5NDNkOTM1NjliYjdlNTFiNmU0OTIyY2JhMmE2Ng==
4
+ Yjk3MTY1YTcyNTQ0ZmNjZTVkMjYwOWQ3MjVjYjMxZTEzNTliMjE5NQ==
5
5
  data.tar.gz: !binary |-
6
- YjQwNjhlZTJkYzRmYzYwZTA4YWZiM2E3NTZjYTljZTI0MTJhZDU3NA==
6
+ M2FiZjZiOWE0OWVlYWRmNDM4YWJlMWY3YmIxNzY5MDBhOTY5OTc0ZA==
7
7
  !binary "U0hBNTEy":
8
8
  metadata.gz: !binary |-
9
- OWZkNzJhZjYzNjRmZmM4ZDg5YWE5NDQxYWJlZDQyZTNiOWQ4NDZjYzM2NDgx
10
- Mzc1ZTJjZmIzMzBhYzc4ZmNiYzAwYTZiOGUyNzgzOWY3ODEyYTBmYTY4MTcx
11
- YTMxMTU2MWJiYmU0MDdlODJjZGY4YTQzMzkzNjViMmNkOGM3YzA=
9
+ ZWZhY2RkOWIyMDI4ZTkyMjZmMTBlODdiNGQ3NjE4MzI2N2U0ZTg4ZGZlNGEx
10
+ NTQ0NTg1ZDczMjA1NWM5YWYzMmE3OTg1MDQ4NTllZWIxMjZmM2RmODZiMjUy
11
+ M2I5NmU1MTcyNzJhNmU1M2QwZTM5YzVmOTQ4NjY4MTBkOGRmN2E=
12
12
  data.tar.gz: !binary |-
13
- ZDk0OWUxZWU2ZTBiMGFjNmExNTFhMTgzZjk1ZTk3NTRjOTQ5NWNkMWRmOTZi
14
- ZjM1MmEyNDI1MjcyNjg3NWI2Zjk2ZDMxNDA2N2Y5YWYzZTRjOGEzNmE5MjJh
15
- MmUxZTAxYWFlNWJmMDU4OTA4YjhkYzI5NmE2Y2I5OGQwMzk3Yjc=
13
+ MGIzM2IyZjIwMTY5NDQ0MTc3Y2Q5NWNmOGM3OWQ2NTliMjM2ZGM5ZGZkNDU4
14
+ ZDZlMDc2ZDZjYThkZDIzOWU0MWVlODRiMzZjYzc5MDQ5N2Y4NjgyNTZhZWFi
15
+ MjZjMjc1YjE4ZTcyYmI5MTg4YzJmMjcwZjRkZGJlNjc5MGNjN2I=
@@ -1,3 +1,3 @@
1
1
  module USCISStatus
2
- VERSION = "0.2.3"
2
+ VERSION = "0.2.4"
3
3
  end
data/lib/uscis_status.rb CHANGED
@@ -1,4 +1,4 @@
1
- require "uscis_status/version"
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
- page = a.post("https://egov.uscis.gov/cris/Dashboard/CaseStatus.do", { "appReceiptNum" => number })
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.3
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-18 00:00:00.000000000 Z
11
+ date: 2013-04-26 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler