activerecord-oracle_enhanced-adapter 1.4.1 → 1.4.2.rc1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (28) hide show
  1. data/Gemfile +1 -0
  2. data/History.md +16 -1
  3. data/README.md +60 -35
  4. data/Rakefile +14 -1
  5. data/VERSION +1 -1
  6. data/activerecord-oracle_enhanced-adapter.gemspec +2 -2
  7. data/lib/active_record/connection_adapters/oracle_enhanced_adapter.rb +27 -9
  8. data/lib/active_record/connection_adapters/oracle_enhanced_base_ext.rb +13 -1
  9. data/lib/active_record/connection_adapters/oracle_enhanced_column.rb +7 -2
  10. data/lib/active_record/connection_adapters/oracle_enhanced_context_index.rb +31 -0
  11. data/lib/active_record/connection_adapters/oracle_enhanced_dirty.rb +6 -1
  12. data/lib/active_record/connection_adapters/oracle_enhanced_jdbc_connection.rb +17 -5
  13. data/lib/active_record/connection_adapters/oracle_enhanced_oci_connection.rb +2 -1
  14. data/lib/active_record/connection_adapters/oracle_enhanced_schema_definitions.rb +29 -11
  15. data/lib/active_record/connection_adapters/oracle_enhanced_schema_dumper.rb +9 -4
  16. data/lib/active_record/connection_adapters/oracle_enhanced_schema_statements.rb +31 -7
  17. data/lib/active_record/connection_adapters/oracle_enhanced_structure_dump.rb +5 -1
  18. data/spec/active_record/connection_adapters/oracle_enhanced_adapter_spec.rb +34 -5
  19. data/spec/active_record/connection_adapters/oracle_enhanced_connection_spec.rb +22 -0
  20. data/spec/active_record/connection_adapters/oracle_enhanced_context_index_spec.rb +1 -0
  21. data/spec/active_record/connection_adapters/oracle_enhanced_data_types_spec.rb +52 -6
  22. data/spec/active_record/connection_adapters/oracle_enhanced_dirty_spec.rb +20 -0
  23. data/spec/active_record/connection_adapters/oracle_enhanced_procedures_spec.rb +6 -2
  24. data/spec/active_record/connection_adapters/oracle_enhanced_schema_dump_spec.rb +79 -21
  25. data/spec/active_record/connection_adapters/oracle_enhanced_schema_statements_spec.rb +203 -35
  26. data/spec/active_record/connection_adapters/oracle_enhanced_structure_dump_spec.rb +17 -1
  27. data/spec/spec_helper.rb +3 -1
  28. metadata +74 -51
@@ -19,7 +19,11 @@ describe "OracleEnhancedAdapter structure dump" do
19
19
  end
20
20
  class ::TestPost < ActiveRecord::Base
21
21
  end
22
- TestPost.set_table_name "test_posts"
22
+ if TestPost.respond_to?(:table_name=)
23
+ TestPost.table_name = "test_posts"
24
+ else
25
+ TestPost.set_table_name "test_posts"
26
+ end
23
27
  end
24
28
 
25
29
  after(:each) do
@@ -177,6 +181,18 @@ describe "OracleEnhancedAdapter structure dump" do
177
181
  dump.should =~ /CREATE INDEX "?IX_TEST_POSTS_FOO\"? ON "?TEST_POSTS"? \("?FOO"?\)/i
178
182
  dump.should_not =~ /CREATE UNIQUE INDEX "?UK_TEST_POSTS_/i
179
183
  end
184
+
185
+ it "should dump multi-value and function value indexes" do
186
+ ActiveRecord::Base.connection.add_index(:test_posts, [:foo, :foo_id], :name => :ix_test_posts_foo_foo_id)
187
+
188
+ @conn.execute <<-SQL
189
+ CREATE INDEX "IX_TEST_POSTS_FUNCTION" ON "TEST_POSTS" (TO_CHAR(LENGTH("FOO"))||"FOO")
190
+ SQL
191
+
192
+ dump = ActiveRecord::Base.connection.structure_dump
193
+ dump.should =~ /CREATE INDEX "?IX_TEST_POSTS_FOO_FOO_ID\"? ON "?TEST_POSTS"? \("?FOO"?, "?FOO_ID"?\)/i
194
+ dump.should =~ /CREATE INDEX "?IX_TEST_POSTS_FUNCTION\"? ON "?TEST_POSTS"? \(TO_CHAR\(LENGTH\("?FOO"?\)\)\|\|"?FOO"?\)/i
195
+ end
180
196
  end
