ofac 1.2.2 → 1.2.3

Sign up to get free protection for your applications and to get access to all the features.
data/History.txt CHANGED
@@ -1,4 +1,4 @@
1
- == 1.2.2 2011-03-07
1
+ == 1.2.2, 1.2.3 2011-03-07
2
2
 
3
3
  * 1 enhancement:
4
4
  * added yields to the loader class to pass statuses to the calling class.
data/VERSION.yml CHANGED
@@ -1,5 +1,5 @@
1
1
  ---
2
2
  :major: 1
3
3
  :minor: 2
4
- :patch: 2
4
+ :patch: 3
5
5
  :build:
@@ -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
@@ -5,7 +5,7 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = %q{ofac}
8
- s.version = "1.2.2"
8
+ s.version = "1.2.3"
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"]
@@ -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">&quot;Converting file to csv format for Mysql import. This could take several minutes.&quot;</span>
154
154
  <span class="ruby-keyword kw">yield</span> <span class="ruby-value str">&quot;Converting file to csv format for Mysql import. This could take several minutes.&quot;</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 14:20:44 -0500
1
+ Mon, 07 Mar 2011 16:09:40 -0500
@@ -56,7 +56,7 @@
56
56
  </tr>
57
57
  <tr class="top-aligned-row">
58
58
  <td><strong>Last Update:</strong></td>
59
- <td>Mon Mar 07 14:17:12 -0500 2011</td>
59
+ <td>Mon Mar 07 16:08:14 -0500 2011</td>
60
60
  </tr>
61
61
  </table>
62
62
  </div>
data/rdoc/index.html CHANGED
@@ -5,12 +5,12 @@
5
5
 
6
6
  <!--
7
7
 
8
- ofac 1.2.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.2</title>
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%">
metadata CHANGED
@@ -5,8 +5,8 @@ version: !ruby/object:Gem::Version
5
5
  segments:
6
6
  - 1
7
7
  - 2
8
- - 2
9
- version: 1.2.2
8
+ - 3
9
+ version: 1.2.3
10
10
  platform: ruby
11
11
  authors:
12
12
  - Kevin Tyll