hosts_updater 1.0.0 → 1.0.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: f035702771324651cd8c2fa2f1e7248237e96b8b
4
- data.tar.gz: afb2b6556b7133fc4261a5cd02006f33e42fda02
3
+ metadata.gz: 0e060e6463a85f2688a0577f790991821e6dc02b
4
+ data.tar.gz: cfa067ee58a645eb69ffda5df22ceec881b12362
5
5
  SHA512:
6
- metadata.gz: aa6f8c165bdfbec09b539ec9ed4602307fe09e9f3a7df91a65bc16eed63ec5a7a5178fb941b191f232640d41936a7a64fdff64a3f316fbb4a5151cada952f52b
7
- data.tar.gz: cd03ec664d6908db1a0bc0c706441a43093ff999625ca8a745e28df3b669a0fa0db47ef94c12f57860d3dd604a565413ad10f21d4458da41dac3c29d0edbf08c
6
+ metadata.gz: 871d25470e40156e16d2f8f9d8a3bb79eccf08ad60192cbd85371a01b010464d85ae7a2301844e3dd8e60cc2021329738e586de306ff7cf9833fead77f7e6674
7
+ data.tar.gz: e451bfa067c6a89e4df1f180df04f8e3f471d95a37fba8f8bbbb133dc02d2397e2c9f172eba6c6ab9b5aac3eca0648f95bdaece29733c0bb89e3a8384f253672
data/CHANGELOG.md ADDED
@@ -0,0 +1,11 @@
1
+ # Changelog
2
+
3
+ ## 1.0.1
4
+
5
+ - fix several command line options (@IvanUkhov)
6
+ - fix bootstrap process (@IvanUkhov)
7
+ - fixes in documentation (@krzysztofbialek)
8
+
9
+ ## 1.0.0
10
+
11
+ - initial release
data/README.md CHANGED
@@ -1,6 +1,6 @@
1
1
  # Hosts Updater
2
2
 
3
- This script indends to help manage large collection of blacklisted domains. It's best to describe it as replacement for adblock, but instead of slowing down your browser it blocks domains of ad and scam websites at DNS level.
3
+ This script intends to help manage large collection of blacklisted domains. It's best to describe it as a replacement for adblock, but instead of slowing down your browser it blocks domains of ad and scam websites at DNS level.
4
4
 
5
5
  ## Quick start guide
6
6
 
@@ -9,7 +9,7 @@ $ gem install hosts_updater
9
9
  $ sudo hosts-updater --help
10
10
  ```
11
11
 
12
- It required sudo in order to write to `/etc/hosts` file.
12
+ It requires sudo in order to write to `/etc/hosts` file.
13
13
 
14
14
  ## What it does?
15
15
 
@@ -20,13 +20,13 @@ This script download lists of malicious domains from following websites:
20
20
  - http://someonewhocares.org/hosts/hosts
21
21
  - http://pgl.yoyo.org/adservers/serverlist.php?hostformat=hosts&mimetype=plaintext
22
22
 
23
- All of those lists are combined, duplicates removed and combined with your current `hosts` file (no data will should lost as original `hosts` file is copied and reused in future).
23
+ Unique entries from those lists are added together, and results are combined with your current `hosts` file (no data will be lost as original `hosts` file is copied and reused in the future).
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` takes couple seconds after file change, but after that has nearly zero impact on performance. Additionally AdBlock is removing parts of websited very aggresively, often leaving indended layout broken - it should be less common problem with domain blacklisting.
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 aggresively, often leaving broken layout - it should be less common problem with domain blacklisting.
28
28
 
29
- On the other hand there are small amount of ads that are unblockable by domain blacklisting - that are visible from time to time, but probably not often enough to complain ;)
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
31
  ## How to configure what domains I want whitelisted/blacklisted?
32
32
 
@@ -34,7 +34,7 @@ During first run `hosts-updater` will create folder in `/etc/hosts.d`, in which
34
34
 
35
35
  - `hosts.custom` - this will be copy of old `/etc/hosts` and it will be added to `/etc/hosts` at top upon each use of `hosts-updater`. You should store you developer domains and all similar stuff inside of this file, as it will never be modified by this script. If you need to blacklist additional domains you should put them here too.
