activerecord-jdbcas400-adapter 1.3.4.3 → 1.3.5
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/README.md +26 -1
- data/test/test_helper.rb +9 -6
- metadata +15 -15
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: a2398fc7c8bad7ce1d3253f2e0f6a4a7b20d0ead
|
4
|
+
data.tar.gz: 413c9f4b32caf45437b3acb22a5352159af1c152
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 6cacc8de3cf7d3b33e607007d5cbdd5d9b55dd6bb9cb358be734637076852d75ffb95bf2cea112bc7ee46817580ee4ce00261ed097073cb6674f5109028665f5
|
7
|
+
data.tar.gz: b57c5cb53826fa1d07a54576b9eae158e08f40fd348b58dd75f80814d9aad8c1718fb0d81a75a942779dd57e0d53c5c658295e8b885f8d7e8dbc0bf24b1e7c09
|
data/README.md
CHANGED
@@ -39,12 +39,37 @@ If your DB isn't correctly discovered you can specify the dialect:
|
|
39
39
|
To allow migrations with system naming, a configuration is added to adapter:
|
40
40
|
|
41
41
|
```yml
|
42
|
-
current_library: lib
|
42
|
+
current_library: lib
|
43
43
|
```
|
44
44
|
|
45
45
|
The specified library will be used to define a schema during create_table migration.
|
46
46
|
It prevents creation of a table in QGPL.
|
47
47
|
|
48
|
+
If you want to use it with JNDI you can create a JNDI string and use erb in yaml to do something like this:
|
49
|
+
|
50
|
+
```yml
|
51
|
+
<%
|
52
|
+
require 'java'
|
53
|
+
current_library = Java::JavaxNaming::InitialContext.new.lookup('java:comp/env/currentLibrary').to_s if Rails.env.production?
|
54
|
+
%>
|
55
|
+
|
56
|
+
production:
|
57
|
+
adapter: as400
|
58
|
+
jndi: jdbc/dataSource
|
59
|
+
current_library: <%=current_library%>
|
60
|
+
```
|
61
|
+
|
62
|
+
## Connection pool
|
63
|
+
Websphere Application Server for i provides data sources with connection pool.
|
64
|
+
Rails has it's own connection pool management. To make them compatible you should define:
|
65
|
+
|
66
|
+
* Connection timeout: 0
|
67
|
+
* Maximum connections: 5 (default) or same as rails configuration
|
68
|
+
* Minimum connections: 0 to Maximum connections
|
69
|
+
* Reap time: 0
|
70
|
+
* Unused timeout: 0
|
71
|
+
* Aged timeout: 0
|
72
|
+
|
48
73
|
## Compatibility
|
49
74
|
|
50
75
|
Actually activerecord-jdbcas400-adapter is only compatible with IBM i V6R1 and later versions.
|
data/test/test_helper.rb
CHANGED
@@ -1,11 +1,7 @@
|
|
1
1
|
require 'java'
|
2
2
|
|
3
|
-
|
4
|
-
|
5
|
-
rescue LoadError => e
|
6
|
-
require('rubygems') && retry
|
7
|
-
raise e
|
8
|
-
end
|
3
|
+
require 'rubygems'
|
4
|
+
require 'bundler/setup'
|
9
5
|
Bundler.require(:default, :test)
|
10
6
|
|
11
7
|
class Test::Unit::TestCase
|
@@ -16,6 +12,13 @@ class Test::Unit::TestCase
|
|
16
12
|
|
17
13
|
def data_source_connection
|
18
14
|
return @connection if @connection && @connection_type == 'data_source'
|
15
|
+
|
16
|
+
begin
|
17
|
+
require 'jdbc/as400'
|
18
|
+
::Jdbc::AS400.load_driver(:require) if defined?(::Jdbc::AS400.load_driver)
|
19
|
+
rescue LoadError # assuming driver.jar is on the class-path
|
20
|
+
end
|
21
|
+
|
19
22
|
# Create a data source to the iSeries database.
|
20
23
|
datasource = com.ibm.as400.access.AS400JDBCDataSource.new
|
21
24
|
datasource.setServerName(config[:host])
|
metadata
CHANGED
@@ -1,29 +1,29 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: activerecord-jdbcas400-adapter
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.3.
|
4
|
+
version: 1.3.5
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Nick Sieger, Ola Bini, Pierrick Rouxel and JRuby contributors
|
8
|
-
autorequire:
|
8
|
+
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2014-01-
|
11
|
+
date: 2014-01-20 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activerecord-jdbc-adapter
|
15
|
-
|
15
|
+
version_requirements: !ruby/object:Gem::Requirement
|
16
16
|
requirements:
|
17
17
|
- - '>='
|
18
18
|
- !ruby/object:Gem::Version
|
19
|
-
version: 1.3.
|
20
|
-
|
21
|
-
prerelease: false
|
22
|
-
version_requirements: !ruby/object:Gem::Requirement
|
19
|
+
version: 1.3.5
|
20
|
+
requirement: !ruby/object:Gem::Requirement
|
23
21
|
requirements:
|
24
22
|
- - '>='
|
25
23
|
- !ruby/object:Gem::Version
|
26
|
-
version: 1.3.
|
24
|
+
version: 1.3.5
|
25
|
+
prerelease: false
|
26
|
+
type: :runtime
|
27
27
|
description: Install this gem to use AS/400 with JRuby on Rails.
|
28
28
|
email: nick@nicksieger.com, ola.bini@gmail.com
|
29
29
|
executables: []
|
@@ -33,12 +33,12 @@ files:
|
|
33
33
|
- Rakefile
|
34
34
|
- README.md
|
35
35
|
- LICENSE.txt
|
36
|
-
- lib/active_record/connection_adapters/as400_adapter.rb
|
37
36
|
- lib/activerecord-jdbcas400-adapter.rb
|
38
|
-
- lib/
|
39
|
-
- lib/arjdbc/as400/connection_methods.rb
|
37
|
+
- lib/active_record/connection_adapters/as400_adapter.rb
|
40
38
|
- lib/arjdbc/as400.rb
|
41
39
|
- lib/arjdbc/discover.rb
|
40
|
+
- lib/arjdbc/as400/adapter.rb
|
41
|
+
- lib/arjdbc/as400/connection_methods.rb
|
42
42
|
- test/config.yml
|
43
43
|
- test/test_connection.rb
|
44
44
|
- test/test_database_tasks.rb
|
@@ -47,7 +47,7 @@ homepage: https://github.com/pierrickrouxel/activerecord-jdbcas400-adapter
|
|
47
47
|
licenses:
|
48
48
|
- GPL-3.0
|
49
49
|
metadata: {}
|
50
|
-
post_install_message:
|
50
|
+
post_install_message:
|
51
51
|
rdoc_options: []
|
52
52
|
require_paths:
|
53
53
|
- lib
|
@@ -63,8 +63,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
63
63
|
version: '0'
|
64
64
|
requirements: []
|
65
65
|
rubyforge_project: jruby-extras
|
66
|
-
rubygems_version: 2.
|
67
|
-
signing_key:
|
66
|
+
rubygems_version: 2.1.9
|
67
|
+
signing_key:
|
68
68
|
specification_version: 4
|
69
69
|
summary: AS/400 JDBC adapter for JRuby on Rails.
|
70
70
|
test_files:
|