boston-ruby 0.0.6 → 0.0.7
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.
- data/README.md +1 -0
- data/bin/boston-ruby +3 -0
- data/lib/boston-ruby.rb +1 -1
- data/lib/boston-ruby/event.rb +23 -0
- metadata +2 -1
data/README.md
CHANGED
data/bin/boston-ruby
CHANGED
@@ -13,6 +13,8 @@ when /^b/
|
|
13
13
|
require 'boston-ruby/blogs'
|
14
14
|
when /^g/
|
15
15
|
require 'boston-ruby/github'
|
16
|
+
when /^e/
|
17
|
+
require 'boston-ruby/event'
|
16
18
|
when /^w/
|
17
19
|
require 'nokogiri'
|
18
20
|
html = `curl -s http://ruby.bostonstuff.org/weather`
|
@@ -29,6 +31,7 @@ Commands:
|
|
29
31
|
t Show recent tweets by BostonRB members
|
30
32
|
g Show recent github activity by BostonRB members
|
31
33
|
b Show recent blog posts
|
34
|
+
e Show next BostonRB event
|
32
35
|
w Show current Boston weather
|
33
36
|
|
34
37
|
Project homepage: http://github.com/danchoi/boston-ruby
|
data/lib/boston-ruby.rb
CHANGED
@@ -0,0 +1,23 @@
|
|
1
|
+
# encoding: UTF-8
|
2
|
+
|
3
|
+
require 'open-uri'
|
4
|
+
require 'nokogiri'
|
5
|
+
|
6
|
+
html = open("http://bostonrb.org/").read
|
7
|
+
doc = Nokogiri::HTML(html)
|
8
|
+
xs = doc.search('article')
|
9
|
+
|
10
|
+
puts xs[0].at("header h2").inner_text
|
11
|
+
puts
|
12
|
+
xs[0].search('section').each do |section|
|
13
|
+
puts section.inner_text.gsub(/^\s+/, '')
|
14
|
+
puts
|
15
|
+
end
|
16
|
+
|
17
|
+
where = xs[2].at('p')
|
18
|
+
puts where.inner_text.gsub(/^\s+/, '')
|
19
|
+
signup = where.search("a")[1]
|
20
|
+
if signup
|
21
|
+
puts "\n#{signup.inner_text}: #{signup[:href]}"
|
22
|
+
end
|
23
|
+
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: boston-ruby
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.7
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -60,6 +60,7 @@ files:
|
|
60
60
|
- boston-ruby.gemspec
|
61
61
|
- lib/boston-ruby.rb
|
62
62
|
- lib/boston-ruby/blogs.rb
|
63
|
+
- lib/boston-ruby/event.rb
|
63
64
|
- lib/boston-ruby/github.rb
|
64
65
|
- lib/boston-ruby/mailing_list.rb
|
65
66
|
- lib/boston-ruby/twitter.rb
|