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 CHANGED
@@ -10,6 +10,7 @@ line.
10
10
  t Show recent tweets by BostonRB members
11
11
  g Show recent github activity by BostonRB members
12
12
  b Show recent blog posts
13
+ e Show next BostonRB event
13
14
  w Show current Boston weather
14
15
 
15
16
  ## Install
@@ -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
@@ -3,7 +3,7 @@ require 'htmlentities'
3
3
 
4
4
  module BostonRuby
5
5
 
6
- VERSION = '0.0.6'
6
+ VERSION = '0.0.7'
7
7
 
8
8
  MAX_WIDTH = 90
9
9
  CODER = HTMLEntities.new
@@ -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.6
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