schoolfinder 0.4.2 → 0.4.3
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/lib/schoolfinder/client.rb
CHANGED
@@ -24,6 +24,11 @@ module Schoolfinder
|
|
24
24
|
params = {:f => 'getAssignedSchools'}
|
25
25
|
make_request(params, optional_params)
|
26
26
|
end
|
27
|
+
|
28
|
+
def assigned_district(optional_params = {})
|
29
|
+
params = {:f => 'getAssignedDistrict'}
|
30
|
+
make_request(params, optional_params)
|
31
|
+
end
|
27
32
|
|
28
33
|
def test_rating(options)
|
29
34
|
params = {:f => 'getTestRating'}
|
data/lib/schoolfinder/version.rb
CHANGED
@@ -0,0 +1 @@
|
|
1
|
+
[{"district":{"districtid":"8639","name":"Boston School District","address":"26 COURT STREET","city":"BOSTON","state":"MA","zip":"23219","phonenumber":"(617) 635-9050","gradesserved":"PK-12","testrating_text":"","testrating_image_large":"","testrating_image_small":"","testrating_year":""}}]
|
@@ -57,6 +57,21 @@ describe "Schoolfinder::Client" do
|
|
57
57
|
@response.body.first.should be_kind_of(Hashie::Rash)
|
58
58
|
end
|
59
59
|
end
|
60
|
+
|
61
|
+
context "assigned_district" do
|
62
|
+
before do
|
63
|
+
mock_get({"f" => "getAssignedDistrict", "latitude" => "42.34", "longitude" => "-71.05"}, 'assigned_district.json')
|
64
|
+
end
|
65
|
+
|
66
|
+
it { lambda {@schoolfinder.assigned_district(:latitude => "42.34", :longitude => "-71.05")}.should_not raise_exception }
|
67
|
+
|
68
|
+
it "should return a response" do
|
69
|
+
@response = @schoolfinder.assigned_district(:latitude => "42.34", :longitude => "-71.05")
|
70
|
+
@response.should_not be_nil
|
71
|
+
@response.body.should be_kind_of(Array)
|
72
|
+
@response.body.first.should be_kind_of(Hashie::Rash)
|
73
|
+
end
|
74
|
+
end
|
60
75
|
|
61
76
|
context "test_rating" do
|
62
77
|
before do
|
metadata
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: schoolfinder
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
4
|
+
hash: 9
|
5
5
|
prerelease:
|
6
6
|
segments:
|
7
7
|
- 0
|
8
8
|
- 4
|
9
|
-
-
|
10
|
-
version: 0.4.
|
9
|
+
- 3
|
10
|
+
version: 0.4.3
|
11
11
|
platform: ruby
|
12
12
|
authors:
|
13
13
|
- Tom Cocca
|
@@ -120,6 +120,7 @@ files:
|
|
120
120
|
- lib/schoolfinder/response.rb
|
121
121
|
- lib/schoolfinder/version.rb
|
122
122
|
- schoolfinder.gemspec
|
123
|
+
- spec/responses/assigned_district.json
|
123
124
|
- spec/responses/assigned_schools.json
|
124
125
|
- spec/responses/branding_data.json
|
125
126
|
- spec/responses/district_search.json
|
@@ -171,6 +172,7 @@ signing_key:
|
|
171
172
|
specification_version: 3
|
172
173
|
summary: ruby api wrapper for education.com schoolfinder
|
173
174
|
test_files:
|
175
|
+
- spec/responses/assigned_district.json
|
174
176
|
- spec/responses/assigned_schools.json
|
175
177
|
- spec/responses/branding_data.json
|
176
178
|
- spec/responses/district_search.json
|