rgroups 0.2.1 → 0.2.2
Sign up to get free protection for your applications and to get access to all the features.
- data/VERSION +1 -1
- data/lib/rgroups.rb +11 -0
- data/rgroups.gemspec +2 -2
- metadata +4 -4
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.2.
|
1
|
+
0.2.2
|
data/lib/rgroups.rb
CHANGED
@@ -1,3 +1,4 @@
|
|
1
|
+
# encoding: utf-8
|
1
2
|
require 'mechanize'
|
2
3
|
|
3
4
|
|
@@ -51,6 +52,16 @@ class RGroup
|
|
51
52
|
groups
|
52
53
|
end
|
53
54
|
|
55
|
+
def list_members(group)
|
56
|
+
page = @scraper.get(@BASE_URL + group + @@MANAGE)
|
57
|
+
member_set = page.search('//table[@class="memlist"]//td')
|
58
|
+
members = []
|
59
|
+
member_set.each do |m|
|
60
|
+
members.push(member_set[member_set.index(m) + 1].children.text.gsub(/\302\240/, '').gsub(/-me$/, '')) if m.to_s.include?('class="cb"')
|
61
|
+
end
|
62
|
+
return members
|
63
|
+
end
|
64
|
+
|
54
65
|
#search groups
|
55
66
|
#listing groups is not easy when scraping
|
56
67
|
#instead, you can search for one
|
data/rgroups.gemspec
CHANGED
@@ -5,11 +5,11 @@
|
|
5
5
|
|
6
6
|
Gem::Specification.new do |s|
|
7
7
|
s.name = "rgroups"
|
8
|
-
s.version = "0.2.
|
8
|
+
s.version = "0.2.2"
|
9
9
|
|
10
10
|
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
|
11
11
|
s.authors = ["Andrew Hayworth"]
|
12
|
-
s.date = "2012-
|
12
|
+
s.date = "2012-07-05"
|
13
13
|
s.description = "This is a Ruby API for accessing and updating Google Groups. It's based on Mechanize, which means it's essentially screen-scraping."
|
14
14
|
s.email = "ahayworth@gmail.com"
|
15
15
|
s.extra_rdoc_files = [
|
metadata
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: rgroups
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
4
|
+
hash: 19
|
5
5
|
prerelease:
|
6
6
|
segments:
|
7
7
|
- 0
|
8
8
|
- 2
|
9
|
-
-
|
10
|
-
version: 0.2.
|
9
|
+
- 2
|
10
|
+
version: 0.2.2
|
11
11
|
platform: ruby
|
12
12
|
authors:
|
13
13
|
- Andrew Hayworth
|
@@ -15,7 +15,7 @@ autorequire:
|
|
15
15
|
bindir: bin
|
16
16
|
cert_chain: []
|
17
17
|
|
18
|
-
date: 2012-
|
18
|
+
date: 2012-07-05 00:00:00 Z
|
19
19
|
dependencies:
|
20
20
|
- !ruby/object:Gem::Dependency
|
21
21
|
requirement: &id001 !ruby/object:Gem::Requirement
|