amalgalite 0.10.2-x86-mswin32 → 0.11.0-x86-mswin32

Sign up to get free protection for your applications and to get access to all the features.
Binary file
Binary file
@@ -28,6 +28,9 @@ module Amalgalite
28
28
  [ MAJOR, MINOR, RELEASE ]
29
29
  end
30
30
 
31
+ def self.compiled_matches_runtime?
32
+ self.compiled_version == self.runtime_version
33
+ end
31
34
  end
32
35
 
33
36
  # Version of SQLite that ships with Amalgalite
@@ -35,3 +38,19 @@ module Amalgalite
35
38
  end
36
39
  Version.freeze
37
40
  end
41
+
42
+ unless Amalgalite::SQLite3::Version.compiled_matches_runtime? then
43
+ warn <<eom
44
+ You are seeing something odd. The compiled version of SQLite that
45
+ is embedded in this extension is for some reason, not being used.
46
+ The version in the extension is #{Amalgalite::SQLite3::Version.compiled_version} and the version that
47
+ as been loaded as a shared library is #{Amalgalite::SQLite3::Version.runtime_version}. These versions
48
+ should be the same, but they are not.
49
+
50
+ One known issue is if you are using this libary in conjunction with
51
+ Hitimes on Mac OS X. You should make sure that "require 'amalgalite'"
52
+ appears before "require 'hitimes'" in your ruby code.
53
+
54
+ This is a non-trivial problem, and I am working on it.
55
+ eom
56
+ end
@@ -22,9 +22,9 @@ module Amalgalite::TypeMaps
22
22
  'date' => %w[ date ],
23
23
  'datetime' => %w[ datetime ],
24
24
  'time' => %w[ timestamp time ],
25
- 'float' => %w[ double real numeric decimal ],
25
+ 'float' => %w[ double float real numeric decimal ],
26
26
  'integer' => %w[ integer tinyint smallint int int2 int4 int8 bigint serial bigserial ],
27
- 'string' => %w[ text char varchar character ],
27
+ 'string' => %w[ text char string varchar character ],
28
28
  'boolean' => %w[ bool boolean ],
29
29
  'blob' => %w[ binary blob ],
30
30
  }
@@ -8,8 +8,8 @@ module Amalgalite
8
8
  module Version
9
9
 
10
10
  MAJOR = 0
11
- MINOR = 10
12
- BUILD = 2
11
+ MINOR = 11
12
+ BUILD = 0
13
13
 
14
14
  #
15
15
  # return the Version as an array of MAJOR, MINOR, BUILD
@@ -62,6 +62,10 @@ describe Amalgalite::TypeMaps::DefaultMap do
62
62
  @map.result_value_of( "double", "3.14" ).should be_kind_of(Float)
63
63
  end
64
64
 
65
+ it "Float is returned for declared types of 'float'" do
66
+ @map.result_value_of( "float", "3.14" ).should be_kind_of(Float)
67
+ end
68
+
65
69
  it "Integer is returned for declared types of 'int'" do
66
70
  @map.result_value_of( "int", "42" ).should be_kind_of(Integer)
67
71
  end
@@ -70,11 +74,15 @@ describe Amalgalite::TypeMaps::DefaultMap do
70
74
  @map.result_value_of( "bool", "True" ).should == true
71
75
  end
72
76
 
73
- it "Blob is returned for declated types of 'blob'" do
77
+ it "Blob is returned for declared types of 'blob'" do
74
78
  blob = @map.result_value_of( "blob", "stuff")
75
79
  blob.to_s.should == "stuff"
76
80
  end
77
81
 
82
+ it "String is returned for delcared types of 'string'" do
83
+ @map.result_value_of( "string", "stuff").should == "stuff"
84
+ end
85
+
78
86
  it "raises and error if an unknown sql type is returned" do
79
87
  x = nil
80
88
  lambda{ x = @map.result_value_of( "footype", "foo" ) }.should raise_error( ::Amalgalite::Error )
@@ -5,10 +5,18 @@ describe "Amalgalite::SQLite3::Version" do
5
5
  it "should have the sqlite3 version" do
6
6
  Amalgalite::SQLite3::VERSION.should =~ /\d\.\d\.\d/
7
7
  Amalgalite::SQLite3::Version.to_s.should =~ /\d\.\d\.\d/
8
- Amalgalite::SQLite3::Version.to_i.should eql(3006016)
8
+ Amalgalite::SQLite3::Version.runtime_version.should =~ /\d\.\d\.\d/
9
+
10
+ Amalgalite::SQLite3::Version.to_i.should eql(3006017)
11
+ Amalgalite::SQLite3::Version.runtime_version_number.should eql(3006017)
12
+
9
13
  Amalgalite::SQLite3::Version::MAJOR.should eql(3)
10
14
  Amalgalite::SQLite3::Version::MINOR.should eql(6)
11
- Amalgalite::SQLite3::Version::RELEASE.should eql(16)
15
+ Amalgalite::SQLite3::Version::RELEASE.should eql(17)
12
16
  Amalgalite::SQLite3::Version.to_a.should have(3).items
17
+
18
+ Amalgalite::SQLite3::Version.compiled_version.should == "3.6.17"
19
+ Amalgalite::SQLite3::Version.compiled_version_number.should == 3006017
20
+ Amalgalite::SQLite3::Version.compiled_matches_runtime?.should == true
13
21
  end
14
22
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: amalgalite
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.10.2
4
+ version: 0.11.0
5
5
  platform: x86-mswin32
6
6
  authors:
7
7
  - Jeremy Hinegardner
@@ -9,7 +9,7 @@ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
11
 
12
- date: 2009-08-10 00:00:00 -06:00
12
+ date: 2009-08-23 00:00:00 -06:00
13
13
  default_executable:
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency