ofac 1.2.5 → 1.3.0

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.
@@ -0,0 +1,135 @@
1
+ <!DOCTYPE html>
2
+
3
+ <html>
4
+ <head>
5
+ <meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
6
+
7
+ <title>Module: OfacMigration::Generators</title>
8
+
9
+ <link type="text/css" media="screen" href="../rdoc.css" rel="stylesheet">
10
+
11
+ <script type="text/javascript">
12
+ var rdoc_rel_prefix = "../";
13
+ </script>
14
+
15
+ <script type="text/javascript" charset="utf-8" src="../js/jquery.js"></script>
16
+ <script type="text/javascript" charset="utf-8" src="../js/navigation.js"></script>
17
+ <script type="text/javascript" charset="utf-8" src="../js/search_index.js"></script>
18
+ <script type="text/javascript" charset="utf-8" src="../js/search.js"></script>
19
+ <script type="text/javascript" charset="utf-8" src="../js/searcher.js"></script>
20
+ <script type="text/javascript" charset="utf-8" src="../js/darkfish.js"></script>
21
+
22
+
23
+ <body id="top" class="module">
24
+ <nav id="metadata">
25
+ <nav id="home-section" class="section">
26
+ <h3 class="section-header">
27
+ <a href="../index.html">Home</a>
28
+ <a href="../table_of_contents.html#classes">Classes</a>
29
+ <a href="../table_of_contents.html#methods">Methods</a>
30
+ </h3>
31
+ </nav>
32
+
33
+
34
+ <nav id="search-section" class="section project-section" class="initially-hidden">
35
+ <form action="#" method="get" accept-charset="utf-8">
36
+ <h3 class="section-header">
37
+ <input type="text" name="search" placeholder="Search" id="search-field"
38
+ title="Type to search, Up and Down to navigate, Enter to load">
39
+ </h3>
40
+ </form>
41
+
42
+ <ul id="search-results" class="initially-hidden"></ul>
43
+ </nav>
44
+
45
+
46
+ <div id="file-metadata">
47
+ <nav id="file-list-section" class="section">
48
+ <h3 class="section-header">Defined In</h3>
49
+ <ul>
50
+ <li>lib/generators/ofac_migration/build/build_generator.rb
51
+ </ul>
52
+ </nav>
53
+
54
+
55
+ </div>
56
+
57
+ <div id="class-metadata">
58
+
59
+
60
+
61
+
62
+ </div>
63
+
64
+ <div id="project-metadata">
65
+ <nav id="fileindex-section" class="section project-section">
66
+ <h3 class="section-header">Pages</h3>
67
+
68
+ <ul>
69
+
70
+ <li class="file"><a href="../README_rdoc.html">README</a>
71
+
72
+ </ul>
73
+ </nav>
74
+
75
+ <nav id="classindex-section" class="section project-section">
76
+ <h3 class="section-header">Class and Module Index</h3>
77
+
78
+ <ul class="link-list">
79
+
80
+ <li><a href="../OfacMigration.html">OfacMigration</a>
81
+
82
+ <li><a href="../OfacMigration/Generators.html">OfacMigration::Generators</a>
83
+
84
+ <li><a href="../OfacMigration/Generators/BuildGenerator.html">OfacMigration::Generators::BuildGenerator</a>
85
+
86
+ <li><a href="../CreateOfacSdns.html">CreateOfacSdns</a>
87
+
88
+ <li><a href="../Ofac.html">Ofac</a>
89
+
90
+ <li><a href="../OfacMatch.html">OfacMatch</a>
91
+
92
+ <li><a href="../OfacSdn.html">OfacSdn</a>
93
+
94
+ <li><a href="../OfacSdnLoader.html">OfacSdnLoader</a>
95
+
96
+ <li><a href="../String.html">String</a>
97
+
98
+ </ul>
99
+ </nav>
100
+
101
+ </div>
102
+ </nav>
103
+
104
+ <div id="documentation">
105
+ <h1 class="module">module OfacMigration::Generators</h1>
106
+
107
+ <div id="description" class="description">
108
+
109
+ </div><!-- description -->
110
+
111
+
112
+
113
+
114
+ <section id="5Buntitled-5D" class="documentation-section">
115
+
116
+
117
+
118
+
119
+
120
+
121
+
122
+
123
+ <!-- Methods -->
124
+
125
+ </section><!-- 5Buntitled-5D -->
126
+
127
+ </div><!-- documentation -->
128
+
129
+
130
+ <footer id="validator-badges">
131
+ <p><a href="http://validator.w3.org/check/referer">[Validate]</a>
132
+ <p>Generated by <a href="https://github.com/rdoc/rdoc">RDoc</a> 3.11.
133
+ <p>Generated with the <a href="http://deveiate.org/projects/Darkfish-Rdoc/">Darkfish Rdoc Generator</a> 3.
134
+ </footer>
135
+
@@ -0,0 +1,242 @@
1
+ <!DOCTYPE html>
2
+
3
+ <html>
4
+ <head>
5
+ <meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
6
+
7
+ <title>Class: OfacMigration::Generators::BuildGenerator</title>
8
+
9
+ <link type="text/css" media="screen" href="../../rdoc.css" rel="stylesheet">
10
+
11
+ <script type="text/javascript">
12
+ var rdoc_rel_prefix = "../../";
13
+ </script>
14
+
15
+ <script type="text/javascript" charset="utf-8" src="../../js/jquery.js"></script>
16
+ <script type="text/javascript" charset="utf-8" src="../../js/navigation.js"></script>
17
+ <script type="text/javascript" charset="utf-8" src="../../js/search_index.js"></script>
18
+ <script type="text/javascript" charset="utf-8" src="../../js/search.js"></script>
19
+ <script type="text/javascript" charset="utf-8" src="../../js/searcher.js"></script>
20
+ <script type="text/javascript" charset="utf-8" src="../../js/darkfish.js"></script>
21
+
22
+
23
+ <body id="top" class="class">
24
+ <nav id="metadata">
25
+ <nav id="home-section" class="section">
26
+ <h3 class="section-header">
27
+ <a href="../../index.html">Home</a>
28
+ <a href="../../table_of_contents.html#classes">Classes</a>
29
+ <a href="../../table_of_contents.html#methods">Methods</a>
30
+ </h3>
31
+ </nav>
32
+
33
+
34
+ <nav id="search-section" class="section project-section" class="initially-hidden">
35
+ <form action="#" method="get" accept-charset="utf-8">
36
+ <h3 class="section-header">
37
+ <input type="text" name="search" placeholder="Search" id="search-field"
38
+ title="Type to search, Up and Down to navigate, Enter to load">
39
+ </h3>
40
+ </form>
41
+
42
+ <ul id="search-results" class="initially-hidden"></ul>
43
+ </nav>
44
+
45
+
46
+ <div id="file-metadata">
47
+ <nav id="file-list-section" class="section">
48
+ <h3 class="section-header">Defined In</h3>
49
+ <ul>
50
+ <li>lib/generators/ofac_migration/build/build_generator.rb
51
+ </ul>
52
+ </nav>
53
+
54
+
55
+ </div>
56
+
57
+ <div id="class-metadata">
58
+
59
+ <nav id="parent-class-section" class="section">
60
+ <h3 class="section-header">Parent</h3>
61
+
62
+ <p class="link">Rails::Generators::Base
63
+
64
+ </nav>
65
+
66
+ <!-- Included Modules -->
67
+ <nav id="includes-section" class="section">
68
+ <h3 class="section-header">Included Modules</h3>
69
+
70
+ <ul class="link-list">
71
+
72
+
73
+ <li><span class="include">Rails::Generators::Migration</span>
74
+
75
+
76
+ </ul>
77
+ </nav>
78
+
79
+ <!-- Method Quickref -->
80
+ <nav id="method-list-section" class="section">
81
+ <h3 class="section-header">Methods</h3>
82
+
83
+ <ul class="link-list">
84
+
85
+ <li><a href="#method-c-next_migration_number">::next_migration_number</a>
86
+
87
+ <li><a href="#method-i-copy_migrations">#copy_migrations</a>
88
+
89
+ </ul>
90
+ </nav>
91
+
92
+ </div>
93
+
94
+ <div id="project-metadata">
95
+ <nav id="fileindex-section" class="section project-section">
96
+ <h3 class="section-header">Pages</h3>
97
+
98
+ <ul>
99
+
100
+ <li class="file"><a href="../../README_rdoc.html">README</a>
101
+
102
+ </ul>
103
+ </nav>
104
+
105
+ <nav id="classindex-section" class="section project-section">
106
+ <h3 class="section-header">Class and Module Index</h3>
107
+
108
+ <ul class="link-list">
109
+
110
+ <li><a href="../../OfacMigration.html">OfacMigration</a>
111
+
112
+ <li><a href="../../OfacMigration/Generators.html">OfacMigration::Generators</a>
113
+
114
+ <li><a href="../../OfacMigration/Generators/BuildGenerator.html">OfacMigration::Generators::BuildGenerator</a>
115
+
116
+ <li><a href="../../CreateOfacSdns.html">CreateOfacSdns</a>
117
+
118
+ <li><a href="../../Ofac.html">Ofac</a>
119
+
120
+ <li><a href="../../OfacMatch.html">OfacMatch</a>
121
+
122
+ <li><a href="../../OfacSdn.html">OfacSdn</a>
123
+
124
+ <li><a href="../../OfacSdnLoader.html">OfacSdnLoader</a>
125
+
126
+ <li><a href="../../String.html">String</a>
127
+
128
+ </ul>
129
+ </nav>
130
+
131
+ </div>
132
+ </nav>
133
+
134
+ <div id="documentation">
135
+ <h1 class="class">class OfacMigration::Generators::BuildGenerator</h1>
136
+
137
+ <div id="description" class="description">
138
+
139
+ </div><!-- description -->
140
+
141
+
142
+
143
+
144
+ <section id="5Buntitled-5D" class="documentation-section">
145
+
146
+
147
+
148
+
149
+
150
+
151
+
152
+
153
+ <!-- Methods -->
154
+
155
+ <section id="public-class-5Buntitled-5D-method-details" class="method-section section">
156
+ <h3 class="section-header">Public Class Methods</h3>
157
+
158
+
159
+ <div id="method-c-next_migration_number" class="method-detail ">
160
+
161
+ <div class="method-heading">
162
+ <span class="method-name">next_migration_number</span><span
163
+ class="method-args">(path)</span>
164
+ <span class="method-click-advice">click to toggle source</span>
165
+ </div>
166
+
167
+
168
+ <div class="method-description">
169
+
170
+ <p>Get the next migration number</p>
171
+
172
+
173
+
174
+ <div class="method-source-code" id="next_migration_number-source">
175
+ <pre><span class="ruby-comment"># File lib/generators/ofac_migration/build/build_generator.rb, line 12</span>
176
+ <span class="ruby-keyword">def</span> <span class="ruby-keyword">self</span>.<span class="ruby-identifier">next_migration_number</span>(<span class="ruby-identifier">path</span>)
177
+ <span class="ruby-keyword">unless</span> <span class="ruby-ivar">@prev_migration_nr</span>
178
+ <span class="ruby-ivar">@prev_migration_nr</span> = <span class="ruby-constant">Time</span>.<span class="ruby-identifier">now</span>.<span class="ruby-identifier">utc</span>.<span class="ruby-identifier">strftime</span>(<span class="ruby-string">&quot;%Y%m%d%H%M%S&quot;</span>).<span class="ruby-identifier">to_i</span>
179
+ <span class="ruby-keyword">else</span>
180
+ <span class="ruby-ivar">@prev_migration_nr</span> <span class="ruby-operator">+=</span> <span class="ruby-value">1</span>
181
+ <span class="ruby-keyword">end</span>
182
+ <span class="ruby-ivar">@prev_migration_nr</span>.<span class="ruby-identifier">to_s</span>
183
+ <span class="ruby-keyword">end</span></pre>
184
+ </div><!-- next_migration_number-source -->
185
+
186
+ </div>
187
+
188
+
189
+
190
+
191
+ </div><!-- next_migration_number-method -->
192
+
193
+
194
+ </section><!-- public-class-method-details -->
195
+
196
+ <section id="public-instance-5Buntitled-5D-method-details" class="method-section section">
197
+ <h3 class="section-header">Public Instance Methods</h3>
198
+
199
+
200
+ <div id="method-i-copy_migrations" class="method-detail ">
201
+
202
+ <div class="method-heading">
203
+ <span class="method-name">copy_migrations</span><span
204
+ class="method-args">()</span>
205
+ <span class="method-click-advice">click to toggle source</span>
206
+ </div>
207
+
208
+
209
+ <div class="method-description">
210
+
211
+ <p>copy the migration file over</p>
212
+
213
+
214
+
215
+ <div class="method-source-code" id="copy_migrations-source">
216
+ <pre><span class="ruby-comment"># File lib/generators/ofac_migration/build/build_generator.rb, line 23</span>
217
+ <span class="ruby-keyword">def</span> <span class="ruby-identifier">copy_migrations</span>
218
+ <span class="ruby-identifier">migration_template</span> <span class="ruby-string">&quot;create_ofac_sdns.rb&quot;</span>, <span class="ruby-string">&quot;db/migrate/create_ofac_sdns.rb&quot;</span>
219
+ <span class="ruby-keyword">end</span></pre>
220
+ </div><!-- copy_migrations-source -->
221
+
222
+ </div>
223
+
224
+
225
+
226
+
227
+ </div><!-- copy_migrations-method -->
228
+
229
+
230
+ </section><!-- public-instance-method-details -->
231
+
232
+ </section><!-- 5Buntitled-5D -->
233
+
234
+ </div><!-- documentation -->
235
+
236
+
237
+ <footer id="validator-badges">
238
+ <p><a href="http://validator.w3.org/check/referer">[Validate]</a>
239
+ <p>Generated by <a href="https://github.com/rdoc/rdoc">RDoc</a> 3.11.
240
+ <p>Generated with the <a href="http://deveiate.org/projects/Darkfish-Rdoc/">Darkfish Rdoc Generator</a> 3.
241
+ </footer>
242
+
data/rdoc/OfacSdn.html CHANGED
@@ -83,6 +83,14 @@
83
83
 
