focus.rb 1.1.0 → 1.1.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (4) hide show
  1. checksums.yaml +4 -4
  2. data/bin/focus +2 -2
  3. data/lib/focus/config.rb +1 -1
  4. metadata +1 -1
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 9dae74d714f49abf09ba3d42f7831f05760346563dd4cce4a233b6f0975020c4
4
- data.tar.gz: a2b268db17e8ff009b7d1b672499f5fbbb7cfff6b0f76a66c2c352c3a7767325
3
+ metadata.gz: 1df428809adafd42b392926175afb6d8b4ba2919b2aa089d55fe92f8a9f6bc4b
4
+ data.tar.gz: 1c7218d6b73f81b58a6d9ca6dbafaa26b0b5df57d6a464cf23774886cdf5e7e4
5
5
  SHA512:
6
- metadata.gz: 04d3b1ebf9df3df68e3fb2f79fa3ce793b46346b886163ba61cd040d2c467ccaabc64cc25e6a90527dbbb08d3ea941da773172eed5b36e762022f0ca6db57810
7
- data.tar.gz: 8f66742d9f3684b84555548b26a983bf70eb34e81f411ef720bc2e58a910b95cd003c6686ddc4c29564344c6d56fc683a0e9f1a69f913a61db9ed28550f62658
6
+ metadata.gz: 53c969c851742f456d2fd003e1d738ebf51bac2e1f162c7b351aa7f360659f21b13c702563ae77684848bd5a65ad377ed3fb3649f1ed9e9e9cec9bd9ef972934
7
+ data.tar.gz: 5893453871608649f0b26bcd84d753acb4768e2d9f256f9f10827bb19d49abe9e45375ea4e37203ad42d1b7f065af3feab4d852b65e13e0fe9dafde24c0341f5
data/bin/focus CHANGED
@@ -24,7 +24,7 @@ Help to focus on your work, block leasure website while you need working, unbloc
24
24
  opts.on("-c=PATH", "--config=PATH", "Change the default config path") { |path| config_path = path }
25
25
 
26
26
  opts.on("-a=BLOCK", "--add-block-host=BLOCK", "Add a new host to block") { |block| action = :add_block_host; args = [block] }
27
- opts.on("-d=BLOCK", "--delete-block-host=BLOCK", "Delete a host to block") { |block| action = :delete_block_host; args = [block] }
27
+ opts.on("--delete-block-host=BLOCK", "Delete a host to block") { |block| action = :delete_block_host; args = [block] }
28
28
 
29
29
  opts.on("-b", "--block", "Block non-work website") { action = :block }
30
30
  opts.on("-r", "--restore", "Restore non-work website") { action = :restore }
@@ -44,7 +44,7 @@ host_file = "/dev/null" if dry
44
44
  ACTIONS = {
45
45
  list_block_hosts: lambda { puts config.block_hosts },
46
46
  add_block_host: lambda { config.add_block_host(*args) },
47
- delete_block_host: lambda { config.add_block_host(*args) },
47
+ delete_block_host: lambda { config.delete_block_host(*args) },
48
48
  block: lambda { Focus::Host.new(host_file).block!(config) },
49
49
  restore: lambda { Focus::Host.new(host_file).restore!(config) },
50
50
  help: lambda { puts options_parser }
data/lib/focus/config.rb CHANGED
@@ -50,7 +50,7 @@ module Focus
50
50
  end
51
51
 
52
52
  def delete_block_host(blocks)
53
- puts "This operation removes \"#{blocks}\" to the list of blocked hosts.".yellow
53
+ puts "This operation deletes \"#{blocks}\" to the list of blocked hosts.".yellow
54
54
  puts "This operation does not unblock the hosts. Execute -b to refresh the blocking or -r to reset it.".yellow
55
55
  blocks.split(",").each do |block|
56
56
  data = read
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: focus.rb
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.1.0
4
+ version: 1.1.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Arthur Poulet