ruby-plsql 0.1.3 → 0.1.4

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.
data/History.txt CHANGED
@@ -1,3 +1,8 @@
1
+ == 0.1.4 2008-04-18
2
+
3
+ * Bug fixes
4
+ * Fixed bug when nil numeric parameters where passed as 0, now nil numeric parameter is passed as NULL
5
+
1
6
  == 0.1.3 2008-04-15
2
7
 
3
8
  * Improvements
@@ -193,7 +193,7 @@ module PLSQL
193
193
 
194
194
  def ruby_value_to_ora_value(val, type)
195
195
  if type == OraNumber
196
- val.is_a?(Fixnum) ? val : val.to_f
196
+ val.nil? || val.is_a?(Fixnum) ? val : val.to_f
197
197
  elsif type == DateTime
198
198
  val ? val.to_datetime : nil
199
199
  else
@@ -2,7 +2,7 @@ module RubyPlsql #:nodoc:
2
2
  module VERSION #:nodoc:
3
3
  MAJOR = 0
4
4
  MINOR = 1
5
- TINY = 3
5
+ TINY = 4
6
6
 
7
7
  STRING = [MAJOR, MINOR, TINY].join('.')
8
8
  end
@@ -50,6 +50,10 @@ describe "Procedure with string parameters" do
50
50
  plsql.hr.test_uppercase('xxx').should == 'XXX'
51
51
  end
52
52
 
53
+ it "should process nil parameter as NULL" do
54
+ plsql.test_uppercase(nil).should be_nil
55
+ end
56
+
53
57
  end
54
58
 
55
59
  describe "Procedure with numeric parameters" do
@@ -87,7 +91,9 @@ describe "Procedure with numeric parameters" do
87
91
  plsql.test_sum(:p_num1 => BigDecimal.new("123.123"), :p_num2 => BigDecimal.new("456.456")).should == 579.579
88
92
  end
89
93
 
90
-
94
+ it "should process nil parameter as NULL" do
95
+ plsql.test_sum(123,nil).should be_nil
96
+ end
91
97
 
92
98
  end
93
99
 
@@ -130,7 +136,7 @@ describe "Procedure with date parameters" do
130
136
  plsql.test_date(now).should == now + 1
131
137
  end
132
138
 
133
- it "should process nil date parameters" do
139
+ it "should process nil date parameter as NULL" do
134
140
  plsql.test_date(nil).should be_nil
135
141
  end
136
142
 
data/website/index.html CHANGED
@@ -33,7 +33,7 @@
33
33
  <h1>Ruby API for PL/SQL</h1>
34
34
  <div id="version" class="clickable" onclick='document.location = "http://rubyforge.org/projects/ruby-plsql"; return false'>
35
35
  <p>Get Version</p>
36
- <a href="http://rubyforge.org/projects/ruby-plsql" class="numbers">0.1.3</a>
36
+ <a href="http://rubyforge.org/projects/ruby-plsql" class="numbers">0.1.4</a>
37
37
  </div>
38
38
  <h1>&#x2192; &#8216;ruby-plsql&#8217;</h1>
39
39
 
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.1.3
4
+ version: 0.1.4
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: 2008-04-16 00:00:00 +03:00
12
+ date: 2008-04-18 00:00:00 +03:00
13
13
  default_executable:
14
14
  dependencies: []
15
15