ubi 0.0.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/.gitignore +9 -0
- data/.rspec +3 -0
- data/Gemfile +11 -0
- data/Guardfile +16 -0
- data/MIT-LICENSE +19 -0
- data/README.md +57 -0
- data/Rakefile +9 -0
- data/bin/ubi +10 -0
- data/lib/ubi.rb +37 -0
- data/lib/ubi/aranea.rb +42 -0
- data/lib/ubi/artifex.rb +28 -0
- data/lib/ubi/consultor.rb +61 -0
- data/lib/ubi/consultores/bing.rb +26 -0
- data/lib/ubi/consultores/duckduckgo.rb +26 -0
- data/lib/ubi/consultores/facebook.rb +6 -0
- data/lib/ubi/consultores/foursquare.rb +6 -0
- data/lib/ubi/consultores/google.rb +24 -0
- data/lib/ubi/consultores/linkedin.rb +0 -0
- data/lib/ubi/consultores/twitter.rb +6 -0
- data/lib/ubi/consultores/wikipedia.rb +6 -0
- data/lib/ubi/consultores/yahoo.rb +26 -0
- data/lib/ubi/datum.rb +43 -0
- data/lib/ubi/impero.rb +20 -0
- data/lib/ubi/memoria.rb +72 -0
- data/lib/ubi/memorias/address.rb +71 -0
- data/lib/ubi/memorias/document.rb +50 -0
- data/lib/ubi/memorias/email.rb +19 -0
- data/lib/ubi/memorias/phone.rb +33 -0
- data/lib/ubi/memorias/site.rb +29 -0
- data/lib/ubi/memorias/social.rb +20 -0
- data/lib/ubi/memorias/who.rb +20 -0
- data/lib/ubi/thema.rb +62 -0
- data/lib/ubi/version.rb +4 -0
- data/spec/fixtures/email.txt +5 -0
- data/spec/fixtures/mobile.txt +17 -0
- data/spec/fixtures/page.txt +21 -0
- data/spec/fixtures/phone.txt +17 -0
- data/spec/fixtures/site.txt +21 -0
- data/spec/spec_helper.rb +40 -0
- data/spec/ubi/aranea_spec.rb +19 -0
- data/spec/ubi/artifex_spec.rb +4 -0
- data/spec/ubi/memorias/address_spec.rb +56 -0
- data/spec/ubi/memorias/document_spec.rb +48 -0
- data/spec/ubi/memorias/email_spec.rb +59 -0
- data/spec/ubi/memorias/phone_spec.rb +79 -0
- data/spec/ubi/memorias/site_spec.rb +82 -0
- data/spec/ubi/thema_spec.rb +33 -0
- data/ubi.gemspec +39 -0
- metadata +232 -0
@@ -0,0 +1,33 @@
|
|
1
|
+
require 'spec_helper'
|
2
|
+
|
3
|
+
describe Thema do
|
4
|
+
it 'should have a name' do
|
5
|
+
expect(Thema.new('Hard Rock').name).to eq('Hard Rock')
|
6
|
+
end
|
7
|
+
|
8
|
+
it 'should accept urls too' do
|
9
|
+
expect(Thema.new('Hard Rock', ['hr.com']).urls).to include('hr.com')
|
10
|
+
end
|
11
|
+
|
12
|
+
it 'should convert urls to aranea' do
|
13
|
+
expect(Thema.new('HR', ['hr.com']).araneas.first).to be_a(Aranea)
|
14
|
+
end
|
15
|
+
|
16
|
+
it 'should have many memorias' do
|
17
|
+
expect(Thema.new('Foo').memorias).to be_an(Array)
|
18
|
+
end
|
19
|
+
|
20
|
+
it 'should access memorias by type' do
|
21
|
+
expect(Thema.new('Foo')).to respond_to(:emails)
|
22
|
+
end
|
23
|
+
|
24
|
+
it 'should access sites by type' do
|
25
|
+
expect(Thema.new('Foo')).to respond_to(:sites)
|
26
|
+
end
|
27
|
+
|
28
|
+
it 'should accept a site' do
|
29
|
+
th = Thema.new('Ruby')
|
30
|
+
th.sites << Memoria::Site.new('http://ruby-lang.org')
|
31
|
+
expect(th.sites.size).to eq(1)
|
32
|
+
end
|
33
|
+
end
|
data/ubi.gemspec
ADDED
@@ -0,0 +1,39 @@
|
|
1
|
+
lib = File.expand_path('../lib', __FILE__)
|
2
|
+
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
3
|
+
|
4
|
+
require 'ubi/version'
|
5
|
+
|
6
|
+
Gem::Specification.new do |s|
|
7
|
+
s.name = 'ubi'
|
8
|
+
s.version = Ubi::VERSION
|
9
|
+
s.platform = Gem::Platform::RUBY
|
10
|
+
|
11
|
+
s.authors = ['Marcos Piccinini']
|
12
|
+
s.homepage = 'http://github.com/nofxx/ubi'
|
13
|
+
s.email = 'x@nofxx.com'
|
14
|
+
s.description = 'Find all those devices connected in LAN'
|
15
|
+
s.summary = 'Find devices connected in LAN'
|
16
|
+
s.license = 'MIT'
|
17
|
+
|
18
|
+
s.executables = ['ubi']
|
19
|
+
s.default_executable = 'ubi'
|
20
|
+
|
21
|
+
s.files = `git ls-files`.split("\n")
|
22
|
+
s.test_files = `git ls-files -- {test,spec,features}/*`.split("\n")
|
23
|
+
s.require_paths = ['lib']
|
24
|
+
|
25
|
+
s.add_dependency 'thor' #, '~> 0.19.1'
|
26
|
+
s.add_dependency 'paint' #, '~> 0.9.0'
|
27
|
+
s.add_dependency 'phonelib'
|
28
|
+
# s.add_dependency 'phonie', '~> 3.1.0'
|
29
|
+
# s.add_dependency 'addressie', '~> 0.0.0'
|
30
|
+
s.add_dependency 'polipus' #, '~> 0.4.0'
|
31
|
+
s.add_dependency 'nokogiri' #, '~> 1.6.0'
|
32
|
+
s.add_dependency 'geopolitical'
|
33
|
+
|
34
|
+
s.add_development_dependency 'vcr'
|
35
|
+
s.add_development_dependency 'rspec'
|
36
|
+
s.add_development_dependency 'webmock'
|
37
|
+
# s.add_dependency 'activemodel'
|
38
|
+
# s.add_dependency 'activesupport'
|
39
|
+
end
|
metadata
ADDED
@@ -0,0 +1,232 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: ubi
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 0.0.3
|
5
|
+
platform: ruby
|
6
|
+
authors:
|
7
|
+
- Marcos Piccinini
|
8
|
+
autorequire:
|
9
|
+
bindir: bin
|
10
|
+
cert_chain: []
|
11
|
+
date: 2015-08-21 00:00:00.000000000 Z
|
12
|
+
dependencies:
|
13
|
+
- !ruby/object:Gem::Dependency
|
14
|
+
name: thor
|
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
|
+
- !ruby/object:Gem::Dependency
|
28
|
+
name: paint
|
29
|
+
requirement: !ruby/object:Gem::Requirement
|
30
|
+
requirements:
|
31
|
+
- - ">="
|
32
|
+
- !ruby/object:Gem::Version
|
33
|
+
version: '0'
|
34
|
+
type: :runtime
|
35
|
+
prerelease: false
|
36
|
+
version_requirements: !ruby/object:Gem::Requirement
|
37
|
+
requirements:
|
38
|
+
- - ">="
|
39
|
+
- !ruby/object:Gem::Version
|
40
|
+
version: '0'
|
41
|
+
- !ruby/object:Gem::Dependency
|
42
|
+
name: phonelib
|
43
|
+
requirement: !ruby/object:Gem::Requirement
|
44
|
+
requirements:
|
45
|
+
- - ">="
|
46
|
+
- !ruby/object:Gem::Version
|
47
|
+
version: '0'
|
48
|
+
type: :runtime
|
49
|
+
prerelease: false
|
50
|
+
version_requirements: !ruby/object:Gem::Requirement
|
51
|
+
requirements:
|
52
|
+
- - ">="
|
53
|
+
- !ruby/object:Gem::Version
|
54
|
+
version: '0'
|
55
|
+
- !ruby/object:Gem::Dependency
|
56
|
+
name: polipus
|
57
|
+
requirement: !ruby/object:Gem::Requirement
|
58
|
+
requirements:
|
59
|
+
- - ">="
|
60
|
+
- !ruby/object:Gem::Version
|
61
|
+
version: '0'
|
62
|
+
type: :runtime
|
63
|
+
prerelease: false
|
64
|
+
version_requirements: !ruby/object:Gem::Requirement
|
65
|
+
requirements:
|
66
|
+
- - ">="
|
67
|
+
- !ruby/object:Gem::Version
|
68
|
+
version: '0'
|
69
|
+
- !ruby/object:Gem::Dependency
|
70
|
+
name: nokogiri
|
71
|
+
requirement: !ruby/object:Gem::Requirement
|
72
|
+
requirements:
|
73
|
+
- - ">="
|
74
|
+
- !ruby/object:Gem::Version
|
75
|
+
version: '0'
|
76
|
+
type: :runtime
|
77
|
+
prerelease: false
|
78
|
+
version_requirements: !ruby/object:Gem::Requirement
|
79
|
+
requirements:
|
80
|
+
- - ">="
|
81
|
+
- !ruby/object:Gem::Version
|
82
|
+
version: '0'
|
83
|
+
- !ruby/object:Gem::Dependency
|
84
|
+
name: geopolitical
|
85
|
+
requirement: !ruby/object:Gem::Requirement
|
86
|
+
requirements:
|
87
|
+
- - ">="
|
88
|
+
- !ruby/object:Gem::Version
|
89
|
+
version: '0'
|
90
|
+
type: :runtime
|
91
|
+
prerelease: false
|
92
|
+
version_requirements: !ruby/object:Gem::Requirement
|
93
|
+
requirements:
|
94
|
+
- - ">="
|
95
|
+
- !ruby/object:Gem::Version
|
96
|
+
version: '0'
|
97
|
+
- !ruby/object:Gem::Dependency
|
98
|
+
name: vcr
|
99
|
+
requirement: !ruby/object:Gem::Requirement
|
100
|
+
requirements:
|
101
|
+
- - ">="
|
102
|
+
- !ruby/object:Gem::Version
|
103
|
+
version: '0'
|
104
|
+
type: :development
|
105
|
+
prerelease: false
|
106
|
+
version_requirements: !ruby/object:Gem::Requirement
|
107
|
+
requirements:
|
108
|
+
- - ">="
|
109
|
+
- !ruby/object:Gem::Version
|
110
|
+
version: '0'
|
111
|
+
- !ruby/object:Gem::Dependency
|
112
|
+
name: rspec
|
113
|
+
requirement: !ruby/object:Gem::Requirement
|
114
|
+
requirements:
|
115
|
+
- - ">="
|
116
|
+
- !ruby/object:Gem::Version
|
117
|
+
version: '0'
|
118
|
+
type: :development
|
119
|
+
prerelease: false
|
120
|
+
version_requirements: !ruby/object:Gem::Requirement
|
121
|
+
requirements:
|
122
|
+
- - ">="
|
123
|
+
- !ruby/object:Gem::Version
|
124
|
+
version: '0'
|
125
|
+
- !ruby/object:Gem::Dependency
|
126
|
+
name: webmock
|
127
|
+
requirement: !ruby/object:Gem::Requirement
|
128
|
+
requirements:
|
129
|
+
- - ">="
|
130
|
+
- !ruby/object:Gem::Version
|
131
|
+
version: '0'
|
132
|
+
type: :development
|
133
|
+
prerelease: false
|
134
|
+
version_requirements: !ruby/object:Gem::Requirement
|
135
|
+
requirements:
|
136
|
+
- - ">="
|
137
|
+
- !ruby/object:Gem::Version
|
138
|
+
version: '0'
|
139
|
+
description: Find all those devices connected in LAN
|
140
|
+
email: x@nofxx.com
|
141
|
+
executables:
|
142
|
+
- ubi
|
143
|
+
extensions: []
|
144
|
+
extra_rdoc_files: []
|
145
|
+
files:
|
146
|
+
- ".gitignore"
|
147
|
+
- ".rspec"
|
148
|
+
- Gemfile
|
149
|
+
- Guardfile
|
150
|
+
- MIT-LICENSE
|
151
|
+
- README.md
|
152
|
+
- Rakefile
|
153
|
+
- bin/ubi
|
154
|
+
- lib/ubi.rb
|
155
|
+
- lib/ubi/aranea.rb
|
156
|
+
- lib/ubi/artifex.rb
|
157
|
+
- lib/ubi/consultor.rb
|
158
|
+
- lib/ubi/consultores/bing.rb
|
159
|
+
- lib/ubi/consultores/duckduckgo.rb
|
160
|
+
- lib/ubi/consultores/facebook.rb
|
161
|
+
- lib/ubi/consultores/foursquare.rb
|
162
|
+
- lib/ubi/consultores/google.rb
|
163
|
+
- lib/ubi/consultores/linkedin.rb
|
164
|
+
- lib/ubi/consultores/twitter.rb
|
165
|
+
- lib/ubi/consultores/wikipedia.rb
|
166
|
+
- lib/ubi/consultores/yahoo.rb
|
167
|
+
- lib/ubi/datum.rb
|
168
|
+
- lib/ubi/impero.rb
|
169
|
+
- lib/ubi/memoria.rb
|
170
|
+
- lib/ubi/memorias/address.rb
|
171
|
+
- lib/ubi/memorias/document.rb
|
172
|
+
- lib/ubi/memorias/email.rb
|
173
|
+
- lib/ubi/memorias/phone.rb
|
174
|
+
- lib/ubi/memorias/site.rb
|
175
|
+
- lib/ubi/memorias/social.rb
|
176
|
+
- lib/ubi/memorias/who.rb
|
177
|
+
- lib/ubi/thema.rb
|
178
|
+
- lib/ubi/version.rb
|
179
|
+
- spec/fixtures/email.txt
|
180
|
+
- spec/fixtures/mobile.txt
|
181
|
+
- spec/fixtures/page.txt
|
182
|
+
- spec/fixtures/phone.txt
|
183
|
+
- spec/fixtures/site.txt
|
184
|
+
- spec/spec_helper.rb
|
185
|
+
- spec/ubi/aranea_spec.rb
|
186
|
+
- spec/ubi/artifex_spec.rb
|
187
|
+
- spec/ubi/memorias/address_spec.rb
|
188
|
+
- spec/ubi/memorias/document_spec.rb
|
189
|
+
- spec/ubi/memorias/email_spec.rb
|
190
|
+
- spec/ubi/memorias/phone_spec.rb
|
191
|
+
- spec/ubi/memorias/site_spec.rb
|
192
|
+
- spec/ubi/thema_spec.rb
|
193
|
+
- ubi.gemspec
|
194
|
+
homepage: http://github.com/nofxx/ubi
|
195
|
+
licenses:
|
196
|
+
- MIT
|
197
|
+
metadata: {}
|
198
|
+
post_install_message:
|
199
|
+
rdoc_options: []
|
200
|
+
require_paths:
|
201
|
+
- lib
|
202
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
203
|
+
requirements:
|
204
|
+
- - ">="
|
205
|
+
- !ruby/object:Gem::Version
|
206
|
+
version: '0'
|
207
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
208
|
+
requirements:
|
209
|
+
- - ">="
|
210
|
+
- !ruby/object:Gem::Version
|
211
|
+
version: '0'
|
212
|
+
requirements: []
|
213
|
+
rubyforge_project:
|
214
|
+
rubygems_version: 2.4.5
|
215
|
+
signing_key:
|
216
|
+
specification_version: 4
|
217
|
+
summary: Find devices connected in LAN
|
218
|
+
test_files:
|
219
|
+
- spec/fixtures/email.txt
|
220
|
+
- spec/fixtures/mobile.txt
|
221
|
+
- spec/fixtures/page.txt
|
222
|
+
- spec/fixtures/phone.txt
|
223
|
+
- spec/fixtures/site.txt
|
224
|
+
- spec/spec_helper.rb
|
225
|
+
- spec/ubi/aranea_spec.rb
|
226
|
+
- spec/ubi/artifex_spec.rb
|
227
|
+
- spec/ubi/memorias/address_spec.rb
|
228
|
+
- spec/ubi/memorias/document_spec.rb
|
229
|
+
- spec/ubi/memorias/email_spec.rb
|
230
|
+
- spec/ubi/memorias/phone_spec.rb
|
231
|
+
- spec/ubi/memorias/site_spec.rb
|
232
|
+
- spec/ubi/thema_spec.rb
|