disavow_tool 0.1.0 → 0.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.
- checksums.yaml +4 -4
- data/Gemfile.lock +1 -1
- data/lib/disavow_tool.rb +3 -1
- data/lib/disavow_tool/command_options.rb +13 -2
- data/lib/disavow_tool/list.rb +1 -2
- data/lib/disavow_tool/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: c7ec191f824e770810f284c9893491f27468279a136bbfc075f8319e51f84c7a
|
|
4
|
+
data.tar.gz: 63626b8f6505c63e13930da9fb16b25d543256230ad149475d8edbc229a4b459
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 0e77f7322716892366f2c22c1af5c7d6a31a8d50e088322bca3b1620aedab22b66440eee819590baac8cdd2a32e5100735f96c7565ec7203b4751cad8622878b
|
|
7
|
+
data.tar.gz: 751b98ce7205bb45e3eb472c1e76d8262aedca76e2d18774faacd0985a8385ceaad7e3e447f7e8c558927a05cc0fc29dfdc7a1c22ffced73244589faf7027cfa
|
data/Gemfile.lock
CHANGED
data/lib/disavow_tool.rb
CHANGED
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
#!/usr/bin/ruby
|
|
2
2
|
require 'colorize'
|
|
3
3
|
require 'io/console'
|
|
4
|
+
require 'active_support/inflector'
|
|
5
|
+
require 'active_support/core_ext/object'
|
|
4
6
|
require_relative 'disavow_tool/config'
|
|
5
7
|
require_relative 'disavow_tool/version'
|
|
6
8
|
require_relative 'disavow_tool/command_options.rb'
|
|
@@ -9,8 +11,8 @@ require_relative 'disavow_tool/white_list.rb'
|
|
|
9
11
|
require_relative 'disavow_tool/imported_links.rb'
|
|
10
12
|
|
|
11
13
|
module DisavowTool
|
|
12
|
-
|
|
13
14
|
def self.run
|
|
15
|
+
|
|
14
16
|
puts "Importing new links".blue if OPTIONS.verbose
|
|
15
17
|
imported_links = ImportedLinks.new
|
|
16
18
|
|
|
@@ -18,7 +18,7 @@ module DisavowTool
|
|
|
18
18
|
opts.banner = "Usage: disavow.rb [options] --disavow FILE --import file_1,file_2,file_3 [--whitelist file1,file2,file3]"
|
|
19
19
|
opts.separator ""
|
|
20
20
|
opts.separator "Requited options:"
|
|
21
|
-
opts.on("-d","--disavow FILE",
|
|
21
|
+
opts.on("-d","--disavow FILE", "Disavow file as exported from Google Search Console") do |file|
|
|
22
22
|
options.disavow_file = file
|
|
23
23
|
end
|
|
24
24
|
opts.on("-i","--import file_1,file_2", Array, "List of URLS to analyse. The file must have one URL per line") do |file|
|
|
@@ -27,7 +27,7 @@ module DisavowTool
|
|
|
27
27
|
|
|
28
28
|
opts.separator ""
|
|
29
29
|
opts.separator "Optional options:"
|
|
30
|
-
opts.on("--whitelist file1,file2,file3", Array, "Enter any number of whitelisted files",
|
|
30
|
+
opts.on("-w", "--whitelist file1,file2,file3", Array, "Enter any number of whitelisted files",
|
|
31
31
|
"whitelisted files must have one URL per line") do |file|
|
|
32
32
|
options.whitelist = true
|
|
33
33
|
options.whitelist_files = file
|
|
@@ -55,9 +55,20 @@ module DisavowTool
|
|
|
55
55
|
end
|
|
56
56
|
|
|
57
57
|
opt_parser.parse!(args)
|
|
58
|
+
check_arguments(options)
|
|
58
59
|
options
|
|
59
60
|
end
|
|
61
|
+
|
|
62
|
+
def check_arguments(options)
|
|
63
|
+
raise "You must to specify one disallow file" if options.disavow_file.blank?
|
|
64
|
+
raise "You must to specify one import file" if options.import_files.blank?
|
|
65
|
+
if options.whitelist
|
|
66
|
+
raise "You need to specify at least one white list file" if options.whitelist_files.blank?
|
|
67
|
+
end
|
|
68
|
+
end
|
|
69
|
+
|
|
60
70
|
end
|
|
61
71
|
|
|
62
72
|
OPTIONS = Commands.parse_inputs
|
|
73
|
+
|
|
63
74
|
end
|
data/lib/disavow_tool/list.rb
CHANGED
data/lib/disavow_tool/version.rb
CHANGED