84
84
  <ul class="link-list">
85
85
 
86
+ <li><a href="./OfacMigration.html">OfacMigration</a>
87
+
88
+ <li><a href="./OfacMigration/Generators.html">OfacMigration::Generators</a>
89
+
90
+ <li><a href="./OfacMigration/Generators/BuildGenerator.html">OfacMigration::Generators::BuildGenerator</a>
91
+
92
+ <li><a href="./CreateOfacSdns.html">CreateOfacSdns</a>
93
+
86
94
  <li><a href="./Ofac.html">Ofac</a>
87
95
 
88
96
  <li><a href="./OfacMatch.html">OfacMatch</a>
@@ -93,6 +93,14 @@
93
93
 
94
94
  <ul class="link-list">
95
95
 
96
+ <li><a href="./OfacMigration.html">OfacMigration</a>
97
+
98
+ <li><a href="./OfacMigration/Generators.html">OfacMigration::Generators</a>
99
+
100
+ <li><a href="./OfacMigration/Generators/BuildGenerator.html">OfacMigration::Generators::BuildGenerator</a>
101
+
102
+ <li><a href="./CreateOfacSdns.html">CreateOfacSdns</a>
103
+
96
104
  <li><a href="./Ofac.html">Ofac</a>
97
105
 
98
106
  <li><a href="./OfacMatch.html">OfacMatch</a>
