linodians 0.0.6 → 0.1.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/linodians/version.rb +1 -1
- data/lib/linodians.rb +11 -1
- data/linodians.gemspec +1 -1
- metadata +5 -5
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 59e2ade0dd5c4af5ff21eab082e6ebea77dd4d9f
|
4
|
+
data.tar.gz: a41f7ed7d6d83903ed570b1ab7980cfab16ad490
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 76031fc94b07da29d3e58028ea8d893f2acde3ba9cbbf51d3a228994b2a21462b6ced7c531a8903faaa1b95656c78b543b4fb7a640428092a4cd1019ce14dd5a
|
7
|
+
data.tar.gz: d1b4019ae70f4be77931e46a769441aa819b184616b8c84b0d70cee1a6a3c962af5f177941036f87e36c9d32de0c3a170bd3f84de18dc4389b07c74435ac5b87
|
data/lib/linodians/version.rb
CHANGED
data/lib/linodians.rb
CHANGED
@@ -37,10 +37,20 @@ module Linodians
|
|
37
37
|
def parse_social(block)
|
38
38
|
links = block.css('a.employee-link').map do |link|
|
39
39
|
# Social site name from CSS class, link target
|
40
|
-
[link[:class]
|
40
|
+
[parse_class(link[:class]), link['href']]
|
41
41
|
end.to_h
|
42
|
+
links.each { |k, v| links[k] = parse_handle(k, v) }
|
42
43
|
links.merge(social: links.keys)
|
43
44
|
end
|
45
|
+
|
46
|
+
def parse_class(text)
|
47
|
+
text.split.last.split('-').last.to_sym
|
48
|
+
end
|
49
|
+
|
50
|
+
def parse_handle(type, link)
|
51
|
+
return link if type == :linkedin
|
52
|
+
link.split('/').last
|
53
|
+
end
|
44
54
|
end
|
45
55
|
end
|
46
56
|
|
data/linodians.gemspec
CHANGED
@@ -18,7 +18,7 @@ Gem::Specification.new do |s|
|
|
18
18
|
s.executables = ['linodians']
|
19
19
|
|
20
20
|
s.add_dependency 'nokogiri', '~> 1.6.5'
|
21
|
-
s.add_dependency 'cymbal', '~> 0.0
|
21
|
+
s.add_dependency 'cymbal', '~> 1.0.0'
|
22
22
|
|
23
23
|
s.add_development_dependency 'rubocop', '~> 0.28.0'
|
24
24
|
s.add_development_dependency 'rake', '~> 10.4.0'
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: linodians
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0
|
4
|
+
version: 0.1.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Les Aker
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-01-
|
11
|
+
date: 2015-01-30 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: nokogiri
|
@@ -30,14 +30,14 @@ dependencies:
|
|
30
30
|
requirements:
|
31
31
|
- - "~>"
|
32
32
|
- !ruby/object:Gem::Version
|
33
|
-
version: 0.0
|
33
|
+
version: 1.0.0
|
34
34
|
type: :runtime
|
35
35
|
prerelease: false
|
36
36
|
version_requirements: !ruby/object:Gem::Requirement
|
37
37
|
requirements:
|
38
38
|
- - "~>"
|
39
39
|
- !ruby/object:Gem::Version
|
40
|
-
version: 0.0
|
40
|
+
version: 1.0.0
|
41
41
|
- !ruby/object:Gem::Dependency
|
42
42
|
name: rubocop
|
43
43
|
requirement: !ruby/object:Gem::Requirement
|
@@ -151,7 +151,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
151
151
|
version: '0'
|
152
152
|
requirements: []
|
153
153
|
rubyforge_project:
|
154
|
-
rubygems_version: 2.
|
154
|
+
rubygems_version: 2.4.5
|
155
155
|
signing_key:
|
156
156
|
specification_version: 4
|
157
157
|
summary: Parse Linode employees
|