sgs 0.5.0
Sign up to get free protection for your applications and to get access to all the features.
- data/.gitignore +17 -0
- data/.rspec +5 -0
- data/Gemfile +4 -0
- data/LICENSE +22 -0
- data/README.md +43 -0
- data/Rakefile +2 -0
- data/lib/sgs.rb +8 -0
- data/lib/sgs/authenticate.rb +38 -0
- data/lib/sgs/not_authorised_error.rb +4 -0
- data/lib/sgs/version.rb +3 -0
- data/lib/sgs/wash.rb +60 -0
- data/sgs.gemspec +26 -0
- data/spec/authenticate_spec.rb +22 -0
- data/spec/fixtures/vcr_cassettes/authenticate.yml +225 -0
- data/spec/fixtures/vcr_cassettes/wash.yml +551 -0
- data/spec/spec_helper.rb +23 -0
- data/spec/wash_spec.rb +28 -0
- metadata +122 -0
data/.gitignore
ADDED
data/.rspec
ADDED
data/Gemfile
ADDED
data/LICENSE
ADDED
@@ -0,0 +1,22 @@
|
|
1
|
+
Copyright (c) 2012 Linus Oleander
|
2
|
+
|
3
|
+
MIT License
|
4
|
+
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining
|
6
|
+
a copy of this software and associated documentation files (the
|
7
|
+
"Software"), to deal in the Software without restriction, including
|
8
|
+
without limitation the rights to use, copy, modify, merge, publish,
|
9
|
+
distribute, sublicense, and/or sell copies of the Software, and to
|
10
|
+
permit persons to whom the Software is furnished to do so, subject to
|
11
|
+
the following conditions:
|
12
|
+
|
13
|
+
The above copyright notice and this permission notice shall be
|
14
|
+
included in all copies or substantial portions of the Software.
|
15
|
+
|
16
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
17
|
+
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
18
|
+
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
19
|
+
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
20
|
+
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
21
|
+
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
22
|
+
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
data/README.md
ADDED
@@ -0,0 +1,43 @@
|
|
1
|
+
# SGS
|
2
|
+
|
3
|
+
Ruby wrapper for [sgsstudentbostader.se](http://www.sgsstudentbostader.se).
|
4
|
+
|
5
|
+
## Installation
|
6
|
+
|
7
|
+
`[sudo] gem install sgs`
|
8
|
+
|
9
|
+
## Usage
|
10
|
+
|
11
|
+
### Wash
|
12
|
+
|
13
|
+
``` ruby
|
14
|
+
booking = SGS::Wash.new({
|
15
|
+
username: "username",
|
16
|
+
password: "secret"
|
17
|
+
}).bookings.first
|
18
|
+
|
19
|
+
booking.group # => "2"
|
20
|
+
```
|
21
|
+
|
22
|
+
### Booking
|
23
|
+
|
24
|
+
- **group** (String) What group was booked?
|
25
|
+
- **start_time** (Time) When does it start?
|
26
|
+
- **end_time** (Time) When does it end?
|
27
|
+
- **where** (String) What studio was booked?
|
28
|
+
|
29
|
+
## Contributing
|
30
|
+
|
31
|
+
1. Fork it
|
32
|
+
2. Create your feature branch (`git checkout -b my-new-feature`)
|
33
|
+
3. Commit your changes (`git commit -am 'Added some feature'`)
|
34
|
+
4. Push to the branch (`git push origin my-new-feature`)
|
35
|
+
5. Create new Pull Request
|
36
|
+
|
37
|
+
## Requirements
|
38
|
+
|
39
|
+
*SGS* is tested in *OS X 10.7.4* using Ruby *1.9.2*.
|
40
|
+
|
41
|
+
## License
|
42
|
+
|
43
|
+
*SGS* is released under the *MIT license*.
|
data/Rakefile
ADDED
data/lib/sgs.rb
ADDED
@@ -0,0 +1,38 @@
|
|
1
|
+
module SGS
|
2
|
+
class Authenticate
|
3
|
+
#
|
4
|
+
# @args[:password] String
|
5
|
+
# @args[:username] String
|
6
|
+
#
|
7
|
+
def initialize(args)
|
8
|
+
@username, @password = args.fetch(:username), args.fetch(:password)
|
9
|
+
end
|
10
|
+
|
11
|
+
#
|
12
|
+
# @return Hash Cookies used by SGS
|
13
|
+
#
|
14
|
+
def cookies
|
15
|
+
@_cookies ||= lambda {
|
16
|
+
url = %W{
|
17
|
+
http://marknad.sgsstudentbostader.se/s3.aspx?
|
18
|
+
page=pgRedirect&
|
19
|
+
verifylogin=y&
|
20
|
+
mg=1&
|
21
|
+
id=/se/mina-sidor&
|
22
|
+
client=#{@username}&
|
23
|
+
pin=#{@password}&
|
24
|
+
url=http://www.sgsstudentbostader.se/setlogin.aspx
|
25
|
+
}.join("")
|
26
|
+
|
27
|
+
RestClient.get(url) do |r1|
|
28
|
+
if r1.headers[:location] =~ /blnInloggadFull=false/
|
29
|
+
raise NotAuthorisedError.new("Invalid username of password")
|
30
|
+
end
|
31
|
+
RestClient.get(r1.headers[:location]) do |r2|
|
32
|
+
return r2.cookies
|
33
|
+
end
|
34
|
+
end
|
35
|
+
}.call
|
36
|
+
end
|
37
|
+
end
|
38
|
+
end
|
data/lib/sgs/version.rb
ADDED
data/lib/sgs/wash.rb
ADDED
@@ -0,0 +1,60 @@
|
|
1
|
+
module SGS
|
2
|
+
class Wash
|
3
|
+
#
|
4
|
+
# @args[:week] Fixnum Optional
|
5
|
+
# @args[:username] String
|
6
|
+
# @args[:password] Password
|
7
|
+
#
|
8
|
+
def initialize(args)
|
9
|
+
@week = args[:week] || Date.today.cweek
|
10
|
+
|
11
|
+
@cookies = SGS::Authenticate.new({
|
12
|
+
username: args.fetch(:username),
|
13
|
+
password: args.fetch(:password)
|
14
|
+
}).cookies
|
15
|
+
|
16
|
+
@booking = Struct.new(:group, :start_time, :end_time, :where)
|
17
|
+
end
|
18
|
+
|
19
|
+
#
|
20
|
+
# @return Array<Booking> A list of bookings
|
21
|
+
#
|
22
|
+
def bookings
|
23
|
+
@_bookings ||= lambda {
|
24
|
+
url = %W{
|
25
|
+
http://tvatta.sgsstudentbostader.se/wwwashbookings.aspx?
|
26
|
+
panelId=616&
|
27
|
+
weekoffset=0&
|
28
|
+
date=#{URI.escape week_dates(@week).strftime("%Y-%m-%d %H:%M:%S")}
|
29
|
+
}.join("")
|
30
|
+
|
31
|
+
RestClient.get("http://www.sgsstudentbostader.se/ext_gw.aspx?module=wwwash&lang=se", cookies: @cookies) do |r|
|
32
|
+
RestClient.get(r.headers[:location], cookies: @cookies) do |r|
|
33
|
+
return prepare_data(RestClient.get(url, {
|
34
|
+
cookies: r.cookies.merge(@cookies)
|
35
|
+
}))
|
36
|
+
end
|
37
|
+
end
|
38
|
+
}.call
|
39
|
+
end
|
40
|
+
|
41
|
+
private
|
42
|
+
def prepare_data(raw)
|
43
|
+
tr = Nokogiri::HTML(raw).css(".smallText.headerColor").to_a
|
44
|
+
total = (tr.count + 1) / 4
|
45
|
+
|
46
|
+
total.times.map do |n|
|
47
|
+
start_time = Time.parse("#{tr[n * 4 + 1].content} #{tr[n * 4 + 3].content.split("-").first}") # 2012-05-31 11:30:00 +0200
|
48
|
+
end_time = Time.parse("#{tr[n * 4 + 1].content} #{tr[n * 4 + 3].content.split("-").last}") # 2012-05-31 13:00:00 +0200
|
49
|
+
group = tr[n * 4 + 2].content.match(/^\w+: (.+)$/).to_a.last # 1
|
50
|
+
where = URI.decode(tr[n * 4].at_css("b").content) # Tvätt 307
|
51
|
+
|
52
|
+
@booking.new(group, start_time, end_time, where)
|
53
|
+
end
|
54
|
+
end
|
55
|
+
|
56
|
+
def week_dates(week_num)
|
57
|
+
Date.commercial(Time.now.year, week_num, 1)
|
58
|
+
end
|
59
|
+
end
|
60
|
+
end
|
data/sgs.gemspec
ADDED
@@ -0,0 +1,26 @@
|
|
1
|
+
# -*- encoding: utf-8 -*-
|
2
|
+
require File.expand_path('../lib/sgs/version', __FILE__)
|
3
|
+
|
4
|
+
Gem::Specification.new do |gem|
|
5
|
+
gem.authors = ["Linus Oleander"]
|
6
|
+
gem.email = ["linus@oleander.nu"]
|
7
|
+
gem.description = %q{Ruby wrapper for sgsstudentbostader.se}
|
8
|
+
gem.summary = %q{Ruby wrapper for sgsstudentbostader.se}
|
9
|
+
gem.homepage = "https://github.com/oleander/sgs-rb"
|
10
|
+
|
11
|
+
gem.files = `git ls-files`.split($\)
|
12
|
+
gem.executables = gem.files.grep(%r{^bin/}).map{ |f| File.basename(f) }
|
13
|
+
gem.test_files = gem.files.grep(%r{^(test|spec|features)/})
|
14
|
+
gem.name = "sgs"
|
15
|
+
gem.require_paths = ["lib"]
|
16
|
+
gem.version = SGS::VERSION
|
17
|
+
|
18
|
+
gem.add_dependency("rest-client")
|
19
|
+
gem.add_dependency("nokogiri")
|
20
|
+
|
21
|
+
gem.add_development_dependency("vcr")
|
22
|
+
gem.add_development_dependency("rspec")
|
23
|
+
gem.add_development_dependency("webmock")
|
24
|
+
|
25
|
+
gem.required_ruby_version = "~> 1.9.0"
|
26
|
+
end
|
@@ -0,0 +1,22 @@
|
|
1
|
+
describe SGS::Authenticate do
|
2
|
+
use_vcr_cassette "authenticate"
|
3
|
+
|
4
|
+
it "should generate proper cookies" do
|
5
|
+
cookies = SGS::Authenticate.new({
|
6
|
+
username: $username,
|
7
|
+
password: $password
|
8
|
+
}).cookies
|
9
|
+
|
10
|
+
cookies.keys.should include("ASP.NET_SessionId")
|
11
|
+
cookies["ASP.NET_SessionId"].should match(/[a-z0-9]+/)
|
12
|
+
end
|
13
|
+
|
14
|
+
it "should raise NotAuthenticateError if corrent params isn't used" do
|
15
|
+
lambda {
|
16
|
+
SGS::Authenticate.new({
|
17
|
+
username: "random",
|
18
|
+
password: "wrong"
|
19
|
+
}).cookies
|
20
|
+
}.should raise_error(SGS::NotAuthorisedError)
|
21
|
+
end
|
22
|
+
end
|
@@ -0,0 +1,225 @@
|
|
1
|
+
---
|
2
|
+
http_interactions:
|
3
|
+
- request:
|
4
|
+
method: get
|
5
|
+
uri: http://marknad.sgsstudentbostader.se/s3.aspx?client=<username>&id=/se/mina-sidor&mg=1&page=pgRedirect&pin=<password>&url=http://www.sgsstudentbostader.se/setlogin.aspx&verifylogin=y
|
6
|
+
body:
|
7
|
+
encoding: US-ASCII
|
8
|
+
string: ''
|
9
|
+
headers:
|
10
|
+
Accept:
|
11
|
+
- ! '*/*; q=0.5, application/xml'
|
12
|
+
Accept-Encoding:
|
13
|
+
- gzip, deflate
|
14
|
+
User-Agent:
|
15
|
+
- Ruby
|
16
|
+
response:
|
17
|
+
status:
|
18
|
+
code: 302
|
19
|
+
message: Found
|
20
|
+
headers:
|
21
|
+
Date:
|
22
|
+
- Wed, 30 May 2012 23:34:28 GMT
|
23
|
+
Server:
|
24
|
+
- Microsoft-IIS/6.0
|
25
|
+
X-Powered-By:
|
26
|
+
- ASP.NET
|
27
|
+
X-Aspnet-Version:
|
28
|
+
- 2.0.50727
|
29
|
+
Location:
|
30
|
+
- http://www.sgsstudentbostader.se/setlogin.aspx?id=/se/mina-sidor&blnInloggadFull=true&blnInloggadLight=true&kundid=<username>&kundnamn=Linus+Oleander&borhossgs=True&tvattstuga=True&ansokningsdatum=2008-12-15&customer_name=401320034&kundstatus=+%7b+%22SyndicateObjectMainGroupDescription%22%3a+%22Studentl%c3%a4genheter%22%2c+%22ClientDate%22%3a+%222008-12-15%22%2c+%22ClientPoints%22%3a+0%2c+%22ShowClientDate%22%3a++true%2c+%22ShowClientPoints%22%3a+false%2c+%22BlockCodeNo%22%3a+0%2c+%22BlockCode%22%3a+%22NONE%22%2c+%22BlockCodeDescription%22%3a+%22Godk%c3%a4nd%22%2c+%22BlockCodeValidTo%22%3a+%22%22%2c%22CompanyBlockCodeNo%22%3a+0%2c+%22CompanyBlockCodeDescription%22%3a+%22Godk%c3%a4nd%22%2c+%22CompanyBlockValidTo%22%3a+%22%22+%7d
|
31
|
+
Set-Cookie:
|
32
|
+
- ASP.NET_SessionId=nt3dc1uabsguhj55ri4ldn55; path=/; HttpOnly
|
33
|
+
- Language=se; expires=Fri, 30-Nov-2012 00:34:28 GMT; path=/
|
34
|
+
- maingroup=1; expires=Mon, 30-Jul-2012 23:34:28 GMT; path=/
|
35
|
+
Cache-Control:
|
36
|
+
- private
|
37
|
+
Expires:
|
38
|
+
- Wed, 30 May 2012 23:33:28 GMT
|
39
|
+
Content-Type:
|
40
|
+
- text/html; charset=utf-8
|
41
|
+
Content-Length:
|
42
|
+
- '886'
|
43
|
+
body:
|
44
|
+
encoding: US-ASCII
|
45
|
+
string: ! "<html><head><title>Object moved</title></head><body>\r\n<h2>Object
|
46
|
+
moved to <a href=\"http://www.sgsstudentbostader.se/setlogin.aspx?id=/se/mina-sidor&blnInloggadFull=true&blnInloggadLight=true&kundid=<username>&kundnamn=Linus+Oleander&borhossgs=True&tvattstuga=True&ansokningsdatum=2008-12-15&customer_name=401320034&kundstatus=+%7b+%22SyndicateObjectMainGroupDescription%22%3a+%22Studentl%c3%a4genheter%22%2c+%22ClientDate%22%3a+%222008-12-15%22%2c+%22ClientPoints%22%3a+0%2c+%22ShowClientDate%22%3a++true%2c+%22ShowClientPoints%22%3a+false%2c+%22BlockCodeNo%22%3a+0%2c+%22BlockCode%22%3a+%22NONE%22%2c+%22BlockCodeDescription%22%3a+%22Godk%c3%a4nd%22%2c+%22BlockCodeValidTo%22%3a+%22%22%2c%22CompanyBlockCodeNo%22%3a+0%2c+%22CompanyBlockCodeDescription%22%3a+%22Godk%c3%a4nd%22%2c+%22CompanyBlockValidTo%22%3a+%22%22+%7d\">here</a>.</h2>\r\n</body></html>\r\n"
|
47
|
+
http_version: !!null
|
48
|
+
recorded_at: Wed, 30 May 2012 23:34:22 GMT
|
49
|
+
- request:
|
50
|
+
method: get
|
51
|
+
uri: http://www.sgsstudentbostader.se/setlogin.aspx?ansokningsdatum=2008-12-15&blnInloggadFull=true&blnInloggadLight=true&borhossgs=True&customer_name=401320034&id=/se/mina-sidor&kundid=<username>&kundnamn=Linus%20Oleander&kundstatus=%20%7B%20%22SyndicateObjectMainGroupDescription%22:%20%22Studentl%C3%A4genheter%22,%20%22ClientDate%22:%20%222008-12-15%22,%20%22ClientPoints%22:%200,%20%22ShowClientDate%22:%20%20true,%20%22ShowClientPoints%22:%20false,%20%22BlockCodeNo%22:%200,%20%22BlockCode%22:%20%22NONE%22,%20%22BlockCodeDescription%22:%20%22Godk%C3%A4nd%22,%20%22BlockCodeValidTo%22:%20%22%22,%22CompanyBlockCodeNo%22:%200,%20%22CompanyBlockCodeDescription%22:%20%22Godk%C3%A4nd%22,%20%22CompanyBlockValidTo%22:%20%22%22%20%7D&tvattstuga=True
|
52
|
+
body:
|
53
|
+
encoding: US-ASCII
|
54
|
+
string: ''
|
55
|
+
headers:
|
56
|
+
Accept:
|
57
|
+
- ! '*/*; q=0.5, application/xml'
|
58
|
+
Accept-Encoding:
|
59
|
+
- gzip, deflate
|
60
|
+
User-Agent:
|
61
|
+
- Ruby
|
62
|
+
response:
|
63
|
+
status:
|
64
|
+
code: 302
|
65
|
+
message: Found
|
66
|
+
headers:
|
67
|
+
Date:
|
68
|
+
- Wed, 30 May 2012 23:34:28 GMT
|
69
|
+
Server:
|
70
|
+
- Microsoft-IIS/6.0
|
71
|
+
X-Powered-By:
|
72
|
+
- ASP.NET
|
73
|
+
X-Aspnet-Version:
|
74
|
+
- 2.0.50727
|
75
|
+
Location:
|
76
|
+
- /se/mina-sidor
|
77
|
+
Set-Cookie:
|
78
|
+
- ASP.NET_SessionId=2dde3055u1tlvlaza4lcbh45; path=/; HttpOnly
|
79
|
+
Cache-Control:
|
80
|
+
- private
|
81
|
+
Content-Type:
|
82
|
+
- text/html; charset=utf-8
|
83
|
+
Content-Length:
|
84
|
+
- '135'
|
85
|
+
body:
|
86
|
+
encoding: US-ASCII
|
87
|
+
string: ! "<html><head><title>Object moved</title></head><body>\r\n<h2>Object
|
88
|
+
moved to <a href=\"%2fse%2fmina-sidor\">here</a>.</h2>\r\n</body></html>\r\n"
|
89
|
+
http_version: !!null
|
90
|
+
recorded_at: Wed, 30 May 2012 23:34:23 GMT
|
91
|
+
- request:
|
92
|
+
method: get
|
93
|
+
uri: http://marknad.sgsstudentbostader.se/s3.aspx?client=ramdom&id=/se/mina-sidor&mg=1&page=pgRedirect&pin=wrong&url=http://www.sgsstudentbostader.se/setlogin.aspx&verifylogin=y
|
94
|
+
body:
|
95
|
+
encoding: US-ASCII
|
96
|
+
string: ''
|
97
|
+
headers:
|
98
|
+
Accept:
|
99
|
+
- ! '*/*; q=0.5, application/xml'
|
100
|
+
Accept-Encoding:
|
101
|
+
- gzip, deflate
|
102
|
+
User-Agent:
|
103
|
+
- Ruby
|
104
|
+
response:
|
105
|
+
status:
|
106
|
+
code: 302
|
107
|
+
message: Found
|
108
|
+
headers:
|
109
|
+
Date:
|
110
|
+
- Thu, 31 May 2012 22:24:30 GMT
|
111
|
+
Server:
|
112
|
+
- Microsoft-IIS/6.0
|
113
|
+
X-Powered-By:
|
114
|
+
- ASP.NET
|
115
|
+
X-Aspnet-Version:
|
116
|
+
- 2.0.50727
|
117
|
+
Location:
|
118
|
+
- http://www.sgsstudentbostader.se/setlogin.aspx?id=/se/mina-sidor&blnInloggadFull=false&blnInloggadLight=false&kundid=ramdom&ssnInloggadLightFelmeddelande=Fel+Anv%c3%a4ndare%2fPin
|
119
|
+
Set-Cookie:
|
120
|
+
- ASP.NET_SessionId=psjqgsizanedr43nc2mhdp45; path=/; HttpOnly
|
121
|
+
- Language=se; expires=Fri, 30-Nov-2012 23:24:30 GMT; path=/
|
122
|
+
- maingroup=1; expires=Tue, 31-Jul-2012 22:24:30 GMT; path=/
|
123
|
+
Cache-Control:
|
124
|
+
- private
|
125
|
+
Expires:
|
126
|
+
- Thu, 31 May 2012 22:23:30 GMT
|
127
|
+
Content-Type:
|
128
|
+
- text/html; charset=utf-8
|
129
|
+
Content-Length:
|
130
|
+
- '311'
|
131
|
+
body:
|
132
|
+
encoding: US-ASCII
|
133
|
+
string: ! "<html><head><title>Object moved</title></head><body>\r\n<h2>Object
|
134
|
+
moved to <a href=\"http://www.sgsstudentbostader.se/setlogin.aspx?id=/se/mina-sidor&blnInloggadFull=false&blnInloggadLight=false&kundid=ramdom&ssnInloggadLightFelmeddelande=Fel+Anv%c3%a4ndare%2fPin\">here</a>.</h2>\r\n</body></html>\r\n"
|
135
|
+
http_version: !!null
|
136
|
+
recorded_at: Thu, 31 May 2012 22:24:23 GMT
|
137
|
+
- request:
|
138
|
+
method: get
|
139
|
+
uri: http://www.sgsstudentbostader.se/setlogin.aspx?blnInloggadFull=false&blnInloggadLight=false&id=/se/mina-sidor&kundid=ramdom&ssnInloggadLightFelmeddelande=Fel%20Anv%C3%A4ndare/Pin
|
140
|
+
body:
|
141
|
+
encoding: US-ASCII
|
142
|
+
string: ''
|
143
|
+
headers:
|
144
|
+
Accept:
|
145
|
+
- ! '*/*; q=0.5, application/xml'
|
146
|
+
Accept-Encoding:
|
147
|
+
- gzip, deflate
|
148
|
+
User-Agent:
|
149
|
+
- Ruby
|
150
|
+
response:
|
151
|
+
status:
|
152
|
+
code: 302
|
153
|
+
message: Found
|
154
|
+
headers:
|
155
|
+
Date:
|
156
|
+
- Thu, 31 May 2012 22:24:30 GMT
|
157
|
+
Server:
|
158
|
+
- Microsoft-IIS/6.0
|
159
|
+
X-Powered-By:
|
160
|
+
- ASP.NET
|
161
|
+
X-Aspnet-Version:
|
162
|
+
- 2.0.50727
|
163
|
+
Location:
|
164
|
+
- /se/mina-sidor
|
165
|
+
Set-Cookie:
|
166
|
+
- ASP.NET_SessionId=sscbuh45hzgnb355x1vaob3n; path=/; HttpOnly
|
167
|
+
Cache-Control:
|
168
|
+
- private
|
169
|
+
Content-Type:
|
170
|
+
- text/html; charset=utf-8
|
171
|
+
Content-Length:
|
172
|
+
- '135'
|
173
|
+
body:
|
174
|
+
encoding: US-ASCII
|
175
|
+
string: ! "<html><head><title>Object moved</title></head><body>\r\n<h2>Object
|
176
|
+
moved to <a href=\"%2fse%2fmina-sidor\">here</a>.</h2>\r\n</body></html>\r\n"
|
177
|
+
http_version: !!null
|
178
|
+
recorded_at: Thu, 31 May 2012 22:24:23 GMT
|
179
|
+
- request:
|
180
|
+
method: get
|
181
|
+
uri: http://marknad.sgsstudentbostader.se/s3.aspx?client=random&id=/se/mina-sidor&mg=1&page=pgRedirect&pin=wrong&url=http://www.sgsstudentbostader.se/setlogin.aspx&verifylogin=y
|
182
|
+
body:
|
183
|
+
encoding: US-ASCII
|
184
|
+
string: ''
|
185
|
+
headers:
|
186
|
+
Accept:
|
187
|
+
- ! '*/*; q=0.5, application/xml'
|
188
|
+
Accept-Encoding:
|
189
|
+
- gzip, deflate
|
190
|
+
User-Agent:
|
191
|
+
- Ruby
|
192
|
+
response:
|
193
|
+
status:
|
194
|
+
code: 302
|
195
|
+
message: Found
|
196
|
+
headers:
|
197
|
+
Date:
|
198
|
+
- Thu, 31 May 2012 22:38:23 GMT
|
199
|
+
Server:
|
200
|
+
- Microsoft-IIS/6.0
|
201
|
+
X-Powered-By:
|
202
|
+
- ASP.NET
|
203
|
+
X-Aspnet-Version:
|
204
|
+
- 2.0.50727
|
205
|
+
Location:
|
206
|
+
- http://www.sgsstudentbostader.se/setlogin.aspx?id=/se/mina-sidor&blnInloggadFull=false&blnInloggadLight=false&kundid=random&ssnInloggadLightFelmeddelande=Fel+Anv%c3%a4ndare%2fPin
|
207
|
+
Set-Cookie:
|
208
|
+
- ASP.NET_SessionId=ecxu2o55ei4pmcjkfqhmur45; path=/; HttpOnly
|
209
|
+
- Language=se; expires=Fri, 30-Nov-2012 23:38:23 GMT; path=/
|
210
|
+
- maingroup=1; expires=Tue, 31-Jul-2012 22:38:23 GMT; path=/
|
211
|
+
Cache-Control:
|
212
|
+
- private
|
213
|
+
Expires:
|
214
|
+
- Thu, 31 May 2012 22:37:23 GMT
|
215
|
+
Content-Type:
|
216
|
+
- text/html; charset=utf-8
|
217
|
+
Content-Length:
|
218
|
+
- '311'
|
219
|
+
body:
|
220
|
+
encoding: US-ASCII
|
221
|
+
string: ! "<html><head><title>Object moved</title></head><body>\r\n<h2>Object
|
222
|
+
moved to <a href=\"http://www.sgsstudentbostader.se/setlogin.aspx?id=/se/mina-sidor&blnInloggadFull=false&blnInloggadLight=false&kundid=random&ssnInloggadLightFelmeddelande=Fel+Anv%c3%a4ndare%2fPin\">here</a>.</h2>\r\n</body></html>\r\n"
|
223
|
+
http_version: !!null
|
224
|
+
recorded_at: Thu, 31 May 2012 22:38:17 GMT
|
225
|
+
recorded_with: VCR 2.1.1
|
@@ -0,0 +1,551 @@
|
|
1
|
+
---
|
2
|
+
http_interactions:
|
3
|
+
- request:
|
4
|
+
method: get
|
5
|
+
uri: http://marknad.sgsstudentbostader.se/s3.aspx?client=<username>&id=/se/mina-sidor&mg=1&page=pgRedirect&pin=<password>&url=http://www.sgsstudentbostader.se/setlogin.aspx&verifylogin=y
|
6
|
+
body:
|
7
|
+
encoding: US-ASCII
|
8
|
+
string: ''
|
9
|
+
headers:
|
10
|
+
Accept:
|
11
|
+
- ! '*/*; q=0.5, application/xml'
|
12
|
+
Accept-Encoding:
|
13
|
+
- gzip, deflate
|
14
|
+
User-Agent:
|
15
|
+
- Ruby
|
16
|
+
response:
|
17
|
+
status:
|
18
|
+
code: 302
|
19
|
+
message: Found
|
20
|
+
headers:
|
21
|
+
Date:
|
22
|
+
- Thu, 31 May 2012 22:58:31 GMT
|
23
|
+
Server:
|
24
|
+
- Microsoft-IIS/6.0
|
25
|
+
X-Powered-By:
|
26
|
+
- ASP.NET
|
27
|
+
X-Aspnet-Version:
|
28
|
+
- 2.0.50727
|
29
|
+
Location:
|
30
|
+
- http://www.sgsstudentbostader.se/setlogin.aspx?id=/se/mina-sidor&blnInloggadFull=true&blnInloggadLight=true&kundid=<username>&kundnamn=Linus+Oleander&borhossgs=True&tvattstuga=True&ansokningsdatum=2008-12-15&customer_name=401320034&kundstatus=+%7b+%22SyndicateObjectMainGroupDescription%22%3a+%22Studentl%c3%a4genheter%22%2c+%22ClientDate%22%3a+%222008-12-15%22%2c+%22ClientPoints%22%3a+0%2c+%22ShowClientDate%22%3a++true%2c+%22ShowClientPoints%22%3a+false%2c+%22BlockCodeNo%22%3a+0%2c+%22BlockCode%22%3a+%22NONE%22%2c+%22BlockCodeDescription%22%3a+%22Godk%c3%a4nd%22%2c+%22BlockCodeValidTo%22%3a+%22%22%2c%22CompanyBlockCodeNo%22%3a+0%2c+%22CompanyBlockCodeDescription%22%3a+%22Godk%c3%a4nd%22%2c+%22CompanyBlockValidTo%22%3a+%22%22+%7d
|
31
|
+
Set-Cookie:
|
32
|
+
- ASP.NET_SessionId=xnkvyqz2nssivw55vfnwqp55; path=/; HttpOnly
|
33
|
+
- Language=se; expires=Fri, 30-Nov-2012 23:58:31 GMT; path=/
|
34
|
+
- maingroup=1; expires=Tue, 31-Jul-2012 22:58:31 GMT; path=/
|
35
|
+
Cache-Control:
|
36
|
+
- private
|
37
|
+
Expires:
|
38
|
+
- Thu, 31 May 2012 22:57:31 GMT
|
39
|
+
Content-Type:
|
40
|
+
- text/html; charset=utf-8
|
41
|
+
Content-Length:
|
42
|
+
- '886'
|
43
|
+
body:
|
44
|
+
encoding: US-ASCII
|
45
|
+
string: !str
|
46
|
+
str: ! "<html><head><title>Object moved</title></head><body>\r\n<h2>Object
|
47
|
+
moved to <a href=\"http://www.sgsstudentbostader.se/setlogin.aspx?id=/se/mina-sidor&blnInloggadFull=true&blnInloggadLight=true&kundid=<username>&kundnamn=Linus+Oleander&borhossgs=True&tvattstuga=True&ansokningsdatum=2008-12-15&customer_name=401320034&kundstatus=+%7b+%22SyndicateObjectMainGroupDescription%22%3a+%22Studentl%c3%a4genheter%22%2c+%22ClientDate%22%3a+%222008-12-15%22%2c+%22ClientPoints%22%3a+0%2c+%22ShowClientDate%22%3a++true%2c+%22ShowClientPoints%22%3a+false%2c+%22BlockCodeNo%22%3a+0%2c+%22BlockCode%22%3a+%22NONE%22%2c+%22BlockCodeDescription%22%3a+%22Godk%c3%a4nd%22%2c+%22BlockCodeValidTo%22%3a+%22%22%2c%22CompanyBlockCodeNo%22%3a+0%2c+%22CompanyBlockCodeDescription%22%3a+%22Godk%c3%a4nd%22%2c+%22CompanyBlockValidTo%22%3a+%22%22+%7d\">here</a>.</h2>\r\n</body></html>\r\n"
|
48
|
+
net_http_res: &70208837485440 !ruby/object:Net::HTTPFound
|
49
|
+
http_version: '1.0'
|
50
|
+
code: '302'
|
51
|
+
message: Found
|
52
|
+
header:
|
53
|
+
date:
|
54
|
+
- Thu, 31 May 2012 22:58:31 GMT
|
55
|
+
server:
|
56
|
+
- Microsoft-IIS/6.0
|
57
|
+
x-powered-by:
|
58
|
+
- ASP.NET
|
59
|
+
x-aspnet-version:
|
60
|
+
- 2.0.50727
|
61
|
+
location:
|
62
|
+
- http://www.sgsstudentbostader.se/setlogin.aspx?id=/se/mina-sidor&blnInloggadFull=true&blnInloggadLight=true&kundid=<username>&kundnamn=Linus+Oleander&borhossgs=True&tvattstuga=True&ansokningsdatum=2008-12-15&customer_name=401320034&kundstatus=+%7b+%22SyndicateObjectMainGroupDescription%22%3a+%22Studentl%c3%a4genheter%22%2c+%22ClientDate%22%3a+%222008-12-15%22%2c+%22ClientPoints%22%3a+0%2c+%22ShowClientDate%22%3a++true%2c+%22ShowClientPoints%22%3a+false%2c+%22BlockCodeNo%22%3a+0%2c+%22BlockCode%22%3a+%22NONE%22%2c+%22BlockCodeDescription%22%3a+%22Godk%c3%a4nd%22%2c+%22BlockCodeValidTo%22%3a+%22%22%2c%22CompanyBlockCodeNo%22%3a+0%2c+%22CompanyBlockCodeDescription%22%3a+%22Godk%c3%a4nd%22%2c+%22CompanyBlockValidTo%22%3a+%22%22+%7d
|
63
|
+
set-cookie: &70208837484040
|
64
|
+
- ASP.NET_SessionId=xnkvyqz2nssivw55vfnwqp55; path=/; HttpOnly
|
65
|
+
- Language=se; expires=Fri, 30-Nov-2012 23:58:31 GMT; path=/
|
66
|
+
- maingroup=1; expires=Tue, 31-Jul-2012 22:58:31 GMT; path=/
|
67
|
+
cache-control:
|
68
|
+
- private
|
69
|
+
expires:
|
70
|
+
- Thu, 31 May 2012 22:57:31 GMT
|
71
|
+
content-type:
|
72
|
+
- text/html; charset=utf-8
|
73
|
+
content-length:
|
74
|
+
- '886'
|
75
|
+
body: !str
|
76
|
+
str: ! "<html><head><title>Object moved</title></head><body>\r\n<h2>Object
|
77
|
+
moved to <a href=\"http://www.sgsstudentbostader.se/setlogin.aspx?id=/se/mina-sidor&blnInloggadFull=true&blnInloggadLight=true&kundid=<username>&kundnamn=Linus+Oleander&borhossgs=True&tvattstuga=True&ansokningsdatum=2008-12-15&customer_name=401320034&kundstatus=+%7b+%22SyndicateObjectMainGroupDescription%22%3a+%22Studentl%c3%a4genheter%22%2c+%22ClientDate%22%3a+%222008-12-15%22%2c+%22ClientPoints%22%3a+0%2c+%22ShowClientDate%22%3a++true%2c+%22ShowClientPoints%22%3a+false%2c+%22BlockCodeNo%22%3a+0%2c+%22BlockCode%22%3a+%22NONE%22%2c+%22BlockCodeDescription%22%3a+%22Godk%c3%a4nd%22%2c+%22BlockCodeValidTo%22%3a+%22%22%2c%22CompanyBlockCodeNo%22%3a+0%2c+%22CompanyBlockCodeDescription%22%3a+%22Godk%c3%a4nd%22%2c+%22CompanyBlockValidTo%22%3a+%22%22+%7d\">here</a>.</h2>\r\n</body></html>\r\n"
|
78
|
+
net_http_res: *70208837485440
|
79
|
+
args: &70208838067700
|
80
|
+
:method: :get
|
81
|
+
:url: http://marknad.sgsstudentbostader.se/s3.aspx?page=pgRedirect&verifylogin=y&mg=1&id=/se/mina-sidor&client=200910&pin=6223&url=http://www.sgsstudentbostader.se/setlogin.aspx
|
82
|
+
:headers: {}
|
83
|
+
headers: &70208837482820
|
84
|
+
:date: Thu, 31 May 2012 22:58:31 GMT
|
85
|
+
:server: Microsoft-IIS/6.0
|
86
|
+
:x_powered_by: ASP.NET
|
87
|
+
:x_aspnet_version: 2.0.50727
|
88
|
+
:location: http://www.sgsstudentbostader.se/setlogin.aspx?id=/se/mina-sidor&blnInloggadFull=true&blnInloggadLight=true&kundid=<username>&kundnamn=Linus+Oleander&borhossgs=True&tvattstuga=True&ansokningsdatum=2008-12-15&customer_name=401320034&kundstatus=+%7b+%22SyndicateObjectMainGroupDescription%22%3a+%22Studentl%c3%a4genheter%22%2c+%22ClientDate%22%3a+%222008-12-15%22%2c+%22ClientPoints%22%3a+0%2c+%22ShowClientDate%22%3a++true%2c+%22ShowClientPoints%22%3a+false%2c+%22BlockCodeNo%22%3a+0%2c+%22BlockCode%22%3a+%22NONE%22%2c+%22BlockCodeDescription%22%3a+%22Godk%c3%a4nd%22%2c+%22BlockCodeValidTo%22%3a+%22%22%2c%22CompanyBlockCodeNo%22%3a+0%2c+%22CompanyBlockCodeDescription%22%3a+%22Godk%c3%a4nd%22%2c+%22CompanyBlockValidTo%22%3a+%22%22+%7d
|
89
|
+
:set_cookie: *70208837484040
|
90
|
+
:cache_control: private
|
91
|
+
:expires: Thu, 31 May 2012 22:57:31 GMT
|
92
|
+
:content_type: text/html; charset=utf-8
|
93
|
+
:content_length: '886'
|
94
|
+
read: true
|
95
|
+
__read_body_previously_called: true
|
96
|
+
args: *70208838067700
|
97
|
+
headers: *70208837482820
|
98
|
+
http_version: !!null
|
99
|
+
recorded_at: Thu, 31 May 2012 22:58:24 GMT
|
100
|
+
- request:
|
101
|
+
method: get
|
102
|
+
uri: http://www.sgsstudentbostader.se/setlogin.aspx?ansokningsdatum=2008-12-15&blnInloggadFull=true&blnInloggadLight=true&borhossgs=True&customer_name=401320034&id=/se/mina-sidor&kundid=<username>&kundnamn=Linus%20Oleander&kundstatus=%20%7B%20%22SyndicateObjectMainGroupDescription%22:%20%22Studentl%C3%A4genheter%22,%20%22ClientDate%22:%20%222008-12-15%22,%20%22ClientPoints%22:%200,%20%22ShowClientDate%22:%20%20true,%20%22ShowClientPoints%22:%20false,%20%22BlockCodeNo%22:%200,%20%22BlockCode%22:%20%22NONE%22,%20%22BlockCodeDescription%22:%20%22Godk%C3%A4nd%22,%20%22BlockCodeValidTo%22:%20%22%22,%22CompanyBlockCodeNo%22:%200,%20%22CompanyBlockCodeDescription%22:%20%22Godk%C3%A4nd%22,%20%22CompanyBlockValidTo%22:%20%22%22%20%7D&tvattstuga=True
|
103
|
+
body:
|
104
|
+
encoding: US-ASCII
|
105
|
+
string: ''
|
106
|
+
headers:
|
107
|
+
Accept:
|
108
|
+
- ! '*/*; q=0.5, application/xml'
|
109
|
+
Accept-Encoding:
|
110
|
+
- gzip, deflate
|
111
|
+
User-Agent:
|
112
|
+
- Ruby
|
113
|
+
response:
|
114
|
+
status:
|
115
|
+
code: 302
|
116
|
+
message: Found
|
117
|
+
headers:
|
118
|
+
Date:
|
119
|
+
- Thu, 31 May 2012 22:58:31 GMT
|
120
|
+
Server:
|
121
|
+
- Microsoft-IIS/6.0
|
122
|
+
X-Powered-By:
|
123
|
+
- ASP.NET
|
124
|
+
X-Aspnet-Version:
|
125
|
+
- 2.0.50727
|
126
|
+
Location:
|
127
|
+
- /se/mina-sidor
|
128
|
+
Set-Cookie:
|
129
|
+
- ASP.NET_SessionId=2prowpbqeqube3fhvfojcc55; path=/; HttpOnly
|
130
|
+
Cache-Control:
|
131
|
+
- private
|
132
|
+
Content-Type:
|
133
|
+
- text/html; charset=utf-8
|
134
|
+
Content-Length:
|
135
|
+
- '135'
|
136
|
+
body:
|
137
|
+
encoding: US-ASCII
|
138
|
+
string: !str
|
139
|
+
str: ! "<html><head><title>Object moved</title></head><body>\r\n<h2>Object
|
140
|
+
moved to <a href=\"%2fse%2fmina-sidor\">here</a>.</h2>\r\n</body></html>\r\n"
|
141
|
+
net_http_res: &70208836315260 !ruby/object:Net::HTTPFound
|
142
|
+
http_version: '1.0'
|
143
|
+
code: '302'
|
144
|
+
message: Found
|
145
|
+
header:
|
146
|
+
date:
|
147
|
+
- Thu, 31 May 2012 22:58:31 GMT
|
148
|
+
server:
|
149
|
+
- Microsoft-IIS/6.0
|
150
|
+
x-powered-by:
|
151
|
+
- ASP.NET
|
152
|
+
x-aspnet-version:
|
153
|
+
- 2.0.50727
|
154
|
+
location:
|
155
|
+
- /se/mina-sidor
|
156
|
+
set-cookie: &70208836287080
|
157
|
+
- ASP.NET_SessionId=2prowpbqeqube3fhvfojcc55; path=/; HttpOnly
|
158
|
+
cache-control:
|
159
|
+
- private
|
160
|
+
content-type:
|
161
|
+
- text/html; charset=utf-8
|
162
|
+
content-length:
|
163
|
+
- '135'
|
164
|
+
body: !str
|
165
|
+
str: ! "<html><head><title>Object moved</title></head><body>\r\n<h2>Object
|
166
|
+
moved to <a href=\"%2fse%2fmina-sidor\">here</a>.</h2>\r\n</body></html>\r\n"
|
167
|
+
net_http_res: *70208836315260
|
168
|
+
args: &70208837462520
|
169
|
+
:method: :get
|
170
|
+
:url: http://www.sgsstudentbostader.se/setlogin.aspx?id=/se/mina-sidor&blnInloggadFull=true&blnInloggadLight=true&kundid=<username>&kundnamn=Linus+Oleander&borhossgs=True&tvattstuga=True&ansokningsdatum=2008-12-15&customer_name=401320034&kundstatus=+%7b+%22SyndicateObjectMainGroupDescription%22%3a+%22Studentl%c3%a4genheter%22%2c+%22ClientDate%22%3a+%222008-12-15%22%2c+%22ClientPoints%22%3a+0%2c+%22ShowClientDate%22%3a++true%2c+%22ShowClientPoints%22%3a+false%2c+%22BlockCodeNo%22%3a+0%2c+%22BlockCode%22%3a+%22NONE%22%2c+%22BlockCodeDescription%22%3a+%22Godk%c3%a4nd%22%2c+%22BlockCodeValidTo%22%3a+%22%22%2c%22CompanyBlockCodeNo%22%3a+0%2c+%22CompanyBlockCodeDescription%22%3a+%22Godk%c3%a4nd%22%2c+%22CompanyBlockValidTo%22%3a+%22%22+%7d
|
171
|
+
:headers: {}
|
172
|
+
headers: &70208836286100
|
173
|
+
:date: Thu, 31 May 2012 22:58:31 GMT
|
174
|
+
:server: Microsoft-IIS/6.0
|
175
|
+
:x_powered_by: ASP.NET
|
176
|
+
:x_aspnet_version: 2.0.50727
|
177
|
+
:location: /se/mina-sidor
|
178
|
+
:set_cookie: *70208836287080
|
179
|
+
:cache_control: private
|
180
|
+
:content_type: text/html; charset=utf-8
|
181
|
+
:content_length: '135'
|
182
|
+
cookies: &70208836280360
|
183
|
+
ASP.NET_SessionId: 2prowpbqeqube3fhvfojcc55
|
184
|
+
read: true
|
185
|
+
__read_body_previously_called: true
|
186
|
+
args: *70208837462520
|
187
|
+
headers: *70208836286100
|
188
|
+
cookies: *70208836280360
|
189
|
+
http_version: !!null
|
190
|
+
recorded_at: Thu, 31 May 2012 22:58:24 GMT
|
191
|
+
- request:
|
192
|
+
method: get
|
193
|
+
uri: http://www.sgsstudentbostader.se/ext_gw.aspx?lang=se&module=wwwash
|
194
|
+
body:
|
195
|
+
encoding: US-ASCII
|
196
|
+
string: ''
|
197
|
+
headers:
|
198
|
+
Accept:
|
199
|
+
- ! '*/*; q=0.5, application/xml'
|
200
|
+
Accept-Encoding:
|
201
|
+
- gzip, deflate
|
202
|
+
Cookie:
|
203
|
+
- ASP.NET_SessionId=2prowpbqeqube3fhvfojcc55
|
204
|
+
User-Agent:
|
205
|
+
- Ruby
|
206
|
+
response:
|
207
|
+
status:
|
208
|
+
code: 302
|
209
|
+
message: Found
|
210
|
+
headers:
|
211
|
+
Date:
|
212
|
+
- Thu, 31 May 2012 22:58:31 GMT
|
213
|
+
Server:
|
214
|
+
- Microsoft-IIS/6.0
|
215
|
+
X-Powered-By:
|
216
|
+
- ASP.NET
|
217
|
+
X-Aspnet-Version:
|
218
|
+
- 2.0.50727
|
219
|
+
Location:
|
220
|
+
- http://tvatta.sgsstudentbostader.se/int_gw.aspx?module=wwwash&CustomerIdentity=401320034&SecurityCode=d199l7vukhcn6q2ycwymwdql
|
221
|
+
Cache-Control:
|
222
|
+
- private
|
223
|
+
Content-Type:
|
224
|
+
- text/html; charset=utf-8
|
225
|
+
Content-Length:
|
226
|
+
- '251'
|
227
|
+
body:
|
228
|
+
encoding: US-ASCII
|
229
|
+
string: !str
|
230
|
+
str: ! "<html><head><title>Object moved</title></head><body>\r\n<h2>Object
|
231
|
+
moved to <a href=\"http://tvatta.sgsstudentbostader.se/int_gw.aspx?module=wwwash&CustomerIdentity=401320034&SecurityCode=d199l7vukhcn6q2ycwymwdql\">here</a>.</h2>\r\n</body></html>\r\n"
|
232
|
+
net_http_res: &70208835916020 !ruby/object:Net::HTTPFound
|
233
|
+
http_version: '1.0'
|
234
|
+
code: '302'
|
235
|
+
message: Found
|
236
|
+
header:
|
237
|
+
date:
|
238
|
+
- Thu, 31 May 2012 22:58:31 GMT
|
239
|
+
server:
|
240
|
+
- Microsoft-IIS/6.0
|
241
|
+
x-powered-by:
|
242
|
+
- ASP.NET
|
243
|
+
x-aspnet-version:
|
244
|
+
- 2.0.50727
|
245
|
+
location:
|
246
|
+
- http://tvatta.sgsstudentbostader.se/int_gw.aspx?module=wwwash&CustomerIdentity=401320034&SecurityCode=d199l7vukhcn6q2ycwymwdql
|
247
|
+
cache-control:
|
248
|
+
- private
|
249
|
+
content-type:
|
250
|
+
- text/html; charset=utf-8
|
251
|
+
content-length:
|
252
|
+
- '251'
|
253
|
+
body: !str
|
254
|
+
str: ! "<html><head><title>Object moved</title></head><body>\r\n<h2>Object
|
255
|
+
moved to <a href=\"http://tvatta.sgsstudentbostader.se/int_gw.aspx?module=wwwash&CustomerIdentity=401320034&SecurityCode=d199l7vukhcn6q2ycwymwdql\">here</a>.</h2>\r\n</body></html>\r\n"
|
256
|
+
net_http_res: *70208835916020
|
257
|
+
args: &70208836211160
|
258
|
+
:method: :get
|
259
|
+
:url: http://www.sgsstudentbostader.se/ext_gw.aspx?module=wwwash&lang=se
|
260
|
+
:headers:
|
261
|
+
:cookie: ASP.NET_SessionId=2prowpbqeqube3fhvfojcc55
|
262
|
+
headers: &70208835907140
|
263
|
+
:date: Thu, 31 May 2012 22:58:31 GMT
|
264
|
+
:server: Microsoft-IIS/6.0
|
265
|
+
:x_powered_by: ASP.NET
|
266
|
+
:x_aspnet_version: 2.0.50727
|
267
|
+
:location: http://tvatta.sgsstudentbostader.se/int_gw.aspx?module=wwwash&CustomerIdentity=401320034&SecurityCode=d199l7vukhcn6q2ycwymwdql
|
268
|
+
:cache_control: private
|
269
|
+
:content_type: text/html; charset=utf-8
|
270
|
+
:content_length: '251'
|
271
|
+
read: true
|
272
|
+
__read_body_previously_called: true
|
273
|
+
args: *70208836211160
|
274
|
+
headers: *70208835907140
|
275
|
+
http_version: !!null
|
276
|
+
recorded_at: Thu, 31 May 2012 22:58:24 GMT
|
277
|
+
- request:
|
278
|
+
method: get
|
279
|
+
uri: http://tvatta.sgsstudentbostader.se/int_gw.aspx?CustomerIdentity=401320034&SecurityCode=d199l7vukhcn6q2ycwymwdql&module=wwwash
|
280
|
+
body:
|
281
|
+
encoding: US-ASCII
|
282
|
+
string: ''
|
283
|
+
headers:
|
284
|
+
Accept:
|
285
|
+
- ! '*/*; q=0.5, application/xml'
|
286
|
+
Accept-Encoding:
|
287
|
+
- gzip, deflate
|
288
|
+
Cookie:
|
289
|
+
- ASP.NET_SessionId=2prowpbqeqube3fhvfojcc55
|
290
|
+
User-Agent:
|
291
|
+
- Ruby
|
292
|
+
response:
|
293
|
+
status:
|
294
|
+
code: 302
|
295
|
+
message: Found
|
296
|
+
headers:
|
297
|
+
Date:
|
298
|
+
- Thu, 31 May 2012 22:58:31 GMT
|
299
|
+
Server:
|
300
|
+
- Microsoft-IIS/6.0
|
301
|
+
X-Powered-By:
|
302
|
+
- ASP.NET
|
303
|
+
X-Aspnet-Version:
|
304
|
+
- 2.0.50727
|
305
|
+
Location:
|
306
|
+
- /wwwash.aspx
|
307
|
+
Set-Cookie:
|
308
|
+
- .ASPXAUTH=1F71F06A8F5250A5AC4D9FD5289C3A492499DBE9D7DB9E955BFC7046DD9D446BD1DACC83D1FE79E545BA5CC964EB8A78D6745CB91E7F98B0CE36F3F8CCEFA56A1F53002E256314CB78E27E99275ACA1C93E5326C7E71E54E2290389C023505619EE849821CCD18F4B2C6D2FE89DE8D053D8443CF;
|
309
|
+
path=/; HttpOnly
|
310
|
+
Cache-Control:
|
311
|
+
- no-cache
|
312
|
+
Pragma:
|
313
|
+
- no-cache
|
314
|
+
Expires:
|
315
|
+
- '-1'
|
316
|
+
Content-Type:
|
317
|
+
- text/html; charset=utf-8
|
318
|
+
Content-Length:
|
319
|
+
- '131'
|
320
|
+
body:
|
321
|
+
encoding: US-ASCII
|
322
|
+
string: !str
|
323
|
+
str: ! "<html><head><title>Object moved</title></head><body>\r\n<h2>Object
|
324
|
+
moved to <a href=\"%2fwwwash.aspx\">here</a>.</h2>\r\n</body></html>\r\n"
|
325
|
+
net_http_res: &70208835618520 !ruby/object:Net::HTTPFound
|
326
|
+
http_version: '1.0'
|
327
|
+
code: '302'
|
328
|
+
message: Found
|
329
|
+
header:
|
330
|
+
date:
|
331
|
+
- Thu, 31 May 2012 22:58:31 GMT
|
332
|
+
server:
|
333
|
+
- Microsoft-IIS/6.0
|
334
|
+
x-powered-by:
|
335
|
+
- ASP.NET
|
336
|
+
x-aspnet-version:
|
337
|
+
- 2.0.50727
|
338
|
+
location:
|
339
|
+
- /wwwash.aspx
|
340
|
+
set-cookie: &70208835616140
|
341
|
+
- .ASPXAUTH=1F71F06A8F5250A5AC4D9FD5289C3A492499DBE9D7DB9E955BFC7046DD9D446BD1DACC83D1FE79E545BA5CC964EB8A78D6745CB91E7F98B0CE36F3F8CCEFA56A1F53002E256314CB78E27E99275ACA1C93E5326C7E71E54E2290389C023505619EE849821CCD18F4B2C6D2FE89DE8D053D8443CF;
|
342
|
+
path=/; HttpOnly
|
343
|
+
cache-control:
|
344
|
+
- no-cache
|
345
|
+
pragma:
|
346
|
+
- no-cache
|
347
|
+
expires:
|
348
|
+
- '-1'
|
349
|
+
content-type:
|
350
|
+
- text/html; charset=utf-8
|
351
|
+
content-length:
|
352
|
+
- '131'
|
353
|
+
body: !str
|
354
|
+
str: ! "<html><head><title>Object moved</title></head><body>\r\n<h2>Object
|
355
|
+
moved to <a href=\"%2fwwwash.aspx\">here</a>.</h2>\r\n</body></html>\r\n"
|
356
|
+
net_http_res: *70208835618520
|
357
|
+
args: &70208835899980
|
358
|
+
:method: :get
|
359
|
+
:url: http://tvatta.sgsstudentbostader.se/int_gw.aspx?module=wwwash&CustomerIdentity=401320034&SecurityCode=d199l7vukhcn6q2ycwymwdql
|
360
|
+
:headers:
|
361
|
+
:cookie: ASP.NET_SessionId=2prowpbqeqube3fhvfojcc55
|
362
|
+
headers: &70208835613700
|
363
|
+
:date: Thu, 31 May 2012 22:58:31 GMT
|
364
|
+
:server: Microsoft-IIS/6.0
|
365
|
+
:x_powered_by: ASP.NET
|
366
|
+
:x_aspnet_version: 2.0.50727
|
367
|
+
:location: /wwwash.aspx
|
368
|
+
:set_cookie: *70208835616140
|
369
|
+
:cache_control: no-cache
|
370
|
+
:pragma: no-cache
|
371
|
+
:expires: '-1'
|
372
|
+
:content_type: text/html; charset=utf-8
|
373
|
+
:content_length: '131'
|
374
|
+
cookies: &70208835583840
|
375
|
+
.ASPXAUTH: 1F71F06A8F5250A5AC4D9FD5289C3A492499DBE9D7DB9E955BFC7046DD9D446BD1DACC83D1FE79E545BA5CC964EB8A78D6745CB91E7F98B0CE36F3F8CCEFA56A1F53002E256314CB78E27E99275ACA1C93E5326C7E71E54E2290389C023505619EE849821CCD18F4B2C6D2FE89DE8D053D8443CF
|
376
|
+
read: true
|
377
|
+
__read_body_previously_called: true
|
378
|
+
args: *70208835899980
|
379
|
+
headers: *70208835613700
|
380
|
+
cookies: *70208835583840
|
381
|
+
http_version: !!null
|
382
|
+
recorded_at: Thu, 31 May 2012 22:58:24 GMT
|
383
|
+
- request:
|
384
|
+
method: get
|
385
|
+
uri: http://tvatta.sgsstudentbostader.se/wwwashbookings.aspx?date=2012-05-28%2000:00:00&panelId=616&weekoffset=0
|
386
|
+
body:
|
387
|
+
encoding: US-ASCII
|
388
|
+
string: ''
|
389
|
+
headers:
|
390
|
+
Accept:
|
391
|
+
- ! '*/*; q=0.5, application/xml'
|
392
|
+
Accept-Encoding:
|
393
|
+
- gzip, deflate
|
394
|
+
Cookie:
|
395
|
+
- .ASPXAUTH=1F71F06A8F5250A5AC4D9FD5289C3A492499DBE9D7DB9E955BFC7046DD9D446BD1DACC83D1FE79E545BA5CC964EB8A78D6745CB91E7F98B0CE36F3F8CCEFA56A1F53002E256314CB78E27E99275ACA1C93E5326C7E71E54E2290389C023505619EE849821CCD18F4B2C6D2FE89DE8D053D8443CF;
|
396
|
+
ASP.NET_SessionId=2prowpbqeqube3fhvfojcc55
|
397
|
+
User-Agent:
|
398
|
+
- Ruby
|
399
|
+
response:
|
400
|
+
status:
|
401
|
+
code: 200
|
402
|
+
message: OK
|
403
|
+
headers:
|
404
|
+
Date:
|
405
|
+
- Thu, 31 May 2012 22:58:31 GMT
|
406
|
+
Server:
|
407
|
+
- Microsoft-IIS/6.0
|
408
|
+
X-Powered-By:
|
409
|
+
- ASP.NET
|
410
|
+
X-Aspnet-Version:
|
411
|
+
- 2.0.50727
|
412
|
+
Cache-Control:
|
413
|
+
- no-cache
|
414
|
+
Pragma:
|
415
|
+
- no-cache
|
416
|
+
Expires:
|
417
|
+
- '-1'
|
418
|
+
Content-Type:
|
419
|
+
- text/html; charset=utf-8
|
420
|
+
Content-Length:
|
421
|
+
- '4201'
|
422
|
+
body:
|
423
|
+
encoding: ASCII-8BIT
|
424
|
+
string: ! "\r\n<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.0 Transitional//EN\"
|
425
|
+
>\r\n<html>\r\n<head>\r\n\t<title>wwwashbookings</title>\r\n\r\n\t<script
|
426
|
+
type=\"text/javascript\" id=\"clientEventHandlersJS\" language=\"javascript\"
|
427
|
+
src=\"script/wwwash.js\"></script>\r\n\r\n\t<link id=\"css\" href=\"css/Styles.css\"
|
428
|
+
type=\"text/css\" rel=\"stylesheet\" />\r\n</head>\r\n<body onmousedown=\"resetTimeOut();\">\r\n\t<table
|
429
|
+
height=\"100%\" cellspacing=\"0\" cellpadding=\"0\" width=\"100%\">\r\n\t\t<tr>\r\n\t\t\t<td
|
430
|
+
valign=\"middle\" align=\"center\">\r\n\t\t\t\t<table style=\"border-right:
|
431
|
+
black 1px solid; border-top: black 1px solid; border-left: black 1px solid;
|
432
|
+
border-bottom: black 1px solid\" cellspacing=\"0\" cellpadding=\"7\" width=\"400\">\r\n\t\t\t\t\t<tr
|
433
|
+
class=\"bgActiveColor\">\r\n\t\t\t\t\t\t<td>\r\n\t\t\t\t\t\t\t<table style=\"border-right:
|
434
|
+
#ffffff 1px solid; border-top: #666666 1px solid; border-left: #666666 1px
|
435
|
+
solid; border-bottom: #ffffff 1px solid; background-color: #ffffff\" cellspacing=\"5\"
|
436
|
+
cellpadding=\"0\" width=\"100%\">\r\n\t\t\t\t\t\t\t\t<tr>\r\n\t\t\t\t\t\t\t\t\t<td
|
437
|
+
class=\"bigText headerColor\">\r\n\t\t\t\t\t\t\t\t\t\t<b>\r\n\t\t\t\t\t\t\t\t\t\t\t<span
|
438
|
+
id=\"lblHeader\">Bokade pass</span>\r\n\t\t\t\t\t\t\t\t\t\t</b><br /><br />\r\n\t\t\t\t\t\t\t\t\t</td>\r\n\t\t\t\t\t\t\t\t</tr>\r\n\t\t\t\t\t\t\t\t<tr>\r\n\t\t\t\t\t\t\t\t\t<td>\r\n\t\t\t\t\t\t\t\t\t\t<span
|
439
|
+
id=\"lblHelpText\" class=\"smallText periodLinkColor\"><b>Klicka på önskat
|
440
|
+
pass för att avboka</b></span>\r\n\t\t\t\t\t\t\t\t\t</td>\r\n\t\t\t\t\t\t\t\t</tr>\r\n\t\t\t\t\t\t\t\t<tr>\r\n\t\t\t\t\t\t\t\t\t<td>\r\n\t\t\t\t\t\t\t\t\t\t<table
|
441
|
+
cellspacing=\"0\" cellpadding=\"0\" width=\"100%\">\r\n\t\t\t\t\t\t\t\t\t\t\t<tr><td
|
442
|
+
rowspan=\"2\" width=\"1\" style=\"padding-left:5px; padding-top:0;\"><img
|
443
|
+
align=\"top\" src=\"Images/pil2_right.gif\" style=\"padding-top:0\"></td><td
|
444
|
+
class=\"smallText headerColor\" style=\"cursor:pointer; cursor:hand;padding-top:5px;\"
|
445
|
+
onmousedown=\"javascript:location.href='wwwashwait.aspx?command=cancel&PanelId=616&TypeId=5179&GroupId=5432&Date=2012-06-26&IntervalId=2&NextPage=wwwashbookings'\"><b>Tvätt
|
446
|
+
307</b></td><td align=\"right\" class=\"smallText headerColor\">2012-06-26</td></tr><tr><td
|
447
|
+
class=\"smallText headerColor\" style=\"width:70%; cursor:pointer; cursor:hand;vertical-align:top;
|
448
|
+
padding-bottom:5px\" onmousedown=\"javascript:location.href='wwwashwait.aspx?command=cancel&PanelId=616&TypeId=5179&GroupId=5432&Date=2012-06-26&IntervalId=2&NextPage=wwwashbookings'\"><b>Grupp:
|
449
|
+
1</b></td><td align=\"right\" class=\"smallText headerColor\">10:00-11:30</td></tr><tr><td
|
450
|
+
colspan=\"3\"><img src=\"Images/yellow_dot.gif\" width=\"100%\" height=\"1\"></td></tr><tr><td
|
451
|
+
rowspan=\"2\" width=\"1\" style=\"padding-left:5px; padding-top:0;\"><img
|
452
|
+
align=\"top\" src=\"Images/pil2_right.gif\" style=\"padding-top:0\"></td><td
|
453
|
+
class=\"smallText headerColor\" style=\"cursor:pointer; cursor:hand;padding-top:5px;\"
|
454
|
+
onmousedown=\"javascript:location.href='wwwashwait.aspx?command=cancel&PanelId=616&TypeId=5179&GroupId=5432&Date=2012-06-05&IntervalId=2&NextPage=wwwashbookings'\"><b>Tvätt
|
455
|
+
307</b></td><td align=\"right\" class=\"smallText headerColor\">2012-06-05</td></tr><tr><td
|
456
|
+
class=\"smallText headerColor\" style=\"width:70%; cursor:pointer; cursor:hand;vertical-align:top;
|
457
|
+
padding-bottom:5px\" onmousedown=\"javascript:location.href='wwwashwait.aspx?command=cancel&PanelId=616&TypeId=5179&GroupId=5432&Date=2012-06-05&IntervalId=2&NextPage=wwwashbookings'\"><b>Grupp:
|
458
|
+
1</b></td><td align=\"right\" class=\"smallText headerColor\">10:00-11:30</td></tr><tr><td
|
459
|
+
colspan=\"3\"><img src=\"Images/yellow_dot.gif\" width=\"100%\" height=\"1\"></td></tr>\r\n\t\t\t\t\t\t\t\t\t\t</table>\r\n\t\t\t\t\t\t\t\t\t</td>\r\n\t\t\t\t\t\t\t\t</tr>\r\n\t\t\t\t\t\t\t\t<tr>\r\n\t\t\t\t\t\t\t\t\t<td>\r\n\t\t\t\t\t\t\t\t\t\t<table
|
460
|
+
cellspacing=\"5\" cellpadding=\"5\" border=\"0\" width=\"100%\">\r\n\t<tr>\r\n\t\t<td
|
461
|
+
class=\"bgInactiveColor textInactiveColor buttonStyleHelp\" align=\"center\"
|
462
|
+
onmousedown=\"javascript:location.href='wwwashcalendar.aspx?panelId=616&weekoffset=0&type=&group='\"><b>Tillbaka</b></td><td></td><td
|
463
|
+
class=\"bgInactiveColor textInactiveColor buttonStyleHelp\" onmousedown=\"javascript:location.href='wwwashbookings.aspx?panelId=616&weekoffset=0&type=&group=&history=true'\"><b>Historik</b></td><td></td><td
|
464
|
+
class=\"bgInactiveColor textInactiveColor buttonStyleHelp\" onmousedown=\"javascript:OpenTheHelpWindow('Help/helpCustomerBookings.aspx');\"><b>Hjälp</b></td>\r\n\t</tr>\r\n</table>\r\n\t\t\t\t\t\t\t\t\t</td>\r\n\t\t\t\t\t\t\t\t</tr>\r\n\t\t\t\t\t\t\t</table>\r\n\t\t\t\t\t\t</td>\r\n\t\t\t\t\t</tr>\r\n\t\t\t\t</table>\r\n\t\t\t</td>\r\n\t\t</tr>\r\n\t</table>\r\n</body>\r\n</html>\r\n"
|
465
|
+
http_version: !!null
|
466
|
+
recorded_at: Thu, 31 May 2012 22:58:25 GMT
|
467
|
+
- request:
|
468
|
+
method: get
|
469
|
+
uri: http://tvatta.sgsstudentbostader.se/wwwashbookings.aspx?date=2012-06-04%2000:00:00&panelId=616&weekoffset=0
|
470
|
+
body:
|
471
|
+
encoding: US-ASCII
|
472
|
+
string: ''
|
473
|
+
headers:
|
474
|
+
Accept:
|
475
|
+
- ! '*/*; q=0.5, application/xml'
|
476
|
+
Accept-Encoding:
|
477
|
+
- gzip, deflate
|
478
|
+
Cookie:
|
479
|
+
- .ASPXAUTH=1F71F06A8F5250A5AC4D9FD5289C3A492499DBE9D7DB9E955BFC7046DD9D446BD1DACC83D1FE79E545BA5CC964EB8A78D6745CB91E7F98B0CE36F3F8CCEFA56A1F53002E256314CB78E27E99275ACA1C93E5326C7E71E54E2290389C023505619EE849821CCD18F4B2C6D2FE89DE8D053D8443CF;
|
480
|
+
ASP.NET_SessionId=2prowpbqeqube3fhvfojcc55
|
481
|
+
User-Agent:
|
482
|
+
- Ruby
|
483
|
+
response:
|
484
|
+
status:
|
485
|
+
code: 200
|
486
|
+
message: OK
|
487
|
+
headers:
|
488
|
+
Date:
|
489
|
+
- Thu, 31 May 2012 22:58:31 GMT
|
490
|
+
Server:
|
491
|
+
- Microsoft-IIS/6.0
|
492
|
+
X-Powered-By:
|
493
|
+
- ASP.NET
|
494
|
+
X-Aspnet-Version:
|
495
|
+
- 2.0.50727
|
496
|
+
Cache-Control:
|
497
|
+
- no-cache
|
498
|
+
Pragma:
|
499
|
+
- no-cache
|
500
|
+
Expires:
|
501
|
+
- '-1'
|
502
|
+
Content-Type:
|
503
|
+
- text/html; charset=utf-8
|
504
|
+
Content-Length:
|
505
|
+
- '4201'
|
506
|
+
body:
|
507
|
+
encoding: ASCII-8BIT
|
508
|
+
string: ! "\r\n<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.0 Transitional//EN\"
|
509
|
+
>\r\n<html>\r\n<head>\r\n\t<title>wwwashbookings</title>\r\n\r\n\t<script
|
510
|
+
type=\"text/javascript\" id=\"clientEventHandlersJS\" language=\"javascript\"
|
511
|
+
src=\"script/wwwash.js\"></script>\r\n\r\n\t<link id=\"css\" href=\"css/Styles.css\"
|
512
|
+
type=\"text/css\" rel=\"stylesheet\" />\r\n</head>\r\n<body onmousedown=\"resetTimeOut();\">\r\n\t<table
|
513
|
+
height=\"100%\" cellspacing=\"0\" cellpadding=\"0\" width=\"100%\">\r\n\t\t<tr>\r\n\t\t\t<td
|
514
|
+
valign=\"middle\" align=\"center\">\r\n\t\t\t\t<table style=\"border-right:
|
515
|
+
black 1px solid; border-top: black 1px solid; border-left: black 1px solid;
|
516
|
+
border-bottom: black 1px solid\" cellspacing=\"0\" cellpadding=\"7\" width=\"400\">\r\n\t\t\t\t\t<tr
|
517
|
+
class=\"bgActiveColor\">\r\n\t\t\t\t\t\t<td>\r\n\t\t\t\t\t\t\t<table style=\"border-right:
|
518
|
+
#ffffff 1px solid; border-top: #666666 1px solid; border-left: #666666 1px
|
519
|
+
solid; border-bottom: #ffffff 1px solid; background-color: #ffffff\" cellspacing=\"5\"
|
520
|
+
cellpadding=\"0\" width=\"100%\">\r\n\t\t\t\t\t\t\t\t<tr>\r\n\t\t\t\t\t\t\t\t\t<td
|
521
|
+
class=\"bigText headerColor\">\r\n\t\t\t\t\t\t\t\t\t\t<b>\r\n\t\t\t\t\t\t\t\t\t\t\t<span
|
522
|
+
id=\"lblHeader\">Bokade pass</span>\r\n\t\t\t\t\t\t\t\t\t\t</b><br /><br />\r\n\t\t\t\t\t\t\t\t\t</td>\r\n\t\t\t\t\t\t\t\t</tr>\r\n\t\t\t\t\t\t\t\t<tr>\r\n\t\t\t\t\t\t\t\t\t<td>\r\n\t\t\t\t\t\t\t\t\t\t<span
|
523
|
+
id=\"lblHelpText\" class=\"smallText periodLinkColor\"><b>Klicka på önskat
|
524
|
+
pass för att avboka</b></span>\r\n\t\t\t\t\t\t\t\t\t</td>\r\n\t\t\t\t\t\t\t\t</tr>\r\n\t\t\t\t\t\t\t\t<tr>\r\n\t\t\t\t\t\t\t\t\t<td>\r\n\t\t\t\t\t\t\t\t\t\t<table
|
525
|
+
cellspacing=\"0\" cellpadding=\"0\" width=\"100%\">\r\n\t\t\t\t\t\t\t\t\t\t\t<tr><td
|
526
|
+
rowspan=\"2\" width=\"1\" style=\"padding-left:5px; padding-top:0;\"><img
|
527
|
+
align=\"top\" src=\"Images/pil2_right.gif\" style=\"padding-top:0\"></td><td
|
528
|
+
class=\"smallText headerColor\" style=\"cursor:pointer; cursor:hand;padding-top:5px;\"
|
529
|
+
onmousedown=\"javascript:location.href='wwwashwait.aspx?command=cancel&PanelId=616&TypeId=5179&GroupId=5432&Date=2012-06-26&IntervalId=2&NextPage=wwwashbookings'\"><b>Tvätt
|
530
|
+
307</b></td><td align=\"right\" class=\"smallText headerColor\">2012-06-26</td></tr><tr><td
|
531
|
+
class=\"smallText headerColor\" style=\"width:70%; cursor:pointer; cursor:hand;vertical-align:top;
|
532
|
+
padding-bottom:5px\" onmousedown=\"javascript:location.href='wwwashwait.aspx?command=cancel&PanelId=616&TypeId=5179&GroupId=5432&Date=2012-06-26&IntervalId=2&NextPage=wwwashbookings'\"><b>Grupp:
|
533
|
+
1</b></td><td align=\"right\" class=\"smallText headerColor\">10:00-11:30</td></tr><tr><td
|
534
|
+
colspan=\"3\"><img src=\"Images/yellow_dot.gif\" width=\"100%\" height=\"1\"></td></tr><tr><td
|
535
|
+
rowspan=\"2\" width=\"1\" style=\"padding-left:5px; padding-top:0;\"><img
|
536
|
+
align=\"top\" src=\"Images/pil2_right.gif\" style=\"padding-top:0\"></td><td
|
537
|
+
class=\"smallText headerColor\" style=\"cursor:pointer; cursor:hand;padding-top:5px;\"
|
538
|
+
onmousedown=\"javascript:location.href='wwwashwait.aspx?command=cancel&PanelId=616&TypeId=5179&GroupId=5432&Date=2012-06-05&IntervalId=2&NextPage=wwwashbookings'\"><b>Tvätt
|
539
|
+
307</b></td><td align=\"right\" class=\"smallText headerColor\">2012-06-05</td></tr><tr><td
|
540
|
+
class=\"smallText headerColor\" style=\"width:70%; cursor:pointer; cursor:hand;vertical-align:top;
|
541
|
+
padding-bottom:5px\" onmousedown=\"javascript:location.href='wwwashwait.aspx?command=cancel&PanelId=616&TypeId=5179&GroupId=5432&Date=2012-06-05&IntervalId=2&NextPage=wwwashbookings'\"><b>Grupp:
|
542
|
+
1</b></td><td align=\"right\" class=\"smallText headerColor\">10:00-11:30</td></tr><tr><td
|
543
|
+
colspan=\"3\"><img src=\"Images/yellow_dot.gif\" width=\"100%\" height=\"1\"></td></tr>\r\n\t\t\t\t\t\t\t\t\t\t</table>\r\n\t\t\t\t\t\t\t\t\t</td>\r\n\t\t\t\t\t\t\t\t</tr>\r\n\t\t\t\t\t\t\t\t<tr>\r\n\t\t\t\t\t\t\t\t\t<td>\r\n\t\t\t\t\t\t\t\t\t\t<table
|
544
|
+
cellspacing=\"5\" cellpadding=\"5\" border=\"0\" width=\"100%\">\r\n\t<tr>\r\n\t\t<td
|
545
|
+
class=\"bgInactiveColor textInactiveColor buttonStyleHelp\" align=\"center\"
|
546
|
+
onmousedown=\"javascript:location.href='wwwashcalendar.aspx?panelId=616&weekoffset=0&type=&group='\"><b>Tillbaka</b></td><td></td><td
|
547
|
+
class=\"bgInactiveColor textInactiveColor buttonStyleHelp\" onmousedown=\"javascript:location.href='wwwashbookings.aspx?panelId=616&weekoffset=0&type=&group=&history=true'\"><b>Historik</b></td><td></td><td
|
548
|
+
class=\"bgInactiveColor textInactiveColor buttonStyleHelp\" onmousedown=\"javascript:OpenTheHelpWindow('Help/helpCustomerBookings.aspx');\"><b>Hjälp</b></td>\r\n\t</tr>\r\n</table>\r\n\t\t\t\t\t\t\t\t\t</td>\r\n\t\t\t\t\t\t\t\t</tr>\r\n\t\t\t\t\t\t\t</table>\r\n\t\t\t\t\t\t</td>\r\n\t\t\t\t\t</tr>\r\n\t\t\t\t</table>\r\n\t\t\t</td>\r\n\t\t</tr>\r\n\t</table>\r\n</body>\r\n</html>\r\n"
|
549
|
+
http_version: !!null
|
550
|
+
recorded_at: Thu, 31 May 2012 22:58:25 GMT
|
551
|
+
recorded_with: VCR 2.1.1
|
data/spec/spec_helper.rb
ADDED
@@ -0,0 +1,23 @@
|
|
1
|
+
require "rspec"
|
2
|
+
require "webmock"
|
3
|
+
require "sgs"
|
4
|
+
require "vcr"
|
5
|
+
|
6
|
+
$username = `echo $U`.strip
|
7
|
+
$password = `echo $P`.strip
|
8
|
+
|
9
|
+
RSpec.configure do |config|
|
10
|
+
config.mock_with :rspec
|
11
|
+
config.extend VCR::RSpec::Macros
|
12
|
+
end
|
13
|
+
|
14
|
+
VCR.configure do |c|
|
15
|
+
c.cassette_library_dir = "spec/fixtures/vcr_cassettes"
|
16
|
+
c.hook_into :webmock
|
17
|
+
c.default_cassette_options = {
|
18
|
+
record: :new_episodes
|
19
|
+
}
|
20
|
+
c.filter_sensitive_data("<password>") { $password }
|
21
|
+
c.filter_sensitive_data("<username>") { $username }
|
22
|
+
c.allow_http_connections_when_no_cassette = false
|
23
|
+
end
|
data/spec/wash_spec.rb
ADDED
@@ -0,0 +1,28 @@
|
|
1
|
+
# -*- encoding : utf-8 -*-
|
2
|
+
describe SGS::Wash do
|
3
|
+
use_vcr_cassette "wash"
|
4
|
+
|
5
|
+
it "should return a list of bookings for this week" do
|
6
|
+
bookings = SGS::Wash.new({
|
7
|
+
username: $username,
|
8
|
+
password: $password
|
9
|
+
}).bookings
|
10
|
+
|
11
|
+
bookings.count.should eq(2)
|
12
|
+
booking = bookings.last
|
13
|
+
booking.group.should eq("1")
|
14
|
+
booking.start_time.to_s.should eq("2012-06-05 10:00:00 +0200")
|
15
|
+
booking.end_time.to_s.should eq("2012-06-05 11:30:00 +0200")
|
16
|
+
booking.where.should eq("Tvätt 307")
|
17
|
+
end
|
18
|
+
|
19
|
+
it "should be possible to pass a week" do
|
20
|
+
bookings = SGS::Wash.new({
|
21
|
+
username: $username,
|
22
|
+
password: $password,
|
23
|
+
week: 23 # Next week
|
24
|
+
}).bookings
|
25
|
+
|
26
|
+
bookings.count.should eq(2)
|
27
|
+
end
|
28
|
+
end
|
metadata
ADDED
@@ -0,0 +1,122 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: sgs
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 0.5.0
|
5
|
+
prerelease:
|
6
|
+
platform: ruby
|
7
|
+
authors:
|
8
|
+
- Linus Oleander
|
9
|
+
autorequire:
|
10
|
+
bindir: bin
|
11
|
+
cert_chain: []
|
12
|
+
date: 2012-05-31 00:00:00.000000000Z
|
13
|
+
dependencies:
|
14
|
+
- !ruby/object:Gem::Dependency
|
15
|
+
name: rest-client
|
16
|
+
requirement: &70365800911920 !ruby/object:Gem::Requirement
|
17
|
+
none: false
|
18
|
+
requirements:
|
19
|
+
- - ! '>='
|
20
|
+
- !ruby/object:Gem::Version
|
21
|
+
version: '0'
|
22
|
+
type: :runtime
|
23
|
+
prerelease: false
|
24
|
+
version_requirements: *70365800911920
|
25
|
+
- !ruby/object:Gem::Dependency
|
26
|
+
name: nokogiri
|
27
|
+
requirement: &70365800911300 !ruby/object:Gem::Requirement
|
28
|
+
none: false
|
29
|
+
requirements:
|
30
|
+
- - ! '>='
|
31
|
+
- !ruby/object:Gem::Version
|
32
|
+
version: '0'
|
33
|
+
type: :runtime
|
34
|
+
prerelease: false
|
35
|
+
version_requirements: *70365800911300
|
36
|
+
- !ruby/object:Gem::Dependency
|
37
|
+
name: vcr
|
38
|
+
requirement: &70365800910520 !ruby/object:Gem::Requirement
|
39
|
+
none: false
|
40
|
+
requirements:
|
41
|
+
- - ! '>='
|
42
|
+
- !ruby/object:Gem::Version
|
43
|
+
version: '0'
|
44
|
+
type: :development
|
45
|
+
prerelease: false
|
46
|
+
version_requirements: *70365800910520
|
47
|
+
- !ruby/object:Gem::Dependency
|
48
|
+
name: rspec
|
49
|
+
requirement: &70365800909560 !ruby/object:Gem::Requirement
|
50
|
+
none: false
|
51
|
+
requirements:
|
52
|
+
- - ! '>='
|
53
|
+
- !ruby/object:Gem::Version
|
54
|
+
version: '0'
|
55
|
+
type: :development
|
56
|
+
prerelease: false
|
57
|
+
version_requirements: *70365800909560
|
58
|
+
- !ruby/object:Gem::Dependency
|
59
|
+
name: webmock
|
60
|
+
requirement: &70365800908960 !ruby/object:Gem::Requirement
|
61
|
+
none: false
|
62
|
+
requirements:
|
63
|
+
- - ! '>='
|
64
|
+
- !ruby/object:Gem::Version
|
65
|
+
version: '0'
|
66
|
+
type: :development
|
67
|
+
prerelease: false
|
68
|
+
version_requirements: *70365800908960
|
69
|
+
description: Ruby wrapper for sgsstudentbostader.se
|
70
|
+
email:
|
71
|
+
- linus@oleander.nu
|
72
|
+
executables: []
|
73
|
+
extensions: []
|
74
|
+
extra_rdoc_files: []
|
75
|
+
files:
|
76
|
+
- .gitignore
|
77
|
+
- .rspec
|
78
|
+
- Gemfile
|
79
|
+
- LICENSE
|
80
|
+
- README.md
|
81
|
+
- Rakefile
|
82
|
+
- lib/sgs.rb
|
83
|
+
- lib/sgs/authenticate.rb
|
84
|
+
- lib/sgs/not_authorised_error.rb
|
85
|
+
- lib/sgs/version.rb
|
86
|
+
- lib/sgs/wash.rb
|
87
|
+
- sgs.gemspec
|
88
|
+
- spec/authenticate_spec.rb
|
89
|
+
- spec/fixtures/vcr_cassettes/authenticate.yml
|
90
|
+
- spec/fixtures/vcr_cassettes/wash.yml
|
91
|
+
- spec/spec_helper.rb
|
92
|
+
- spec/wash_spec.rb
|
93
|
+
homepage: https://github.com/oleander/sgs-rb
|
94
|
+
licenses: []
|
95
|
+
post_install_message:
|
96
|
+
rdoc_options: []
|
97
|
+
require_paths:
|
98
|
+
- lib
|
99
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
100
|
+
none: false
|
101
|
+
requirements:
|
102
|
+
- - ~>
|
103
|
+
- !ruby/object:Gem::Version
|
104
|
+
version: 1.9.0
|
105
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
106
|
+
none: false
|
107
|
+
requirements:
|
108
|
+
- - ! '>='
|
109
|
+
- !ruby/object:Gem::Version
|
110
|
+
version: '0'
|
111
|
+
requirements: []
|
112
|
+
rubyforge_project:
|
113
|
+
rubygems_version: 1.8.15
|
114
|
+
signing_key:
|
115
|
+
specification_version: 3
|
116
|
+
summary: Ruby wrapper for sgsstudentbostader.se
|
117
|
+
test_files:
|
118
|
+
- spec/authenticate_spec.rb
|
119
|
+
- spec/fixtures/vcr_cassettes/authenticate.yml
|
120
|
+
- spec/fixtures/vcr_cassettes/wash.yml
|
121
|
+
- spec/spec_helper.rb
|
122
|
+
- spec/wash_spec.rb
|