36
36
  - `hosts.auto` - this will be regenerated upon calling `hosts-updater` with `--update` flag. It stores downloaded blacklists and is used to regenerate `/etc/hosts`. It's good idea to refresh it from time to time.
37
- - `hosts.whitelist` - in this file you can place domain that you want to have access to despite figuring in one of downloaded lists. In order to do so simply paste full domain name inside there (one domain per line) and it will be picked up during next `hosts-updater` run.
37
+ - `hosts.whitelist` - in this file you can place domains that you want to access despite figuring in one of downloaded lists. In order to do so, simply paste full domain name inside there (one domain per line) and it will be picked up during next `hosts-updater` run.
38
38
 
39
39
  ## Any other configuration options?
40
40
 
data/bin/hosts-updater CHANGED
@@ -13,24 +13,24 @@ OptionParser.new do |opts|
13
13
  exit
14
14
  end
15
15
 
16
- opts.on("--hosts-file", "Path to hosts file to write (default: /etc/hosts)") do |file|
17
- opts[:hosts_file] = file
16
+ opts.on("--hosts-file [PATH]", "Path to hosts file to write (default: /etc/hosts)") do |file|
17
+ options[:hosts_file] = file
18
18
  end
19
19
 
20
- opts.on("--hosts-directory", "Path to hosts.d config directory (default: /etc/hosts.d/)") do |file|
21
- opts[:hosts_dir] = file
20
+ opts.on("--hosts-directory [PATH]", "Path to hosts.d config directory (default: /etc/hosts.d/)") do |file|
21
+ options[:hosts_dir] = file
22
22
  end
23
23
 
24
- opts.on("--hosts-auto-name", "Name for auto-generated file in hosts.d dir (default: hosts.auto)") do |file|
25
- opts[:hosts_auto_name] = file
24
+ opts.on("--hosts-auto-name [NAME]", "Name for auto-generated file in hosts.d dir (default: hosts.auto)") do |file|
25
+ options[:hosts_auto_name] = file
26
26
  end
27
27
 
28
- opts.on("--hosts-custom-name", "Name for custom hosts file in hosts.d dir (default: hosts.custom)") do |file|
29
- opts[:hosts_custom_name] = file
28
+ opts.on("--hosts-custom-name [NAME]", "Name for custom hosts file in hosts.d dir (default: hosts.custom)") do |file|
29
+ options[:hosts_custom_name] = file
30
30
  end
31
31
 
32
- opts.on("--hosts-whitelist-name", "Name for file with whitelisted domains in hosts.d dir (defaule: hosts.whitelist)") do |file|
33
- opts[:hosts_whitelist_name] = file
32
+ opts.on("--hosts-whitelist-name [NAME]", "Name for file with whitelisted domains in hosts.d dir (defaule: hosts.whitelist)") do |file|
33
+ options[:hosts_whitelist_name] = file
34
34
  end
35
35
 
36
36
 
data/lib/hosts_updater.rb CHANGED
@@ -76,7 +76,7 @@ class HostsUpdater
76
76
 
77
77
  unless File.exists? hosts_auto_location
78
78
  logger.debug "Writing default #{hosts_auto_location}"
79
- File.touch(hosts_auto_location)
79
+ FileUtils.touch(hosts_auto_location)
80
80
  end
81
81
 
82
82
  unless File.exists? hosts_whitelist_location
@@ -1,3 +1,3 @@
1
1
  class HostsUpdater
2
- VERSION = "1.0.0"
2
+ VERSION = "1.0.1"
3
3
  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.0
4
+ version: 1.0.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Bernard Potocki
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-12-02 00:00:00.000000000 Z
11
+ date: 2014-12-03 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: hosts
@@ -33,6 +33,7 @@ extensions: []
33
33
  extra_rdoc_files: []
34
34
  files:
35
35
  - ".gitignore"
36
+ - CHANGELOG.md
36
37
  - Gemfile
37
38
  - LICENSE
38
39
  - README.md