@@ -59,6 +59,14 @@
59
59
 
60
60
  <ul class="link-list">
61
61
 
62
+ <li><a href="./OfacMigration.html">OfacMigration</a>
63
+
64
+ <li><a href="./OfacMigration/Generators.html">OfacMigration::Generators</a>
65
+
66
+ <li><a href="./OfacMigration/Generators/BuildGenerator.html">OfacMigration::Generators::BuildGenerator</a>
67
+
68
+ <li><a href="./CreateOfacSdns.html">CreateOfacSdns</a>
69
+
62
70
  <li><a href="./Ofac.html">Ofac</a>
63
71
 
64
72
  <li><a href="./OfacMatch.html">OfacMatch</a>
@@ -228,6 +236,8 @@ record.</p>
228
236
  </li></ul>
229
237
 
230
238
  <h2 id="label-INSTALL%3A">INSTALL:</h2>
239
+
240
+ <h4 id="label-Rails+2.0">Rails 2.0</h4>
231
241
  <ul><li>
232
242
  <p>To install the gem:</p>
233
243
 
@@ -251,6 +261,31 @@ block:</p>
251
261
  http://www.treas.gov/offices/enforcement/ofac/sdn/index.shtml.</pre>
252
262
  </li></ul>
253
263
 
264
+ <h4 id="label-Rails+3.0">Rails 3.0</h4>
265
+ <ul><li>
266
+ <p>To create the necessary db migration, from the command line, run:</p>
267
+
268
+ <pre>rails generate ofac_migration:build</pre>
269
+ </li><li>
270
+ <p>To add the gem to your Rails project:</p>
271
+ </li></ul>
272
+
273
+ <h5 id="label-Add+the+gem+to+your+Gemfile%3A">Add the gem to your Gemfile:</h5>
274
+
275
+ <pre>gem &quot;ofac&quot;, &quot;~&gt; 1.3.0&quot;</pre>
276
+
277
+ <h5 id="label-Run+the+Bundler+install+command">Run the Bundler install command</h5>
278
+
279
+ <pre>bundle install</pre>
280
+ <ul><li>
281
+ <p>To load your table with the current OFAC data, from the command line, run:</p>
282
+
283
+ <pre>rake ofac:update_data
284
+
285
+ * The OFAC data is not updated with any regularity, but you can sign up for email notifications when the data changes at
286
+ http://www.treas.gov/offices/enforcement/ofac/sdn/index.shtml.</pre>
287
+ </li></ul>
288
+
254
289
  <h2 id="label-Copyright">Copyright</h2>
255
290
 
256
291
  <p>Copyright © 2009 Kevin Tyll. See LICENSE for details.</p>