ruby-plsql 0.8.0 → 0.9.9
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.
- checksums.yaml +4 -4
- data/History.txt +2 -0
- data/README.md +19 -3
- data/VERSION +1 -1
- data/lib/plsql/connection.rb +14 -14
- data/lib/plsql/helpers.rb +3 -3
- data/lib/plsql/jdbc_connection.rb +62 -22
- data/lib/plsql/oci_connection.rb +10 -10
- data/lib/plsql/package.rb +3 -3
- data/lib/plsql/procedure.rb +57 -22
- data/lib/plsql/procedure_call.rb +15 -15
- data/lib/plsql/schema.rb +17 -10
- data/lib/plsql/sequence.rb +2 -2
- data/lib/plsql/table.rb +6 -6
- data/lib/plsql/type.rb +7 -7
- data/lib/plsql/variable.rb +6 -5
- data/lib/plsql/version.rb +1 -1
- data/lib/plsql/view.rb +2 -2
- metadata +14 -140
- data/.github/stale.yml +0 -37
- data/.github/workflows/rubocop.yml +0 -37
- data/.github/workflows/test.yml +0 -69
- data/.rubocop.yml +0 -147
- data/.travis/oracle/download.sh +0 -15
- data/.travis/oracle/install.sh +0 -32
- data/.travis/setup_accounts.sh +0 -9
- data/.travis.yml +0 -88
- data/Gemfile +0 -24
- data/Rakefile +0 -53
- data/Vagrantfile +0 -38
- data/ci/network/admin/tnsnames.ora +0 -7
- data/ci/setup_accounts.sh +0 -9
- data/gemfiles/Gemfile.activerecord-5.0 +0 -21
- data/gemfiles/Gemfile.activerecord-5.1 +0 -21
- data/gemfiles/Gemfile.activerecord-5.2 +0 -21
- data/gemfiles/Gemfile.activerecord-6.0 +0 -21
- data/gemfiles/Gemfile.activerecord-6.1 +0 -21
- data/gemfiles/Gemfile.activerecord-main +0 -21
- data/lib/plsql/oci8_patches.rb +0 -25
- data/ruby-plsql.gemspec +0 -114
- data/spec/plsql/connection_spec.rb +0 -505
- data/spec/plsql/package_spec.rb +0 -172
- data/spec/plsql/procedure_spec.rb +0 -2390
- data/spec/plsql/schema_spec.rb +0 -364
- data/spec/plsql/sequence_spec.rb +0 -67
- data/spec/plsql/sql_statements_spec.rb +0 -91
- data/spec/plsql/table_spec.rb +0 -376
- data/spec/plsql/type_spec.rb +0 -299
- data/spec/plsql/variable_spec.rb +0 -497
- data/spec/plsql/version_spec.rb +0 -8
- data/spec/plsql/view_spec.rb +0 -264
- data/spec/spec.opts +0 -6
- data/spec/spec_helper.rb +0 -121
- data/spec/support/create_arunit_user.sql +0 -2
- data/spec/support/custom_config.rb.sample +0 -14
- data/spec/support/file_check_script.sh +0 -9
- data/spec/support/test_db.rb +0 -149
- data/spec/support/unlock_and_setup_hr_user.sql +0 -2
data/lib/plsql/procedure_call.rb
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
module PLSQL
|
|
2
|
-
class ProcedureCall
|
|
2
|
+
class ProcedureCall # :nodoc:
|
|
3
3
|
def initialize(procedure, args = [], options = {})
|
|
4
4
|
@procedure = procedure
|
|
5
5
|
@schema = @procedure.schema
|
|
@@ -115,7 +115,7 @@ module PLSQL
|
|
|
115
115
|
MATCHING_TYPES = {
|
|
116
116
|
integer: ["NUMBER", "NATURAL", "NATURALN", "POSITIVE", "POSITIVEN", "SIGNTYPE", "SIMPLE_INTEGER", "PLS_INTEGER", "BINARY_INTEGER"],
|
|
117
117
|
decimal: ["NUMBER", "BINARY_FLOAT", "BINARY_DOUBLE"],
|
|
118
|
-
string: ["VARCHAR", "VARCHAR2", "NVARCHAR2", "CHAR", "NCHAR", "CLOB", "BLOB", "XMLTYPE"],
|
|
118
|
+
string: ["VARCHAR", "VARCHAR2", "NVARCHAR2", "CHAR", "NCHAR", "CLOB", "BLOB", "XMLTYPE", "OPAQUE/XMLTYPE"],
|
|
119
119
|
date: ["DATE"],
|
|
120
120
|
time: ["DATE", "TIMESTAMP", "TIMESTAMP WITH TIME ZONE", "TIMESTAMP WITH LOCAL TIME ZONE"],
|
|
121
121
|
boolean: ["PL/SQL BOOLEAN"],
|
|
@@ -149,10 +149,10 @@ module PLSQL
|
|
|
149
149
|
end
|
|
150
150
|
|
|
151
151
|
def construct_sql(args)
|
|
152
|
-
@declare_sql = ""
|
|
153
|
-
@assignment_sql = ""
|
|
154
|
-
@call_sql = ""
|
|
155
|
-
@return_sql = ""
|
|
152
|
+
@declare_sql = +""
|
|
153
|
+
@assignment_sql = +""
|
|
154
|
+
@call_sql = +""
|
|
155
|
+
@return_sql = +""
|
|
156
156
|
@return_vars = []
|
|
157
157
|
@return_vars_metadata = {}
|
|
158
158
|
|
|
@@ -218,7 +218,7 @@ module PLSQL
|
|
|
218
218
|
end
|
|
219
219
|
add_out_variables
|
|
220
220
|
|
|
221
|
-
@sql = @declare_sql.empty? ? "" : "DECLARE\n" << @declare_sql
|
|
221
|
+
@sql = @declare_sql.empty? ? +"" : +"DECLARE\n" << @declare_sql
|
|
222
222
|
@sql << "BEGIN\n" << @assignment_sql << dbms_output_enable_sql << @call_sql << @return_sql << "END;\n"
|
|
223
223
|
end
|
|
224
224
|
|
|
@@ -240,8 +240,8 @@ module PLSQL
|
|
|
240
240
|
@bind_values[argument] = value.nil? ? nil : (value ? 1 : 0)
|
|
241
241
|
@bind_metadata[argument] = argument_metadata.merge(data_type: "NUMBER", data_precision: 1)
|
|
242
242
|
"l_#{argument}"
|
|
243
|
-
when "UNDEFINED"
|
|
244
|
-
if argument_metadata[:type_name] == "XMLTYPE"
|
|
243
|
+
when "UNDEFINED", "XMLTYPE", "OPAQUE/XMLTYPE"
|
|
244
|
+
if argument_metadata[:type_name] == "XMLTYPE" || argument_metadata[:data_type] =~ /XMLTYPE/
|
|
245
245
|
@declare_sql << "l_#{argument} XMLTYPE;\n"
|
|
246
246
|
@assignment_sql << "l_#{argument} := XMLTYPE(:#{argument});\n" if not value.nil?
|
|
247
247
|
@bind_values[argument] = value if not value.nil?
|
|
@@ -326,7 +326,7 @@ module PLSQL
|
|
|
326
326
|
"l_#{argument} #{argument_metadata[:sql_type_name]};\n"
|
|
327
327
|
else
|
|
328
328
|
fields_metadata = argument_metadata[:fields]
|
|
329
|
-
sql = "TYPE t_#{argument} IS RECORD (\n"
|
|
329
|
+
sql = +"TYPE t_#{argument} IS RECORD (\n"
|
|
330
330
|
sql << record_fields_sorted_by_position(fields_metadata).map do |field|
|
|
331
331
|
metadata = fields_metadata[field]
|
|
332
332
|
"#{field} #{type_to_sql(metadata)}"
|
|
@@ -341,7 +341,7 @@ module PLSQL
|
|
|
341
341
|
end
|
|
342
342
|
|
|
343
343
|
def record_assignment_sql_values_metadata(argument, argument_metadata, record_value)
|
|
344
|
-
sql = ""
|
|
344
|
+
sql = +""
|
|
345
345
|
bind_values = {}
|
|
346
346
|
bind_metadata = {}
|
|
347
347
|
(record_value || {}).each do |key, value|
|
|
@@ -395,8 +395,8 @@ module PLSQL
|
|
|
395
395
|
end
|
|
396
396
|
end
|
|
397
397
|
"l_#{argument} := " if is_return_value
|
|
398
|
-
when "UNDEFINED"
|
|
399
|
-
if argument_metadata[:type_name] == "XMLTYPE"
|
|
398
|
+
when "UNDEFINED", "XMLTYPE", "OPAQUE/XMLTYPE"
|
|
399
|
+
if argument_metadata[:type_name] == "XMLTYPE" || argument_metadata[:data_type] =~ /XMLTYPE/
|
|
400
400
|
@declare_sql << "l_#{argument} XMLTYPE;\n" if is_return_value
|
|
401
401
|
bind_variable = :"o_#{argument}"
|
|
402
402
|
@return_vars << bind_variable
|
|
@@ -517,8 +517,8 @@ module PLSQL
|
|
|
517
517
|
when "PL/SQL BOOLEAN"
|
|
518
518
|
numeric_value = @cursor[":o_#{argument}"]
|
|
519
519
|
numeric_value.nil? ? nil : numeric_value == 1
|
|
520
|
-
when "UNDEFINED"
|
|
521
|
-
if argument_metadata[:type_name] == "XMLTYPE"
|
|
520
|
+
when "UNDEFINED", "XMLTYPE", "OPAQUE/XMLTYPE"
|
|
521
|
+
if argument_metadata[:type_name] == "XMLTYPE" || argument_metadata[:data_type] =~ /XMLTYPE/
|
|
522
522
|
@cursor[":o_#{argument}"]
|
|
523
523
|
end
|
|
524
524
|
else
|
data/lib/plsql/schema.rb
CHANGED
|
@@ -4,8 +4,8 @@ module PLSQL
|
|
|
4
4
|
|
|
5
5
|
@@schemas = {}
|
|
6
6
|
|
|
7
|
-
class <<self
|
|
8
|
-
def find_or_new(connection_alias)
|
|
7
|
+
class << self
|
|
8
|
+
def find_or_new(connection_alias) # :nodoc:
|
|
9
9
|
connection_alias ||= :default
|
|
10
10
|
if @@schemas[connection_alias]
|
|
11
11
|
@@schemas[connection_alias]
|
|
@@ -15,7 +15,7 @@ module PLSQL
|
|
|
15
15
|
end
|
|
16
16
|
end
|
|
17
17
|
|
|
18
|
-
def initialize(raw_conn = nil, schema = nil, original_schema = nil)
|
|
18
|
+
def initialize(raw_conn = nil, schema = nil, original_schema = nil) # :nodoc:
|
|
19
19
|
self.connection = raw_conn
|
|
20
20
|
@schema_name = schema ? schema.to_s.upcase : nil
|
|
21
21
|
@original_schema = original_schema
|
|
@@ -25,11 +25,11 @@ module PLSQL
|
|
|
25
25
|
# Returns connection wrapper object (this is not raw OCI8 or JDBC connection!)
|
|
26
26
|
attr_reader :connection
|
|
27
27
|
|
|
28
|
-
def root_schema
|
|
28
|
+
def root_schema # :nodoc:
|
|
29
29
|
@original_schema || self
|
|
30
30
|
end
|
|
31
31
|
|
|
32
|
-
def raw_connection=(raw_conn)
|
|
32
|
+
def raw_connection=(raw_conn) # :nodoc:
|
|
33
33
|
@connection = raw_conn ? Connection.create(raw_conn) : nil
|
|
34
34
|
reset_instance_variables
|
|
35
35
|
end
|
|
@@ -41,7 +41,7 @@ module PLSQL
|
|
|
41
41
|
# or
|
|
42
42
|
#
|
|
43
43
|
# plsql.connection = java.sql.DriverManager.getConnection(
|
|
44
|
-
# "jdbc:oracle:thin
|
|
44
|
+
# "jdbc:oracle:thin:@//#{database_host}:#{database_port}/#{database_service_name}",
|
|
45
45
|
# database_user, database_password)
|
|
46
46
|
#
|
|
47
47
|
def connection=(conn)
|
|
@@ -99,8 +99,15 @@ module PLSQL
|
|
|
99
99
|
@original_schema.default_timezone
|
|
100
100
|
else
|
|
101
101
|
@default_timezone ||
|
|
102
|
-
# Use ActiveRecord
|
|
103
|
-
|
|
102
|
+
# Use ActiveRecord default_timezone when ActiveRecord connection is used.
|
|
103
|
+
# Prefer the module-level accessor (AR 7.0+; the only one in AR 8.0+) so
|
|
104
|
+
# that AR 7.0/7.1's deprecation warning for ActiveRecord::Base.default_timezone
|
|
105
|
+
# is not emitted. Fall back to the per-class accessor only on pre-7.0 AR,
|
|
106
|
+
# where ActiveRecord.default_timezone does not exist.
|
|
107
|
+
(@connection && @connection.activerecord_class &&
|
|
108
|
+
(ActiveRecord.respond_to?(:default_timezone) ?
|
|
109
|
+
ActiveRecord.default_timezone :
|
|
110
|
+
@connection.activerecord_class.default_timezone)) ||
|
|
104
111
|
# default to local timezone
|
|
105
112
|
:local
|
|
106
113
|
end
|
|
@@ -117,7 +124,7 @@ module PLSQL
|
|
|
117
124
|
|
|
118
125
|
# Same implementation as for ActiveRecord
|
|
119
126
|
# DateTimes aren't aware of DST rules, so use a consistent non-DST offset when creating a DateTime with an offset in the local zone
|
|
120
|
-
def local_timezone_offset
|
|
127
|
+
def local_timezone_offset # :nodoc:
|
|
121
128
|
::Time.local(2007).utc_offset.to_r / 86400
|
|
122
129
|
end
|
|
123
130
|
|
|
@@ -234,7 +241,7 @@ module PLSQL
|
|
|
234
241
|
end
|
|
235
242
|
|
|
236
243
|
def _errors(object_schema_name, object_name, object_type)
|
|
237
|
-
result = ""
|
|
244
|
+
result = +""
|
|
238
245
|
previous_line = 0
|
|
239
246
|
select_all(
|
|
240
247
|
"SELECT e.line, e.position, e.text error_text, s.text source_text
|
data/lib/plsql/sequence.rb
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
module PLSQL
|
|
2
|
-
module SequenceClassMethods
|
|
2
|
+
module SequenceClassMethods # :nodoc:
|
|
3
3
|
def find(schema, sequence)
|
|
4
4
|
if schema.select_first(
|
|
5
5
|
"SELECT sequence_name FROM all_sequences
|
|
@@ -27,7 +27,7 @@ module PLSQL
|
|
|
27
27
|
class Sequence
|
|
28
28
|
extend SequenceClassMethods
|
|
29
29
|
|
|
30
|
-
def initialize(schema, sequence, override_schema_name = nil)
|
|
30
|
+
def initialize(schema, sequence, override_schema_name = nil) # :nodoc:
|
|
31
31
|
@schema = schema
|
|
32
32
|
@schema_name = override_schema_name || schema.schema_name
|
|
33
33
|
@sequence_name = sequence.to_s.upcase
|
data/lib/plsql/table.rb
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
module PLSQL
|
|
2
|
-
module TableClassMethods
|
|
2
|
+
module TableClassMethods # :nodoc:
|
|
3
3
|
def find(schema, table)
|
|
4
4
|
if schema.select_first(
|
|
5
5
|
"SELECT table_name FROM all_tables
|
|
@@ -33,9 +33,9 @@ module PLSQL
|
|
|
33
33
|
class Table
|
|
34
34
|
extend TableClassMethods
|
|
35
35
|
|
|
36
|
-
attr_reader :columns, :schema_name, :table_name
|
|
36
|
+
attr_reader :columns, :schema_name, :table_name # :nodoc:
|
|
37
37
|
|
|
38
|
-
def initialize(schema, table, override_schema_name = nil)
|
|
38
|
+
def initialize(schema, table, override_schema_name = nil) # :nodoc:
|
|
39
39
|
@schema = schema
|
|
40
40
|
@schema_name = override_schema_name || schema.schema_name
|
|
41
41
|
@table_name = table.to_s.upcase
|
|
@@ -87,9 +87,9 @@ module PLSQL
|
|
|
87
87
|
def select(first_or_all, sql_params = "", *bindvars)
|
|
88
88
|
case first_or_all
|
|
89
89
|
when :first, :all
|
|
90
|
-
select_sql = "SELECT * "
|
|
90
|
+
select_sql = +"SELECT * "
|
|
91
91
|
when :count
|
|
92
|
-
select_sql = "SELECT COUNT(*) "
|
|
92
|
+
select_sql = +"SELECT COUNT(*) "
|
|
93
93
|
else
|
|
94
94
|
raise ArgumentError, "Only :first, :all or :count are supported"
|
|
95
95
|
end
|
|
@@ -251,7 +251,7 @@ module PLSQL
|
|
|
251
251
|
end
|
|
252
252
|
|
|
253
253
|
# wrapper class to simulate Procedure class for ProcedureClass#exec
|
|
254
|
-
class TableProcedure
|
|
254
|
+
class TableProcedure # :nodoc:
|
|
255
255
|
attr_reader :arguments, :argument_list, :return, :out_list, :schema
|
|
256
256
|
|
|
257
257
|
def initialize(schema, table, operation)
|
data/lib/plsql/type.rb
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
module PLSQL
|
|
2
|
-
module TypeClassMethods
|
|
2
|
+
module TypeClassMethods # :nodoc:
|
|
3
3
|
def find(schema, type)
|
|
4
4
|
if schema.select_first(
|
|
5
5
|
"SELECT type_name FROM all_types
|
|
@@ -33,9 +33,9 @@ module PLSQL
|
|
|
33
33
|
class Type
|
|
34
34
|
extend TypeClassMethods
|
|
35
35
|
|
|
36
|
-
attr_reader :typecode, :attributes, :schema_name, :type_name, :type_object_id
|
|
36
|
+
attr_reader :typecode, :attributes, :schema_name, :type_name, :type_object_id # :nodoc:
|
|
37
37
|
|
|
38
|
-
def initialize(schema, type, override_schema_name = nil)
|
|
38
|
+
def initialize(schema, type, override_schema_name = nil) # :nodoc:
|
|
39
39
|
@schema = schema
|
|
40
40
|
@schema_name = override_schema_name || schema.schema_name
|
|
41
41
|
@type_name = type.to_s.upcase
|
|
@@ -107,7 +107,7 @@ module PLSQL
|
|
|
107
107
|
end
|
|
108
108
|
end
|
|
109
109
|
|
|
110
|
-
def method_missing(method, *args, &block)
|
|
110
|
+
def method_missing(method, *args, &block) # :nodoc:
|
|
111
111
|
if procedure = find_procedure(method)
|
|
112
112
|
procedure.exec_with_options(args, {}, &block)
|
|
113
113
|
else
|
|
@@ -115,7 +115,7 @@ module PLSQL
|
|
|
115
115
|
end
|
|
116
116
|
end
|
|
117
117
|
|
|
118
|
-
def find_procedure(new_or_procedure)
|
|
118
|
+
def find_procedure(new_or_procedure) # :nodoc:
|
|
119
119
|
@type_procedures[new_or_procedure] ||= begin
|
|
120
120
|
procedure_name = new_or_procedure == :new ? @type_name : new_or_procedure
|
|
121
121
|
# find defined procedure for type
|
|
@@ -134,7 +134,7 @@ module PLSQL
|
|
|
134
134
|
end
|
|
135
135
|
|
|
136
136
|
# wrapper class to simulate Procedure class for ProcedureClass#exec
|
|
137
|
-
class TypeProcedure
|
|
137
|
+
class TypeProcedure # :nodoc:
|
|
138
138
|
include ProcedureCommon
|
|
139
139
|
|
|
140
140
|
def initialize(schema, type, procedure)
|
|
@@ -250,7 +250,7 @@ module PLSQL
|
|
|
250
250
|
end
|
|
251
251
|
end
|
|
252
252
|
|
|
253
|
-
class ObjectInstance < Hash
|
|
253
|
+
class ObjectInstance < Hash # :nodoc:
|
|
254
254
|
attr_accessor :plsql_type
|
|
255
255
|
|
|
256
256
|
def self.create(type, attributes)
|
data/lib/plsql/variable.rb
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
module PLSQL
|
|
2
|
-
module VariableClassMethods
|
|
2
|
+
module VariableClassMethods # :nodoc:
|
|
3
3
|
def find(schema, variable, package, override_schema_name = nil)
|
|
4
4
|
variable_upcase = variable.to_s.upcase
|
|
5
5
|
schema.select_all(
|
|
@@ -9,7 +9,8 @@ module PLSQL
|
|
|
9
9
|
AND type = 'PACKAGE'
|
|
10
10
|
AND UPPER(text) LIKE :variable_name",
|
|
11
11
|
override_schema_name || schema.schema_name, package, "%#{variable_upcase}%").each do |row|
|
|
12
|
-
if row[0] =~ /^\s*#{variable_upcase}\s+(CONSTANT\s+)?([A-Z0-9_. %]+(\([\w\s,]+\))?)\s*(NOT\s+NULL)?\s*((:=|DEFAULT).*)?;\s*(--.*)?$/i
|
|
12
|
+
if row[0] =~ /^\s*#{variable_upcase}\s+(CONSTANT\s+)?([A-Z0-9_. %]+(\([\w\s,]+\))?)\s*(NOT\s+NULL)?\s*((:=|DEFAULT).*)?;\s*(--.*)?$/i ||
|
|
13
|
+
row[0] =~ /^\s*#{variable_upcase}\s+(CONSTANT\s+)?([A-Z0-9_. %]+(\([\w\s,]+\))?)\s*(NOT\s+NULL)?\s*(:=|DEFAULT)\s*$/i
|
|
13
14
|
return new(schema, variable, package, $2.strip, override_schema_name)
|
|
14
15
|
end
|
|
15
16
|
end
|
|
@@ -17,10 +18,10 @@ module PLSQL
|
|
|
17
18
|
end
|
|
18
19
|
end
|
|
19
20
|
|
|
20
|
-
class Variable
|
|
21
|
+
class Variable # :nodoc:
|
|
21
22
|
extend VariableClassMethods
|
|
22
23
|
|
|
23
|
-
attr_reader :schema_name, :package_name, :variable_name
|
|
24
|
+
attr_reader :schema_name, :package_name, :variable_name # :nodoc:
|
|
24
25
|
|
|
25
26
|
def initialize(schema, variable, package, variable_type, override_schema_name = nil)
|
|
26
27
|
@schema = schema
|
|
@@ -95,7 +96,7 @@ module PLSQL
|
|
|
95
96
|
end
|
|
96
97
|
|
|
97
98
|
# wrapper class to simulate Procedure class for ProcedureClass#exec
|
|
98
|
-
class VariableProcedure
|
|
99
|
+
class VariableProcedure # :nodoc:
|
|
99
100
|
attr_reader :arguments, :argument_list, :return, :out_list, :schema
|
|
100
101
|
|
|
101
102
|
def initialize(schema, variable, operation, metadata)
|
data/lib/plsql/version.rb
CHANGED
data/lib/plsql/view.rb
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
module PLSQL
|
|
2
|
-
module ViewClassMethods
|
|
2
|
+
module ViewClassMethods # :nodoc:
|
|
3
3
|
def find(schema, view)
|
|
4
4
|
if schema.select_first(
|
|
5
5
|
"SELECT view_name FROM all_views
|
|
@@ -33,6 +33,6 @@ module PLSQL
|
|
|
33
33
|
class View < Table
|
|
34
34
|
extend ViewClassMethods
|
|
35
35
|
|
|
36
|
-
alias :view_name :table_name
|
|
36
|
+
alias :view_name :table_name # :nodoc:
|
|
37
37
|
end
|
|
38
38
|
end
|
metadata
CHANGED
|
@@ -1,85 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: ruby-plsql
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.
|
|
4
|
+
version: 0.9.9
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Raimonds Simanovskis
|
|
8
|
-
autorequire:
|
|
9
8
|
bindir: bin
|
|
10
9
|
cert_chain: []
|
|
11
|
-
date:
|
|
10
|
+
date: 1980-01-02 00:00:00.000000000 Z
|
|
12
11
|
dependencies:
|
|
13
|
-
- !ruby/object:Gem::Dependency
|
|
14
|
-
name: juwelier
|
|
15
|
-
requirement: !ruby/object:Gem::Requirement
|
|
16
|
-
requirements:
|
|
17
|
-
- - "~>"
|
|
18
|
-
- !ruby/object:Gem::Version
|
|
19
|
-
version: '2.0'
|
|
20
|
-
type: :development
|
|
21
|
-
prerelease: false
|
|
22
|
-
version_requirements: !ruby/object:Gem::Requirement
|
|
23
|
-
requirements:
|
|
24
|
-
- - "~>"
|
|
25
|
-
- !ruby/object:Gem::Version
|
|
26
|
-
version: '2.0'
|
|
27
|
-
- !ruby/object:Gem::Dependency
|
|
28
|
-
name: rspec_junit_formatter
|
|
29
|
-
requirement: !ruby/object:Gem::Requirement
|
|
30
|
-
requirements:
|
|
31
|
-
- - ">="
|
|
32
|
-
- !ruby/object:Gem::Version
|
|
33
|
-
version: '0'
|
|
34
|
-
type: :development
|
|
35
|
-
prerelease: false
|
|
36
|
-
version_requirements: !ruby/object:Gem::Requirement
|
|
37
|
-
requirements:
|
|
38
|
-
- - ">="
|
|
39
|
-
- !ruby/object:Gem::Version
|
|
40
|
-
version: '0'
|
|
41
|
-
- !ruby/object:Gem::Dependency
|
|
42
|
-
name: rubocop
|
|
43
|
-
requirement: !ruby/object:Gem::Requirement
|
|
44
|
-
requirements:
|
|
45
|
-
- - '='
|
|
46
|
-
- !ruby/object:Gem::Version
|
|
47
|
-
version: '0.81'
|
|
48
|
-
type: :development
|
|
49
|
-
prerelease: false
|
|
50
|
-
version_requirements: !ruby/object:Gem::Requirement
|
|
51
|
-
requirements:
|
|
52
|
-
- - '='
|
|
53
|
-
- !ruby/object:Gem::Version
|
|
54
|
-
version: '0.81'
|
|
55
|
-
- !ruby/object:Gem::Dependency
|
|
56
|
-
name: rubocop-performance
|
|
57
|
-
requirement: !ruby/object:Gem::Requirement
|
|
58
|
-
requirements:
|
|
59
|
-
- - ">="
|
|
60
|
-
- !ruby/object:Gem::Version
|
|
61
|
-
version: '0'
|
|
62
|
-
type: :development
|
|
63
|
-
prerelease: false
|
|
64
|
-
version_requirements: !ruby/object:Gem::Requirement
|
|
65
|
-
requirements:
|
|
66
|
-
- - ">="
|
|
67
|
-
- !ruby/object:Gem::Version
|
|
68
|
-
version: '0'
|
|
69
|
-
- !ruby/object:Gem::Dependency
|
|
70
|
-
name: rubocop-rails
|
|
71
|
-
requirement: !ruby/object:Gem::Requirement
|
|
72
|
-
requirements:
|
|
73
|
-
- - ">="
|
|
74
|
-
- !ruby/object:Gem::Version
|
|
75
|
-
version: '0'
|
|
76
|
-
type: :development
|
|
77
|
-
prerelease: false
|
|
78
|
-
version_requirements: !ruby/object:Gem::Requirement
|
|
79
|
-
requirements:
|
|
80
|
-
- - ">="
|
|
81
|
-
- !ruby/object:Gem::Version
|
|
82
|
-
version: '0'
|
|
83
12
|
- !ruby/object:Gem::Dependency
|
|
84
13
|
name: rake
|
|
85
14
|
requirement: !ruby/object:Gem::Requirement
|
|
@@ -109,33 +38,19 @@ dependencies:
|
|
|
109
38
|
- !ruby/object:Gem::Version
|
|
110
39
|
version: '3.1'
|
|
111
40
|
- !ruby/object:Gem::Dependency
|
|
112
|
-
name:
|
|
113
|
-
requirement: !ruby/object:Gem::Requirement
|
|
114
|
-
requirements:
|
|
115
|
-
- - "~>"
|
|
116
|
-
- !ruby/object:Gem::Version
|
|
117
|
-
version: '5.0'
|
|
118
|
-
type: :development
|
|
119
|
-
prerelease: false
|
|
120
|
-
version_requirements: !ruby/object:Gem::Requirement
|
|
121
|
-
requirements:
|
|
122
|
-
- - "~>"
|
|
123
|
-
- !ruby/object:Gem::Version
|
|
124
|
-
version: '5.0'
|
|
125
|
-
- !ruby/object:Gem::Dependency
|
|
126
|
-
name: activerecord-oracle_enhanced-adapter
|
|
41
|
+
name: rspec_junit_formatter
|
|
127
42
|
requirement: !ruby/object:Gem::Requirement
|
|
128
43
|
requirements:
|
|
129
|
-
- - "
|
|
44
|
+
- - ">="
|
|
130
45
|
- !ruby/object:Gem::Version
|
|
131
|
-
version: '
|
|
46
|
+
version: '0'
|
|
132
47
|
type: :development
|
|
133
48
|
prerelease: false
|
|
134
49
|
version_requirements: !ruby/object:Gem::Requirement
|
|
135
50
|
requirements:
|
|
136
|
-
- - "
|
|
51
|
+
- - ">="
|
|
137
52
|
- !ruby/object:Gem::Version
|
|
138
|
-
version: '
|
|
53
|
+
version: '0'
|
|
139
54
|
- !ruby/object:Gem::Dependency
|
|
140
55
|
name: simplecov
|
|
141
56
|
requirement: !ruby/object:Gem::Requirement
|
|
@@ -157,50 +72,30 @@ dependencies:
|
|
|
157
72
|
- - "~>"
|
|
158
73
|
- !ruby/object:Gem::Version
|
|
159
74
|
version: '2.1'
|
|
160
|
-
type: :
|
|
75
|
+
type: :runtime
|
|
161
76
|
prerelease: false
|
|
162
77
|
version_requirements: !ruby/object:Gem::Requirement
|
|
163
78
|
requirements:
|
|
164
79
|
- - "~>"
|
|
165
80
|
- !ruby/object:Gem::Version
|
|
166
81
|
version: '2.1'
|
|
167
|
-
description:
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
82
|
+
description: |-
|
|
83
|
+
ruby-plsql gem provides simple Ruby API for calling Oracle PL/SQL procedures.
|
|
84
|
+
It could be used both for accessing Oracle PL/SQL API procedures in legacy applications
|
|
85
|
+
as well as it could be used to create PL/SQL unit tests using Ruby testing libraries.
|
|
171
86
|
email: raimonds.simanovskis@gmail.com
|
|
172
87
|
executables: []
|
|
173
88
|
extensions: []
|
|
174
89
|
extra_rdoc_files:
|
|
175
90
|
- README.md
|
|
176
91
|
files:
|
|
177
|
-
- ".github/stale.yml"
|
|
178
|
-
- ".github/workflows/rubocop.yml"
|
|
179
|
-
- ".github/workflows/test.yml"
|
|
180
|
-
- ".rubocop.yml"
|
|
181
|
-
- ".travis.yml"
|
|
182
|
-
- ".travis/oracle/download.sh"
|
|
183
|
-
- ".travis/oracle/install.sh"
|
|
184
|
-
- ".travis/setup_accounts.sh"
|
|
185
|
-
- Gemfile
|
|
186
92
|
- History.txt
|
|
187
93
|
- License.txt
|
|
188
94
|
- README.md
|
|
189
|
-
- Rakefile
|
|
190
95
|
- VERSION
|
|
191
|
-
- Vagrantfile
|
|
192
|
-
- ci/network/admin/tnsnames.ora
|
|
193
|
-
- ci/setup_accounts.sh
|
|
194
|
-
- gemfiles/Gemfile.activerecord-5.0
|
|
195
|
-
- gemfiles/Gemfile.activerecord-5.1
|
|
196
|
-
- gemfiles/Gemfile.activerecord-5.2
|
|
197
|
-
- gemfiles/Gemfile.activerecord-6.0
|
|
198
|
-
- gemfiles/Gemfile.activerecord-6.1
|
|
199
|
-
- gemfiles/Gemfile.activerecord-main
|
|
200
96
|
- lib/plsql/connection.rb
|
|
201
97
|
- lib/plsql/helpers.rb
|
|
202
98
|
- lib/plsql/jdbc_connection.rb
|
|
203
|
-
- lib/plsql/oci8_patches.rb
|
|
204
99
|
- lib/plsql/oci_connection.rb
|
|
205
100
|
- lib/plsql/package.rb
|
|
206
101
|
- lib/plsql/procedure.rb
|
|
@@ -215,30 +110,10 @@ files:
|
|
|
215
110
|
- lib/plsql/view.rb
|
|
216
111
|
- lib/ruby-plsql.rb
|
|
217
112
|
- lib/ruby_plsql.rb
|
|
218
|
-
|
|
219
|
-
- spec/plsql/connection_spec.rb
|
|
220
|
-
- spec/plsql/package_spec.rb
|
|
221
|
-
- spec/plsql/procedure_spec.rb
|
|
222
|
-
- spec/plsql/schema_spec.rb
|
|
223
|
-
- spec/plsql/sequence_spec.rb
|
|
224
|
-
- spec/plsql/sql_statements_spec.rb
|
|
225
|
-
- spec/plsql/table_spec.rb
|
|
226
|
-
- spec/plsql/type_spec.rb
|
|
227
|
-
- spec/plsql/variable_spec.rb
|
|
228
|
-
- spec/plsql/version_spec.rb
|
|
229
|
-
- spec/plsql/view_spec.rb
|
|
230
|
-
- spec/spec.opts
|
|
231
|
-
- spec/spec_helper.rb
|
|
232
|
-
- spec/support/create_arunit_user.sql
|
|
233
|
-
- spec/support/custom_config.rb.sample
|
|
234
|
-
- spec/support/file_check_script.sh
|
|
235
|
-
- spec/support/test_db.rb
|
|
236
|
-
- spec/support/unlock_and_setup_hr_user.sql
|
|
237
|
-
homepage: http://github.com/rsim/ruby-plsql
|
|
113
|
+
homepage: https://github.com/rsim/ruby-plsql
|
|
238
114
|
licenses:
|
|
239
115
|
- MIT
|
|
240
116
|
metadata: {}
|
|
241
|
-
post_install_message:
|
|
242
117
|
rdoc_options: []
|
|
243
118
|
require_paths:
|
|
244
119
|
- lib
|
|
@@ -253,8 +128,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
|
253
128
|
- !ruby/object:Gem::Version
|
|
254
129
|
version: '0'
|
|
255
130
|
requirements: []
|
|
256
|
-
rubygems_version:
|
|
257
|
-
signing_key:
|
|
131
|
+
rubygems_version: 4.0.10
|
|
258
132
|
specification_version: 4
|
|
259
133
|
summary: Ruby API for calling Oracle PL/SQL procedures.
|
|
260
134
|
test_files: []
|
data/.github/stale.yml
DELETED
|
@@ -1,37 +0,0 @@
|
|
|
1
|
-
# Configuration for probot-stale - https://github.com/probot/stale
|
|
2
|
-
|
|
3
|
-
# Number of days of inactivity before an Issue or Pull Request becomes stale
|
|
4
|
-
daysUntilStale: 60
|
|
5
|
-
# Number of days of inactivity before a stale Issue or Pull Request is closed
|
|
6
|
-
daysUntilClose: 7
|
|
7
|
-
# Issues or Pull Requests with these labels will never be considered stale. Set to `[]` to disable
|
|
8
|
-
exemptLabels:
|
|
9
|
-
- pinned
|
|
10
|
-
- security
|
|
11
|
-
- "[Status] Maybe Later"
|
|
12
|
-
# Label to use when marking as stale
|
|
13
|
-
staleLabel: wontfix
|
|
14
|
-
# Comment to post when marking as stale. Set to `false` to disable
|
|
15
|
-
markComment: >
|
|
16
|
-
This issue has been automatically marked as stale because it has not had
|
|
17
|
-
recent activity. It will be closed if no further activity occurs. Thank you
|
|
18
|
-
for your contributions.
|
|
19
|
-
# Comment to post when removing the stale label. Set to `false` to disable
|
|
20
|
-
unmarkComment: false
|
|
21
|
-
# Comment to post when closing a stale Issue or Pull Request. Set to `false` to disable
|
|
22
|
-
closeComment: false
|
|
23
|
-
# Limit the number of actions per hour, from 1-30. Default is 30
|
|
24
|
-
limitPerRun: 30
|
|
25
|
-
# Limit to only `issues` or `pulls`
|
|
26
|
-
# only: issues
|
|
27
|
-
#
|
|
28
|
-
# Optionally, specify configuration settings that are specific to just 'issues' or 'pulls':
|
|
29
|
-
# pulls:
|
|
30
|
-
# daysUntilStale: 30
|
|
31
|
-
# markComment: >
|
|
32
|
-
# This pull request has been automatically marked as stale because it has not had
|
|
33
|
-
# recent activity. It will be closed if no further activity occurs. Thank you
|
|
34
|
-
# for your contributions.
|
|
35
|
-
# issues:
|
|
36
|
-
# exemptLabels:
|
|
37
|
-
# - confirmed
|
|
@@ -1,37 +0,0 @@
|
|
|
1
|
-
name: RuboCop
|
|
2
|
-
|
|
3
|
-
on:
|
|
4
|
-
push:
|
|
5
|
-
pull_request:
|
|
6
|
-
schedule:
|
|
7
|
-
- cron: "0 0 * * *"
|
|
8
|
-
|
|
9
|
-
jobs:
|
|
10
|
-
build:
|
|
11
|
-
|
|
12
|
-
runs-on: ubuntu-latest
|
|
13
|
-
|
|
14
|
-
steps:
|
|
15
|
-
- uses: actions/checkout@v1
|
|
16
|
-
- name: Set up Ruby 2.6
|
|
17
|
-
uses: actions/setup-ruby@v1
|
|
18
|
-
with:
|
|
19
|
-
ruby-version: 2.6.x
|
|
20
|
-
- name: Install required package
|
|
21
|
-
run: |
|
|
22
|
-
sudo apt-get install alien
|
|
23
|
-
- name: Download Oracle instant client
|
|
24
|
-
run: |
|
|
25
|
-
wget -q https://download.oracle.com/otn_software/linux/instantclient/193000/oracle-instantclient19.3-basic-19.3.0.0.0-1.x86_64.rpm
|
|
26
|
-
wget -q https://download.oracle.com/otn_software/linux/instantclient/193000/oracle-instantclient19.3-sqlplus-19.3.0.0.0-1.x86_64.rpm
|
|
27
|
-
wget -q https://download.oracle.com/otn_software/linux/instantclient/193000/oracle-instantclient19.3-devel-19.3.0.0.0-1.x86_64.rpm
|
|
28
|
-
- name: Install Oracle instant client
|
|
29
|
-
run: |
|
|
30
|
-
sudo alien -i oracle-instantclient19.3-basic-19.3.0.0.0-1.x86_64.rpm
|
|
31
|
-
sudo alien -i oracle-instantclient19.3-sqlplus-19.3.0.0.0-1.x86_64.rpm
|
|
32
|
-
sudo alien -i oracle-instantclient19.3-devel-19.3.0.0.0-1.x86_64.rpm
|
|
33
|
-
|
|
34
|
-
- name: Build and run RuboCop
|
|
35
|
-
run: |
|
|
36
|
-
bundle install --jobs 4 --retry 3
|
|
37
|
-
bundle exec rubocop --parallel
|