181
197
  describe "temporary tables" do
182
198
  after(:all) do
data/spec/spec_helper.rb CHANGED
@@ -178,7 +178,9 @@ SYSTEM_CONNECTION_PARAMS = {
178
178
  DATABASE_NON_DEFAULT_TABLESPACE = ENV['DATABASE_NON_DEFAULT_TABLESPACE'] || "SYSTEM"
179
179
 
180
180
  # Set default $KCODE to UTF8
181
- $KCODE = "UTF8"
181
+ if RUBY_VERSION < "1.9"
182
+ $KCODE = "UTF8"
183
+ end
182
184
 
183
185
  # set default time zone in TZ environment variable
184
186
  # which will be used to set session time zone
metadata CHANGED
@@ -1,19 +1,19 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: activerecord-oracle_enhanced-adapter
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.4.1
5
- prerelease:
4
+ version: 1.4.2.rc1
5
+ prerelease: 6
6
6
  platform: ruby
7
7
  authors:
8
8
  - Raimonds Simanovskis
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2012-01-27 00:00:00.000000000Z
12
+ date: 2012-11-13 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: jeweler
16
- requirement: &2153250780 !ruby/object:Gem::Requirement
16
+ requirement: !ruby/object:Gem::Requirement
17
17
  none: false
18
18
  requirements:
19
19
  - - ~>
@@ -21,10 +21,15 @@ dependencies:
21
21
  version: 1.5.1
22
22
  type: :development
23
23
  prerelease: false
24
- version_requirements: *2153250780
24
+ version_requirements: !ruby/object:Gem::Requirement
25
+ none: false
26
+ requirements:
27
+ - - ~>
28
+ - !ruby/object:Gem::Version
29
+ version: 1.5.1
25
30
  - !ruby/object:Gem::Dependency
26
31
  name: rspec
27
- requirement: &2153250120 !ruby/object:Gem::Requirement
32
+ requirement: !ruby/object:Gem::Requirement
28
33
  none: false
29
34
  requirements:
30
35
  - - ~>
@@ -32,10 +37,15 @@ dependencies:
32
37
  version: '2.4'
33
38
  type: :development
34
39
  prerelease: false
35
- version_requirements: *2153250120
40
+ version_requirements: !ruby/object:Gem::Requirement
41
+ none: false
42
+ requirements:
43
+ - - ~>
44
+ - !ruby/object:Gem::Version
45
+ version: '2.4'
36
46
  - !ruby/object:Gem::Dependency
37
- name: activerecord
38
- requirement: &2153249460 !ruby/object:Gem::Requirement
47
+ name: rdoc
48
+ requirement: !ruby/object:Gem::Requirement
39
49
  none: false
40
50
  requirements:
41
51
  - - ! '>='
@@ -43,76 +53,79 @@ dependencies:
43
53
  version: '0'
44
54
  type: :development
45
55
  prerelease: false
46
- version_requirements: *2153249460
47
- - !ruby/object:Gem::Dependency
48
- name: activemodel
49
- requirement: &2153248740 !ruby/object:Gem::Requirement
56
+ version_requirements: !ruby/object:Gem::Requirement
50
57
  none: false
51
58
  requirements:
52
59
  - - ! '>='
53
60
  - !ruby/object:Gem::Version
54
61
  version: '0'
55
- type: :development
56
- prerelease: false
57
- version_requirements: *2153248740
58
62
  - !ruby/object:Gem::Dependency
59
- name: activesupport
60
- requirement: &2153244840 !ruby/object:Gem::Requirement
63
+ name: activerecord
64
+ requirement: !ruby/object:Gem::Requirement
61
65
  none: false
62
66
  requirements:
63
- - - ! '>='
67
+ - - '='
64
68
  - !ruby/object:Gem::Version
65
- version: '0'
69
+ version: 3.2.9
66
70
  type: :development
67
71
  prerelease: false
68
- version_requirements: *2153244840
72
+ version_requirements: !ruby/object:Gem::Requirement
73
+ none: false
74
+ requirements:
75
+ - - '='
76
+ - !ruby/object:Gem::Version
77
+ version: 3.2.9
69
78
  - !ruby/object:Gem::Dependency
70
79
  name: actionpack
71
- requirement: &2153243500 !ruby/object:Gem::Requirement
80
+ requirement: !ruby/object:Gem::Requirement
72
81
  none: false
73
82
  requirements:
74
- - - ! '>='
83
+ - - '='
75
84
  - !ruby/object:Gem::Version
76
- version: '0'
85
+ version: 3.2.9
77
86
  type: :development
78
87
  prerelease: false
79
- version_requirements: *2153243500
80
- - !ruby/object:Gem::Dependency
81
- name: railties
82
- requirement: &2153241780 !ruby/object:Gem::Requirement
88
+ version_requirements: !ruby/object:Gem::Requirement
83
89
  none: false
84
90
  requirements:
85
- - - ! '>='
91
+ - - '='
86
92
  - !ruby/object:Gem::Version
87
- version: '0'
88
- type: :development
89
- prerelease: false
90
- version_requirements: *2153241780
93
+ version: 3.2.9
91
94
  - !ruby/object:Gem::Dependency
92
- name: arel
93
- requirement: &2153241160 !ruby/object:Gem::Requirement
95
+ name: activesupport
96
+ requirement: !ruby/object:Gem::Requirement
94
97
  none: false
95
98
  requirements:
96
- - - ! '>='
99
+ - - '='
97
100
  - !ruby/object:Gem::Version
98
- version: '0'
101
+ version: 3.2.9
99
102
  type: :development
100
103
  prerelease: false
101
- version_requirements: *2153241160
104
+ version_requirements: !ruby/object:Gem::Requirement
105
+ none: false
106
+ requirements:
107
+ - - '='
108
+ - !ruby/object:Gem::Version
109
+ version: 3.2.9
102
110
  - !ruby/object:Gem::Dependency
103
- name: journey
104
- requirement: &2153239560 !ruby/object:Gem::Requirement
111
+ name: railties
112
+ requirement: !ruby/object:Gem::Requirement
105
113
  none: false
106
114
  requirements:
107
- - - ! '>='
115
+ - - '='
108
116
  - !ruby/object:Gem::Version
109
- version: '0'
117
+ version: 3.2.9
110
118
  type: :development
111
119
  prerelease: false
112
- version_requirements: *2153239560
120
+ version_requirements: !ruby/object:Gem::Requirement
121
+ none: false
122
+ requirements:
123
+ - - '='
124
+ - !ruby/object:Gem::Version
125
+ version: 3.2.9
113
126
  - !ruby/object:Gem::Dependency
114
127
  name: ruby-plsql
115
- requirement: &2153238020 !ruby/object:Gem::Requirement
128
+ requirement: !ruby/object:Gem::Requirement
116
129
  none: false
117
130
  requirements:
118
131
  - - ! '>='
@@ -120,10 +133,15 @@ dependencies:
120
133
  version: 0.4.4
121
134
  type: :development
122
135
  prerelease: false
123
- version_requirements: *2153238020
136
+ version_requirements: !ruby/object:Gem::Requirement
137
+ none: false
138
+ requirements:
139
+ - - ! '>='
140
+ - !ruby/object:Gem::Version
141
+ version: 0.4.4
124
142
  - !ruby/object:Gem::Dependency
125
143
  name: ruby-oci8
126
- requirement: &2153237300 !ruby/object:Gem::Requirement
144
+ requirement: !ruby/object:Gem::Requirement
127
145
  none: false
128
146
  requirements:
129
147
  - - ! '>='
@@ -131,7 +149,12 @@ dependencies:
131
149
  version: 2.0.4
132
150
  type: :development
133
151
  prerelease: false
134
- version_requirements: *2153237300
152
+ version_requirements: !ruby/object:Gem::Requirement
153
+ none: false
154
+ requirements:
155
+ - - ! '>='
156
+ - !ruby/object:Gem::Version
157
+ version: 2.0.4
135
158
  description: ! 'Oracle "enhanced" ActiveRecord adapter contains useful additional
136
159
  methods for working with new and legacy Oracle databases.
137
160
 
@@ -203,16 +226,16 @@ required_ruby_version: !ruby/object:Gem::Requirement
203
226
  version: '0'
204
227
  segments:
205
228
  - 0
206
- hash: -576454282826115937
229
+ hash: -4041151724223707895
207
230
  required_rubygems_version: !ruby/object:Gem::Requirement
208
231
  none: false
209
232
  requirements:
210
- - - ! '>='
233
+ - - ! '>'
211
234
  - !ruby/object:Gem::Version
212
- version: '0'
235
+ version: 1.3.1
213
236
  requirements: []
214
237
  rubyforge_project:
215
- rubygems_version: 1.8.6
238
+ rubygems_version: 1.8.24
216
239
  signing_key:
217
240
  specification_version: 3
218
241
  summary: Oracle enhanced adapter for ActiveRecord