voight_kampff 1.1.2 → 1.1.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +1 -1
- data/config/crawler-user-agents.json +1448 -338
- data/lib/tasks/voight_kampff.rake +6 -2
- data/lib/voight_kampff/version.rb +1 -1
- metadata +2 -2
@@ -8,7 +8,11 @@ namespace :voight_kampff do
|
|
8
8
|
uri = URI(args[:url])
|
9
9
|
contents = Net::HTTP.get(uri)
|
10
10
|
|
11
|
-
|
12
|
-
|
11
|
+
if contents.present?
|
12
|
+
file = File.open('./config/crawler-user-agents.json', 'w')
|
13
|
+
file.write(contents.force_encoding(Encoding::UTF_8))
|
14
|
+
else
|
15
|
+
puts "voight_kampff:import_user_agents - empty file received from #{uri}"
|
16
|
+
end
|
13
17
|
end
|
14
18
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: voight_kampff
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.1.
|
4
|
+
version: 1.1.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Adam Crownoble
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2018-
|
11
|
+
date: 2018-09-30 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rack
|