ofac 1.1.12 → 1.2.0

Sign up to get free protection for your applications and to get access to all the features.
@@ -1,3 +1,9 @@
1
+ == 1.2.0 2010-12-14
2
+
3
+ * 1 enhancement:
4
+ * The url to download the sdn file changed. Modified the loader so it will not truncate the table
5
+ if it does not get a good file.
6
+
1
7
  == 1.1.12 2010-09-03
2
8
 
3
9
  * 1 minor enhancement:
@@ -1,5 +1,4 @@
1
1
  ---
2
2
  :major: 1
3
- :minor: 1
4
- :patch: 12
5
- :build:
3
+ :minor: 2
4
+ :patch: 0
@@ -11,13 +11,19 @@ class OfacSdnLoader
11
11
  puts "Downloading OFAC data from http://www.treas.gov/offices/enforcement/ofac/sdn"
12
12
  #get the 3 data files
13
13
  sdn = Tempfile.new('sdn')
14
- sdn.write(Net::HTTP.get(URI.parse('http://www.treas.gov/offices/enforcement/ofac/sdn/delimit/sdn.pip')))
14
+ bytes = sdn.write(Net::HTTP.get(URI.parse('http://www.treasury.gov/ofac/downloads/sdn.pip')))
15
15
  sdn.rewind
16
+ if bytes == 0 || convert_line_to_array(sdn.readline).size != 12
17
+ puts "Trouble downloading file. The url may have changed."
18
+ return
19
+ else
20
+ sdn.rewind
21
+ end
16
22
  address = Tempfile.new('sdn')
17
- address.write(Net::HTTP.get(URI.parse('http://www.treas.gov/offices/enforcement/ofac/sdn/delimit/add.pip')))
23
+ address.write(Net::HTTP.get(URI.parse('http://www.treasury.gov/ofac/downloads/add.pip')))
18
24
  address.rewind
19
25
  alt = Tempfile.new('sdn')
20
- alt.write(Net::HTTP.get(URI.parse('http://www.treas.gov/offices/enforcement/ofac/sdn/delimit/alt.pip')))
26
+ alt.write(Net::HTTP.get(URI.parse('http://www.treasury.gov/ofac/downloads/alt.pip')))
21
27
  alt.rewind
22
28
 
23
29
  if OfacSdn.connection.kind_of?(ActiveRecord::ConnectionAdapters::MysqlAdapter)
@@ -1,15 +1,15 @@
1
1
  # Generated by jeweler
2
- # DO NOT EDIT THIS FILE DIRECTLY
3
- # Instead, edit Jeweler::Tasks in Rakefile, and run the gemspec command
2
+ # DO NOT EDIT THIS FILE
3
+ # Instead, edit Jeweler::Tasks in Rakefile, and run `rake gemspec`
4
4
  # -*- encoding: utf-8 -*-
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = %q{ofac}
8
- s.version = "1.1.12"
8
+ s.version = "1.2.0"
9
9
 
10
10
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
11
  s.authors = ["Kevin Tyll"]
