voruby 1.0.1 → 1.0.2
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/REQUIREMENTS +4 -2
- data/Rakefile.rb +12 -4
- data/lib/voruby/active_votable/active_votable.rb +319 -0
- data/lib/voruby/active_votable/loader.rb +5 -0
- data/test/active_votable/database.yml +6 -0
- data/test/active_votable/test.vot +168492 -0
- data/test/active_votable/unittest.rb +27 -0
- metadata +27 -2
@@ -0,0 +1,27 @@
|
|
1
|
+
require 'test/unit'
|
2
|
+
require 'voruby/active_votable/active_votable'
|
3
|
+
|
4
|
+
include VORuby::ActiveVotable
|
5
|
+
|
6
|
+
ActiveVotable.establish_connection(YAML::load(File.open('test/active_votable/database.yml'))['development'])
|
7
|
+
|
8
|
+
class ActiveVotableTest < Test::Unit::TestCase
|
9
|
+
def setup
|
10
|
+
@vot = ActiveVotable.build('test/active_votable/test.vot')
|
11
|
+
@vot.items_per_page = 5
|
12
|
+
end
|
13
|
+
|
14
|
+
def test_page
|
15
|
+
record = @vot.page(2).first
|
16
|
+
|
17
|
+
assert_equal(record[:object], 'F4p11')
|
18
|
+
assert_equal(record[:survey], 'NOAO Deep Lens')
|
19
|
+
assert_equal(record[:instrument], 'NOAO.CTIO.4M')
|
20
|
+
assert_equal(record[:ra], 163.669)
|
21
|
+
assert_equal(record[:dec], -4.33333)
|
22
|
+
end
|
23
|
+
|
24
|
+
def teardown
|
25
|
+
@vot.drop()
|
26
|
+
end
|
27
|
+
end
|
metadata
CHANGED
@@ -3,8 +3,8 @@ rubygems_version: 0.9.0
|
|
3
3
|
specification_version: 1
|
4
4
|
name: voruby
|
5
5
|
version: !ruby/object:Gem::Version
|
6
|
-
version: 1.0.
|
7
|
-
date: 2006-
|
6
|
+
version: 1.0.2
|
7
|
+
date: 2006-12-01 00:00:00 -07:00
|
8
8
|
summary: Modules for interacting with the astronomical virtual observatory.
|
9
9
|
require_paths:
|
10
10
|
- lib
|
@@ -33,6 +33,7 @@ files:
|
|
33
33
|
- LICENSE
|
34
34
|
- REQUIREMENTS
|
35
35
|
- lib/voruby
|
36
|
+
- lib/voruby/active_votable
|
36
37
|
- lib/voruby/adql
|
37
38
|
- lib/voruby/ext.rb
|
38
39
|
- lib/voruby/loader.rb
|
@@ -47,6 +48,8 @@ files:
|
|
47
48
|
- lib/voruby/util.rb
|
48
49
|
- lib/voruby/voevent
|
49
50
|
- lib/voruby/votables
|
51
|
+
- lib/voruby/active_votable/active_votable.rb
|
52
|
+
- lib/voruby/active_votable/loader.rb
|
50
53
|
- lib/voruby/adql/adql.rb
|
51
54
|
- lib/voruby/adql/ext.rb
|
52
55
|
- lib/voruby/adql/loader.rb
|
@@ -142,6 +145,7 @@ files:
|
|
142
145
|
- lib/voruby/votables/types.rb
|
143
146
|
- lib/voruby/votables/votable.rb
|
144
147
|
- lib/voruby/votables/xmm.rb
|
148
|
+
- test/active_votable
|
145
149
|
- test/adql
|
146
150
|
- test/plastic
|
147
151
|
- test/resources
|
@@ -151,6 +155,9 @@ files:
|
|
151
155
|
- test/stc
|
152
156
|
- test/voevent
|
153
157
|
- test/votables
|
158
|
+
- test/active_votable/database.yml
|
159
|
+
- test/active_votable/test.vot
|
160
|
+
- test/active_votable/unittest.rb
|
154
161
|
- test/adql/test1.adql
|
155
162
|
- test/adql/test2.adql
|
156
163
|
- test/adql/test3.adql
|
@@ -254,3 +261,21 @@ dependencies:
|
|
254
261
|
- !ruby/object:Gem::Version
|
255
262
|
version: 0.8.1
|
256
263
|
version:
|
264
|
+
- !ruby/object:Gem::Dependency
|
265
|
+
name: activerecord
|
266
|
+
version_requirement:
|
267
|
+
version_requirements: !ruby/object:Gem::Version::Requirement
|
268
|
+
requirements:
|
269
|
+
- - ">="
|
270
|
+
- !ruby/object:Gem::Version
|
271
|
+
version: "1.14"
|
272
|
+
version:
|
273
|
+
- !ruby/object:Gem::Dependency
|
274
|
+
name: activesupport
|
275
|
+
version_requirement:
|
276
|
+
version_requirements: !ruby/object:Gem::Version::Requirement
|
277
|
+
requirements:
|
278
|
+
- - ">="
|
279
|
+
- !ruby/object:Gem::Version
|
280
|
+
version: "1.3"
|
281
|
+
version:
|