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.
@@ -8,7 +8,11 @@ namespace :voight_kampff do
8
8
  uri = URI(args[:url])
9
9
  contents = Net::HTTP.get(uri)
10
10
 
11
- file = File.open('./config/crawler-user-agents.json', 'w')
12
- file.write(contents)
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
@@ -1,3 +1,3 @@
1
1
  module VoightKampff
2
- VERSION = '1.1.2'
2
+ VERSION = '1.1.3'
3
3
  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.2
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-02-16 00:00:00.000000000 Z
11
+ date: 2018-09-30 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rack