hosts_updater 1.0.3 → 1.0.4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +4 -0
- data/README.md +5 -1
- data/lib/hosts_updater.rb +1 -1
- data/lib/hosts_updater/version.rb +1 -1
- metadata +3 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 59b543501b8a9d722a6d33ce5ae0f9264a1cefa8
|
4
|
+
data.tar.gz: 51f4a04d2f38524f0a91d8e5c81f4c0c9cef83dc
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: ae5ffd2eab09f6b5d9b4a444d78cc447ed1c90404e47421d4e1f63f257780f55288a848aac1f5fbf6f523f2f6354c81f0bc7782ebe80e8a2f746add7f1c82dcb
|
7
|
+
data.tar.gz: c4836da3eca9e75d8d97f7e64653d52c7fb6ab7139efba7834c3696f9206349ce67facc1b8e5608b4246c944d2b5748b5d24cb5f74330e46073f6d3c8e6790e6
|
data/CHANGELOG.md
CHANGED
data/README.md
CHANGED
@@ -24,10 +24,14 @@ Unique entries from those lists are added together, and results are combined wit
|
|
24
24
|
|
25
25
|
## How is it better than AdBlock/Ghostery etc?
|
26
26
|
|
27
|
-
Each browser plugin that blocks ads is using [large amount of resources, hogs browser, and often causes strange errors](http://www.reddit.com/r/programming/comments/25j41u/adblock_pluss_effect_on_firefoxs_memory_usage/chhpomw). In constrast to this, blacklisting domains in `/etc/hosts` only takes couple seconds after file change, and besides that has nearly zero impact on performance. Additionally AdBlock is removing parts of websites very
|
27
|
+
Each browser plugin that blocks ads is using [large amount of resources, hogs browser, and often causes strange errors](http://www.reddit.com/r/programming/comments/25j41u/adblock_pluss_effect_on_firefoxs_memory_usage/chhpomw). In constrast to this, blacklisting domains in `/etc/hosts` only takes couple seconds after file change, and besides that has nearly zero impact on performance. Additionally AdBlock is removing parts of websites very aggressively, often leaving broken layout - it should be less common problem with domain blacklisting.
|
28
28
|
|
29
29
|
On the other hand there is a small amount of ads that are unblockable by domain blacklisting - that are visible from time to time, but probably not often enough to complain ;)
|
30
30
|
|
31
|
+
### Slow auto complete
|
32
|
+
|
33
|
+
As a lot of hosts are added to your system, autocomplete might slow down. To solve this in [zsh prezto](https://github.com/sorin-ionescu/prezto) one could replace `cat /etc/hosts (|)(N)` with `sed /0\.0\.0\.0/d`. This prevents the domains to be loaded for completion.
|
34
|
+
|
31
35
|
## How to configure what domains I want whitelisted/blacklisted?
|
32
36
|
|
33
37
|
During first run `hosts-updater` will create folder in `/etc/hosts.d`, in which it will store all configuration files:
|
data/lib/hosts_updater.rb
CHANGED
@@ -35,7 +35,7 @@ class HostsUpdater
|
|
35
35
|
# Create required files, update auto file if necessary and generate hosts file.
|
36
36
|
# Need to be ran as root in order to access /etc/hosts
|
37
37
|
def run
|
38
|
-
unless
|
38
|
+
unless Process.uid == 0
|
39
39
|
logger.error 'Error: Must run as root'
|
40
40
|
exit
|
41
41
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: hosts_updater
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0.
|
4
|
+
version: 1.0.4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Bernard Potocki
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2016-02-15 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: hosts
|
@@ -62,9 +62,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
62
62
|
version: '0'
|
63
63
|
requirements: []
|
64
64
|
rubyforge_project:
|
65
|
-
rubygems_version: 2.4.5
|
65
|
+
rubygems_version: 2.4.5.1
|
66
66
|
signing_key:
|
67
67
|
specification_version: 4
|
68
68
|
summary: Update your /etc/hosts with list of unwanted domains
|
69
69
|
test_files: []
|
70
|
-
has_rdoc:
|