disposable_db 0.0.6 → 0.0.7
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/disposable_db/version.rb +1 -1
- data/lib/disposable_db.rb +1 -1
- data/spec/disposable_model_spec.rb +14 -0
- metadata +16 -16
data/lib/disposable_db.rb
CHANGED
@@ -52,4 +52,18 @@ describe DisposableModel do
|
|
52
52
|
m.paginate(1, 50).page_count == 0
|
53
53
|
end
|
54
54
|
|
55
|
+
it "can divide" do
|
56
|
+
columns = []
|
57
|
+
columns << TableTemplate::Column.new('t1', Integer)
|
58
|
+
|
59
|
+
tt = TableTemplate.new('foo', columns)
|
60
|
+
|
61
|
+
database = Databases::SQLite.new
|
62
|
+
database.create_table! tt
|
63
|
+
m = DisposableModel.factory(:database => database, :table_name => tt.name)
|
64
|
+
m.create(:t1 => 10)
|
65
|
+
m.count.should == 1
|
66
|
+
m.dataset.select((50.sql_expr / :t1).as(:result)).first.values[:result].should == 5
|
67
|
+
end
|
68
|
+
|
55
69
|
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: disposable_db
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.7
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -9,11 +9,11 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2012-04-
|
12
|
+
date: 2012-04-24 00:00:00.000000000Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: rspec
|
16
|
-
requirement: &
|
16
|
+
requirement: &73296120 !ruby/object:Gem::Requirement
|
17
17
|
none: false
|
18
18
|
requirements:
|
19
19
|
- - ! '>='
|
@@ -21,10 +21,10 @@ dependencies:
|
|
21
21
|
version: 2.9.0
|
22
22
|
type: :development
|
23
23
|
prerelease: false
|
24
|
-
version_requirements: *
|
24
|
+
version_requirements: *73296120
|
25
25
|
- !ruby/object:Gem::Dependency
|
26
26
|
name: bundler
|
27
|
-
requirement: &
|
27
|
+
requirement: &73295900 !ruby/object:Gem::Requirement
|
28
28
|
none: false
|
29
29
|
requirements:
|
30
30
|
- - ! '>='
|
@@ -32,10 +32,10 @@ dependencies:
|
|
32
32
|
version: '0'
|
33
33
|
type: :development
|
34
34
|
prerelease: false
|
35
|
-
version_requirements: *
|
35
|
+
version_requirements: *73295900
|
36
36
|
- !ruby/object:Gem::Dependency
|
37
37
|
name: ffaker
|
38
|
-
requirement: &
|
38
|
+
requirement: &73295480 !ruby/object:Gem::Requirement
|
39
39
|
none: false
|
40
40
|
requirements:
|
41
41
|
- - ! '>='
|
@@ -43,10 +43,10 @@ dependencies:
|
|
43
43
|
version: 1.13.0
|
44
44
|
type: :development
|
45
45
|
prerelease: false
|
46
|
-
version_requirements: *
|
46
|
+
version_requirements: *73295480
|
47
47
|
- !ruby/object:Gem::Dependency
|
48
48
|
name: ruby-prof
|
49
|
-
requirement: &
|
49
|
+
requirement: &73295160 !ruby/object:Gem::Requirement
|
50
50
|
none: false
|
51
51
|
requirements:
|
52
52
|
- - ! '>='
|
@@ -54,10 +54,10 @@ dependencies:
|
|
54
54
|
version: '0'
|
55
55
|
type: :development
|
56
56
|
prerelease: false
|
57
|
-
version_requirements: *
|
57
|
+
version_requirements: *73295160
|
58
58
|
- !ruby/object:Gem::Dependency
|
59
59
|
name: sequel
|
60
|
-
requirement: &
|
60
|
+
requirement: &73294730 !ruby/object:Gem::Requirement
|
61
61
|
none: false
|
62
62
|
requirements:
|
63
63
|
- - =
|
@@ -65,10 +65,10 @@ dependencies:
|
|
65
65
|
version: 3.33.0
|
66
66
|
type: :runtime
|
67
67
|
prerelease: false
|
68
|
-
version_requirements: *
|
68
|
+
version_requirements: *73294730
|
69
69
|
- !ruby/object:Gem::Dependency
|
70
70
|
name: sqlite3
|
71
|
-
requirement: &
|
71
|
+
requirement: &73294390 !ruby/object:Gem::Requirement
|
72
72
|
none: false
|
73
73
|
requirements:
|
74
74
|
- - ! '>='
|
@@ -76,7 +76,7 @@ dependencies:
|
|
76
76
|
version: '0'
|
77
77
|
type: :runtime
|
78
78
|
prerelease: false
|
79
|
-
version_requirements: *
|
79
|
+
version_requirements: *73294390
|
80
80
|
description: A utility that makes it easy to create "on-the-fly databases"
|
81
81
|
email:
|
82
82
|
- keithlarrimore@icehook.com
|
@@ -118,7 +118,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
118
118
|
version: '0'
|
119
119
|
segments:
|
120
120
|
- 0
|
121
|
-
hash:
|
121
|
+
hash: 860357517
|
122
122
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
123
123
|
none: false
|
124
124
|
requirements:
|
@@ -127,7 +127,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
127
127
|
version: '0'
|
128
128
|
segments:
|
129
129
|
- 0
|
130
|
-
hash:
|
130
|
+
hash: 860357517
|
131
131
|
requirements: []
|
132
132
|
rubyforge_project:
|
133
133
|
rubygems_version: 1.8.10
|