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/retract.txt
DELETED
data/spec/log/reviewer_note.rb
DELETED
@@ -1,28 +0,0 @@
|
|
1
|
-
# encoding: utf-8
|
2
|
-
|
3
|
-
describe "Geocaching::Log for 876d4e85-ebe9-4098-8552-151f34d3b4de (Post Reviewer Note)" do
|
4
|
-
before :all do
|
5
|
-
@log = Geocaching::Log.fetch(:guid => "876d4e85-ebe9-4098-8552-151f34d3b4de")
|
6
|
-
end
|
7
|
-
|
8
|
-
it "should return the correct username" do
|
9
|
-
@log.user.name.should == "Prime Reviewer"
|
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 == :reviewer_note
|
18
|
-
end
|
19
|
-
|
20
|
-
it "should return the correct date" do
|
21
|
-
@log.date.should == Time.mktime(2010, 7, 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/reviewer_note.txt
DELETED
@@ -1,3 +0,0 @@
|
|
1
|
-
I noticed that this cache has been temporarily disabled for a period of time well in excess of the period of "a few weeks" as contemplated by the cache guidelines published on Geocaching.com. While I feel that Geocaching.com should hold the location for you and block other caches from entering the area around this cache for a reasonable amount of time, we can't do so forever. Please either repair/replace this cache, or archive it (using the [i]archive listing[/i] link in the upper right) so that someone else can place a cache in the area, and geocachers can once again enjoy visiting this location.
|
2
|
-
|
3
|
-
If you plan on repairing this cache, please [b]log a note to the cache[/b] (not email) so I don't archive the listing for non-communication.
|
data/spec/log/unarchive.rb
DELETED
@@ -1,28 +0,0 @@
|
|
1
|
-
# encoding: utf-8
|
2
|
-
|
3
|
-
describe "Geocaching::Log for b70042d7-1411-4f56-950e-d23303e7ab4e (Unarchive)" do
|
4
|
-
before :all do
|
5
|
-
@log = Geocaching::Log.fetch(:guid => "b70042d7-1411-4f56-950e-d23303e7ab4e")
|
6
|
-
end
|
7
|
-
|
8
|
-
it "should return the correct username" do
|
9
|
-
@log.user.name.should == "Krypton"
|
10
|
-
end
|
11
|
-
|
12
|
-
it "should return the correct cache GUID" do
|
13
|
-
@log.cache.guid.should == "4d56861e-2779-4b2c-b06a-5bbea2ec93d4"
|
14
|
-
end
|
15
|
-
|
16
|
-
it "should return the correct type" do
|
17
|
-
@log.type.to_sym.should == :unarchive
|
18
|
-
end
|
19
|
-
|
20
|
-
it "should return the correct date" do
|
21
|
-
@log.date.should == Time.mktime(2009, 1, 16)
|
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/unarchive.txt
DELETED
@@ -1 +0,0 @@
|
|
1
|
-
Unarchiving cache.
|
@@ -1,28 +0,0 @@
|
|
1
|
-
# encoding: utf-8
|
2
|
-
|
3
|
-
describe "Geocaching::Log for c7f88568-9417-45c2-9906-c4f0210c7837 (Webcam Photo Taken)" do
|
4
|
-
before :all do
|
5
|
-
@log = Geocaching::Log.fetch(:guid => "c7f88568-9417-45c2-9906-c4f0210c7837")
|
6
|
-
end
|
7
|
-
|
8
|
-
it "should return the correct username" do
|
9
|
-
@log.user.name.should == "123flash"
|
10
|
-
end
|
11
|
-
|
12
|
-
it "should return the correct cache GUID" do
|
13
|
-
@log.cache.guid.should == "ed19825b-f94d-450f-a1df-feb274f33ac8"
|
14
|
-
end
|
15
|
-
|
16
|
-
it "should return the correct type" do
|
17
|
-
@log.type.to_sym.should == :webcam_photo_taken
|
18
|
-
end
|
19
|
-
|
20
|
-
it "should return the correct date" do
|
21
|
-
@log.date.should == Time.mktime(2010, 6, 30)
|
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
|
-
Thanks KBer for letting me log it as a find,
|
data/spec/log/will_attend.rb
DELETED
@@ -1,28 +0,0 @@
|
|
1
|
-
# encoding: utf-8
|
2
|
-
|
3
|
-
describe "Geocaching::Log for 4ef9383c-19b6-41d6-843e-31ada8abbc22 (Will Attend)" do
|
4
|
-
before :all do
|
5
|
-
@log = Geocaching::Log.fetch(:guid => "4ef9383c-19b6-41d6-843e-31ada8abbc22")
|
6
|
-
end
|
7
|
-
|
8
|
-
it "should return the correct username" do
|
9
|
-
@log.user.name.should == "Dennis the Menace2"
|
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 == :will_attend
|
18
|
-
end
|
19
|
-
|
20
|
-
it "should return the correct date" do
|
21
|
-
@log.date.should == Time.mktime(2010, 7, 30)
|
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/will_attend.txt
DELETED
@@ -1 +0,0 @@
|
|
1
|
-
Sounds like I will be able to make this one. Thanks for having it later in the day, so I can still make church.
|
data/spec/log_spec.rb
DELETED
@@ -1,21 +0,0 @@
|
|
1
|
-
# encoding: utf-8
|
2
|
-
|
3
|
-
$:.unshift File.join(File.dirname(__FILE__), "..", "lib")
|
4
|
-
dir = File.dirname(__FILE__)
|
5
|
-
|
6
|
-
require "geocaching"
|
7
|
-
require "#{dir}/helper"
|
8
|
-
|
9
|
-
if ENV["GC_LOG_TYPES"]
|
10
|
-
types = ENV["GC_LOG_TYPES"].split
|
11
|
-
else
|
12
|
-
types = Geocaching::LogType::TYPES.to_a.map { |a| a[0].to_s }
|
13
|
-
end
|
14
|
-
|
15
|
-
types.each do |type|
|
16
|
-
begin
|
17
|
-
require "#{dir}/log/#{type}"
|
18
|
-
rescue LoadError
|
19
|
-
$stderr.puts "Missing test for log type #{type}"
|
20
|
-
end
|
21
|
-
end
|
data/spec/user_spec.rb
DELETED
@@ -1,48 +0,0 @@
|
|
1
|
-
# encoding: utf-8
|
2
|
-
|
3
|
-
$:.unshift File.join(File.dirname(__FILE__), "..", "lib")
|
4
|
-
|
5
|
-
require "geocaching"
|
6
|
-
require "helper"
|
7
|
-
|
8
|
-
describe "Geocaching::User for efa09aeb-e2ac-4aad-8779-725a4aa35eac" do
|
9
|
-
before :all do
|
10
|
-
@user = Geocaching::User.fetch(:guid => "efa09aeb-e2ac-4aad-8779-725a4aa35eac")
|
11
|
-
end
|
12
|
-
|
13
|
-
it "should return the correct GUID" do
|
14
|
-
@user.guid.should == "efa09aeb-e2ac-4aad-8779-725a4aa35eac"
|
15
|
-
end
|
16
|
-
|
17
|
-
it "should return the correct user name" do
|
18
|
-
@user.name.should == "palmetto"
|
19
|
-
end
|
20
|
-
|
21
|
-
it "should return the correct member since date" do
|
22
|
-
@user.member_since.should == Time.mktime(2005, 12, 5)
|
23
|
-
end
|
24
|
-
|
25
|
-
it "should return a plausible last visit date" do
|
26
|
-
@user.last_visit.should >= Time.mktime(2010, 8, 12)
|
27
|
-
end
|
28
|
-
|
29
|
-
it "should return the correct occupation" do
|
30
|
-
@user.occupation.should == "loafering"
|
31
|
-
end
|
32
|
-
|
33
|
-
it "should return the correct location" do
|
34
|
-
@user.location.should == "sunny Florida"
|
35
|
-
end
|
36
|
-
|
37
|
-
it "should return no homepage" do
|
38
|
-
@user.homepage.should == nil
|
39
|
-
end
|
40
|
-
|
41
|
-
it "should return user is a premium member" do
|
42
|
-
@user.premium_member?.should == true
|
43
|
-
end
|
44
|
-
|
45
|
-
it "should return user is a reviewer" do
|
46
|
-
@user.reviewer?.should == true
|
47
|
-
end
|
48
|
-
end
|