disposable_db 0.0.5 → 0.0.6
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 +2 -0
- data/spec/disposable_model_spec.rb +14 -0
- metadata +21 -15
data/lib/disposable_db.rb
CHANGED
@@ -38,4 +38,18 @@ describe DisposableModel do
|
|
38
38
|
m.columns.length.should == columns.length
|
39
39
|
end
|
40
40
|
|
41
|
+
it "can paginate" do
|
42
|
+
columns = []
|
43
|
+
columns << TableTemplate::Column.new('t1', Integer)
|
44
|
+
columns << TableTemplate::Column.new('t2', String)
|
45
|
+
|
46
|
+
tt = TableTemplate.new('foo', columns)
|
47
|
+
|
48
|
+
database = Databases::SQLite.new
|
49
|
+
database.create_table! tt
|
50
|
+
|
51
|
+
m = DisposableModel.factory(:database => database, :table_name => tt.name)
|
52
|
+
m.paginate(1, 50).page_count == 0
|
53
|
+
end
|
54
|
+
|
41
55
|
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.6
|
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-
|
12
|
+
date: 2012-04-15 00:00:00.000000000Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: rspec
|
16
|
-
requirement: &
|
16
|
+
requirement: &80200130 !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: *80200130
|
25
25
|
- !ruby/object:Gem::Dependency
|
26
26
|
name: bundler
|
27
|
-
requirement: &
|
27
|
+
requirement: &80199870 !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: *80199870
|
36
36
|
- !ruby/object:Gem::Dependency
|
37
37
|
name: ffaker
|
38
|
-
requirement: &
|
38
|
+
requirement: &80199450 !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: *80199450
|
47
47
|
- !ruby/object:Gem::Dependency
|
48
48
|
name: ruby-prof
|
49
|
-
requirement: &
|
49
|
+
requirement: &80199070 !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: *80199070
|
58
58
|
- !ruby/object:Gem::Dependency
|
59
59
|
name: sequel
|
60
|
-
requirement: &
|
60
|
+
requirement: &80198670 !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: *80198670
|
69
69
|
- !ruby/object:Gem::Dependency
|
70
70
|
name: sqlite3
|
71
|
-
requirement: &
|
71
|
+
requirement: &80198400 !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: *80198400
|
80
80
|
description: A utility that makes it easy to create "on-the-fly databases"
|
81
81
|
email:
|
82
82
|
- keithlarrimore@icehook.com
|
@@ -116,15 +116,21 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
116
116
|
- - ! '>='
|
117
117
|
- !ruby/object:Gem::Version
|
118
118
|
version: '0'
|
119
|
+
segments:
|
120
|
+
- 0
|
121
|
+
hash: 555394131
|
119
122
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
120
123
|
none: false
|
121
124
|
requirements:
|
122
125
|
- - ! '>='
|
123
126
|
- !ruby/object:Gem::Version
|
124
127
|
version: '0'
|
128
|
+
segments:
|
129
|
+
- 0
|
130
|
+
hash: 555394131
|
125
131
|
requirements: []
|
126
132
|
rubyforge_project:
|
127
|
-
rubygems_version: 1.8.
|
133
|
+
rubygems_version: 1.8.10
|
128
134
|
signing_key:
|
129
135
|
specification_version: 3
|
130
136
|
summary: A utility that makes it easy to create "on-the-fly databases"
|