activerecord-oracle_enhanced-adapter 6.1.1 → 6.1.2
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
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: fe153e95c0604a0c3c4d99c15e96122be421cf0ae458508cd0177a57434afe9e
|
4
|
+
data.tar.gz: 4d0bb45de045b0a51dfdd4c7328ad64999c2b4494e10791f361ae95f7d805523
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 1d692b70253c15a57353fe49cb6a576b067c00614fba6ed6f6eaef5169364c5e1899c0e69c9c8259224d9b7d6e0c1ac4299a31dad812403c51c41bbfeb90bfb3
|
7
|
+
data.tar.gz: 7f1b51e8ced3139c1a380804b772113ae3004d045de9c4b2c1632b833364b06f434b4b10446fc3a60290578f44fca2dde368227a25cfa4aefdaa101404baf252
|
data/History.md
CHANGED
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
6.1.
|
1
|
+
6.1.2
|
@@ -17,19 +17,19 @@ module ActiveRecord
|
|
17
17
|
print "Please provide the SYSTEM password for your Oracle installation (set ORACLE_SYSTEM_PASSWORD to avoid this prompt)\n>"
|
18
18
|
$stdin.gets.strip
|
19
19
|
}
|
20
|
-
establish_connection(@config.merge(
|
20
|
+
establish_connection(@config.merge(username: "SYSTEM", password: system_password))
|
21
21
|
begin
|
22
|
-
connection.execute "CREATE USER #{@config[
|
22
|
+
connection.execute "CREATE USER #{@config[:username]} IDENTIFIED BY #{@config[:password]}"
|
23
23
|
rescue => e
|
24
24
|
if /ORA-01920/.match?(e.message) # user name conflicts with another user or role name
|
25
|
-
connection.execute "ALTER USER #{@config[
|
25
|
+
connection.execute "ALTER USER #{@config[:username]} IDENTIFIED BY #{@config[:password]}"
|
26
26
|
else
|
27
27
|
raise e
|
28
28
|
end
|
29
29
|
end
|
30
30
|
|
31
31
|
OracleEnhancedAdapter.permissions.each do |permission|
|
32
|
-
connection.execute "GRANT #{permission} TO #{@config[
|
32
|
+
connection.execute "GRANT #{permission} TO #{@config[:username]}"
|
33
33
|
end
|
34
34
|
end
|
35
35
|
|
@@ -46,7 +46,7 @@ module ActiveRecord
|
|
46
46
|
def structure_dump(filename, extra_flags)
|
47
47
|
establish_connection(@config)
|
48
48
|
File.open(filename, "w:utf-8") { |f| f << connection.structure_dump }
|
49
|
-
if @config[
|
49
|
+
if @config[:structure_dump] == "db_stored_code"
|
50
50
|
File.open(filename, "a") { |f| f << connection.structure_dump_db_stored_code }
|
51
51
|
end
|
52
52
|
end
|
@@ -16,11 +16,11 @@ describe "Oracle Enhanced adapter database tasks" do
|
|
16
16
|
ActiveRecord::Tasks::DatabaseTasks.create(new_user_config)
|
17
17
|
end
|
18
18
|
end
|
19
|
-
|
19
|
+
it "creates user" do
|
20
20
|
query = "SELECT COUNT(*) FROM dba_users WHERE UPPER(username) = '#{new_user_config[:username].upcase}'"
|
21
21
|
expect(ActiveRecord::Base.connection.select_value(query)).to eq(1)
|
22
22
|
end
|
23
|
-
|
23
|
+
it "grants permissions defined by OracleEnhancedAdapter.persmissions" do
|
24
24
|
query = "SELECT COUNT(*) FROM DBA_SYS_PRIVS WHERE GRANTEE = '#{new_user_config[:username].upcase}'"
|
25
25
|
permissions_count = ActiveRecord::ConnectionAdapters::OracleEnhancedAdapter.permissions.size
|
26
26
|
expect(ActiveRecord::Base.connection.select_value(query)).to eq(permissions_count)
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: activerecord-oracle_enhanced-adapter
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 6.1.
|
4
|
+
version: 6.1.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Raimonds Simanovskis
|
8
|
-
autorequire:
|
8
|
+
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2021-
|
11
|
+
date: 2021-02-10 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activerecord
|
@@ -122,7 +122,7 @@ homepage: http://github.com/rsim/oracle-enhanced
|
|
122
122
|
licenses:
|
123
123
|
- MIT
|
124
124
|
metadata: {}
|
125
|
-
post_install_message:
|
125
|
+
post_install_message:
|
126
126
|
rdoc_options: []
|
127
127
|
require_paths:
|
128
128
|
- lib
|
@@ -138,7 +138,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
138
138
|
version: 1.8.11
|
139
139
|
requirements: []
|
140
140
|
rubygems_version: 3.2.3
|
141
|
-
signing_key:
|
141
|
+
signing_key:
|
142
142
|
specification_version: 4
|
143
143
|
summary: Oracle enhanced adapter for ActiveRecord
|
144
144
|
test_files:
|