webmaster_tools 0.1.5 → 0.1.6

Sign up to get free protection for your applications and to get access to all the features.
data/README.md CHANGED
@@ -35,6 +35,9 @@ We'll check out your contribution if you:
35
35
  We'll do our best to help you out with any contribution issues you may have.
36
36
 
37
37
 
38
+ ## Contributers
39
+ [Arthur D'Antonio III](https://github.com/ArthurD)
40
+
38
41
  ## License
39
42
 
40
43
  The license is included as LICENSE in this directory.
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.1.5
1
+ 0.1.6
@@ -88,9 +88,12 @@ class WebmasterTools
88
88
  end
89
89
  end
90
90
 
91
- def remove_url(url_with_file)
91
+ # Possible Removal Types are: ["PAGE", "PAGE_CACHE", "DIRECTORY"]
92
+ def remove_url(url_with_file, removal_type = "PAGE")
92
93
  url = CGI::escape norm_url(url_with_file)
93
94
  page = agent.get(REMOVAL % [url, CGI::escape(url_with_file)])
95
+
96
+ page.form.field_with(:name => 'removalmethod').value = removal_type
94
97
  page = agent.submit page.form
95
98
  files = page.search(".wmt-external-url").map { |n| File.basename(n.text) }
96
99
  raise "could not submit URL" unless files.include?(File.basename(url_with_file))