ruby-plsql 0.3.0 → 0.3.1

Sign up to get free protection for your applications and to get access to all the features.
data/History.txt CHANGED
@@ -1,3 +1,8 @@
1
+ == 0.3.1 2009-06-05
2
+
3
+ * Bug fixes
4
+ * fixed usage of plsql.activerecord_class = ... (fixes OCIInvalidHandle exception in development mode with ActiveRecord 2.2+)
5
+
1
6
  == 0.3.0 2009-04-21
2
7
 
3
8
  * New features
@@ -54,6 +54,11 @@ JRuby
54
54
 
55
55
  * sudo gem install ruby-plsql
56
56
 
57
+ == CONTRIBUTORS:
58
+
59
+ * Raimonds Simanovskis
60
+ * Edgars Beigarts
61
+
57
62
  == LICENSE:
58
63
 
59
64
  (The MIT License)
data/lib/plsql/schema.rb CHANGED
@@ -24,11 +24,20 @@ module PLSQL
24
24
  @connection
25
25
  end
26
26
 
27
- def connection=(raw_conn)
27
+ def raw_connection=(raw_conn)
28
28
  @connection = raw_conn ? Connection.create(raw_conn) : nil
29
29
  reset_instance_variables
30
30
  end
31
31
 
32
+ def connection=(conn)
33
+ if conn.is_a?(::PLSQL::Connection)
34
+ @connection = conn
35
+ reset_instance_variables
36
+ else
37
+ self.raw_connection = conn
38
+ end
39
+ end
40
+
32
41
  def activerecord_class=(ar_class)
33
42
  @connection = ar_class ? Connection.create(nil, ar_class) : nil
34
43
  reset_instance_variables
@@ -122,7 +131,7 @@ module PLSQL
122
131
  def find_other_schema(name)
123
132
  return nil unless @first && connection
124
133
  if select_first("SELECT username FROM all_users WHERE username = :username", name.to_s.upcase)
125
- Schema.new(connection.raw_connection, name, false)
134
+ Schema.new(connection, name, false)
126
135
  else
127
136
  nil
128
137
  end
@@ -1,3 +1,3 @@
1
1
  module RubyPlsql #:nodoc:
2
- VERSION = '0.3.0'
2
+ VERSION = '0.3.1'
3
3
  end
@@ -114,4 +114,7 @@ describe "ActiveRecord connection" do
114
114
  plsql.default_timezone.should == :utc
115
115
  end
116
116
 
117
+ it "should have the same connection as default schema" do
118
+ plsql.hr.connection.should == plsql.connection
119
+ end
117
120
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ruby-plsql
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.0
4
+ version: 0.3.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Raimonds Simanovskis
@@ -9,7 +9,7 @@ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
11
 
12
- date: 2009-04-21 00:00:00 +03:00
12
+ date: 2009-06-05 00:00:00 +03:00
13
13
  default_executable:
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
@@ -32,7 +32,14 @@ dependencies:
32
32
  - !ruby/object:Gem::Version
33
33
  version: 1.8.0
34
34
  version:
35
- description: ruby-plsql gem provides simple Ruby API for calling Oracle PL/SQL procedures. ruby-plsql support both Ruby 1.8 MRI, Ruby 1.9.1 YARV and JRuby runtime environments. This gem requires ruby-oci8 library version 1.x (if MRI is used) or 2.x (if Ruby 1.9.1 is used) or Oracle JDBC driver (ojdbc14.jar) (if JRuby is used) for connection to Oracle database. See http://blog.rayapps.com for more information. Look ar RSpec tests under spec directory for usage examples.
35
+ description: |-
36
+ ruby-plsql gem provides simple Ruby API for calling Oracle PL/SQL procedures.
37
+ ruby-plsql support both Ruby 1.8 MRI, Ruby 1.9.1 YARV and JRuby runtime environments.
38
+ This gem requires ruby-oci8 library version 1.x (if MRI is used) or 2.x (if Ruby 1.9.1 is used) or Oracle JDBC driver (ojdbc14.jar) (if JRuby is used) for connection to Oracle database.
39
+
40
+ See http://blog.rayapps.com for more information.
41
+
42
+ Look ar RSpec tests under spec directory for usage examples.
36
43
  email:
37
44
  - raimonds.simanovskis@gmail.com
38
45
  executables: []
@@ -42,11 +49,11 @@ extensions: []
42
49
  extra_rdoc_files:
43
50
  - History.txt
44
51
  - License.txt
45
- - README.txt
52
+ - README.rdoc
46
53
  files:
47
54
  - History.txt
48
55
  - License.txt
49
- - README.txt
56
+ - README.rdoc
50
57
  - lib/plsql/connection.rb
51
58
  - lib/plsql/jdbc_connection.rb
52
59
  - lib/plsql/oci_connection.rb
@@ -63,10 +70,12 @@ files:
63
70
  - spec/spec_helper.rb
64
71
  has_rdoc: true
65
72
  homepage: http://rubyforge.org/projects/ruby-plsql/
73
+ licenses: []
74
+
66
75
  post_install_message:
67
76
  rdoc_options:
68
77
  - --main
69
- - README.txt
78
+ - README.rdoc
70
79
  require_paths:
71
80
  - lib
72
81
  required_ruby_version: !ruby/object:Gem::Requirement
@@ -84,9 +93,9 @@ required_rubygems_version: !ruby/object:Gem::Requirement
84
93
  requirements: []
85
94
 
86
95
  rubyforge_project: ruby-plsql
87
- rubygems_version: 1.3.1
96
+ rubygems_version: 1.3.3
88
97
  signing_key:
89
- specification_version: 2
98
+ specification_version: 3
90
99
  summary: ruby-plsql gem provides simple Ruby API for calling Oracle PL/SQL procedures.
91
100
  test_files: []
92
101