rubyconferenceby 0.0.2
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.
- checksums.yaml +7 -0
- data/lib/rubyconferenceby.rb +40 -0
- metadata +58 -0
checksums.yaml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
SHA1:
|
3
|
+
metadata.gz: 6ee1b0477ce2c21d1c6b82cd44f31f0b341f8d1a
|
4
|
+
data.tar.gz: 737f5eb03e9f11321052d8c435353b46205bc731
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: 899541787297fda625c6f9389b5ee2497fae93d4e4dd6af5ed39c73ff00e9b522199723970c59f8216c0b5152f901626569c1c93d95f040c7d6b5367c3b57dcf
|
7
|
+
data.tar.gz: 2a4bc8af9e76aa214bf106f8fba3bcc6f7d007722732739638aa02f1da84583f22d0171936f22c0ed78a23b665911e64c8b69660fa576e513e620c707b004fed
|
@@ -0,0 +1,40 @@
|
|
1
|
+
require 'mechanize'
|
2
|
+
|
3
|
+
class RubyConference
|
4
|
+
class << self
|
5
|
+
|
6
|
+
def by
|
7
|
+
self
|
8
|
+
end
|
9
|
+
|
10
|
+
def schedule
|
11
|
+
raw_schedule.map do |x|
|
12
|
+
{
|
13
|
+
when: x.at('span').text,
|
14
|
+
title: x.at('h3').text.strip,
|
15
|
+
presentor: x.at('a:last').text.strip
|
16
|
+
}
|
17
|
+
end
|
18
|
+
end
|
19
|
+
|
20
|
+
def print_schedule
|
21
|
+
schedule.each do |row|
|
22
|
+
if row[:presentor].empty?
|
23
|
+
p "#{row[:when]} - #{row[:title]}"
|
24
|
+
else
|
25
|
+
p "#{row[:when]} - #{row[:title]} - #{row[:presentor]}"
|
26
|
+
end
|
27
|
+
end
|
28
|
+
nil
|
29
|
+
end
|
30
|
+
|
31
|
+
protected
|
32
|
+
|
33
|
+
def raw_schedule
|
34
|
+
a = Mechanize.new
|
35
|
+
p = a.get('http://rubyconference.by')
|
36
|
+
p.parser.css('.program ul li')
|
37
|
+
end
|
38
|
+
|
39
|
+
end
|
40
|
+
end
|
metadata
ADDED
@@ -0,0 +1,58 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: rubyconferenceby
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 0.0.2
|
5
|
+
platform: ruby
|
6
|
+
authors:
|
7
|
+
- Rodion Chauskin
|
8
|
+
autorequire:
|
9
|
+
bindir: bin
|
10
|
+
cert_chain: []
|
11
|
+
date: 2016-04-24 00:00:00.000000000 Z
|
12
|
+
dependencies:
|
13
|
+
- !ruby/object:Gem::Dependency
|
14
|
+
name: mechanize
|
15
|
+
requirement: !ruby/object:Gem::Requirement
|
16
|
+
requirements:
|
17
|
+
- - ">="
|
18
|
+
- !ruby/object:Gem::Version
|
19
|
+
version: '0'
|
20
|
+
type: :runtime
|
21
|
+
prerelease: false
|
22
|
+
version_requirements: !ruby/object:Gem::Requirement
|
23
|
+
requirements:
|
24
|
+
- - ">="
|
25
|
+
- !ruby/object:Gem::Version
|
26
|
+
version: '0'
|
27
|
+
description: Have no idea what should be here
|
28
|
+
email: r.chauskin@gmail.com
|
29
|
+
executables: []
|
30
|
+
extensions: []
|
31
|
+
extra_rdoc_files: []
|
32
|
+
files:
|
33
|
+
- lib/rubyconferenceby.rb
|
34
|
+
homepage: https://github.com/ChauskinRodion/rubyconference.by
|
35
|
+
licenses:
|
36
|
+
- MIT
|
37
|
+
metadata: {}
|
38
|
+
post_install_message:
|
39
|
+
rdoc_options: []
|
40
|
+
require_paths:
|
41
|
+
- lib
|
42
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
43
|
+
requirements:
|
44
|
+
- - ">="
|
45
|
+
- !ruby/object:Gem::Version
|
46
|
+
version: '0'
|
47
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
48
|
+
requirements:
|
49
|
+
- - ">="
|
50
|
+
- !ruby/object:Gem::Version
|
51
|
+
version: '0'
|
52
|
+
requirements: []
|
53
|
+
rubyforge_project:
|
54
|
+
rubygems_version: 2.4.8
|
55
|
+
signing_key:
|
56
|
+
specification_version: 4
|
57
|
+
summary: This if official gem of Ruby Conference.by 2016
|
58
|
+
test_files: []
|