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/log/announcement.txt
DELETED
@@ -1,14 +0,0 @@
|
|
1
|
-
Liebe Mopedcacher,
|
2
|
-
|
3
|
-
ich habe gerade die Routenplanung abgeschlossen und als GC-Tour bereitgestellt. Auf Wunsch mache ich auch noch Bookmarklisten fertig, dann bitte einfach bei mir melden.
|
4
|
-
|
5
|
-
Hier die GC-Tour für alle, die die Templer-Cache noch suchen müssen: [url=http://gctour.madd.in/?webcode=9f5baeff]gctour.madd.in/?webcode=9f5baeff[/url]
|
6
|
-
|
7
|
-
Diese GC-Tour ist für diejenigen, die schon zum Tempelritter geschlagen wurden: [url=http://gctour.madd.in/?webcode=8ae9eabd]gctour.madd.in/?webcode=8ae9eabd[/url]
|
8
|
-
|
9
|
-
Und falls es bei einer der beiden Gruppen etwas länger dauert, kann an der Mittagslokation noch eine Warteschleife geflogen werden: [url=http://gctour.madd.in/?webcode=7275a720]gctour.madd.in/?webcode=7275a720[/url]
|
10
|
-
|
11
|
-
Ich freue mich schon, euch in zwei Wochen zu dem Tempelrittern nach Polen zu (ent-)führen, und würde mich freuen, wenn sich noch der eine oder andere anschließen würde.
|
12
|
-
|
13
|
-
Schöne Grüße, Frank
|
14
|
-
|
data/spec/log/archive.rb
DELETED
@@ -1,28 +0,0 @@
|
|
1
|
-
# encoding: utf-8
|
2
|
-
|
3
|
-
describe "Geocaching::Log for 48a90293-e589-4690-bdcc-de0043d79b6d (Archive)" do
|
4
|
-
before :all do
|
5
|
-
@log = Geocaching::Log.fetch(:guid => "48a90293-e589-4690-bdcc-de0043d79b6d")
|
6
|
-
end
|
7
|
-
|
8
|
-
it "should return the correct username" do
|
9
|
-
@log.user.name.should == "jonny42"
|
10
|
-
end
|
11
|
-
|
12
|
-
it "should return the correct cache GUID" do
|
13
|
-
@log.cache.guid.should == "24edb0c6-cc83-477c-b0b9-78716d43a8dc"
|
14
|
-
end
|
15
|
-
|
16
|
-
it "should return the correct type" do
|
17
|
-
@log.type.to_sym.should == :archive
|
18
|
-
end
|
19
|
-
|
20
|
-
it "should return the correct date" do
|
21
|
-
@log.date.should == Time.mktime(2010, 7, 5)
|
22
|
-
end
|
23
|
-
|
24
|
-
it "should return the correct message" do
|
25
|
-
should_message = File.read(__FILE__.gsub(/rb$/, "txt"))
|
26
|
-
@log.message.should == should_message.gsub(/\r\n/, "\n")
|
27
|
-
end
|
28
|
-
end
|
data/spec/log/archive.txt
DELETED
data/spec/log/attended.rb
DELETED
@@ -1,28 +0,0 @@
|
|
1
|
-
# encoding: utf-8
|
2
|
-
|
3
|
-
describe "Geocaching::Log for 9bf458db-6dc9-4e02-b7ea-9cf056c40ade (Attended)" do
|
4
|
-
before :all do
|
5
|
-
@log = Geocaching::Log.fetch(:guid => "9bf458db-6dc9-4e02-b7ea-9cf056c40ade")
|
6
|
-
end
|
7
|
-
|
8
|
-
it "should return the correct username" do
|
9
|
-
@log.user.name.should == "Snooking Good"
|
10
|
-
end
|
11
|
-
|
12
|
-
it "should return the correct cache GUID" do
|
13
|
-
@log.cache.guid.should == "2f067ddb-1999-403a-8f9f-7509b8a68494"
|
14
|
-
end
|
15
|
-
|
16
|
-
it "should return the correct type" do
|
17
|
-
@log.type.to_sym.should == :attended
|
18
|
-
end
|
19
|
-
|
20
|
-
it "should return the correct date" do
|
21
|
-
@log.date.should == Time.mktime(2010, 8, 8)
|
22
|
-
end
|
23
|
-
|
24
|
-
it "should return the correct message" do
|
25
|
-
should_message = File.read(__FILE__.gsub(/rb$/, "txt"))
|
26
|
-
@log.message.should == should_message.gsub(/\r\n/, "\n")
|
27
|
-
end
|
28
|
-
end
|
data/spec/log/attended.txt
DELETED
@@ -1 +0,0 @@
|
|
1
|
-
Ok for sure I am logging this event as my first....LTF!!!! [:I] [:I] [:P] (Last to Find) "you know how it is" I'm in Hialeah!!! trying to put my son to sleep, and he ended up putting me to sleep. Phone rings and I rushed out the door. Made it to Wall's just in time to join the chaos. I did the ROBOT but not as good as the Bon Jovi crew... Glad to share some fun time with a group of peers I recently found. Definitely looking forward to 9/9 and 10/10.
|
data/spec/log/coords_update.rb
DELETED
@@ -1,28 +0,0 @@
|
|
1
|
-
# encoding: utf-8
|
2
|
-
|
3
|
-
describe "Geocaching::Log for 6802b623-f02c-4268-8fb3-7194ea60a686 (Update Coordinates)" do
|
4
|
-
before :all do
|
5
|
-
@log = Geocaching::Log.fetch(:guid => "6802b623-f02c-4268-8fb3-7194ea60a686")
|
6
|
-
end
|
7
|
-
|
8
|
-
it "should return the correct username" do
|
9
|
-
@log.user.name.should == "Rudisucht"
|
10
|
-
end
|
11
|
-
|
12
|
-
it "should return the correct cache GUID" do
|
13
|
-
@log.cache.guid.should == "c72dc03a-cd9d-4ebe-9cd2-6789aaa66ae5"
|
14
|
-
end
|
15
|
-
|
16
|
-
it "should return the correct type" do
|
17
|
-
@log.type.to_sym.should == :coords_update
|
18
|
-
end
|
19
|
-
|
20
|
-
it "should return the correct date" do
|
21
|
-
@log.date.should == Time.mktime(2009, 5, 15)
|
22
|
-
end
|
23
|
-
|
24
|
-
it "should return the correct message" do
|
25
|
-
should_message = File.read(__FILE__.gsub(/rb$/, "txt"))
|
26
|
-
@log.message.should == should_message.gsub(/\r\n/, "\n")
|
27
|
-
end
|
28
|
-
end
|
data/spec/log/coords_update.txt
DELETED
data/spec/log/disable.rb
DELETED
@@ -1,28 +0,0 @@
|
|
1
|
-
# encoding: utf-8
|
2
|
-
|
3
|
-
describe "Geocaching::Log for 83a3f4f4-7faf-414a-8145-8f334622d20f (Disable Listing)" do
|
4
|
-
before :all do
|
5
|
-
@log = Geocaching::Log.fetch(:guid => "83a3f4f4-7faf-414a-8145-8f334622d20f")
|
6
|
-
end
|
7
|
-
|
8
|
-
it "should return the correct username" do
|
9
|
-
@log.user.name.should == "CacheHasen"
|
10
|
-
end
|
11
|
-
|
12
|
-
it "should return the correct cache GUID" do
|
13
|
-
@log.cache.guid.should == "65f58a1c-916b-4b32-a656-e80964b6819b"
|
14
|
-
end
|
15
|
-
|
16
|
-
it "should return the correct type" do
|
17
|
-
@log.type.to_sym.should == :disable
|
18
|
-
end
|
19
|
-
|
20
|
-
it "should return the correct date" do
|
21
|
-
@log.date.should == Time.mktime(2010, 3, 13)
|
22
|
-
end
|
23
|
-
|
24
|
-
it "should return the correct message" do
|
25
|
-
should_message = File.read(__FILE__.gsub(/rb$/, "txt"))
|
26
|
-
@log.message.should == should_message.gsub(/\r\n/, "\n")
|
27
|
-
end
|
28
|
-
end
|
data/spec/log/disable.txt
DELETED
@@ -1,5 +0,0 @@
|
|
1
|
-
Es schaut so als ob die Dose nicht lange sicher war in ihrem Versteck. Bis wir das überprüft und gegebenenfalls ein neues Versteck gefunden habe, deaktiviere ich mal den Cache.
|
2
|
-
|
3
|
-
PS: Jeder der uns die errechneten (richtigen) Koordinaten schickt, darf trotzdem loggen.
|
4
|
-
|
5
|
-
[This entry was edited by pevo117 on Tuesday, March 16, 2010 at 4:09:34 AM.]
|
data/spec/log/dnf.rb
DELETED
@@ -1,28 +0,0 @@
|
|
1
|
-
# encoding: utf-8
|
2
|
-
|
3
|
-
describe "Geocaching::Log for 08dab41e-feaf-4f24-a9b5-b87e864f385f (Didn't find it)" do
|
4
|
-
before :all do
|
5
|
-
@log = Geocaching::Log.fetch(:guid => "08dab41e-feaf-4f24-a9b5-b87e864f385f")
|
6
|
-
end
|
7
|
-
|
8
|
-
it "should return the correct username" do
|
9
|
-
@log.user.name.should == "swemil"
|
10
|
-
end
|
11
|
-
|
12
|
-
it "should return the correct cache GUID" do
|
13
|
-
@log.cache.guid.should == "d7524ad9-3c15-451a-9997-6c167f7b406f"
|
14
|
-
end
|
15
|
-
|
16
|
-
it "should return the correct type" do
|
17
|
-
@log.type.to_sym.should == :dnf
|
18
|
-
end
|
19
|
-
|
20
|
-
it "should return the correct date" do
|
21
|
-
@log.date.should == Time.mktime(2010, 7, 17)
|
22
|
-
end
|
23
|
-
|
24
|
-
it "should return the correct message" do
|
25
|
-
should_message = File.read(__FILE__.gsub(/rb$/, "txt"))
|
26
|
-
@log.message.should == should_message.gsub(/\r\n/, "\n")
|
27
|
-
end
|
28
|
-
end
|
data/spec/log/dnf.txt
DELETED
@@ -1,5 +0,0 @@
|
|
1
|
-
Litt irriterende å ikke finne cachen.. Måtte betale 50 kr for å komme in ! men greit det. Løste oppgaven, men jeg fant ingen cache. Dobbelsjekket årtalen igen, telte på nytt, men ingen cache å se på angitte kordinater.
|
2
|
-
Men jeg måtte opptrå forsiktigt, siden det var fullt av mugglers fra det lokale distriktet.
|
3
|
-
Får prøve neste gang en er i den dalen... surt. [:(!]
|
4
|
-
|
5
|
-
Ellers en trevlig cache.
|
data/spec/log/enable.rb
DELETED
@@ -1,28 +0,0 @@
|
|
1
|
-
# encoding: utf-8
|
2
|
-
|
3
|
-
describe "Geocaching::Log for 4e588373-768d-43fb-8cf1-45d2a7d21599 (Enable Listing)" do
|
4
|
-
before :all do
|
5
|
-
@log = Geocaching::Log.fetch(:guid => "4e588373-768d-43fb-8cf1-45d2a7d21599")
|
6
|
-
end
|
7
|
-
|
8
|
-
it "should return the correct username" do
|
9
|
-
@log.user.name.should == "Cermak"
|
10
|
-
end
|
11
|
-
|
12
|
-
it "should return the correct cache GUID" do
|
13
|
-
@log.cache.guid.should == "66274935-40d5-43d8-8cc3-c819e38f9dcc"
|
14
|
-
end
|
15
|
-
|
16
|
-
it "should return the correct type" do
|
17
|
-
@log.type.to_sym.should == :enable
|
18
|
-
end
|
19
|
-
|
20
|
-
it "should return the correct date" do
|
21
|
-
@log.date.should == Time.mktime(2009, 1, 1)
|
22
|
-
end
|
23
|
-
|
24
|
-
it "should return the correct message" do
|
25
|
-
should_message = File.read(__FILE__.gsub(/rb$/, "txt"))
|
26
|
-
@log.message.should == should_message.gsub(/\r\n/, "\n")
|
27
|
-
end
|
28
|
-
end
|
data/spec/log/enable.txt
DELETED
@@ -1 +0,0 @@
|
|
1
|
-
We made it out to the site today. A perfect way to start the new year! Everything is back to the way it should be. We tried to hide it pretty well, so it would not get plundered again. My only concern is the amount of leaves- this may make it a little tougher in the fall/winter months.
|
data/spec/log/found.rb
DELETED
@@ -1,28 +0,0 @@
|
|
1
|
-
# encoding: utf-8
|
2
|
-
|
3
|
-
describe "Geocaching::Log for a3237dec-6931-4221-8f00-5d62923b411a (Found it)" do
|
4
|
-
before :all do
|
5
|
-
@log = Geocaching::Log.fetch(:guid => "a3237dec-6931-4221-8f00-5d62923b411a")
|
6
|
-
end
|
7
|
-
|
8
|
-
it "should return the correct username" do
|
9
|
-
@log.user.name.should == "CampinCrazy"
|
10
|
-
end
|
11
|
-
|
12
|
-
it "should return the correct cache GUID" do
|
13
|
-
@log.cache.guid.should == "66274935-40d5-43d8-8cc3-c819e38f9dcc"
|
14
|
-
end
|
15
|
-
|
16
|
-
it "should return the correct type" do
|
17
|
-
@log.type.to_sym.should == :found
|
18
|
-
end
|
19
|
-
|
20
|
-
it "should return the correct date" do
|
21
|
-
@log.date.should == Time.mktime(2009, 1, 31)
|
22
|
-
end
|
23
|
-
|
24
|
-
it "should return the correct message" do
|
25
|
-
should_message = File.read(__FILE__.gsub(/rb$/, "txt"))
|
26
|
-
@log.message.should == should_message.gsub(/\r\n/, "\n")
|
27
|
-
end
|
28
|
-
end
|
data/spec/log/found.txt
DELETED
data/spec/log/needs_archived.rb
DELETED
@@ -1,28 +0,0 @@
|
|
1
|
-
# encoding: utf-8
|
2
|
-
|
3
|
-
describe "Geocaching::Log for d235f46e-cd16-49af-a520-fa52f6c8abf8 (Needs Archived)" do
|
4
|
-
before :all do
|
5
|
-
@log = Geocaching::Log.fetch(:guid => "d235f46e-cd16-49af-a520-fa52f6c8abf8")
|
6
|
-
end
|
7
|
-
|
8
|
-
it "should return the correct username" do
|
9
|
-
@log.user.name.should == "Kent_Allard"
|
10
|
-
end
|
11
|
-
|
12
|
-
it "should return the correct cache GUID" do
|
13
|
-
@log.cache.guid.should == "b39d3cf0-88ad-4402-ba42-29879ecb5814"
|
14
|
-
end
|
15
|
-
|
16
|
-
it "should return the correct type" do
|
17
|
-
@log.type.to_sym.should == :needs_archived
|
18
|
-
end
|
19
|
-
|
20
|
-
it "should return the correct date" do
|
21
|
-
@log.date.should == Time.mktime(2008, 6, 15)
|
22
|
-
end
|
23
|
-
|
24
|
-
it "should return the correct message" do
|
25
|
-
should_message = File.read(__FILE__.gsub(/rb$/, "txt"))
|
26
|
-
@log.message.should == should_message.gsub(/\r\n/, "\n")
|
27
|
-
end
|
28
|
-
end
|
data/spec/log/needs_archived.txt
DELETED
@@ -1 +0,0 @@
|
|
1
|
-
This cache has been disabled for a long time. Please archive the cache and make any trackable items in inventory 'location unknown'.
|
@@ -1,28 +0,0 @@
|
|
1
|
-
# encoding: utf-8
|
2
|
-
|
3
|
-
describe "Geocaching::Log for a572c594-8763-408a-9bec-f29b77a1e50f (Needs Maintenance)" do
|
4
|
-
before :all do
|
5
|
-
@log = Geocaching::Log.fetch(:guid => "a572c594-8763-408a-9bec-f29b77a1e50f")
|
6
|
-
end
|
7
|
-
|
8
|
-
it "should return the correct username" do
|
9
|
-
@log.user.name.should == "taroh"
|
10
|
-
end
|
11
|
-
|
12
|
-
it "should return the correct cache GUID" do
|
13
|
-
@log.cache.guid.should == "c889a2e8-4d15-4b06-997e-8827896de5e8"
|
14
|
-
end
|
15
|
-
|
16
|
-
it "should return the correct type" do
|
17
|
-
@log.type.to_sym.should == :needs_maintenance
|
18
|
-
end
|
19
|
-
|
20
|
-
it "should return the correct date" do
|
21
|
-
@log.date.should == Time.mktime(2010, 7, 27)
|
22
|
-
end
|
23
|
-
|
24
|
-
it "should return the correct message" do
|
25
|
-
should_message = File.read(__FILE__.gsub(/rb$/, "txt"))
|
26
|
-
@log.message.should == should_message.gsub(/\r\n/, "\n")
|
27
|
-
end
|
28
|
-
end
|
@@ -1 +0,0 @@
|
|
1
|
-
As I wrote in found log, the cache might be returned to the proper place. Also the thing to fix the cache to tha point is degraded.
|
data/spec/log/note.rb
DELETED
@@ -1,28 +0,0 @@
|
|
1
|
-
# encoding: utf-8
|
2
|
-
|
3
|
-
describe "Geocaching::Log for 1eb67c1f-610d-4d1d-9703-10b3e47416e2 (Write Note)" do
|
4
|
-
before :all do
|
5
|
-
@log = Geocaching::Log.fetch(:guid => "1eb67c1f-610d-4d1d-9703-10b3e47416e2")
|
6
|
-
end
|
7
|
-
|
8
|
-
it "should return the correct username" do
|
9
|
-
@log.user.name.should == "cache-strapped"
|
10
|
-
end
|
11
|
-
|
12
|
-
it "should return the correct cache GUID" do
|
13
|
-
@log.cache.guid.should == "879ec54c-3c0b-4378-bc4c-53c191e17816"
|
14
|
-
end
|
15
|
-
|
16
|
-
it "should return the correct type" do
|
17
|
-
@log.type.to_sym.should == :note
|
18
|
-
end
|
19
|
-
|
20
|
-
it "should return the correct date" do
|
21
|
-
@log.date.should == Time.mktime(2005, 6, 5)
|
22
|
-
end
|
23
|
-
|
24
|
-
it "should return the correct message" do
|
25
|
-
should_message = File.read(__FILE__.gsub(/rb$/, "txt"))
|
26
|
-
@log.message.should == should_message.gsub(/\r\n/, "\n")
|
27
|
-
end
|
28
|
-
end
|
data/spec/log/note.txt
DELETED
@@ -1 +0,0 @@
|
|
1
|
-
Just popped in to check cache. Contents into fresh ziploc tucked back into hiding spot. Forgot the new additions to cache in truck. Will take in another time.
|
@@ -1,28 +0,0 @@
|
|
1
|
-
# encoding: utf-8
|
2
|
-
|
3
|
-
describe "Geocaching::Log for 6eecdf81-3958-4b93-8d63-24f53107f97a (Owner Maintenance)" do
|
4
|
-
before :all do
|
5
|
-
@log = Geocaching::Log.fetch(:guid => "6eecdf81-3958-4b93-8d63-24f53107f97a")
|
6
|
-
end
|
7
|
-
|
8
|
-
it "should return the correct username" do
|
9
|
-
@log.user.name.should == "pöllö"
|
10
|
-
end
|
11
|
-
|
12
|
-
it "should return the correct cache GUID" do
|
13
|
-
@log.cache.guid.should == "006ceb4e-5a45-471c-a74a-2af0a6035565"
|
14
|
-
end
|
15
|
-
|
16
|
-
it "should return the correct type" do
|
17
|
-
@log.type.to_sym.should == :owner_maintenance
|
18
|
-
end
|
19
|
-
|
20
|
-
it "should return the correct date" do
|
21
|
-
@log.date.should == Time.mktime(2009, 11, 26)
|
22
|
-
end
|
23
|
-
|
24
|
-
it "should return the correct message" do
|
25
|
-
should_message = File.read(__FILE__.gsub(/rb$/, "txt"))
|
26
|
-
@log.message.should == should_message.gsub(/\r\n/, "\n")
|
27
|
-
end
|
28
|
-
end
|
@@ -1 +0,0 @@
|
|
1
|
-
huoltokäynti ja nappasin samalla tb:n matkaan
|
data/spec/log/publish.rb
DELETED
@@ -1,28 +0,0 @@
|
|
1
|
-
# encoding: utf-8
|
2
|
-
|
3
|
-
describe "Geocaching::Log for d7ae038b-cb26-4b8e-bcca-5effd05870d0 (Publish)" do
|
4
|
-
before :all do
|
5
|
-
@log = Geocaching::Log.fetch(:guid => "d7ae038b-cb26-4b8e-bcca-5effd05870d0")
|
6
|
-
end
|
7
|
-
|
8
|
-
it "should return the correct username" do
|
9
|
-
@log.user.name.should == "geoawareCA"
|
10
|
-
end
|
11
|
-
|
12
|
-
it "should return the correct cache GUID" do
|
13
|
-
@log.cache.guid.should == "d4c5b818-1d91-4c01-a305-7c9950ec57f2"
|
14
|
-
end
|
15
|
-
|
16
|
-
it "should return the correct type" do
|
17
|
-
@log.type.to_sym.should == :publish
|
18
|
-
end
|
19
|
-
|
20
|
-
it "should return the correct date" do
|
21
|
-
@log.date.should == Time.mktime(2010, 4, 11)
|
22
|
-
end
|
23
|
-
|
24
|
-
it "should return the correct message" do
|
25
|
-
should_message = File.read(__FILE__.gsub(/rb$/, "txt"))
|
26
|
-
@log.message.should == should_message.gsub(/\r\n/, "\n")
|
27
|
-
end
|
28
|
-
end
|
data/spec/log/publish.txt
DELETED
@@ -1 +0,0 @@
|
|
1
|
-
Published
|
data/spec/log/retract.rb
DELETED
@@ -1,28 +0,0 @@
|
|
1
|
-
# encoding: utf-8
|
2
|
-
|
3
|
-
describe "Geocaching::Log for 58fa3ddc-6c1a-4ae3-bc19-40009c50a9d5 (Retract Listing)" do
|
4
|
-
before :all do
|
5
|
-
@log = Geocaching::Log.fetch(:guid => "58fa3ddc-6c1a-4ae3-bc19-40009c50a9d5")
|
6
|
-
end
|
7
|
-
|
8
|
-
it "should return the correct username" do
|
9
|
-
@log.user.name.should == "WGA3"
|
10
|
-
end
|
11
|
-
|
12
|
-
it "should return the correct cache GUID" do
|
13
|
-
@log.cache.guid.should == "d4249438-50e9-41b8-bafb-3f9e72e25f5a"
|
14
|
-
end
|
15
|
-
|
16
|
-
it "should return the correct type" do
|
17
|
-
@log.type.to_sym.should == :retract
|
18
|
-
end
|
19
|
-
|
20
|
-
it "should return the correct date" do
|
21
|
-
@log.date.should == Time.mktime(2010, 7, 29)
|
22
|
-
end
|
23
|
-
|
24
|
-
it "should return the correct message" do
|
25
|
-
should_message = File.read(__FILE__.gsub(/rb$/, "txt"))
|
26
|
-
@log.message.should == should_message.gsub(/\r\n/, "\n")
|
27
|
-
end
|
28
|
-
end
|