orasaurus 0.0.1

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.
Files changed (41) hide show
  1. data/.gitignore +4 -0
  2. data/Gemfile +4 -0
  3. data/README.textile +7 -0
  4. data/Rakefile +1 -0
  5. data/bin/orasaurus +4 -0
  6. data/lib/orasaurus/sql_script_builder.rb +162 -0
  7. data/lib/orasaurus/version.rb +3 -0
  8. data/lib/orasaurus.rb +12 -0
  9. data/notes/build_table_build_script.rb +207 -0
  10. data/notes/db_migrator.rb +115 -0
  11. data/notes/file_dependencies.rb +65 -0
  12. data/notes/main_db.rb +130 -0
  13. data/notes/rakefile.rb +375 -0
  14. data/notes/stractor.rb +41 -0
  15. data/notes/try_to_compile.rb +28 -0
  16. data/orasaurus.gemspec +26 -0
  17. data/spec/orasaurus_spec.rb +12 -0
  18. data/spec/spec_helper.rb +8 -0
  19. data/test/db/Notes/Packages/build.sql +35 -0
  20. data/test/db/Notes/Packages/pkg_note_comments.pkg +164 -0
  21. data/test/db/Notes/Packages/pkg_note_tags.pkg +146 -0
  22. data/test/db/Notes/Packages/pkg_notebooks.pkg +135 -0
  23. data/test/db/Notes/Packages/pkg_notes.pkg +418 -0
  24. data/test/db/Notes/Packages/teardown.sql +36 -0
  25. data/test/db/Notes/Sequences/build.sql +35 -0
  26. data/test/db/Notes/Sequences/note_comments_seq.sql +1 -0
  27. data/test/db/Notes/Sequences/note_tags_seq.sql +1 -0
  28. data/test/db/Notes/Sequences/notebooks_seq.sql +1 -0
  29. data/test/db/Notes/Sequences/notes_seq.sql +1 -0
  30. data/test/db/Notes/Sequences/teardown.sql +36 -0
  31. data/test/db/Notes/Tables/build.sql +35 -0
  32. data/test/db/Notes/Tables/note_comments.sql +27 -0
  33. data/test/db/Notes/Tables/note_tags.sql +25 -0
  34. data/test/db/Notes/Tables/notebooks.sql +26 -0
  35. data/test/db/Notes/Tables/notes.sql +30 -0
  36. data/test/db/Notes/Tables/teardown.sql +36 -0
  37. data/test/db/Rakefile +75 -0
  38. data/test/db/build.sql +26 -0
  39. data/test/db/create_test_user.sql +3 -0
  40. data/test/db/teardown.sql +36 -0
  41. metadata +119 -0
