uw_sws 2.0.33 → 2.1.0
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.
- checksums.yaml +4 -4
- data/lib/uw_sws/version.rb +1 -1
- data/lib/uw_sws.rb +3 -3
- data/test/test_endpoints.rb +10 -2
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 3c9390d1987d989831dbe1d9bc0526b176b53ade
|
4
|
+
data.tar.gz: 12035f23f41870a2ff81b5e9c551889eada34686
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: de2809265958e690704de484092b52f407e80ee2579612a4188f7e048972929a01f8306244f67208bfbd531c44f620374e11afe7eb2f66361bde03365cb0019d
|
7
|
+
data.tar.gz: 45f98eb6b6149db4d5e66e6d65cfb9d4ef297e5e52e8597052067fc47206b112e2c4c4384d27dd62255c20af011a3322a2cf3d90624cbb5e744a86c2b09e131a
|
data/lib/uw_sws/version.rb
CHANGED
data/lib/uw_sws.rb
CHANGED
@@ -66,12 +66,12 @@ class UwSws
|
|
66
66
|
end
|
67
67
|
|
68
68
|
def sections(year, curriculum: "", instructor: "", count: 0, quarter: "",
|
69
|
-
course_num: "")
|
69
|
+
course_num: "", delete_flag: "")
|
70
70
|
fix_param curriculum
|
71
71
|
data = parse("section.json?year=#{year}"\
|
72
72
|
"&quarter=#{quarter}&curriculum_abbreviation=#{curriculum}"\
|
73
73
|
"&future_terms=#{count}&course_number=#{course_num}"\
|
74
|
-
"®_id=#{instructor}")
|
74
|
+
"®_id=#{instructor}&delete_flag=#{delete_flag}")
|
75
75
|
|
76
76
|
data["Sections"]
|
77
77
|
end
|
@@ -262,7 +262,7 @@ class UwSws
|
|
262
262
|
end
|
263
263
|
|
264
264
|
def clean_spaces(data)
|
265
|
-
data.gsub!
|
265
|
+
data.gsub!(/(\\?"|)((?:.(?!\1))+.)(?:\1)/) do |match|
|
266
266
|
match.gsub(/^(\\?")\s+|\s+(\\?")$/, "\\1\\2").strip
|
267
267
|
end
|
268
268
|
end
|
data/test/test_endpoints.rb
CHANGED
@@ -18,10 +18,10 @@ describe UwSws do
|
|
18
18
|
|
19
19
|
cert = config["cert"]
|
20
20
|
key = config["key"]
|
21
|
-
url = "https://wseval.s.uw.edu/student/v5/"
|
21
|
+
# url = "https://wseval.s.uw.edu/student/v5/"
|
22
22
|
@regid = "9136CCB8F66711D5BE060004AC494FFE"
|
23
23
|
@uw = UwSws.new(cert: cert, key: key, throw_HEPPS: false,
|
24
|
-
logger: log, use_cache: false
|
24
|
+
logger: log, use_cache: false)
|
25
25
|
end
|
26
26
|
|
27
27
|
describe "when getting test scores " do
|
@@ -245,6 +245,14 @@ describe UwSws do
|
|
245
245
|
end
|
246
246
|
end
|
247
247
|
|
248
|
+
describe "when asked for sections that were withdrawn " do
|
249
|
+
it "must return at least 1 of them" do
|
250
|
+
@uw.sections(2015, curriculum: "MKTG", quarter: :autumn,
|
251
|
+
course_num: 510, delete_flag: "withdrawn,active")
|
252
|
+
.size.must_be :>, 0
|
253
|
+
end
|
254
|
+
end
|
255
|
+
|
248
256
|
#describe "when asked for section with a HEPPS error " do
|
249
257
|
# it "must respond with error 500" do
|
250
258
|
# @uw.section(2013, :autumn, "PB AF", 521, "A").must_be_nil
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: uw_sws
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.0
|
4
|
+
version: 2.1.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Nogbit
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-
|
11
|
+
date: 2015-06-19 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rest-client
|