12
- s.date = %q{2010-09-03}
12
+ s.date = %q{2010-12-14}
13
13
  s.description = %q{Attempts to find a hit on the Office of Foreign Assets Control's Specially Designated Nationals list.}
14
14
  s.email = %q{kevintyll@gmail.com}
15
15
  s.extra_rdoc_files = [
@@ -82,13 +82,13 @@ Gem::Specification.new do |s|
82
82
  http://www.treas.gov/offices/enforcement/ofac/sdn/index.shtml.}
83
83
  s.rdoc_options = ["--charset=UTF-8"]
84
84
  s.require_paths = ["lib"]
85
- s.rubygems_version = %q{1.3.5}
85
+ s.rubygems_version = %q{1.3.6}
86
86
  s.summary = %q{Attempts to find a hit on the Office of Foreign Assets Control's Specially Designated Nationals list.}
87
87
  s.test_files = [
88
- "test/mocks/test/ofac_sdn_loader.rb",
89
- "test/ofac_sdn_loader_test.rb",
88
+ "test/ofac_sdn_loader_test.rb",
90
89
  "test/ofac_test.rb",
91
- "test/test_helper.rb"
90
+ "test/test_helper.rb",
91
+ "test/mocks/test/ofac_sdn_loader.rb"
92
92
  ]
93
93
 
94
94
  if s.respond_to? :specification_version then
@@ -101,4 +101,3 @@ Gem::Specification.new do |s|
101
101
  else
102
102
  end
103
103
  end
104
-
metadata CHANGED
@@ -1,15 +1,20 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ofac
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.1.12
4
+ prerelease: false
5
+ segments:
6
+ - 1
7
+ - 2
8
+ - 0
9
+ version: 1.2.0
5
10
  platform: ruby
6
11
  authors:
7
- - Kevin Tyll
12
+ - Kevin Tyll
8
13
  autorequire:
9
14
  bindir: bin
10
15
  cert_chain: []
11
16
 
12
- date: 2010-09-03 00:00:00 -04:00
17
+ date: 2010-12-14 00:00:00 -05:00
13
18
  default_executable:
14
19
  dependencies: []
15
20
 
@@ -20,59 +25,59 @@ executables: []
20
25
  extensions: []
21
26
 
22
27
  extra_rdoc_files:
23
- - LICENSE
24
- - README.rdoc
28
+ - LICENSE
29
+ - README.rdoc
25
30
  files:
26
- - .document
27
- - .gitignore
28
- - History.txt
29
- - LICENSE
30
- - PostInstall.txt
31
- - README.rdoc
32
- - Rakefile
33
- - VERSION.yml
34
- - generators/ofac_migration/.DS_Store
35
- - generators/ofac_migration/ofac_migration_generator.rb
36
- - generators/ofac_migration/templates/.DS_Store
37
- - generators/ofac_migration/templates/migration.rb
38
- - lib/ofac.rb
39
- - lib/ofac/models/ofac.rb
40
- - lib/ofac/models/ofac_sdn.rb
41
- - lib/ofac/models/ofac_sdn_loader.rb
42
- - lib/ofac/ofac_match.rb
43
- - lib/ofac/ruby_string_extensions.rb
44
- - lib/tasks/ofac.rake
45
- - nbproject/project.properties
46
- - nbproject/project.xml
47
- - ofac.gemspec
48
- - pkg/ofac-0.1.0.gem
49
- - pkg/ofac-1.0.0.gem
50
- - rdoc/classes/Ofac.html
51
- - rdoc/classes/OfacMatch.html
52
- - rdoc/classes/OfacSdn.html
53
- - rdoc/classes/OfacSdnLoader.html
54
- - rdoc/classes/String.html
55
- - rdoc/created.rid
56
- - rdoc/files/README_rdoc.html
57
- - rdoc/files/lib/ofac/models/ofac_rb.html
58
- - rdoc/files/lib/ofac/models/ofac_sdn_loader_rb.html
59
- - rdoc/files/lib/ofac/models/ofac_sdn_rb.html
60
- - rdoc/files/lib/ofac/ofac_match_rb.html
61
- - rdoc/files/lib/ofac/ruby_string_extensions_rb.html
62
- - rdoc/files/lib/ofac_rb.html
63
- - rdoc/fr_class_index.html
64
- - rdoc/fr_file_index.html
65
- - rdoc/fr_method_index.html
66
- - rdoc/index.html
67
- - rdoc/rdoc-style.css
68
- - test/files/test_address_data_load.pip
69
- - test/files/test_alt_data_load.pip
70
- - test/files/test_sdn_data_load.pip
71
- - test/files/valid_flattened_file.csv
72
- - test/mocks/test/ofac_sdn_loader.rb
73
- - test/ofac_sdn_loader_test.rb
74
- - test/ofac_test.rb
75
- - test/test_helper.rb
31
+ - .document
32
+ - .gitignore
33
+ - History.txt
34
+ - LICENSE
35
+ - PostInstall.txt
36
+ - README.rdoc
37
+ - Rakefile
38
+ - VERSION.yml
39
+ - generators/ofac_migration/.DS_Store
40
+ - generators/ofac_migration/ofac_migration_generator.rb
41
+ - generators/ofac_migration/templates/.DS_Store
42
+ - generators/ofac_migration/templates/migration.rb
43
+ - lib/ofac.rb
44
+ - lib/ofac/models/ofac.rb
45
+ - lib/ofac/models/ofac_sdn.rb
46
+ - lib/ofac/models/ofac_sdn_loader.rb
47
+ - lib/ofac/ofac_match.rb
48
+ - lib/ofac/ruby_string_extensions.rb
49
+ - lib/tasks/ofac.rake
50
+ - nbproject/project.properties
51
+ - nbproject/project.xml
52
+ - ofac.gemspec
53
+ - pkg/ofac-0.1.0.gem
54
+ - pkg/ofac-1.0.0.gem
55
+ - rdoc/classes/Ofac.html
56
+ - rdoc/classes/OfacMatch.html
57
+ - rdoc/classes/OfacSdn.html
58
+ - rdoc/classes/OfacSdnLoader.html
59
+ - rdoc/classes/String.html
60
+ - rdoc/created.rid
61
+ - rdoc/files/README_rdoc.html
62
+ - rdoc/files/lib/ofac/models/ofac_rb.html
63
+ - rdoc/files/lib/ofac/models/ofac_sdn_loader_rb.html
64
+ - rdoc/files/lib/ofac/models/ofac_sdn_rb.html
65
+ - rdoc/files/lib/ofac/ofac_match_rb.html
66
+ - rdoc/files/lib/ofac/ruby_string_extensions_rb.html
67
+ - rdoc/files/lib/ofac_rb.html
68
+ - rdoc/fr_class_index.html
69
+ - rdoc/fr_file_index.html
70
+ - rdoc/fr_method_index.html
71
+ - rdoc/index.html
72
+ - rdoc/rdoc-style.css
73
+ - test/files/test_address_data_load.pip
74
+ - test/files/test_alt_data_load.pip
75
+ - test/files/test_sdn_data_load.pip
76
+ - test/files/valid_flattened_file.csv
77
+ - test/mocks/test/ofac_sdn_loader.rb
78
+ - test/ofac_sdn_loader_test.rb
79
+ - test/ofac_test.rb
80
+ - test/test_helper.rb
76
81
  has_rdoc: true
77
82
  homepage: http://github.com/kevintyll/ofac
78
83
  licenses: []
@@ -90,30 +95,32 @@ post_install_message: |-
90
95
  * The OFAC data is not updated with any regularity, but you can sign up for email notifications when the data changes at
91
96
  http://www.treas.gov/offices/enforcement/ofac/sdn/index.shtml.
92
97
  rdoc_options:
93
- - --charset=UTF-8
98
+ - --charset=UTF-8
94
99
  require_paths:
95
- - lib
100
+ - lib
96
101
  required_ruby_version: !ruby/object:Gem::Requirement
97
102
  requirements:
98
- - - ">="
99
- - !ruby/object:Gem::Version
100
- version: "0"
101
- version:
103
+ - - ">="
104
+ - !ruby/object:Gem::Version
105
+ segments:
106
+ - 0
107
+ version: "0"
102
108
  required_rubygems_version: !ruby/object:Gem::Requirement
103
109
  requirements:
104
- - - ">="
105
- - !ruby/object:Gem::Version
106
- version: "0"
107
- version:
110
+ - - ">="
111
+ - !ruby/object:Gem::Version
112
+ segments:
113
+ - 0
114
+ version: "0"
108
115
  requirements: []
109
116
 
110
117
  rubyforge_project:
111
- rubygems_version: 1.3.5
118
+ rubygems_version: 1.3.6
112
119
  signing_key:
113
120
  specification_version: 3
114
121
  summary: Attempts to find a hit on the Office of Foreign Assets Control's Specially Designated Nationals list.
115
122
  test_files:
116
- - test/mocks/test/ofac_sdn_loader.rb
117
- - test/ofac_sdn_loader_test.rb
118
- - test/ofac_test.rb
119
- - test/test_helper.rb
123
+ - test/ofac_sdn_loader_test.rb
124
+ - test/ofac_test.rb
125
+ - test/test_helper.rb
126
+ - test/mocks/test/ofac_sdn_loader.rb