data/notes/main_db.rb ADDED
@@ -0,0 +1,130 @@
1
+ #ruby classes
2
+ require "oci8"
3
+ require "erb"
4
+ require "find"
5
+ require "logger"
6
+
7
+ #local classes
8
+ require "lib/DB_Table.rb"
9
+ require "lib/PLSQLGen.rb"
10
+
11
+ my_plsql_gen = PLSQLGen.new()
12
+ params = my_plsql_gen.load_properties( "conf/PLSQLGen.conf" )
13
+
14
+ $system_column_names = ["CREATE_DATE", "CREATE_USER", "CREATE_PGM", "UPDATE_DATE", "UPDATE_USER", "UPDATE_PGM"]
15
+ $system_column_defaults = Hash.new
16
+ $system_column_defaults[ "CREATE_DATE" ] = "SYSDATE"
17
+ $system_column_defaults[ "CREATE_USER" ] = "USER"
18
+ $system_column_defaults[ "CREATE_PGM" ] = "g_pkgName"
19
+ $system_column_defaults[ "UPDATE_DATE" ] = "SYSDATE"
20
+ $system_column_defaults[ "UPDATE_USER" ] = "USER"
21
+ $system_column_defaults[ "UPDATE_PGM" ] = "g_pkgName"
22
+
23
+ #oracle stuff
24
+ conn = OCI8.new( params['db_user'], params['db_password'], params['db_name'])
25
+ tableList = Array.new
26
+ params['tables'].split( ',' ).each{ |s| tableList.push( conn.describe_table( s.strip ) ) }
27
+
28
+
29
+ pkg_names = Array.new()
30
+ app_abbr = params[ 'app_abbr' ]
31
+ app_name = params[ 'app_name' ]
32
+
33
+ logger = Logger.new( params[ 'log_path' ] + ".log", 'weekly')
34
+ logger.info('main') { "begin" }
35
+ puts "begin"
36
+
37
+ tableList.each { |tbl|
38
+
39
+ logger.info('main') { "working with " + tbl.obj_name }
40
+
41
+ $table = tbl
42
+ $updatable_cols = Array.new
43
+ tbl.columns.each{ |c| $updatable_cols.push( c ) unless $system_column_names.include?( c.name.upcase ) }
44
+ #collect package name
45
+ pkg_names.push( "pkg_" + $table.obj_name.downcase + params["pkg_name_suffix"] )
46
+ #process spec
47
+ begin
48
+ my_plsql_gen.erb_to_file( my_plsql_gen.file_to_string( File.open( params[ 'spec_template' ], "r" )) \
49
+ ,params[ 'destination_path' ] + pkg_names.last + ".pkg")
50
+ logger.info('main') { "creating spec " + pkg_names.last+".pkg" }
51
+ puts "package created " + pkg_names.last+".pkg"
52
+ rescue
53
+ logger.error( 'main' ){"error processing spec for " + pkg_names.last }
54
+ puts "There was a problem processing the spec for " + pkg_names.last
55
+ puts $!
56
+ end
57
+
58
+ =begin
59
+ #process body
60
+ begin
61
+ my_plsql_gen.erb_to_file(my_plsql_gen.file_to_string(File.open(params['body_template'],"r")) \
62
+ ,params[ 'destination_path' ] + pkg_names.last+".pkb")
63
+ logger.info('main') { "creating body " + pkg_names.last+".pkb" }
64
+ puts "creating body " + pkg_names.last+".pkb"
65
+ rescue
66
+ logger.error( 'main' ){"error processing body for " + pkg_names.last }
67
+ puts "There was a problem processing the body for " + pkg_names.last
68
+ puts $!
69
+ end
70
+ logger.info('main') { "package creation complete" }
71
+ =end
72
+ }
73
+
74
+ =begin
75
+
76
+ #make home page
77
+ if params.has_key?('include_home') \
78
+ and params['include_home'] = 'YES' then
79
+ #collect package name
80
+ pkg_name.push("pkg_" + app_abbr.downcase + "_home")
81
+
82
+ #making spec
83
+ begin
84
+ my_plsql_gen.erb_to_file( my_plsql_gen.file_to_string( File.open( params[ 'home_spec_template' ], "r" ) ) \
85
+ , params[ 'destination_path' ] + pkg_name.last+".pks" )
86
+ logger.info('main') { "creating spec " + pkg_name.last+".pks" }
87
+ puts "creating spec " + pkg_name.last+".pks"
88
+ rescue
89
+ logger.error( 'main' ){"error processing body for " + pkg_name.last }
90
+ puts "There was a problem processing the body for " + pkg_name.last
91
+ puts $!
92
+ end
93
+
94
+ #making body
95
+ begin
96
+ my_plsql_gen.erb_to_file( my_plsql_gen.file_to_string( File.open( params[ 'home_body_template' ], "r" ) ) \
97
+ , params[ 'destination_path' ] + pkg_name.last+".pkb")
98
+ logger.info('main') { "creating body " + pkg_name.last }
99
+ puts "creating body " + pkg_name.last
100
+ rescue
101
+ logger.error( 'main' ){"error processing body for " + pkg_name.last }
102
+ puts "There was a problem processing the body for " + pkg_name.last
103
+ puts $!
104
+ end
105
+
106
+ end
107
+ logger.info('main') { "home page create" }
108
+
109
+ #make db script
110
+ if params.has_key?('include_db_script') \
111
+ and params['include_db_script'] = 'YES' then
112
+ role_name = params['role_name']
113
+ begin
114
+ #making grant script
115
+ my_plsql_gen.erb_to_file( my_plsql_gen.file_to_string( File.open( params[ 'db_script_template' ], "r" ) ) \
116
+ , params[ 'destination_path' ] + app_abbr.downcase + "_db_script.sql" )
117
+ logger.info('main') { "db script created" }
118
+ puts "db script created "
119
+ rescue
120
+ logger.error( 'main' ){"error creating db script" + pkg_name.last }
121
+ puts "There was a problem processing the db script"
122
+ puts $!
123
+ end
124
+ end
125
+ =end
126
+ logger.info('main') { "end" }
127
+ logger.close
128
+ conn.logoff
129
+
130
+ puts "finished"
data/notes/rakefile.rb ADDED
@@ -0,0 +1,375 @@
1
+ #this is a build or make file written in ruby
2
+
3
+ require "oci8"
4
+ require "fileutils"
5
+ require "highline/import"
6
+
7
+ $db_name = ""
8
+ $db_user = ""
9
+ $db_user_password = ""
10
+
11
+ def print_response
12
+ if $? == 0 then
13
+ puts "completed successfully"
14
+ else
15
+ puts( "command failure" )
16
+ end
17
+ end
18
+
19
+ def process_db_connect_params
20
+
21
+ if ENV['db_user'].nil? then
22
+ $db_user = ask("Database User: ") { |q| q.echo = true }
23
+ else
24
+ $db_user = ENV['db_user']
25
+ end
26
+
27
+ if ENV['db_user_password'].nil? then
28
+ $db_user_password = ask("Database User Password: ") { |q| q.echo = "*" }
29
+ else
30
+ $db_user_password = ENV['db_user_password']
31
+ end
32
+
33
+ if ENV['db_name'].nil? then
34
+ $db_name = ask("Database Instance: ") { |q| q.echo = true }
35
+ else
36
+ $db_name = ENV['db_name']
37
+ end
38
+
39
+ if not $db_user.nil? and not $db_user_password.nil? and not $db_name.nil? then
40
+ return true
41
+ else
42
+ puts "INVALID DATABASE CONNECTION PARAMETERS"
43
+ end
44
+
45
+ end
46
+
47
+ def sqlplus_connect_string
48
+ return $db_user + "/" + $db_user_password + "@" + $db_name
49
+ end
50
+
51
+ desc "Test database connection"
52
+ task :test_connection do
53
+ if not process_db_connect_params then
54
+ exit
55
+ puts "test failed"
56
+ else
57
+ puts "valid parameters"
58
+ end
59
+ puts "Starting database connection test"
60
+ begin
61
+ conn = OCI8.new( $db_user, $db_user_password, $db_name )
62
+ conn.logoff
63
+ puts "Connection successful"
64
+ rescue
65
+ puts $!
66
+ puts "Connection failed"
67
+ end
68
+ end
69
+
70
+ desc "Rebuild all build and teardown scripts"
71
+ task :rebuild_build_scripts do
72
+ if not process_db_connect_params then
73
+ exit
74
+ end
75
+
76
+ s = ScriptBuilder.new( '.' )
77
+ puts "building simple build scripts"
78
+ s.build_all_scripts( 'build.sql', 'teardown.sql' )
79
+
80
+ puts "re-doing table build scripts for proper order"
81
+ t = TableScriptBuilder.new( $db_user, $db_user_password, $db_name, './Tables/' )
82
+ puts 'build_tables has finished'
83
+
84
+ puts 'done'
85
+ end
86
+
87
+ =begin
88
+ desc "logs in as system and creates application schema user and issues all necessary grants"
89
+ task :do_grants do
90
+ #check for args
91
+ if not process_db_connect_params then
92
+ exit
93
+ end
94
+
95
+ # call script
96
+ sqlplus_cmd = "cd BuildScripts\\ && sqlplus " + $db_user + "/" + $db_user_password + "@" + $db_name + " @grants.sql"
97
+ system "cd BuildScripts"
98
+ system sqlplus_cmd
99
+ system "cd .."
100
+ #print response
101
+ print_response
102
+
103
+ end
104
+ =end
105
+
106
+ desc "runs table build script"
107
+ task :build_tables do
108
+ puts "building tables"
109
+ if not process_db_connect_params then
110
+ exit
111
+ end
112
+ # call script
113
+ sqlplus_cmd = "cd tables\\ && sqlplus " + $db_user + "/" + $db_user_password + "@" + $db_name + " @build.sql"
114
+ system sqlplus_cmd
115
+ print_response
116
+ end
117
+
118
+ desc "runs table teardown script"
119
+ task :teardown_tables do
120
+ puts "teardown tables"
121
+ if not process_db_connect_params then
122
+ exit
123
+ end
124
+ # call script
125
+ sqlplus_cmd = "cd tables\\ && sqlplus " + $db_user + "/" + $db_user_password + "@" + $db_name + " @teardown.sql"
126
+ system sqlplus_cmd
127
+ print_response
128
+ end
129
+
130
+ desc "runs table teardown, then table build script"
131
+ task :rebuild_tables => [:teardown_tables,:build_tables] do
132
+ puts "rebuild complete"
133
+ end
134
+
135
+ desc "runs view build script"
136
+ task :build_views do
137
+ puts "building views"
138
+ if not process_db_connect_params then
139
+ exit
140
+ end
141
+ # call script
142
+ sqlplus_cmd = "cd views\\ && sqlplus " + $db_user + "/" + $db_user_password + "@" + $db_name + " @build.sql"
143
+ system sqlplus_cmd
144
+ print_response
145
+ end
146
+
147
+ desc "runs view teardown script"
148
+ task :teardown_views do
149
+ puts "teardown views"
150
+ if not process_db_connect_params then
151
+ exit
152
+ end
153
+ # call script
154
+ sqlplus_cmd = "cd views\\ && sqlplus " + $db_user + "/" + $db_user_password + "@" + $db_name + " @teardown.sql"
155
+ system sqlplus_cmd
156
+ print_response
157
+ end
158
+
159
+ desc "runs view teardown, then view build script"
160
+ task :rebuild_views => [:teardown_views,:build_views] do
161
+ puts "rebuild complete"
162
+ end
163
+
164
+ desc "runs sequence build script"
165
+ task :build_sequences do
166
+ puts "building sequences"
167
+ if not process_db_connect_params then
168
+ exit
169
+ end
170
+ # call script
171
+ sqlplus_cmd = "cd bin\\ && sqlplus " + $db_user + "/" + $db_user_password + "@" + $db_name + " @rebuild_all_sequences.sql"
172
+ puts sqlplus_cmd
173
+ system sqlplus_cmd
174
+ print_response
175
+ end
176
+
177
+ desc "runs sequence teardown script"
178
+ task :teardown_sequences do
179
+ puts "tearing down sequences"
180
+ if not process_db_connect_params then
181
+ exit
182
+ end
183
+ # call script
184
+ sqlplus_cmd = "cd sequences\\ && sqlplus " + $db_user + "/" + $db_user_password + "@" + $db_name + " @teardown.sql"
185
+ system sqlplus_cmd
186
+ print_response
187
+ end
188
+
189
+ desc "runs sequence teardown then sequence build scripts"
190
+ task :rebuild_sequences => [:build_sequences] do
191
+ puts "rebuild complete"
192
+ end
193
+
194
+ desc "runs package model build script"
195
+ task :build_models do
196
+ puts "building models"
197
+ if not process_db_connect_params then
198
+ exit
199
+ end
200
+ # call script
201
+ sqlplus_cmd = "cd packages\\models && sqlplus " + $db_user + "/" + $db_user_password + "@" + $db_name + " @build.sql"
202
+ system sqlplus_cmd
203
+ print_response
204
+ end
205
+
206
+ desc "runs package model teardown script"
207
+ task :teardown_models do
208
+ puts "tearing down models"
209
+ if not process_db_connect_params then
210
+ exit
211
+ end
212
+ # call script
213
+ sqlplus_cmd = "cd packages\\models && sqlplus " + $db_user + "/" + $db_user_password + "@" + $db_name + " @teardown.sql"
214
+ system sqlplus_cmd
215
+ print_response
216
+ end
217
+
218
+ desc "runs package model teardown then build scripts"
219
+ task :rebuild_models => [:teardown_models, :build_models] do
220
+ puts "rebuild complete"
221
+ end
222
+
223
+ desc "build controller packages"
224
+ task :build_controllers do
225
+ puts "building controllers"
226
+ if not process_db_connect_params then
227
+ exit
228
+ end
229
+ # call script
230
+ sqlplus_cmd = "cd packages\\controllers && sqlplus " + $db_user + "/" + $db_user_password + "@" + $db_name + " @build.sql"
231
+ system sqlplus_cmd
232
+ print_response
233
+ end
234
+
235
+ desc "teardown controller packages"
236
+ task :teardown_controllers do
237
+ puts "tearing down controllers"
238
+ if not process_db_connect_params then
239
+ exit
240
+ end
241
+ # call script
242
+ sqlplus_cmd = "cd packages\\controllers && sqlplus " + $db_user + "/" + $db_user_password + "@" + $db_name + " @teardown.sql"
243
+ system sqlplus_cmd
244
+ print_response
245
+ end
246
+
247
+ desc "teardown then rebuild all controllers"
248
+ task :rebuild_controllers => [:teardown_controllers, :build_controllers] do
249
+ puts "rebuild complete"
250
+ end
251
+
252
+ desc "build helper packages"
253
+ task :build_helpers do
254
+ puts "building helpers"
255
+ if not process_db_connect_params then
256
+ exit
257
+ end
258
+ # call script
259
+ sqlplus_cmd = "cd packages\\helpers && sqlplus " + $db_user + "/" + $db_user_password + "@" + $db_name + " @build.sql"
260
+ system sqlplus_cmd
261
+ print_response
262
+ end
263
+
264
+ desc "teardown helper packages"
265
+ task :teardown_helpers do
266
+ puts "tearing down helpers"
267
+ if not process_db_connect_params then
268
+ exit
269
+ end
270
+ # call script
271
+ sqlplus_cmd = "cd packages\\helpers && sqlplus " + $db_user + "/" + $db_user_password + "@" + $db_name + " @teardown.sql"
272
+ system sqlplus_cmd
273
+ print_response
274
+ end
275
+
276
+ desc "teardown then build helper packages"
277
+ task :rebuild_helpers => [:teardown_helpers, :build_helpers] do
278
+ puts "rebuild complete"
279
+ end
280
+
281
+ desc "build view packages"
282
+ task :build_pkg_views do
283
+ puts "building views"
284
+ if not process_db_connect_params then
285
+ exit
286
+ end
287
+ # call script
288
+ sqlplus_cmd = "cd packages\\views && sqlplus " + $db_user + "/" + $db_user_password + "@" + $db_name + " @build.sql"
289
+ system sqlplus_cmd
290
+ print_response
291
+ end
292
+
293
+ desc "teardown view packages"
294
+ task :teardown_pkg_views do
295
+ puts "tearing down views"
296
+ if not process_db_connect_params then
297
+ exit
298
+ end
299
+ # call script
300
+ sqlplus_cmd = "cd packages\\views && sqlplus " + $db_user + "/" + $db_user_password + "@" + $db_name + " @teardown.sql"
301
+ system sqlplus_cmd
302
+ print_response
303
+ end
304
+
305
+ desc "teardown then build view packages"
306
+ task :rebuild_pkg_views => [:teardown_pkg_views, :build_pkg_views] do
307
+ puts "rebuild complete"
308
+ end
309
+
310
+ desc "teardown all packages"
311
+ task :teardown_packages => [:teardown_controllers, :teardown_views, :teardown_helpers, :teardown_models] do
312
+ puts "teardown complete"
313
+ end
314
+
315
+ desc "build all packages"
316
+ task :build_packages => [:build_models, :build_helpers, :build_pkg_views, :build_controllers] do
317
+ puts "package build complete"
318
+ end
319
+
320
+ desc "teardown and build all packages"
321
+ task :rebuild_packages => [:teardown_packages, :build_packages] do
322
+ puts "rebuild complete"
323
+ end
324
+
325
+ desc "teardown the whole app...DANGEROUS!!!! BE CAREFUL RUNNING THIS ONE"
326
+ task :teardown_app => [:teardown_packages, :teardown_views, :teardown_sequences, :teardown_tables] do
327
+ puts "application teardown complete"
328
+ end
329
+
330
+ desc "builds the application from the ground up"
331
+ task :build_app => [:build_tables, :build_sequences, :build_views, :build_packages] do
332
+ puts "application build complete"
333
+ end
334
+
335
+ desc "teardown the rebuild the appliction from the ground up...DANGEROUS!!! you will lose all data if you run this script"
336
+ task :rebuild_app => [:teardown_app, :build_app] do
337
+ puts "application rebuild complete"
338
+ puts Time.now.to_s
339
+ end
340
+
341
+ desc "teardown the rebuild the appliction from the ground up...DANGEROUS!!! you will lose all data if you run this script"
342
+ task :rebuild_app => [:teardown_app, :build_app] do
343
+ puts "application rebuild complete"
344
+ puts Time.now.to_s
345
+ end
346
+
347
+ desc "run database migrations"
348
+ task :run_db_migrations do
349
+ puts "running database migrations"
350
+ if not process_db_connect_params then
351
+ exit
352
+ end
353
+ mig = DbMigrator.new( "Migrations", $db_name, $db_user, $db_user_password )
354
+ mig.migrate
355
+ puts "done runing database migrations"
356
+ end
357
+
358
+ desc "runs trigger build script"
359
+ task :build_triggers do
360
+ puts "building triggers"
361
+ if not process_db_connect_params then
362
+ exit
363
+ end
364
+ # call script
365
+ sqlplus_cmd = "cd triggers\\ && sqlplus " + $db_user + "/" + $db_user_password + "@" + $db_name + " @build.sql"
366
+ system sqlplus_cmd
367
+ print_response
368
+ end
369
+
370
+ desc "lines of code"
371
+ task :lines_of_code do
372
+ puts "Generating lines of code report"
373
+ system "cd bin && lines_of_code.rb"
374
+ end
375
+
data/notes/stractor.rb ADDED
@@ -0,0 +1,41 @@
1
+ require 'oci8'
2
+
3
+ class Stractor
4
+
5
+ def initialize( db_user, db_password, db_name )
6
+
7
+ @db_user = db_user
8
+ @db_password = db_password
9
+ @db_name = db_name
10
+
11
+ end
12
+
13
+ def extract_ddl( object_type, object_name )
14
+
15
+ ddl_sql = %q{
16
+ SELECT dbms_metadata.get_ddl( :object_type, :object_name ) ddl_clob FROM dual
17
+ }
18
+
19
+ db_connection = OCI8.new( @db_user, @db_password, @db_name )
20
+
21
+ ddl = ""
22
+
23
+ db_connection.exec( ddl_sql, object_type, object_name ) do |result|
24
+ ddl << result[0].read
25
+ end
26
+
27
+ db_connection.logoff
28
+
29
+ return ddl.delete( 34.chr ).gsub( Regexp.new( @db_user << '\.' ), '' ).strip << ";"
30
+
31
+ end
32
+
33
+ def extract_into_file( object_type, object_name, file_name )
34
+
35
+ ddl = extract_ddl( object_type, object_name )
36
+ File.open(file_name, 'w') {|f| f.write( ddl )}
37
+
38
+ end
39
+
40
+ end
41
+
@@ -0,0 +1,28 @@
1
+ require 'oci8'
2
+
3
+
4
+ f2k = OCI8.new("junk", "password", "xe")
5
+
6
+ puts "effin' eh"
7
+
8
+ pkg = File.open( 'pkg_fdr_bridges.pks' )
9
+
10
+ #f = f2k.exec( "#{ pkg.read }; " )
11
+
12
+ #puts f.to_s
13
+
14
+ #puts f2k.exec( "SHOW ERRORS" )
15
+
16
+ error_cursor = f2k.exec( "SELECT * FROM USER_ERRORS" )
17
+
18
+ while r = error_cursor.fetch_hash()
19
+ puts r.to_s
20
+ end
21
+
22
+ # errors = .fetch_hash()
23
+
24
+ puts errors.to_s
25
+
26
+ puts "done"
27
+
28
+ f2k.logoff
data/orasaurus.gemspec ADDED
@@ -0,0 +1,26 @@
1
+ # -*- encoding: utf-8 -*-
2
+ $:.push File.expand_path("../lib", __FILE__)
3
+ require "orasaurus/version"
4
+
5
+ Gem::Specification.new do |s|
6
+ s.name = "orasaurus"
7
+ s.version = Orasaurus::VERSION
8
+ s.authors = ["Andy Campbell"]
9
+ s.email = ["pmacydna@gmail.com"]
10
+ s.homepage = ""
11
+ s.summary = %q{Tools for building Oracle Applications}
12
+ s.description = %q{A robust interface for building Oracle Applications, especially pl/sql.}
13
+
14
+ s.rubyforge_project = "orasaurus"
15
+
16
+ s.files = `git ls-files`.split("\n")
17
+ s.test_files = `git ls-files -- {test,spec,features}/*`.split("\n")
18
+ s.executables = `git ls-files -- bin/*`.split("\n").map{ |f| File.basename(f) }
19
+ s.bindir = 'bin'
20
+ s.require_paths = ["lib"]
21
+
22
+ # specify any dependencies here; for example:
23
+ s.add_development_dependency "rspec"
24
+ s.add_runtime_dependency "ruby-oci8"
25
+ s.add_runtime_dependency "ruby-plsql"
26
+ end
@@ -0,0 +1,12 @@
1
+ require 'spec_helper'
2
+
3
+ describe "Orasaurus" do
4
+
5
+ it "should be able to create an Oracle object from a file" do
6
+ Orasaurus.compile( "franklin" )
7
+ Orasaurus.compile( "franklin" ).should == "franklin"
8
+ end
9
+
10
+ end
11
+
12
+ puts "franklin"
@@ -0,0 +1,8 @@
1
+ require 'rubygems'
2
+ require 'bundler/setup'
3
+
4
+ require 'orasaurus'
5
+
6
+ RSpec.configure do |config|
7
+ # some (optional) config here
8
+ end
@@ -0,0 +1,35 @@
1
+
2
+ SET SERVEROUTPUT ON
3
+ SET DEFINE OFF
4
+ SPOOL build.log
5
+
6
+ PROMPT
7
+ PROMPT *****************************GETTING STARTED************************
8
+ PROMPT
9
+ /
10
+ BEGIN DBMS_OUTPUT.PUT_LINE( 'BEGIN TIME: '||TO_CHAR( SYSDATE, 'MM/DD/YYYY HH:MI:SS' ) ); END;
11
+ /
12
+
13
+ PROMPT ***** pkg_note_comments.pkg *****
14
+ @pkg_note_comments.pkg;
15
+ SHOW ERRORS
16
+ PROMPT ***** pkg_note_tags.pkg *****
17
+ @pkg_note_tags.pkg;
18
+ SHOW ERRORS
19
+ PROMPT ***** pkg_notebooks.pkg *****
20
+ @pkg_notebooks.pkg;
21
+ SHOW ERRORS
22
+ PROMPT ***** pkg_notes.pkg *****
23
+ @pkg_notes.pkg;
24
+ SHOW ERRORS
25
+
26
+ BEGIN DBMS_OUTPUT.PUT_LINE( 'END TIME: '||TO_CHAR( SYSDATE, 'MM/DD/YYYY HH:MI:SS' ) ); END;
27
+ /
28
+ PROMPT
29
+ PROMPT *******************************FINISHED*******************************
30
+ PROMPT
31
+
32
+
33
+ EXIT
34
+ /
35
+