ofac 1.2.2 → 1.2.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/History.txt +1 -1
- data/VERSION.yml +1 -1
- data/lib/ofac/models/ofac_sdn_loader.rb +9 -3
- data/ofac.gemspec +1 -1
- data/rdoc/classes/OfacSdnLoader.html +9 -3
- data/rdoc/created.rid +1 -1
- data/rdoc/files/lib/ofac/models/ofac_sdn_loader_rb.html +1 -1
- data/rdoc/index.html +2 -2
- metadata +2 -2
data/History.txt
CHANGED
data/VERSION.yml
CHANGED
@@ -32,11 +32,17 @@ class OfacSdnLoader
|
|
32
32
|
puts "Converting file to csv format for Mysql import. This could take several minutes."
|
33
33
|
yield "Converting file to csv format for Mysql import. This could take several minutes." if block_given?
|
34
34
|
|
35
|
-
csv_file = convert_to_flattened_csv(sdn, address, alt)
|
35
|
+
csv_file = convert_to_flattened_csv(sdn, address, alt) do |status|
|
36
|
+
yield status if block_given?
|
37
|
+
end
|
36
38
|
|
37
|
-
bulk_mysql_update(csv_file)
|
39
|
+
bulk_mysql_update(csv_file)do |status|
|
40
|
+
yield status if block_given?
|
41
|
+
end
|
38
42
|
else
|
39
|
-
active_record_file_load(sdn, address, alt)
|
43
|
+
active_record_file_load(sdn, address, alt)do |status|
|
44
|
+
yield status if block_given?
|
45
|
+
end
|
40
46
|
end
|
41
47
|
|
42
48
|
sdn.close
|
data/ofac.gemspec
CHANGED
@@ -153,11 +153,17 @@ href="http://www.treas.gov/offices/enforcement/ofac/sdn/delimit/index.shtml">www
|
|
153
153
|
<span class="ruby-identifier">puts</span> <span class="ruby-value str">"Converting file to csv format for Mysql import. This could take several minutes."</span>
|
154
154
|
<span class="ruby-keyword kw">yield</span> <span class="ruby-value str">"Converting file to csv format for Mysql import. This could take several minutes."</span> <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">block_given?</span>
|
155
155
|
|
156
|
-
<span class="ruby-identifier">csv_file</span> = <span class="ruby-identifier">convert_to_flattened_csv</span>(<span class="ruby-identifier">sdn</span>, <span class="ruby-identifier">address</span>, <span class="ruby-identifier">alt</span>)
|
156
|
+
<span class="ruby-identifier">csv_file</span> = <span class="ruby-identifier">convert_to_flattened_csv</span>(<span class="ruby-identifier">sdn</span>, <span class="ruby-identifier">address</span>, <span class="ruby-identifier">alt</span>) <span class="ruby-keyword kw">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">status</span><span class="ruby-operator">|</span>
|
157
|
+
<span class="ruby-keyword kw">yield</span> <span class="ruby-identifier">status</span> <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">block_given?</span>
|
158
|
+
<span class="ruby-keyword kw">end</span>
|
157
159
|
|
158
|
-
<span class="ruby-identifier">bulk_mysql_update</span>(<span class="ruby-identifier">csv_file</span>)
|
160
|
+
<span class="ruby-identifier">bulk_mysql_update</span>(<span class="ruby-identifier">csv_file</span>)<span class="ruby-keyword kw">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">status</span><span class="ruby-operator">|</span>
|
161
|
+
<span class="ruby-keyword kw">yield</span> <span class="ruby-identifier">status</span> <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">block_given?</span>
|
162
|
+
<span class="ruby-keyword kw">end</span>
|
159
163
|
<span class="ruby-keyword kw">else</span>
|
160
|
-
<span class="ruby-identifier">active_record_file_load</span>(<span class="ruby-identifier">sdn</span>, <span class="ruby-identifier">address</span>, <span class="ruby-identifier">alt</span>)
|
164
|
+
<span class="ruby-identifier">active_record_file_load</span>(<span class="ruby-identifier">sdn</span>, <span class="ruby-identifier">address</span>, <span class="ruby-identifier">alt</span>)<span class="ruby-keyword kw">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">status</span><span class="ruby-operator">|</span>
|
165
|
+
<span class="ruby-keyword kw">yield</span> <span class="ruby-identifier">status</span> <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">block_given?</span>
|
166
|
+
<span class="ruby-keyword kw">end</span>
|
161
167
|
<span class="ruby-keyword kw">end</span>
|
162
168
|
|
163
169
|
<span class="ruby-identifier">sdn</span>.<span class="ruby-identifier">close</span>
|
data/rdoc/created.rid
CHANGED
@@ -1 +1 @@
|
|
1
|
-
Mon, 07 Mar 2011
|
1
|
+
Mon, 07 Mar 2011 16:09:40 -0500
|
data/rdoc/index.html
CHANGED
@@ -5,12 +5,12 @@
|
|
5
5
|
|
6
6
|
<!--
|
7
7
|
|
8
|
-
ofac 1.2.
|
8
|
+
ofac 1.2.3
|
9
9
|
|
10
10
|
-->
|
11
11
|
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
|
12
12
|
<head>
|
13
|
-
<title>ofac 1.2.
|
13
|
+
<title>ofac 1.2.3</title>
|
14
14
|
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
|
15
15
|
</head>
|
16
16
|
<frameset rows="20%, 80%">
|