rubyuw 0.99.17 → 0.99.18

Sign up to get free protection for your applications and to get access to all the features.
Files changed (5) hide show
  1. data/Gemfile.lock +4 -5
  2. data/VERSION +1 -1
  3. data/lib/rubyuw/base.rb +9 -13
  4. data/rubyuw.gemspec +3 -4
  5. metadata +9 -22
@@ -1,22 +1,22 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- rubyuw (0.99.16)
4
+ rubyuw (0.99.18)
5
5
  mechanize (>= 0.9.3)
6
6
 
7
7
  GEM
8
8
  remote: http://rubygems.org/
9
9
  specs:
10
- gemcutter (0.6.1)
10
+ gemcutter (0.7.0)
11
11
  git (1.2.5)
12
12
  jeweler (1.4.0)
13
13
  gemcutter (>= 0.1.0)
14
14
  git (>= 1.2.5)
15
15
  rubyforge (>= 2.0.0)
16
- json_pure (1.4.6)
16
+ json_pure (1.5.1)
17
17
  mechanize (1.0.0)
18
18
  nokogiri (>= 1.2.1)
19
- nokogiri (1.4.3.1)
19
+ nokogiri (1.4.4)
20
20
  rake (0.8.7)
21
21
  rubyforge (2.0.4)
22
22
  json_pure (>= 1.1.7)
@@ -26,6 +26,5 @@ PLATFORMS
26
26
 
27
27
  DEPENDENCIES
28
28
  jeweler (= 1.4.0)
29
- mechanize (>= 0.9.3)
30
29
  rake
31
30
  rubyuw!
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.99.17
1
+ 0.99.18
@@ -33,21 +33,14 @@ module RubyUW
33
33
  logout
34
34
 
35
35
  # Log in
36
- results = connection.goto("http://myuw.washington.edu").
37
- verify("//input[@type='submit' and @name='defbut']").
38
- submit_form('f').
39
- submit_form('relay').
36
+ results = connection.goto("https://weblogin.washington.edu/index.cgi").
40
37
  submit_form('query', {
41
38
  :user => netid,
42
39
  :pass => password
43
40
  }).
44
41
  execute!
45
42
 
46
- relay_form = results.form_with(:name => 'relay')
47
- return false unless results.form_with(:name => 'query').nil?
48
- relay_form.submit()
49
-
50
- true
43
+ results.body.include?("Log in successful")
51
44
  end
52
45
 
53
46
  # Checks whether authentication is still valid. This method
@@ -57,11 +50,14 @@ module RubyUW
57
50
  #
58
51
  # @return [Boolean]
59
52
  def authenticated?
60
- results = connection.goto("http://myuw.washington.edu").
61
- submit_form('f').
62
- execute!
53
+ results = connection.goto("https://sdb.admin.washington.edu/timeschd/uwnetid/sln.asp?QTRYR=SUM+2011&SLN=10343").execute!
54
+
55
+ # NOTE: This is broken as of April 20, 2011. Returns blank white screen...
56
+ # results = connection.goto("http://myuw.washington.edu").
57
+ # submit_form('f').
58
+ # execute!
63
59
 
64
- !results.search("//div[@class='main_search']").empty?
60
+ results.form_with(:name => "query").nil?
65
61
  end
66
62
 
67
63
  # Log out from MyUW. This method clears the cookies of the
@@ -5,11 +5,11 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = %q{rubyuw}
8
- s.version = "0.99.17"
8
+ s.version = "0.99.18"
9
9
 
10
10
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
11
  s.authors = ["Mitchell Hashimoto"]
12
- s.date = %q{2010-09-08}
12
+ s.date = %q{2011-04-20}
13
13
  s.description = %q{Library which provides a ruby interface to the University of Washington student portal.}
14
14
  s.email = %q{mitchell.hashimoto@gmail.com}
15
15
  s.extra_rdoc_files = [
@@ -78,7 +78,7 @@ Gem::Specification.new do |s|
78
78
  s.homepage = %q{http://github.com/mitchellh/rubyuw}
79
79
  s.rdoc_options = ["--charset=UTF-8"]
80
80
  s.require_paths = ["lib"]
81
- s.rubygems_version = %q{1.3.7}
81
+ s.rubygems_version = %q{1.5.0}
82
82
  s.summary = %q{Library which provides a ruby interface to the University of Washington student portal.}
83
83
  s.test_files = [
84
84
  "test/live/curriculum_enrollment_test.rb",
@@ -96,7 +96,6 @@ Gem::Specification.new do |s|
96
96
  ]
97
97
 
98
98
  if s.respond_to? :specification_version then
99
- current_version = Gem::Specification::CURRENT_SPECIFICATION_VERSION
100
99
  s.specification_version = 3
101
100
 
102
101
  if Gem::Version.new(Gem::VERSION) >= Gem::Version.new('1.2.0') then
metadata CHANGED
@@ -1,13 +1,8 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rubyuw
3
3
  version: !ruby/object:Gem::Version
4
- hash: 433
5
- prerelease: false
6
- segments:
7
- - 0
8
- - 99
9
- - 17
10
- version: 0.99.17
4
+ prerelease:
5
+ version: 0.99.18
11
6
  platform: ruby
12
7
  authors:
13
8
  - Mitchell Hashimoto
@@ -15,25 +10,20 @@ autorequire:
15
10
  bindir: bin
16
11
  cert_chain: []
17
12
 
18
- date: 2010-09-08 00:00:00 -07:00
13
+ date: 2011-04-20 00:00:00 -07:00
19
14
  default_executable:
20
15
  dependencies:
21
16
  - !ruby/object:Gem::Dependency
22
- type: :runtime
23
- prerelease: false
24
17
  name: mechanize
25
- version_requirements: &id001 !ruby/object:Gem::Requirement
18
+ requirement: &id001 !ruby/object:Gem::Requirement
26
19
  none: false
27
20
  requirements:
28
21
  - - ">="
29
22
  - !ruby/object:Gem::Version
30
- hash: 61
31
- segments:
32
- - 0
33
- - 9
34
- - 3
35
23
  version: 0.9.3
36
- requirement: *id001
24
+ type: :runtime
25
+ prerelease: false
26
+ version_requirements: *id001
37
27
  description: Library which provides a ruby interface to the University of Washington student portal.
38
28
  email: mitchell.hashimoto@gmail.com
39
29
  executables: []
@@ -115,7 +105,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
115
105
  requirements:
116
106
  - - ">="
117
107
  - !ruby/object:Gem::Version
118
- hash: 3
108
+ hash: -2339761890012324601
119
109
  segments:
120
110
  - 0
121
111
  version: "0"
@@ -124,14 +114,11 @@ required_rubygems_version: !ruby/object:Gem::Requirement
124
114
  requirements:
125
115
  - - ">="
126
116
  - !ruby/object:Gem::Version
127
- hash: 3
128
- segments:
129
- - 0
130
117
  version: "0"
131
118
  requirements: []
132
119
 
133
120
  rubyforge_project:
134
- rubygems_version: 1.3.7
121
+ rubygems_version: 1.5.0
135
122
  signing_key:
136
123
  specification_version: 3
137
124
  summary: Library which provides a ruby interface to the University of Washington student portal.