mit_stalker 1.0.5 → 1.0.6
Sign up to get free protection for your applications and to get access to all the features.
- data/VERSION +1 -1
- data/lib/mit_stalker.rb +6 -5
- data/mit_stalker.gemspec +4 -4
- data/test/mit_stalker_test.rb +3 -3
- metadata +22 -5
- checksums.yaml +0 -15
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
1.0.
|
1
|
+
1.0.6
|
data/lib/mit_stalker.rb
CHANGED
@@ -91,7 +91,8 @@ module MitStalker
|
|
91
91
|
return users.first if users.length == 1
|
92
92
|
|
93
93
|
# Requesting by alias should return a single name.
|
94
|
-
users = parse_mitdir_response finger(user_base_info[:alias],
|
94
|
+
users = parse_mitdir_response finger(user_base_info[:alias],
|
95
|
+
'mitdir.mit.edu')
|
95
96
|
users and users.first
|
96
97
|
end
|
97
98
|
|
@@ -104,10 +105,10 @@ module MitStalker
|
|
104
105
|
users.each do |user|
|
105
106
|
if user[:email]
|
106
107
|
next unless user[:email].split('@').first.downcase == user_name
|
107
|
-
users = parse_mitdir_response finger(user[:alias], '
|
108
|
+
users = parse_mitdir_response finger(user[:alias], 'mitdir.mit.edu')
|
108
109
|
return users && users.first
|
109
110
|
else
|
110
|
-
users = parse_mitdir_response finger(user[:alias], '
|
111
|
+
users = parse_mitdir_response finger(user[:alias], 'mitdir.mit.edu')
|
111
112
|
next unless users
|
112
113
|
user = users.first
|
113
114
|
if user[:email] and user[:email].split('@').first == user_name
|
@@ -132,12 +133,12 @@ module MitStalker
|
|
132
133
|
full_name = full_name_from_user_name user_name
|
133
134
|
|
134
135
|
if full_name
|
135
|
-
users = parse_mitdir_response finger(full_name, '
|
136
|
+
users = parse_mitdir_response finger(full_name, 'mitdir.mit.edu')
|
136
137
|
else
|
137
138
|
users = []
|
138
139
|
end
|
139
140
|
if users.empty?
|
140
|
-
users = parse_mitdir_response finger(user_name, '
|
141
|
+
users = parse_mitdir_response finger(user_name, 'mitdir.mit.edu')
|
141
142
|
end
|
142
143
|
|
143
144
|
user = refine_mitdir_response_by_name(users, full_name) if full_name
|
data/mit_stalker.gemspec
CHANGED
@@ -5,11 +5,11 @@
|
|
5
5
|
|
6
6
|
Gem::Specification.new do |s|
|
7
7
|
s.name = "mit_stalker"
|
8
|
-
s.version = "1.0.
|
8
|
+
s.version = "1.0.6"
|
9
9
|
|
10
10
|
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
|
11
11
|
s.authors = ["Victor Costan"]
|
12
|
-
s.date = "2013-09-
|
12
|
+
s.date = "2013-09-06"
|
13
13
|
s.description = "Fetches publicly available information about MIT students."
|
14
14
|
s.email = "victor@costan.us"
|
15
15
|
s.extra_rdoc_files = [
|
@@ -37,11 +37,11 @@ Gem::Specification.new do |s|
|
|
37
37
|
s.homepage = "http://github.com/pwnall/mit_stalker"
|
38
38
|
s.licenses = ["MIT"]
|
39
39
|
s.require_paths = ["lib"]
|
40
|
-
s.rubygems_version = "
|
40
|
+
s.rubygems_version = "1.8.23"
|
41
41
|
s.summary = "Fetches publicly available information about MIT students."
|
42
42
|
|
43
43
|
if s.respond_to? :specification_version then
|
44
|
-
s.specification_version =
|
44
|
+
s.specification_version = 3
|
45
45
|
|
46
46
|
if Gem::Version.new(Gem::VERSION) >= Gem::Version.new('1.2.0') then
|
47
47
|
s.add_development_dependency(%q<mocha>, [">= 0.14.0"])
|
data/test/mit_stalker_test.rb
CHANGED
@@ -71,7 +71,7 @@ class MitStalkerTest < Minitest::Test
|
|
71
71
|
end
|
72
72
|
|
73
73
|
def test_refine_mitdir_response_by_name
|
74
|
-
MitStalker.expects(:finger).with('Y-li16', '
|
74
|
+
MitStalker.expects(:finger).with('Y-li16', 'mitdir.mit.edu').
|
75
75
|
returns(fixture('single_response.txt')).once
|
76
76
|
|
77
77
|
multi_response = MitStalker.parse_mitdir_response(
|
@@ -82,9 +82,9 @@ class MitStalkerTest < Minitest::Test
|
|
82
82
|
end
|
83
83
|
|
84
84
|
def test_refine_mitdir_response_by_email
|
85
|
-
MitStalker.expects(:finger).with('V-costan', '
|
85
|
+
MitStalker.expects(:finger).with('V-costan', 'mitdir.mit.edu').
|
86
86
|
returns(fixture('single_response.txt')).once
|
87
|
-
MitStalker.expects(:finger).with('A-li', '
|
87
|
+
MitStalker.expects(:finger).with('A-li', 'mitdir.mit.edu').
|
88
88
|
returns(fixture('single_response2.txt')).once
|
89
89
|
|
90
90
|
mixed_response =
|
metadata
CHANGED
@@ -1,18 +1,20 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: mit_stalker
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0.
|
4
|
+
version: 1.0.6
|
5
|
+
prerelease:
|
5
6
|
platform: ruby
|
6
7
|
authors:
|
7
8
|
- Victor Costan
|
8
9
|
autorequire:
|
9
10
|
bindir: bin
|
10
11
|
cert_chain: []
|
11
|
-
date: 2013-09-
|
12
|
+
date: 2013-09-06 00:00:00.000000000 Z
|
12
13
|
dependencies:
|
13
14
|
- !ruby/object:Gem::Dependency
|
14
15
|
name: mocha
|
15
16
|
requirement: !ruby/object:Gem::Requirement
|
17
|
+
none: false
|
16
18
|
requirements:
|
17
19
|
- - ! '>='
|
18
20
|
- !ruby/object:Gem::Version
|
@@ -20,6 +22,7 @@ dependencies:
|
|
20
22
|
type: :development
|
21
23
|
prerelease: false
|
22
24
|
version_requirements: !ruby/object:Gem::Requirement
|
25
|
+
none: false
|
23
26
|
requirements:
|
24
27
|
- - ! '>='
|
25
28
|
- !ruby/object:Gem::Version
|
@@ -27,6 +30,7 @@ dependencies:
|
|
27
30
|
- !ruby/object:Gem::Dependency
|
28
31
|
name: minitest
|
29
32
|
requirement: !ruby/object:Gem::Requirement
|
33
|
+
none: false
|
30
34
|
requirements:
|
31
35
|
- - ! '>='
|
32
36
|
- !ruby/object:Gem::Version
|
@@ -34,6 +38,7 @@ dependencies:
|
|
34
38
|
type: :development
|
35
39
|
prerelease: false
|
36
40
|
version_requirements: !ruby/object:Gem::Requirement
|
41
|
+
none: false
|
37
42
|
requirements:
|
38
43
|
- - ! '>='
|
39
44
|
- !ruby/object:Gem::Version
|
@@ -41,6 +46,7 @@ dependencies:
|
|
41
46
|
- !ruby/object:Gem::Dependency
|
42
47
|
name: yard
|
43
48
|
requirement: !ruby/object:Gem::Requirement
|
49
|
+
none: false
|
44
50
|
requirements:
|
45
51
|
- - ! '>='
|
46
52
|
- !ruby/object:Gem::Version
|
@@ -48,6 +54,7 @@ dependencies:
|
|
48
54
|
type: :development
|
49
55
|
prerelease: false
|
50
56
|
version_requirements: !ruby/object:Gem::Requirement
|
57
|
+
none: false
|
51
58
|
requirements:
|
52
59
|
- - ! '>='
|
53
60
|
- !ruby/object:Gem::Version
|
@@ -55,6 +62,7 @@ dependencies:
|
|
55
62
|
- !ruby/object:Gem::Dependency
|
56
63
|
name: bundler
|
57
64
|
requirement: !ruby/object:Gem::Requirement
|
65
|
+
none: false
|
58
66
|
requirements:
|
59
67
|
- - ! '>='
|
60
68
|
- !ruby/object:Gem::Version
|
@@ -62,6 +70,7 @@ dependencies:
|
|
62
70
|
type: :development
|
63
71
|
prerelease: false
|
64
72
|
version_requirements: !ruby/object:Gem::Requirement
|
73
|
+
none: false
|
65
74
|
requirements:
|
66
75
|
- - ! '>='
|
67
76
|
- !ruby/object:Gem::Version
|
@@ -69,6 +78,7 @@ dependencies:
|
|
69
78
|
- !ruby/object:Gem::Dependency
|
70
79
|
name: jeweler
|
71
80
|
requirement: !ruby/object:Gem::Requirement
|
81
|
+
none: false
|
72
82
|
requirements:
|
73
83
|
- - ! '>='
|
74
84
|
- !ruby/object:Gem::Version
|
@@ -76,6 +86,7 @@ dependencies:
|
|
76
86
|
type: :development
|
77
87
|
prerelease: false
|
78
88
|
version_requirements: !ruby/object:Gem::Requirement
|
89
|
+
none: false
|
79
90
|
requirements:
|
80
91
|
- - ! '>='
|
81
92
|
- !ruby/object:Gem::Version
|
@@ -83,6 +94,7 @@ dependencies:
|
|
83
94
|
- !ruby/object:Gem::Dependency
|
84
95
|
name: simplecov
|
85
96
|
requirement: !ruby/object:Gem::Requirement
|
97
|
+
none: false
|
86
98
|
requirements:
|
87
99
|
- - ! '>='
|
88
100
|
- !ruby/object:Gem::Version
|
@@ -90,6 +102,7 @@ dependencies:
|
|
90
102
|
type: :development
|
91
103
|
prerelease: false
|
92
104
|
version_requirements: !ruby/object:Gem::Requirement
|
105
|
+
none: false
|
93
106
|
requirements:
|
94
107
|
- - ! '>='
|
95
108
|
- !ruby/object:Gem::Version
|
@@ -121,25 +134,29 @@ files:
|
|
121
134
|
homepage: http://github.com/pwnall/mit_stalker
|
122
135
|
licenses:
|
123
136
|
- MIT
|
124
|
-
metadata: {}
|
125
137
|
post_install_message:
|
126
138
|
rdoc_options: []
|
127
139
|
require_paths:
|
128
140
|
- lib
|
129
141
|
required_ruby_version: !ruby/object:Gem::Requirement
|
142
|
+
none: false
|
130
143
|
requirements:
|
131
144
|
- - ! '>='
|
132
145
|
- !ruby/object:Gem::Version
|
133
146
|
version: '0'
|
147
|
+
segments:
|
148
|
+
- 0
|
149
|
+
hash: 2812083979974987100
|
134
150
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
151
|
+
none: false
|
135
152
|
requirements:
|
136
153
|
- - ! '>='
|
137
154
|
- !ruby/object:Gem::Version
|
138
155
|
version: '0'
|
139
156
|
requirements: []
|
140
157
|
rubyforge_project:
|
141
|
-
rubygems_version:
|
158
|
+
rubygems_version: 1.8.23
|
142
159
|
signing_key:
|
143
|
-
specification_version:
|
160
|
+
specification_version: 3
|
144
161
|
summary: Fetches publicly available information about MIT students.
|
145
162
|
test_files: []
|
checksums.yaml
DELETED
@@ -1,15 +0,0 @@
|
|
1
|
-
---
|
2
|
-
!binary "U0hBMQ==":
|
3
|
-
metadata.gz: !binary |-
|
4
|
-
OThiMGJhYTQ0ZmQ2ZWQzZWFjZGRiZGQxMzNhNzgxZGIzZGIyOWU3Mg==
|
5
|
-
data.tar.gz: !binary |-
|
6
|
-
MDBlNzJiMTliMWYwODc5MTljODgwMDgxOGQwNzQ0ZDUzZTdiYWU1MA==
|
7
|
-
!binary "U0hBNTEy":
|
8
|
-
metadata.gz: !binary |-
|
9
|
-
Y2Q0M2ZlMDNiYWY0YzJkMGU0NWU3NzlhNmE2ODYxODc5MzM0N2FhNzA1ZTJk
|
10
|
-
NDAxOWJjZmVlMmJiNDZhYWQyMTg3ZmE5MGUzOGZjNWQ2MmUwZjFkMzM1ZTBm
|
11
|
-
ODc3NGJmZDM4YjFhYTU3YjU0OWMzNGY5OTRlMjBhNjgxNjJkYjA=
|
12
|
-
data.tar.gz: !binary |-
|
13
|
-
YTI3ZmFmNzc4MDQxYmM2NDllYjI4ZGVkZjkzN2JhOWRkNWJhMWRjNDIxMzk3
|
14
|
-
ZjM0MTAzZTY4NmNhNTc1ZGRkZjNhYTNlNjJhNmVhOTExOWQ4ZThkNzgyZGM1
|
15
|
-
MDcwZjk0MmJiNjE3NzEwZGU2MjAwMjYwYWYzNTNkNTUyOWU4OGE=
|