activerecord-oracle_enhanced-adapter 1.7.11 → 1.8.0.beta1
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/.rspec +2 -0
- data/Gemfile +20 -11
- data/History.md +123 -4
- data/RUNNING_TESTS.md +79 -55
- data/Rakefile +13 -19
- data/VERSION +1 -1
- data/activerecord-oracle_enhanced-adapter.gemspec +16 -17
- data/lib/active_record/connection_adapters/emulation/oracle_adapter.rb +1 -1
- data/lib/active_record/connection_adapters/oracle_enhanced/column.rb +7 -59
- data/lib/active_record/connection_adapters/oracle_enhanced/column_dumper.rb +6 -50
- data/lib/active_record/connection_adapters/oracle_enhanced/connection.rb +11 -11
- data/lib/active_record/connection_adapters/oracle_enhanced/context_index.rb +117 -117
- data/lib/active_record/connection_adapters/oracle_enhanced/database_statements.rb +30 -23
- data/lib/active_record/connection_adapters/oracle_enhanced/database_tasks.rb +10 -10
- data/lib/active_record/connection_adapters/oracle_enhanced/jdbc_connection.rb +48 -70
- data/lib/active_record/connection_adapters/oracle_enhanced/jdbc_quoting.rb +1 -4
- data/lib/active_record/connection_adapters/oracle_enhanced/oci_connection.rb +51 -69
- data/lib/active_record/connection_adapters/oracle_enhanced/oci_quoting.rb +4 -4
- data/lib/active_record/connection_adapters/oracle_enhanced/procedures.rb +76 -76
- data/lib/active_record/connection_adapters/oracle_enhanced/quoting.rb +13 -42
- data/lib/active_record/connection_adapters/oracle_enhanced/schema_creation.rb +60 -64
- data/lib/active_record/connection_adapters/oracle_enhanced/schema_definitions.rb +33 -47
- data/lib/active_record/connection_adapters/oracle_enhanced/schema_dumper.rb +146 -159
- data/lib/active_record/connection_adapters/oracle_enhanced/schema_statements.rb +94 -132
- data/lib/active_record/connection_adapters/oracle_enhanced/schema_statements_ext.rb +3 -3
- data/lib/active_record/connection_adapters/oracle_enhanced/structure_dump.rb +65 -100
- data/lib/active_record/connection_adapters/oracle_enhanced/version.rb +1 -1
- data/lib/active_record/connection_adapters/oracle_enhanced_adapter.rb +250 -487
- data/lib/active_record/oracle_enhanced/type/boolean.rb +7 -10
- data/lib/active_record/oracle_enhanced/type/integer.rb +3 -4
- data/lib/active_record/oracle_enhanced/type/national_character_string.rb +1 -1
- data/lib/active_record/oracle_enhanced/type/raw.rb +2 -3
- data/lib/active_record/oracle_enhanced/type/string.rb +2 -2
- data/lib/active_record/oracle_enhanced/type/text.rb +2 -2
- data/lib/activerecord-oracle_enhanced-adapter.rb +2 -2
- data/spec/active_record/connection_adapters/oracle_enhanced_adapter_spec.rb +57 -131
- data/spec/active_record/connection_adapters/oracle_enhanced_connection_spec.rb +32 -34
- data/spec/active_record/connection_adapters/oracle_enhanced_context_index_spec.rb +40 -42
- data/spec/active_record/connection_adapters/oracle_enhanced_cpk_spec.rb +83 -85
- data/spec/active_record/connection_adapters/oracle_enhanced_data_types_spec.rb +205 -286
- data/spec/active_record/connection_adapters/oracle_enhanced_database_tasks_spec.rb +14 -6
- data/spec/active_record/connection_adapters/oracle_enhanced_dbms_output_spec.rb +3 -5
- data/spec/active_record/connection_adapters/oracle_enhanced_dirty_spec.rb +42 -49
- data/spec/active_record/connection_adapters/oracle_enhanced_emulate_oracle_adapter_spec.rb +1 -3
- data/spec/active_record/connection_adapters/oracle_enhanced_procedures_spec.rb +68 -71
- data/spec/active_record/connection_adapters/oracle_enhanced_schema_dump_spec.rb +51 -92
- data/spec/active_record/connection_adapters/oracle_enhanced_schema_statements_spec.rb +221 -327
- data/spec/active_record/connection_adapters/oracle_enhanced_structure_dump_spec.rb +16 -18
- data/spec/spec_helper.rb +59 -57
- metadata +10 -10
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 7f1beed345101483212d25e0040e52c3fd04c727
|
4
|
+
data.tar.gz: 75338dd46c82d721a9d5762e900444ecc41b563f
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 821f716a5eb0bed68a572bd2c2e848e8800bedbec6fe2132fcc7bd97fd76e8e9c8d0e630b781deccc196165764afac8fc1ee65d1e5bd6019e2facfc4db2d8511
|
7
|
+
data.tar.gz: b1bcd32cb0b630b2db83c44dccf398620ff84a6032dc0876d0c38f1cb4993045b57cb6b604498e78f34928d819fc163241aeb2960021876157d4bf6aac53446e
|
data/.rspec
CHANGED
data/Gemfile
CHANGED
@@ -1,22 +1,31 @@
|
|
1
|
-
source
|
1
|
+
source "http://rubygems.org"
|
2
|
+
|
3
|
+
git_source(:github) do |repo_name|
|
4
|
+
repo_name = "#{repo_name}/#{repo_name}" unless repo_name.include?("/")
|
5
|
+
"https://github.com/#{repo_name}.git"
|
6
|
+
end
|
2
7
|
|
3
8
|
group :development do
|
4
|
-
gem
|
5
|
-
gem
|
6
|
-
gem
|
9
|
+
gem "rspec"
|
10
|
+
gem "rdoc"
|
11
|
+
gem "rake"
|
7
12
|
|
8
|
-
gem
|
9
|
-
gem
|
10
|
-
gem 'arel', github: 'rails/arel', branch: '7-1-stable'
|
13
|
+
gem "activerecord", github: "rails/rails", branch: "master"
|
14
|
+
gem "rack", github: "rack/rack", branch: "master"
|
11
15
|
|
12
|
-
gem
|
16
|
+
gem "ruby-plsql", github: "rsim/ruby-plsql", branch: "master"
|
13
17
|
|
14
18
|
platforms :ruby do
|
15
|
-
gem
|
16
|
-
gem
|
19
|
+
gem "ruby-oci8", github: "kubo/ruby-oci8"
|
20
|
+
gem "byebug"
|
17
21
|
end
|
18
22
|
|
19
23
|
platforms :jruby do
|
20
|
-
gem
|
24
|
+
gem "pry"
|
25
|
+
gem "pry-nav"
|
21
26
|
end
|
22
27
|
end
|
28
|
+
|
29
|
+
group :test do
|
30
|
+
gem "simplecov", github: "colszowka/simplecov", branch: "master", require: false
|
31
|
+
end
|
data/History.md
CHANGED
@@ -1,11 +1,130 @@
|
|
1
|
-
## 1.
|
1
|
+
## 1.8.0.beta1 / 2017-02-27
|
2
|
+
|
3
|
+
* Major enhancements
|
4
|
+
* Support Rails 5.1.0.beta1
|
5
|
+
* Fallback :bigint to :integer for primary keys [#1077]
|
6
|
+
* Drop Java SE 6 or older version of Java SE support [#1126]
|
7
|
+
* Drop JRuby 9.0.x support for Rails 5.1 [#1147]
|
8
|
+
* Refactor ColumnDumper to support consistent Virtual column with Rails [#1185]
|
9
|
+
* Schema dumper supports `t.index` in `create_table` [#1187]
|
10
|
+
* `table_exists?` only checks tables, does not check views [#1179, #1191]
|
11
|
+
* `data_sources` returns tables and views [#1192]
|
12
|
+
* `Model.table_comment` syntax is not supported anymore [#1199]
|
13
|
+
* Remove Oracle enhanced adapter own foreign key implementations [#977]
|
2
14
|
|
3
15
|
* Changes and bug fixes
|
4
|
-
*
|
5
|
-
*
|
16
|
+
* Rails 5.1.0.beta1 is out [#1204]
|
17
|
+
* Composite foreign keys are not supported [#1188]
|
18
|
+
* Introduce `supports_virtual_columns?` [#1184]
|
19
|
+
* Made it able to change column with adding comment [#1156, #1164]
|
20
|
+
* Omit table comment option of schema.rb if it is blank [#1159]
|
21
|
+
* Fix to return nil if column comment is blank at table creation [#1158]
|
22
|
+
* `bind_param` arity change, not to take column [#1203]
|
23
|
+
* ActiveRecord `structure_dump` and `structure_load` signature changes [#1125]
|
24
|
+
* Quoting booleans should return a frozen string [#956]
|
25
|
+
* Pass `type_casted_binds` to log subscriber [#957]
|
26
|
+
* `supports_datetime_with_precision?` always returns `true` [#964]
|
27
|
+
* Handle ORA-00942 and ORA-00955 as `ActiveRecord::StatementInvalid` [#1093]
|
28
|
+
* Raise `ActiveRecord::StatementInvalid` at `rename_index` when old index does not exist [#1195]
|
29
|
+
* Handle `ORA-01418: specified index does not exist` as `ActiveRecord::StatementInvalid` [#1195]
|
30
|
+
* Raise ActiveRecord::NotNullViolation when OCIError: ORA-01400 [#1174]
|
31
|
+
* Rails 5.1 : insert into `returning_id` not working since rails/rails#26002 [#988, #1088]
|
32
|
+
* Make `exec_{insert,update}` signatures consistent [#966]
|
33
|
+
* Introduce OracleEnhanced `ColumnMethods` module and `AlterTable` `Table` classes [#1081]
|
34
|
+
* `empty_insert_statement_value` is not implemented [#1180]
|
35
|
+
* Switch to keyword args for `type_to_sql` [#1167, #1168]
|
36
|
+
* Replace `all_timestamp_attributes` with `all_timestamp_attributes_in_model` [#1129]
|
37
|
+
* `current_database` returns the expected database name [#1135]
|
38
|
+
* Use `supports_foreign_keys_in_create?` [#1143]
|
39
|
+
* Address `add_column` gets `ArgumentError: wrong number of arguments` [#1157, #1170]
|
40
|
+
* Address `change_column` `ArgumentError: wrong number of arguments` [#1171, #1172]
|
41
|
+
* SchemaDumper should not dump views as tables [#1192]
|
42
|
+
* Use Abstract `select_rows(arel, name = nil, binds = [])` [#1132]
|
43
|
+
* Address `OCIError: ORA-01756: quoted string not properly terminated:` [#1102]
|
44
|
+
* Use `table_exists?` and `tables` [#1170, #1178]
|
45
|
+
* Move `ActiveModel::Type::Text` to `ActiveRecord::Type::Text` [#1082]
|
46
|
+
* Support schema option for views [#1190]
|
47
|
+
* Quote table and trigger names containing sinqle quote character [#1192]
|
48
|
+
* Restore :raw type migration support [#1176]
|
49
|
+
* Refactor Boolean type by removing duplicate code [#1047]
|
50
|
+
* Remove deprecated methods to get and set columns [#958]
|
51
|
+
* Remove `is_?` deprecated methods [#959]
|
52
|
+
* Remove `quote_date_with_to_date` and `quote_timestamp_with_to_timestamp` #960
|
53
|
+
* Remove unnecessary comments in Type [#961]
|
54
|
+
* Remove options[:default] for virtual columns [#962]
|
55
|
+
* Remove `self.emulate_dates` and `self.emulate_dates_by_column_name` [#963]
|
56
|
+
* Delete `self.boolean_to_string` [#967]
|
57
|
+
* Delete Oracle enhanced its own `join_to_update` [#968]
|
58
|
+
* Remove `self.ignore_table_columns` [#969]
|
59
|
+
* Remove unused `self.virtual_columns` [#970]
|
60
|
+
* Remove `dump_schema_information` and `initialize_schema_migrations_table` [#972]
|
61
|
+
* Remove `fallback_string_to_date`, `fallback_string_to_time` [#974, #975, #1112]
|
62
|
+
* Remove `dependent` option from `add_foreign_key` [#976]
|
63
|
+
* Remove specs testing Rails `self.ignored_columns` features [#987]
|
64
|
+
* Remove `add_foreign_key` specs with `table_name_prefix` and `table_name_suffix` [#990]
|
65
|
+
* Remove `type_cast` method just calling super [#1201]
|
66
|
+
* Remove `ids_in_list_limit` alias [#1202]
|
67
|
+
* Remove unused comments from data types spec [#1079]
|
68
|
+
* Remove deprecated `table_exists?` and `tables` [#1100, #1178]
|
69
|
+
* Remove deprecated `name` argument from `#tables` [#1189]
|
70
|
+
* Prefer `SYS_CONTEXT` function than `v$nls_parameters` view [#1107]
|
71
|
+
* `initialize_schema_migrations_table` method has been removed [#1144]
|
72
|
+
* `index_name_exists?` at schema statements spec is not necessary [#1197]
|
73
|
+
* Remove comments for `data_source_exists?` [#1200]
|
74
|
+
* Address DEPRECATION WARNING: Passing a column to `quote` has been deprecated. [#978]
|
75
|
+
* Deprecate `supports_primary_key?` [#1177]
|
76
|
+
* Deprecate passing `default` to `index_name_exists?` [#1175]
|
77
|
+
* Suppress `add_index_options` method `DEPRECATION WARNING:` [#1193]
|
78
|
+
* Suppress `remove_index` method deprecation warning [#1194]
|
79
|
+
* Suppress DEPRECATION WARNING at `rename_index` [#1195]
|
80
|
+
* Suppress `oracle_enhanced_adapter.rb:591: warning: assigned but unused` [#1198]
|
81
|
+
* Use rails rubocop setting [#1111]
|
82
|
+
* Rubocop addresses `Extra empty line detected at class body beginning.` [#1078]
|
83
|
+
* Address `Lint/EndAlignment` offences by changing code ifself [#1113]
|
84
|
+
* rubocop `AlignWith` has been renamed to `EnforcedStyleAlignWith` [#1142]
|
85
|
+
* Add `Style/EmptyLinesAroundMethodBody` [#1173]
|
86
|
+
* Address git warnings: [#1000]
|
87
|
+
* Update `required_rubygems_version` just following rails.gemspec [#1110]
|
88
|
+
* Use the latest ruby-plsql while developing alpha version [#1114]
|
89
|
+
* Use the latest arel master while developing alpha version [#1115]
|
90
|
+
* Bump Arel to 8.0 [#1120, #1121, #1124]
|
91
|
+
* Use released Arel 8 [#1205]
|
92
|
+
* Remove duplicate license information [#965]
|
93
|
+
* Clean up comments and un-commented specs for table comment feature [#971]
|
94
|
+
* Use Rails migration `create_table` to create table and sequence [#991]
|
95
|
+
* Removed a invalid spec about TIMESTAMP column [#1020]
|
96
|
+
* Remove specs which set `attribute :hire_date, :date` [#1024]
|
97
|
+
* Remove version specification for rspec [#1055]
|
98
|
+
* Suppress `create_table(:test_employees, {:force=>true})` message [#1080]
|
99
|
+
* Perform `drop_table :test_employees` [#1087]
|
100
|
+
* Address rspec deprecation warning [#1089]
|
101
|
+
* Suppress rspec warning [#1101]
|
102
|
+
* Suppress `Dropped database 'ORCL'` messages while running rspec [#1103]
|
103
|
+
* Address rspec warnings by checking with `raise_errors_for_deprecations!` [#1104]
|
104
|
+
* `clear_cache!` always exists at least since Rails 4.0 [#1106]
|
105
|
+
* Use SimpleCov [#1108]
|
106
|
+
* Enable RSpec `--warnings` option [#1116]
|
107
|
+
* Remove entry for rcov since it already migrated to simplecov [#1118]
|
108
|
+
* Add spec for #1149 `TypeError: can't cast Java::JavaSql::Timestamp` [#1152]
|
109
|
+
* Remove a duplicated specs [#1163]
|
110
|
+
* Specify `--require spec_helper` in .rspec [#1186]
|
111
|
+
* Add 'pry' and 'pry-nav' for JRuby debug [#973]
|
112
|
+
* Remove ruby-debug [#1196]
|
113
|
+
* Use Ubuntu Trusty at travis [#1095]
|
114
|
+
* Address travis.yml has multilpe language entries [#1109]
|
115
|
+
* Use docker-oracle-xe-11g for Travis CI [#1117]
|
116
|
+
* Modify `JRUBY_OPTS` for Travis CI [#1119]
|
117
|
+
* Add ruby-head and jruby-head to .travis.yml [#1127]
|
118
|
+
* Use JRuby 9.1.7.0 [#1138]
|
119
|
+
* Add JRuby 9.0.4.0 and allow JRuby 9.0.5.0 failures [#1146]
|
120
|
+
* Tiny fix for .travis.yml after migrating to docker-oracle-xe-11g [#1183]
|
121
|
+
* Templates updated to use Rails master branch for Rails 5.1 [#1133]
|
122
|
+
* Update running tests to include rails-dev-box [#1140]
|
6
123
|
|
7
124
|
* Known issues
|
8
|
-
|
125
|
+
* Legacy primary key support testing [#1207]
|
126
|
+
* PrimaryKeyIntegerNilDefaultTest failures [#1162]
|
127
|
+
* Skip `explain should explain query with bind` with JRuby [#1091]
|
9
128
|
|
10
129
|
## 1.7.10 / 2017-02-03
|
11
130
|
|
data/RUNNING_TESTS.md
CHANGED
@@ -1,83 +1,107 @@
|
|
1
|
-
|
2
|
-
--------------------------
|
1
|
+
# When and Which tests need to be executed
|
3
2
|
|
4
|
-
|
3
|
+
When you are creating a fix and/or some new features for Oracle enhanced adapter,
|
4
|
+
It is recommended to execute Oracle enhanced adapter unit tests and ActiveRecord unit tests.
|
5
5
|
|
6
|
-
|
6
|
+
* Oracle enhanced adapter unit test
|
7
|
+
* ActiveRecord unit test
|
7
8
|
|
8
|
-
|
9
|
+
This document explains how to prepare and execute Oracle enhanced adapter unit test.
|
10
|
+
For ActiveRecord unit test, please refer [Contributing to Ruby on Rails](http://edgeguides.rubyonrails.org/contributing_to_ruby_on_rails.html) .
|
9
11
|
|
10
|
-
|
12
|
+
This document talks about developing Oracle enhanced adapter itself, does NOT talk about developing Rails applications using Oracle enhanced adapter.
|
11
13
|
|
12
|
-
|
14
|
+
# Building development and test environment
|
13
15
|
|
14
|
-
|
16
|
+
You can create Oracle enhanced adapter development and test environment by following one of them. If you are first to create this environment
|
17
|
+
[rails-dev-box runs_oracle branch](https://github.com/yahonda/rails-dev-box/tree/runs_oracle) is recommended.
|
15
18
|
|
16
|
-
|
17
|
-
|
19
|
+
## [rails-dev-box runs_oracle branch](https://github.com/yahonda/rails-dev-box/tree/runs_oracle)
|
20
|
+
* Please follow the [README](https://github.com/yahonda/rails-dev-box/tree/runs_oracle#a-virtual-machine-for-ruby-on-rails-core-development-with-oracle-database) .
|
18
21
|
|
19
|
-
|
22
|
+
## [rails-dev-box runs_oracle_on_docker branch](https://github.com/yahonda/rails-dev-box/tree/runs_oracle_on_docker)
|
23
|
+
* Please follow the [README](https://github.com/yahonda/rails-dev-box/blob/runs_oracle_on_docker/README.md#a-virtual-machine-for-ruby-on-rails-core-development) .
|
20
24
|
|
21
|
-
|
25
|
+
## Create by yourself
|
26
|
+
You can create your development and test environment by yourself.
|
22
27
|
|
23
|
-
|
28
|
+
### Install Ruby
|
29
|
+
Install Ruby 2.2.2 or higher version of Ruby and JRuby 9.0.5 or higher. To switch multiple version of ruby, you can use use [ruby-build](https://github.com/rbenv/ruby-build) or [Ruby Version Manager(RVM)](https://rvm.io/).
|
24
30
|
|
25
|
-
|
31
|
+
### Creating the test database
|
32
|
+
To test Oracle enhanced adapter Oracle database is necesssary. You can build by your own or use the Docker to run pre-build Oracle Database Express Edition 11g Release 2.
|
26
33
|
|
27
|
-
|
34
|
+
#### Create database by yourself
|
35
|
+
Oracle database 11.2 or later with SYS and SYSTEM user access. AL32UTF8 database character set is recommended.
|
28
36
|
|
29
|
-
|
37
|
+
#### Docker
|
38
|
+
If no Oracle database with SYS and SYSTEM user access is available, try the docker approach.
|
30
39
|
|
31
|
-
|
40
|
+
* Install [Docker](https://docker.github.io/engine/installation/)
|
32
41
|
|
33
|
-
|
42
|
+
* Pull [docker-oracle-xe-11g](https://hub.docker.com/r/wnameless/oracle-xe-11g/) image from docker hub
|
43
|
+
```sh
|
44
|
+
$ docker pull wnameless/oracle-xe-11g
|
45
|
+
```
|
34
46
|
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
name: 'xe'
|
40
|
-
host: 'localhost'
|
41
|
-
port: 49161
|
42
|
-
user: 'oracle_enhanced'
|
43
|
-
password: 'oracle_enhanced'
|
44
|
-
sys_password: 'oracle'
|
45
|
-
non_default_tablespace: 'SYSTEM'
|
46
|
-
timezone: 'Europe/Riga'
|
47
|
-
```
|
47
|
+
* Start a Oracle database docker container with mapped ports. Use port `49161` to access the database.
|
48
|
+
```sh
|
49
|
+
$ docker run -d -p 49160:22 -p 49161:1521 wnameless/oracle-xe-11g
|
50
|
+
```
|
48
51
|
|
49
|
-
|
50
|
-
|
52
|
+
* Check connection to the database with `sqlplus`. The user is `system`, the password is `oracle`.
|
53
|
+
```sh
|
54
|
+
$ sqlplus64 system/oracle@localhost:49161
|
55
|
+
```
|
51
56
|
|
52
|
-
oracle_enhanced is tested with MRI 2.1.x and 2.2.x, and JRuby 1.7.x and 9.0.x.x.
|
53
57
|
|
54
|
-
|
55
|
-
|
56
|
-
Running tests
|
57
|
-
-------------
|
58
|
+
### Creating database schemas at the test database
|
58
59
|
|
59
60
|
* Create Oracle database schema for test purposes. Review `spec/spec_helper.rb` to see default schema/user names and database names (use environment variables to override defaults)
|
60
61
|
|
61
|
-
|
62
|
-
|
63
|
-
|
64
|
-
SQL> CREATE USER oracle_enhanced_schema IDENTIFIED BY oracle_enhanced_schema;
|
65
|
-
SQL> GRANT unlimited tablespace, create session, create table, create sequence, create procedure, create trigger, create view, create materialized view, create database link, create synonym, create type, ctxapp TO oracle_enhanced_schema;
|
62
|
+
```sql
|
63
|
+
SQL> CREATE USER oracle_enhanced IDENTIFIED BY oracle_enhanced;
|
64
|
+
SQL> GRANT unlimited tablespace, create session, create table, create sequence, create procedure, create trigger, create view, create materialized view, create database link, create synonym, create type, ctxapp TO oracle_enhanced;
|
66
65
|
|
67
|
-
|
68
|
-
|
69
|
-
|
70
|
-
|
71
|
-
gem install bundler
|
72
|
-
|
73
|
-
* Install necessary gems with
|
66
|
+
SQL> CREATE USER oracle_enhanced_schema IDENTIFIED BY oracle_enhanced_schema;
|
67
|
+
SQL> GRANT unlimited tablespace, create session, create table, create sequence, create procedure, create trigger, create view, create materialized view, create database link, create synonym, create type, ctxapp TO oracle_enhanced_schema;
|
68
|
+
```
|
74
69
|
|
75
|
-
|
70
|
+
### Configure database login credentials
|
76
71
|
|
77
72
|
* Configure database credentials in one of two ways:
|
78
|
-
* copy spec/spec_config.yaml.template to spec/spec_config.yaml and modify as needed
|
73
|
+
* copy `spec/spec_config.yaml.template` to `spec/spec_config.yaml` and modify as needed
|
79
74
|
* set required environment variables (see DATABASE_NAME in spec_helper.rb)
|
80
75
|
|
81
|
-
*
|
82
|
-
|
83
|
-
|
76
|
+
* The oracle enhanced configuration file `spec/spec_config.yaml` should look like:
|
77
|
+
|
78
|
+
```yaml
|
79
|
+
# copy this file to spec/config.yaml and set appropriate values
|
80
|
+
# you can also use environment variables, see spec_helper.rb
|
81
|
+
database:
|
82
|
+
name: 'xe'
|
83
|
+
host: 'localhost'
|
84
|
+
port: 49161
|
85
|
+
user: 'oracle_enhanced'
|
86
|
+
password: 'oracle_enhanced'
|
87
|
+
sys_password: 'oracle'
|
88
|
+
non_default_tablespace: 'SYSTEM'
|
89
|
+
timezone: 'Europe/Riga'
|
90
|
+
```
|
91
|
+
|
92
|
+
# Running Oracle enhanced adapter unit tests
|
93
|
+
|
94
|
+
* Install bundler
|
95
|
+
```sh
|
96
|
+
$ gem install bundler
|
97
|
+
```
|
98
|
+
|
99
|
+
* Execute bundle install to install required gems
|
100
|
+
```sh
|
101
|
+
$ bundle install
|
102
|
+
```
|
103
|
+
|
104
|
+
* Run Oracle enhanced adapter unit tests
|
105
|
+
```sh
|
106
|
+
$ bundle exec rake spec
|
107
|
+
```
|
data/Rakefile
CHANGED
@@ -1,6 +1,6 @@
|
|
1
|
-
require
|
2
|
-
require
|
3
|
-
require
|
1
|
+
require "rubygems"
|
2
|
+
require "bundler"
|
3
|
+
require "bundler/gem_tasks"
|
4
4
|
begin
|
5
5
|
Bundler.setup(:default, :development)
|
6
6
|
rescue Bundler::BundlerError => e
|
@@ -9,16 +9,11 @@ rescue Bundler::BundlerError => e
|
|
9
9
|
exit e.status_code
|
10
10
|
end
|
11
11
|
|
12
|
-
require
|
12
|
+
require "rake"
|
13
13
|
|
14
|
-
require
|
14
|
+
require "rspec/core/rake_task"
|
15
15
|
RSpec::Core::RakeTask.new(:spec)
|
16
16
|
|
17
|
-
RSpec::Core::RakeTask.new(:rcov) do |t|
|
18
|
-
t.rcov = true
|
19
|
-
t.rcov_opts = ['--exclude', '/Library,spec/']
|
20
|
-
end
|
21
|
-
|
22
17
|
desc "Clear test database"
|
23
18
|
task :clear do
|
24
19
|
require "./spec/spec_helper"
|
@@ -28,18 +23,17 @@ task :clear do
|
|
28
23
|
ActiveRecord::Base.connection.execute("PURGE RECYCLEBIN") rescue nil
|
29
24
|
end
|
30
25
|
|
31
|
-
# Clear test database before running spec
|
32
|
-
task :
|
33
|
-
task :rcov => :clear
|
26
|
+
# Clear test database before running spec
|
27
|
+
task spec: :clear
|
34
28
|
|
35
|
-
task :
|
29
|
+
task default: :spec
|
36
30
|
|
37
|
-
require
|
31
|
+
require "rdoc/task"
|
38
32
|
Rake::RDocTask.new do |rdoc|
|
39
|
-
version = File.exist?(
|
33
|
+
version = File.exist?("VERSION") ? File.read("VERSION") : ""
|
40
34
|
|
41
|
-
rdoc.rdoc_dir =
|
35
|
+
rdoc.rdoc_dir = "doc"
|
42
36
|
rdoc.title = "activerecord-oracle_enhanced-adapter #{version}"
|
43
|
-
rdoc.rdoc_files.include(
|
44
|
-
rdoc.rdoc_files.include(
|
37
|
+
rdoc.rdoc_files.include("README*")
|
38
|
+
rdoc.rdoc_files.include("lib/**/*.rb")
|
45
39
|
end
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
1.
|
1
|
+
1.8.0.beta1
|
@@ -1,16 +1,16 @@
|
|
1
1
|
Gem::Specification.new do |s|
|
2
|
-
s.name =
|
3
|
-
s.version = "1.
|
2
|
+
s.name = "activerecord-oracle_enhanced-adapter"
|
3
|
+
s.version = "1.8.0.beta1"
|
4
4
|
|
5
|
-
s.required_rubygems_version =
|
6
|
-
s.required_ruby_version =
|
7
|
-
s.license =
|
8
|
-
s.authors = [
|
9
|
-
s.date =
|
10
|
-
s.description =
|
5
|
+
s.required_rubygems_version = ">= 1.8.11"
|
6
|
+
s.required_ruby_version = ">= 2.2.2"
|
7
|
+
s.license = "MIT"
|
8
|
+
s.authors = ["Raimonds Simanovskis"]
|
9
|
+
s.date = "2016-12-26"
|
10
|
+
s.description = 'Oracle "enhanced" ActiveRecord adapter contains useful additional methods for working with new and legacy Oracle databases.
|
11
11
|
This adapter is superset of original ActiveRecord Oracle adapter.
|
12
|
-
|
13
|
-
s.email =
|
12
|
+
'
|
13
|
+
s.email = "raimonds.simanovskis@gmail.com"
|
14
14
|
s.extra_rdoc_files = [
|
15
15
|
"README.md"
|
16
16
|
]
|
@@ -68,9 +68,9 @@ This adapter is superset of original ActiveRecord Oracle adapter.
|
|
68
68
|
"spec/active_record/connection_adapters/oracle_enhanced_structure_dump_spec.rb",
|
69
69
|
"spec/spec_helper.rb"
|
70
70
|
]
|
71
|
-
s.homepage =
|
72
|
-
s.require_paths = [
|
73
|
-
s.summary =
|
71
|
+
s.homepage = "http://github.com/rsim/oracle-enhanced"
|
72
|
+
s.require_paths = ["lib"]
|
73
|
+
s.summary = "Oracle enhanced adapter for ActiveRecord"
|
74
74
|
s.test_files = [
|
75
75
|
"spec/active_record/connection_adapters/oracle_enhanced_adapter_spec.rb",
|
76
76
|
"spec/active_record/connection_adapters/oracle_enhanced_connection_spec.rb",
|
@@ -87,8 +87,7 @@ This adapter is superset of original ActiveRecord Oracle adapter.
|
|
87
87
|
"spec/active_record/connection_adapters/oracle_enhanced_structure_dump_spec.rb",
|
88
88
|
"spec/spec_helper.rb"
|
89
89
|
]
|
90
|
-
s.add_runtime_dependency(
|
91
|
-
s.add_runtime_dependency(
|
92
|
-
s.add_runtime_dependency(
|
93
|
-
s.license = 'MIT'
|
90
|
+
s.add_runtime_dependency("activerecord", ["~> 5.1.0.beta"])
|
91
|
+
s.add_runtime_dependency("arel", ["~> 8.0"])
|
92
|
+
s.add_runtime_dependency("ruby-plsql")
|
94
93
|
end
|