geocaching 0.6.0 → 0.6.1
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/README.markdown +3 -3
- data/lib/geocaching.rb +9 -10
- data/lib/geocaching/cache.rb +16 -25
- data/lib/geocaching/http.rb +12 -4
- data/lib/geocaching/log.rb +1 -12
- data/lib/geocaching/my_logs.rb +3 -12
- data/lib/geocaching/user.rb +2 -13
- data/lib/geocaching/version.rb +1 -1
- data/lib/geocaching/watchlist.rb +1 -14
- metadata +3 -75
- data/Rakefile +0 -11
- data/geocaching.gemspec +0 -24
- data/lib/geocaching/pocket_query.rb +0 -213
- data/spec/cache/ape.rb +0 -75
- data/spec/cache/cito.rb +0 -75
- data/spec/cache/earthcache.rb +0 -75
- data/spec/cache/event.rb +0 -75
- data/spec/cache/letterbox.rb +0 -75
- data/spec/cache/lfevent.rb +0 -75
- data/spec/cache/locationless.rb +0 -75
- data/spec/cache/megaevent.rb +0 -75
- data/spec/cache/multi.rb +0 -75
- data/spec/cache/mystery.rb +0 -75
- data/spec/cache/traditional.rb +0 -75
- data/spec/cache/virtual.rb +0 -75
- data/spec/cache/webcam.rb +0 -75
- data/spec/cache/wherigo.rb +0 -75
- data/spec/cache_spec.rb +0 -20
- data/spec/helper.rb +0 -16
- data/spec/log/announcement.rb +0 -28
- data/spec/log/announcement.txt +0 -14
- data/spec/log/archive.rb +0 -28
- data/spec/log/archive.txt +0 -5
- data/spec/log/attended.rb +0 -28
- data/spec/log/attended.txt +0 -1
- data/spec/log/coords_update.rb +0 -28
- data/spec/log/coords_update.txt +0 -9
- data/spec/log/disable.rb +0 -28
- data/spec/log/disable.txt +0 -5
- data/spec/log/dnf.rb +0 -28
- data/spec/log/dnf.txt +0 -5
- data/spec/log/enable.rb +0 -28
- data/spec/log/enable.txt +0 -1
- data/spec/log/found.rb +0 -28
- data/spec/log/found.txt +0 -5
- data/spec/log/needs_archived.rb +0 -28
- data/spec/log/needs_archived.txt +0 -1
- data/spec/log/needs_maintenance.rb +0 -28
- data/spec/log/needs_maintenance.txt +0 -1
- data/spec/log/note.rb +0 -28
- data/spec/log/note.txt +0 -1
- data/spec/log/owner_maintenance.rb +0 -28
- data/spec/log/owner_maintenance.txt +0 -1
- data/spec/log/publish.rb +0 -28
- data/spec/log/publish.txt +0 -1
- data/spec/log/retract.rb +0 -28
- data/spec/log/retract.txt +0 -4
- data/spec/log/reviewer_note.rb +0 -28
- data/spec/log/reviewer_note.txt +0 -3
- data/spec/log/unarchive.rb +0 -28
- data/spec/log/unarchive.txt +0 -1
- data/spec/log/webcam_photo_taken.rb +0 -28
- data/spec/log/webcam_photo_taken.txt +0 -1
- data/spec/log/will_attend.rb +0 -28
- data/spec/log/will_attend.txt +0 -1
- data/spec/log_spec.rb +0 -21
- data/spec/user_spec.rb +0 -48
data/spec/cache/event.rb
DELETED
@@ -1,75 +0,0 @@
|
|
1
|
-
# encoding: utf-8
|
2
|
-
|
3
|
-
describe "Geocaching::Cache for 6cea30b1-7279-43ac-86a8-cdfd1daeb348 (Event)" do
|
4
|
-
before :all do
|
5
|
-
@cache = Geocaching::Cache.fetch(:guid => "6cea30b1-7279-43ac-86a8-cdfd1daeb348")
|
6
|
-
end
|
7
|
-
|
8
|
-
it "should return the correct GC code" do
|
9
|
-
@cache.code.should == "GC211KT"
|
10
|
-
end
|
11
|
-
|
12
|
-
it "should return the correct ID" do
|
13
|
-
@cache.id.should == 1467288
|
14
|
-
end
|
15
|
-
|
16
|
-
it "should return the correct name" do
|
17
|
-
@cache.name.should == "Weihnachtliches Vorglühen"
|
18
|
-
end
|
19
|
-
|
20
|
-
it "should return the correct displayed owner name" do
|
21
|
-
@cache.owner_display_name.should == "papasid"
|
22
|
-
end
|
23
|
-
|
24
|
-
it "should return the correct owner GUID" do
|
25
|
-
@cache.owner.guid == "80b63301-073e-4cf7-af23-2fb162915878"
|
26
|
-
end
|
27
|
-
|
28
|
-
it "should return the correct cache type" do
|
29
|
-
@cache.type.to_sym.should == :event
|
30
|
-
end
|
31
|
-
|
32
|
-
it "should return the correct size" do
|
33
|
-
@cache.size.should == :not_chosen
|
34
|
-
end
|
35
|
-
|
36
|
-
it "should return the correct event date" do
|
37
|
-
@cache.event_date.should == Time.mktime(2009, 12, 23)
|
38
|
-
end
|
39
|
-
|
40
|
-
it "should return the correct difficulty rating" do
|
41
|
-
@cache.difficulty.should == 1
|
42
|
-
end
|
43
|
-
|
44
|
-
it "should return the correct terrain rating" do
|
45
|
-
@cache.terrain.should == 1
|
46
|
-
end
|
47
|
-
|
48
|
-
it "should return the correct latitude" do
|
49
|
-
@cache.latitude.should == 49.420667
|
50
|
-
end
|
51
|
-
|
52
|
-
it "should return the correct longitude" do
|
53
|
-
@cache.longitude.should == 11.1145
|
54
|
-
end
|
55
|
-
|
56
|
-
it "should return the correct location" do
|
57
|
-
@cache.location.should == "Bayern, Germany"
|
58
|
-
end
|
59
|
-
|
60
|
-
it "should return the correct number of logs" do
|
61
|
-
@cache.logs.size.should == 69
|
62
|
-
end
|
63
|
-
|
64
|
-
it "should return cache has been archived" do
|
65
|
-
@cache.archived?.should == true
|
66
|
-
end
|
67
|
-
|
68
|
-
it "should return cache is not PM-only" do
|
69
|
-
@cache.pmonly?.should == false
|
70
|
-
end
|
71
|
-
|
72
|
-
it "should return cache is not in review" do
|
73
|
-
@cache.in_review?.should == false
|
74
|
-
end
|
75
|
-
end
|
data/spec/cache/letterbox.rb
DELETED
@@ -1,75 +0,0 @@
|
|
1
|
-
# encoding: utf-8
|
2
|
-
|
3
|
-
describe "Geocaching::Cache for 01328a57-5a04-4e69-a1cc-ce0eeaa452f5 (Letterbox)" do
|
4
|
-
before :all do
|
5
|
-
@cache = Geocaching::Cache.fetch(:guid => "01328a57-5a04-4e69-a1cc-ce0eeaa452f5")
|
6
|
-
end
|
7
|
-
|
8
|
-
it "should return the correct GC code" do
|
9
|
-
@cache.code.should == "GC1KBJD"
|
10
|
-
end
|
11
|
-
|
12
|
-
it "should return the correct ID" do
|
13
|
-
@cache.id.should == 1089572
|
14
|
-
end
|
15
|
-
|
16
|
-
it "should return the correct name" do
|
17
|
-
@cache.name.should == "Worzeldorfer Gebirge (Letterbox)"
|
18
|
-
end
|
19
|
-
|
20
|
-
it "should return the correct displayed owner name" do
|
21
|
-
@cache.owner_display_name.should == "numakeh (location by gsteinacher)"
|
22
|
-
end
|
23
|
-
|
24
|
-
it "should return the correct owner GUID" do
|
25
|
-
@cache.owner.guid == "d60bf869-8cc2-4e38-a349-9423f7d65427"
|
26
|
-
end
|
27
|
-
|
28
|
-
it "should return the correct cache type" do
|
29
|
-
@cache.type.to_sym.should == :letterbox
|
30
|
-
end
|
31
|
-
|
32
|
-
it "should return the correct size" do
|
33
|
-
@cache.size.should == :regular
|
34
|
-
end
|
35
|
-
|
36
|
-
it "should return the correct hidden date" do
|
37
|
-
@cache.hidden_at.should == Time.mktime(2009, 1, 3)
|
38
|
-
end
|
39
|
-
|
40
|
-
it "should return the correct difficulty rating" do
|
41
|
-
@cache.difficulty.should == 3
|
42
|
-
end
|
43
|
-
|
44
|
-
it "should return the correct terrain rating" do
|
45
|
-
@cache.terrain.should == 3
|
46
|
-
end
|
47
|
-
|
48
|
-
it "should return the correct latitude" do
|
49
|
-
@cache.latitude.should == 49.370417
|
50
|
-
end
|
51
|
-
|
52
|
-
it "should return the correct longitude" do
|
53
|
-
@cache.longitude.should == 11.116
|
54
|
-
end
|
55
|
-
|
56
|
-
it "should return the correct location" do
|
57
|
-
@cache.location.should == "Bayern, Germany"
|
58
|
-
end
|
59
|
-
|
60
|
-
it "should return the correct number of logs" do
|
61
|
-
@cache.logs.size.should >= 100
|
62
|
-
end
|
63
|
-
|
64
|
-
it "should return cache has not been archived" do
|
65
|
-
@cache.archived?.should == false
|
66
|
-
end
|
67
|
-
|
68
|
-
it "should return cache is not PM-only" do
|
69
|
-
@cache.pmonly?.should == false
|
70
|
-
end
|
71
|
-
|
72
|
-
it "should return cache is not in review" do
|
73
|
-
@cache.in_review?.should == false
|
74
|
-
end
|
75
|
-
end
|
data/spec/cache/lfevent.rb
DELETED
@@ -1,75 +0,0 @@
|
|
1
|
-
# encoding: utf-8
|
2
|
-
|
3
|
-
describe "Geocaching::Cache for 32512f3a-0fc2-45df-943b-af0a6f17f1fa (Lost and Found Event)" do
|
4
|
-
before :all do
|
5
|
-
@cache = Geocaching::Cache.fetch(:guid => "32512f3a-0fc2-45df-943b-af0a6f17f1fa")
|
6
|
-
end
|
7
|
-
|
8
|
-
it "should return the correct GC code" do
|
9
|
-
@cache.code.should == "GC2546Y"
|
10
|
-
end
|
11
|
-
|
12
|
-
it "should return the correct ID" do
|
13
|
-
@cache.id.should == 1588936
|
14
|
-
end
|
15
|
-
|
16
|
-
it "should return the correct name" do
|
17
|
-
@cache.name.should == "10 Jahre! Nürnberg, Germany"
|
18
|
-
end
|
19
|
-
|
20
|
-
it "should return the correct displayed owner name" do
|
21
|
-
@cache.owner_display_name.should == "team-noris"
|
22
|
-
end
|
23
|
-
|
24
|
-
it "should return the correct owner GUID" do
|
25
|
-
@cache.owner.guid == "c3d17887-2925-4ff0-9fa6-dccb86d48d3f"
|
26
|
-
end
|
27
|
-
|
28
|
-
it "should return the correct cache type" do
|
29
|
-
@cache.type.to_sym.should == :lfevent
|
30
|
-
end
|
31
|
-
|
32
|
-
it "should return the correct size" do
|
33
|
-
@cache.size.should == :not_chosen
|
34
|
-
end
|
35
|
-
|
36
|
-
it "should return the correct event date" do
|
37
|
-
@cache.event_date.should == Time.mktime(2010, 5, 1)
|
38
|
-
end
|
39
|
-
|
40
|
-
it "should return the correct difficulty rating" do
|
41
|
-
@cache.difficulty.should == 2
|
42
|
-
end
|
43
|
-
|
44
|
-
it "should return the correct terrain rating" do
|
45
|
-
@cache.terrain.should == 5
|
46
|
-
end
|
47
|
-
|
48
|
-
it "should return the correct latitude" do
|
49
|
-
@cache.latitude.should == 49.35475
|
50
|
-
end
|
51
|
-
|
52
|
-
it "should return the correct longitude" do
|
53
|
-
@cache.longitude.should == 11.20695
|
54
|
-
end
|
55
|
-
|
56
|
-
it "should return the correct location" do
|
57
|
-
@cache.location.should == "Bayern, Germany"
|
58
|
-
end
|
59
|
-
|
60
|
-
it "should return the correct number of logs" do
|
61
|
-
@cache.logs.size.should == 118
|
62
|
-
end
|
63
|
-
|
64
|
-
it "should return cache has been archived" do
|
65
|
-
@cache.archived?.should == true
|
66
|
-
end
|
67
|
-
|
68
|
-
it "should return cache is not PM-only" do
|
69
|
-
@cache.pmonly?.should == false
|
70
|
-
end
|
71
|
-
|
72
|
-
it "should return cache is not in review" do
|
73
|
-
@cache.in_review?.should == false
|
74
|
-
end
|
75
|
-
end
|
data/spec/cache/locationless.rb
DELETED
@@ -1,75 +0,0 @@
|
|
1
|
-
# encoding: utf-8
|
2
|
-
|
3
|
-
describe "Geocaching::Cache for 9ce22167-5a8d-451c-a69b-b19d5ec4f578 (Locationless)" do
|
4
|
-
before :all do
|
5
|
-
@cache = Geocaching::Cache.fetch(:guid => "9ce22167-5a8d-451c-a69b-b19d5ec4f578")
|
6
|
-
end
|
7
|
-
|
8
|
-
it "should return the correct GC code" do
|
9
|
-
@cache.code.should == "GCB48F"
|
10
|
-
end
|
11
|
-
|
12
|
-
it "should return the correct ID" do
|
13
|
-
@cache.id.should == 46223
|
14
|
-
end
|
15
|
-
|
16
|
-
it "should return the correct name" do
|
17
|
-
@cache.name.should == "die letzte ihrer art?"
|
18
|
-
end
|
19
|
-
|
20
|
-
it "should return the correct displayed owner name" do
|
21
|
-
@cache.owner_display_name.should == "alexem+sonja+der rote elephant"
|
22
|
-
end
|
23
|
-
|
24
|
-
it "should return the correct owner GUID" do
|
25
|
-
@cache.owner.guid == "87709ecd-09da-44d7-abc3-1ef36921f8e7"
|
26
|
-
end
|
27
|
-
|
28
|
-
it "should return the correct cache type" do
|
29
|
-
@cache.type.to_sym.should == :locationless
|
30
|
-
end
|
31
|
-
|
32
|
-
it "should return the correct size" do
|
33
|
-
@cache.size.should == :virtual
|
34
|
-
end
|
35
|
-
|
36
|
-
it "should return the correct hidden date" do
|
37
|
-
@cache.hidden_at.should == Time.mktime(2002, 12, 14)
|
38
|
-
end
|
39
|
-
|
40
|
-
it "should return the correct difficulty rating" do
|
41
|
-
@cache.difficulty.should == 2.5
|
42
|
-
end
|
43
|
-
|
44
|
-
it "should return the correct terrain rating" do
|
45
|
-
@cache.terrain.should == 2.5
|
46
|
-
end
|
47
|
-
|
48
|
-
it "should return no latitude" do
|
49
|
-
@cache.latitude.should == nil
|
50
|
-
end
|
51
|
-
|
52
|
-
it "should return no longitude" do
|
53
|
-
@cache.longitude.should == nil
|
54
|
-
end
|
55
|
-
|
56
|
-
it "should return no location" do
|
57
|
-
@cache.location.should == nil
|
58
|
-
end
|
59
|
-
|
60
|
-
it "should return the correct number of logs" do
|
61
|
-
@cache.logs.size.should == 1330
|
62
|
-
end
|
63
|
-
|
64
|
-
it "should return cache has been archived" do
|
65
|
-
@cache.archived?.should == true
|
66
|
-
end
|
67
|
-
|
68
|
-
it "should return cache is not PM-only" do
|
69
|
-
@cache.pmonly?.should == false
|
70
|
-
end
|
71
|
-
|
72
|
-
it "should return cache is not in review" do
|
73
|
-
@cache.in_review?.should == false
|
74
|
-
end
|
75
|
-
end
|
data/spec/cache/megaevent.rb
DELETED
@@ -1,75 +0,0 @@
|
|
1
|
-
# encoding: utf-8
|
2
|
-
|
3
|
-
describe "Geocaching::Cache for b60781d0-0933-426d-9a67-80eb855e87ef (Mega Event)" do
|
4
|
-
before :all do
|
5
|
-
@cache = Geocaching::Cache.fetch(:guid => "b60781d0-0933-426d-9a67-80eb855e87ef")
|
6
|
-
end
|
7
|
-
|
8
|
-
it "should return the correct GC code" do
|
9
|
-
@cache.code.should == "GC1XEDZ"
|
10
|
-
end
|
11
|
-
|
12
|
-
it "should return the correct ID" do
|
13
|
-
@cache.id.should == 1360436
|
14
|
-
end
|
15
|
-
|
16
|
-
it "should return the correct name" do
|
17
|
-
@cache.name.should == "Pinzgau 2010"
|
18
|
-
end
|
19
|
-
|
20
|
-
it "should return the correct displayed owner name" do
|
21
|
-
@cache.owner_display_name.should == "Pinzgauer Geocacher"
|
22
|
-
end
|
23
|
-
|
24
|
-
it "should return the correct owner GUID" do
|
25
|
-
@cache.owner.guid == "ba75bb32-16e5-473d-8fbc-e3dde88dd759"
|
26
|
-
end
|
27
|
-
|
28
|
-
it "should return the correct cache type" do
|
29
|
-
@cache.type.to_sym.should == :megaevent
|
30
|
-
end
|
31
|
-
|
32
|
-
it "should return the correct size" do
|
33
|
-
@cache.size.should == :not_chosen
|
34
|
-
end
|
35
|
-
|
36
|
-
it "should return the correct event date" do
|
37
|
-
@cache.event_date.should == Time.mktime(2010, 5, 29)
|
38
|
-
end
|
39
|
-
|
40
|
-
it "should return the correct difficulty rating" do
|
41
|
-
@cache.difficulty.should == 1
|
42
|
-
end
|
43
|
-
|
44
|
-
it "should return the correct terrain rating" do
|
45
|
-
@cache.terrain.should == 1
|
46
|
-
end
|
47
|
-
|
48
|
-
it "should return the correct latitude" do
|
49
|
-
@cache.latitude.should == 47.2744
|
50
|
-
end
|
51
|
-
|
52
|
-
it "should return the correct longitude" do
|
53
|
-
@cache.longitude.should == 12.770883
|
54
|
-
end
|
55
|
-
|
56
|
-
it "should return the correct location" do
|
57
|
-
@cache.location.should == "Salzburg, Austria"
|
58
|
-
end
|
59
|
-
|
60
|
-
it "should return a plausible number of logs" do
|
61
|
-
@cache.logs.size.should >= 1783
|
62
|
-
end
|
63
|
-
|
64
|
-
it "should return cache has not been archived" do
|
65
|
-
@cache.archived?.should == false
|
66
|
-
end
|
67
|
-
|
68
|
-
it "should return cache is not PM-only" do
|
69
|
-
@cache.pmonly?.should == false
|
70
|
-
end
|
71
|
-
|
72
|
-
it "should return cache is not in review" do
|
73
|
-
@cache.in_review?.should == false
|
74
|
-
end
|
75
|
-
end
|
data/spec/cache/multi.rb
DELETED
@@ -1,75 +0,0 @@
|
|
1
|
-
# encoding: utf-8
|
2
|
-
|
3
|
-
describe "Geocaching::Cache for 07cfab08-dadb-4a8f-a187-2a63404b4d3c (Multi)" do
|
4
|
-
before :all do
|
5
|
-
@cache = Geocaching::Cache.fetch(:guid => "07cfab08-dadb-4a8f-a187-2a63404b4d3c")
|
6
|
-
end
|
7
|
-
|
8
|
-
it "should return the correct GC code" do
|
9
|
-
@cache.code.should == "GC1V1RH"
|
10
|
-
end
|
11
|
-
|
12
|
-
it "should return the correct ID" do
|
13
|
-
@cache.id.should == 1288689
|
14
|
-
end
|
15
|
-
|
16
|
-
it "should return the correct name" do
|
17
|
-
@cache.name.should == "D1 - Plan-les-Ouates - le défi"
|
18
|
-
end
|
19
|
-
|
20
|
-
it "should return the correct displayed owner name" do
|
21
|
-
@cache.owner_display_name.should == "Dizzione"
|
22
|
-
end
|
23
|
-
|
24
|
-
it "should return the correct owner GUID" do
|
25
|
-
@cache.owner.guid == "d83598c6-5185-41b5-b4b9-b38c53bcdd2f"
|
26
|
-
end
|
27
|
-
|
28
|
-
it "should return the correct cache type" do
|
29
|
-
@cache.type.to_sym.should == :multi
|
30
|
-
end
|
31
|
-
|
32
|
-
it "should return the correct size" do
|
33
|
-
@cache.size.should == :other
|
34
|
-
end
|
35
|
-
|
36
|
-
it "should return the correct hidden date" do
|
37
|
-
@cache.hidden_at.should == Time.mktime(2009, 6, 23)
|
38
|
-
end
|
39
|
-
|
40
|
-
it "should return the correct difficulty rating" do
|
41
|
-
@cache.difficulty.should == 2
|
42
|
-
end
|
43
|
-
|
44
|
-
it "should return the correct terrain rating" do
|
45
|
-
@cache.terrain.should == 1.5
|
46
|
-
end
|
47
|
-
|
48
|
-
it "should return the correct latitude" do
|
49
|
-
@cache.latitude.should == 46.166233
|
50
|
-
end
|
51
|
-
|
52
|
-
it "should return the correct longitude" do
|
53
|
-
@cache.longitude.should == 6.119683
|
54
|
-
end
|
55
|
-
|
56
|
-
it "should return the correct location" do
|
57
|
-
@cache.location.should == "Suisse romande (GE/VD/FR), Switzerland"
|
58
|
-
end
|
59
|
-
|
60
|
-
it "should return the correct number of logs" do
|
61
|
-
@cache.logs.size.should >= 21
|
62
|
-
end
|
63
|
-
|
64
|
-
it "should return cache has not been archived" do
|
65
|
-
@cache.archived?.should == false
|
66
|
-
end
|
67
|
-
|
68
|
-
it "should return cache is not PM-only" do
|
69
|
-
@cache.pmonly?.should == false
|
70
|
-
end
|
71
|
-
|
72
|
-
it "should return cache is not in review" do
|
73
|
-
@cache.in_review?.should == false
|
74
|
-
end
|
75
|
-
end
|